From 3bf68bfa123584862d4501b605779962c14f68d1 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Tue, 18 Nov 2025 14:36:33 +0100 Subject: [PATCH 1/8] feat: enhance health check robustness and observability Improve the device health check system to prevent blocking, enable graceful shutdown, and provide better error categorization. These changes address stability issues in production environments with multiple GPUs and bursty XID error scenarios. Signed-off-by: Carlos Eduardo Arango Gutierrez --- internal/plugin/server.go | 10 +- internal/rm/health.go | 298 +++++++++++++++--- internal/rm/health_test.go | 628 +++++++++++++++++++++++++++++++++++++ 3 files changed, 888 insertions(+), 48 deletions(-) diff --git a/internal/plugin/server.go b/internal/plugin/server.go index a9d4c8868..4f8387d45 100644 --- a/internal/plugin/server.go +++ b/internal/plugin/server.go @@ -46,6 +46,14 @@ const ( deviceListEnvVar = "NVIDIA_VISIBLE_DEVICES" deviceListAsVolumeMountsHostPath = "/dev/null" deviceListAsVolumeMountsContainerPathRoot = "/var/run/nvidia-container-devices" + + // healthChannelBufferSize defines the buffer capacity for the health + // channel. This is sized to handle bursts of unhealthy device reports + // without blocking the health check goroutine. With 8 GPUs and + // potential for multiple events per GPU (XID errors, ECC errors, etc.), + // a buffer of 64 provides ample headroom while using a power-of-2 size + // for cache-friendly alignment. + healthChannelBufferSize = 64 ) // nvidiaDevicePlugin implements the Kubernetes device plugin API @@ -108,7 +116,7 @@ func getPluginSocketPath(resource spec.ResourceName) string { func (plugin *nvidiaDevicePlugin) initialize() { plugin.server = grpc.NewServer([]grpc.ServerOption{}...) - plugin.health = make(chan *rm.Device) + plugin.health = make(chan *rm.Device, healthChannelBufferSize) plugin.stop = make(chan interface{}) } diff --git a/internal/rm/health.go b/internal/rm/health.go index 1f0fc5c41..9be461351 100644 --- a/internal/rm/health.go +++ b/internal/rm/health.go @@ -17,13 +17,17 @@ package rm import ( + "context" "fmt" "os" "strconv" "strings" + "sync" + "time" "github.com/NVIDIA/go-nvml/pkg/nvml" "k8s.io/klog/v2" + pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1" ) const ( @@ -40,8 +44,133 @@ const ( envEnableHealthChecks = "DP_ENABLE_HEALTHCHECKS" ) +// eventResult packages an NVML event with its return code for passing +// between the event receiver goroutine and the main processing loop. +type eventResult struct { + event nvml.EventData + ret nvml.Return +} + +// sendUnhealthyDevice sends a device to the unhealthy channel without +// blocking. If the channel is full, it logs an error and updates the device +// state directly. This prevents the health check goroutine from being blocked +// indefinitely if ListAndWatch is stalled. +func sendUnhealthyDevice(unhealthy chan<- *Device, d *Device) { + select { + case unhealthy <- d: + klog.V(2).Infof("Device %s sent to unhealthy channel", d.ID) + default: + // Channel is full - this indicates ListAndWatch is not consuming + // or the channel buffer is insufficient for the event rate + klog.Errorf("Health channel full (capacity=%d)! "+ + "Unable to report device %s as unhealthy. "+ + "ListAndWatch may be stalled or event rate is too high.", + cap(unhealthy), d.ID) + // Update device state directly as fallback + d.Health = pluginapi.Unhealthy + } +} + +// healthCheckStats tracks statistics about health check operations for +// observability and debugging. +type healthCheckStats struct { + startTime time.Time + eventsProcessed uint64 + devicesMarkedUnhealthy uint64 + errorCount uint64 + xidByType map[uint64]uint64 // XID code -> count + mu sync.Mutex +} + +// recordEvent increments the events processed counter and tracks XID +// distribution. +func (s *healthCheckStats) recordEvent(xid uint64) { + s.mu.Lock() + defer s.mu.Unlock() + s.eventsProcessed++ + if s.xidByType == nil { + s.xidByType = make(map[uint64]uint64) + } + s.xidByType[xid]++ +} + +// recordUnhealthy increments the devices marked unhealthy counter. +func (s *healthCheckStats) recordUnhealthy() { + s.mu.Lock() + defer s.mu.Unlock() + s.devicesMarkedUnhealthy++ +} + +// recordError increments the error counter. +func (s *healthCheckStats) recordError() { + s.mu.Lock() + defer s.mu.Unlock() + s.errorCount++ +} + +// report logs a summary of health check statistics. +func (s *healthCheckStats) report() { + s.mu.Lock() + defer s.mu.Unlock() + + uptime := time.Since(s.startTime) + klog.Infof("HealthCheck Stats: uptime=%v, events=%d, unhealthy=%d, errors=%d", + uptime.Round(time.Second), s.eventsProcessed, + s.devicesMarkedUnhealthy, s.errorCount) + + if len(s.xidByType) > 0 { + klog.Infof("HealthCheck XID distribution: %v", s.xidByType) + } +} + +// handleEventWaitError categorizes NVML errors and determines the +// appropriate action. Returns true if health checking should continue, +// false if it should terminate. +func (r *nvmlResourceManager) handleEventWaitError( + ret nvml.Return, + devices Devices, + unhealthy chan<- *Device, +) bool { + klog.Errorf("Error waiting for NVML event: %v (code: %d)", ret, ret) + + switch ret { + case nvml.ERROR_GPU_IS_LOST: + // Definitive hardware failure - mark all devices unhealthy + klog.Error("GPU_IS_LOST error: Marking all devices as unhealthy") + for _, d := range devices { + sendUnhealthyDevice(unhealthy, d) + } + return true // Continue checking - devices may recover + + case nvml.ERROR_UNINITIALIZED: + // NVML state corrupted - this shouldn't happen in event loop + klog.Error("NVML uninitialized error: This is unexpected, terminating health check") + return false // Fatal, exit health check + + case nvml.ERROR_UNKNOWN, nvml.ERROR_NOT_SUPPORTED: + // Potentially transient or driver issue + klog.Warningf("Transient NVML error (%v): Will retry on next iteration", ret) + return true // Continue checking + + default: + // Unknown error - be conservative and mark devices unhealthy + klog.Errorf("Unexpected NVML error %v: Marking all devices unhealthy conservatively", ret) + for _, d := range devices { + sendUnhealthyDevice(unhealthy, d) + } + return true // Continue checking + } +} + // CheckHealth performs health checks on a set of devices, writing to the 'unhealthy' channel with any unhealthy devices func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devices, unhealthy chan<- *Device) error { + // Initialize stats tracking + stats := &healthCheckStats{ + startTime: time.Now(), + xidByType: make(map[uint64]uint64), + } + defer stats.report() // Log stats summary on exit + xids := getDisabledHealthCheckXids() if xids.IsAllDisabled() { return nil @@ -62,6 +191,7 @@ func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devic }() klog.Infof("Ignoring the following XIDs for health checks: %v", xids) + klog.V(2).Infof("CheckHealth: Starting for %d devices", len(devices)) eventSet, ret := r.nvml.EventSetCreate() if ret != nvml.SUCCESS { @@ -80,7 +210,7 @@ func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devic uuid, gi, ci, err := r.getDevicePlacement(d) if err != nil { klog.Warningf("Could not determine device placement for %v: %v; Marking it unhealthy.", d.ID, err) - unhealthy <- d + sendUnhealthyDevice(unhealthy, d) continue } deviceIDToGiMap[d.ID] = gi @@ -90,14 +220,14 @@ func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devic gpu, ret := r.nvml.DeviceGetHandleByUUID(uuid) if ret != nvml.SUCCESS { klog.Infof("unable to get device handle from UUID: %v; marking it as unhealthy", ret) - unhealthy <- d + sendUnhealthyDevice(unhealthy, d) continue } supportedEvents, ret := gpu.GetSupportedEventTypes() if ret != nvml.SUCCESS { klog.Infof("unable to determine the supported events for %v: %v; marking it as unhealthy", d.ID, ret) - unhealthy <- d + sendUnhealthyDevice(unhealthy, d) continue } @@ -107,67 +237,141 @@ func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devic } if ret != nvml.SUCCESS { klog.Infof("Marking device %v as unhealthy: %v", d.ID, ret) - unhealthy <- d + sendUnhealthyDevice(unhealthy, d) } } + // Create context for coordinating shutdown + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + // Goroutine to watch for stop signal and cancel context + go func() { + <-stop + cancel() + }() + + // Start periodic stats reporting goroutine + go func() { + ticker := time.NewTicker(5 * time.Minute) + defer ticker.Stop() + for { + select { + case <-ctx.Done(): + return + case <-ticker.C: + stats.report() + } + } + }() + + // Event receive channel with small buffer + eventChan := make(chan eventResult, 10) + + // Start goroutine to receive NVML events + go func() { + defer close(eventChan) + for { + // Check if we should stop + select { + case <-ctx.Done(): + return + default: + } + + // Wait for NVML event with timeout + e, ret := eventSet.Wait(5000) + + // Try to send event result, but respect context cancellation + select { + case <-ctx.Done(): + return + case eventChan <- eventResult{event: e, ret: ret}: + } + } + }() + + // Main event processing loop for { select { - case <-stop: + case <-ctx.Done(): + klog.V(2).Info("Health check stopped cleanly") return nil - default: - } - e, ret := eventSet.Wait(5000) - if ret == nvml.ERROR_TIMEOUT { - continue - } - if ret != nvml.SUCCESS { - klog.Infof("Error waiting for event: %v; Marking all devices as unhealthy", ret) - for _, d := range devices { - unhealthy <- d + case result, ok := <-eventChan: + if !ok { + // Event channel closed, exit + return nil } - continue - } - if e.EventType != nvml.EventTypeXidCriticalError { - klog.Infof("Skipping non-nvmlEventTypeXidCriticalError event: %+v", e) - continue - } + // Handle timeout - just continue + if result.ret == nvml.ERROR_TIMEOUT { + continue + } - if xids.IsDisabled(e.EventData) { - klog.Infof("Skipping event %+v", e) - continue - } + // Handle NVML errors with granular error handling + if result.ret != nvml.SUCCESS { + stats.recordError() + shouldContinue := r.handleEventWaitError(result.ret, devices, unhealthy) + if !shouldContinue { + return fmt.Errorf("fatal NVML error: %v", result.ret) + } + continue + } - klog.Infof("Processing event %+v", e) - eventUUID, ret := e.Device.GetUUID() - if ret != nvml.SUCCESS { - // If we cannot reliably determine the device UUID, we mark all devices as unhealthy. - klog.Infof("Failed to determine uuid for event %v: %v; Marking all devices as unhealthy.", e, ret) - for _, d := range devices { - unhealthy <- d + e := result.event + + // Filter non-critical events + if e.EventType != nvml.EventTypeXidCriticalError { + klog.Infof("Skipping non-nvmlEventTypeXidCriticalError event: %+v", e) + continue } - continue - } - d, exists := parentToDeviceMap[eventUUID] - if !exists { - klog.Infof("Ignoring event for unexpected device: %v", eventUUID) - continue - } + // Check if this XID is disabled + if xids.IsDisabled(e.EventData) { + klog.Infof("Skipping event %+v", e) + continue + } - if d.IsMigDevice() && e.GpuInstanceId != 0xFFFFFFFF && e.ComputeInstanceId != 0xFFFFFFFF { - gi := deviceIDToGiMap[d.ID] - ci := deviceIDToCiMap[d.ID] - if gi != e.GpuInstanceId || ci != e.ComputeInstanceId { + klog.Infof("Processing event %+v", e) + + // Record event stats + stats.recordEvent(e.EventData) + + // Get device UUID from event + eventUUID, ret := e.Device.GetUUID() + if ret != nvml.SUCCESS { + // If we cannot reliably determine the device UUID, we mark all devices as unhealthy. + klog.Infof("Failed to determine uuid for event %v: %v; Marking all devices as unhealthy.", e, ret) + stats.recordError() + for _, d := range devices { + stats.recordUnhealthy() + sendUnhealthyDevice(unhealthy, d) + } continue } - klog.Infof("Event for mig device %v (gi=%v, ci=%v)", d.ID, gi, ci) - } - klog.Infof("XidCriticalError: Xid=%d on Device=%s; marking device as unhealthy.", e.EventData, d.ID) - unhealthy <- d + // Find the device that matches this event + d, exists := parentToDeviceMap[eventUUID] + if !exists { + klog.Infof("Ignoring event for unexpected device: %v", eventUUID) + continue + } + + // For MIG devices, verify the GI/CI matches + if d.IsMigDevice() && e.GpuInstanceId != 0xFFFFFFFF && e.ComputeInstanceId != 0xFFFFFFFF { + gi := deviceIDToGiMap[d.ID] + ci := deviceIDToCiMap[d.ID] + if gi != e.GpuInstanceId || ci != e.ComputeInstanceId { + continue + } + klog.Infof("Event for mig device %v (gi=%v, ci=%v)", d.ID, gi, ci) + } + + klog.Infof("XidCriticalError: Xid=%d on Device=%s; marking device as unhealthy.", e.EventData, d.ID) + stats.recordUnhealthy() + sendUnhealthyDevice(unhealthy, d) + } } } diff --git a/internal/rm/health_test.go b/internal/rm/health_test.go index 6f50dccb8..a547d6ce0 100644 --- a/internal/rm/health_test.go +++ b/internal/rm/health_test.go @@ -20,8 +20,16 @@ import ( "fmt" "strings" "testing" + "time" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" + "github.com/NVIDIA/go-nvml/pkg/nvml" + "github.com/NVIDIA/go-nvml/pkg/nvml/mock" + "github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100" "github.com/stretchr/testify/require" + + spec "github.com/NVIDIA/k8s-device-plugin/api/config/v1" + pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1" ) func TestNewHealthCheckXIDs(t *testing.T) { @@ -221,3 +229,623 @@ func TestGetDisabledHealthCheckXids(t *testing.T) { }) } } + +// Helper function to create a test resource manager with mock NVML +func newMockResourceManager(t *testing.T, mockNVML nvml.Interface, deviceCount int) *nvmlResourceManager { + t.Helper() + + _ = device.New(mockNVML) + + // Create minimal config + failOnInitError := false + config := &spec.Config{ + Flags: spec.Flags{ + CommandLineFlags: spec.CommandLineFlags{ + FailOnInitError: &failOnInitError, + }, + }, + } + + // Build device map with UUIDs matching the mock server + devices := make(Devices) + + // If mockNVML is a dgxa100 server, use its device UUIDs + if server, ok := mockNVML.(*dgxa100.Server); ok { + for i := 0; i < deviceCount && i < len(server.Devices); i++ { + device := server.Devices[i].(*dgxa100.Device) + deviceID := device.UUID + devices[deviceID] = &Device{ + Device: pluginapi.Device{ + ID: deviceID, + Health: pluginapi.Healthy, + }, + Index: fmt.Sprintf("%d", i), + } + } + } else { + // Fallback for non-dgxa100 mocks + for i := 0; i < deviceCount; i++ { + deviceID := fmt.Sprintf("GPU-%d", i) + devices[deviceID] = &Device{ + Device: pluginapi.Device{ + ID: deviceID, + Health: pluginapi.Healthy, + }, + Index: fmt.Sprintf("%d", i), + } + } + } + + return &nvmlResourceManager{ + resourceManager: resourceManager{ + config: config, + resource: "nvidia.com/gpu", + devices: devices, + }, + nvml: mockNVML, + } +} + +// mockDGXA100Setup configures the dgxa100 mock with common overrides +func mockDGXA100Setup(server *dgxa100.Server) { + for i, d := range server.Devices { + device := d.(*dgxa100.Device) + device.GetIndexFunc = func(idx int) func() (int, nvml.Return) { + return func() (int, nvml.Return) { + return idx, nvml.SUCCESS + } + }(i) + device.GetUUIDFunc = func(uuid string) func() (string, nvml.Return) { + return func() (string, nvml.Return) { + return uuid, nvml.SUCCESS + } + }(device.UUID) + + // Setup GetSupportedEventTypes - all devices support all event types + device.GetSupportedEventTypesFunc = func() (uint64, nvml.Return) { + return uint64(nvml.EventTypeXidCriticalError | nvml.EventTypeDoubleBitEccError | nvml.EventTypeSingleBitEccError), nvml.SUCCESS + } + + // Setup RegisterEvents - succeed by default + device.RegisterEventsFunc = func(u uint64, es nvml.EventSet) nvml.Return { + return nvml.SUCCESS + } + } + + // Setup DeviceGetHandleByUUID to return the correct device + server.DeviceGetHandleByUUIDFunc = func(uuid string) (nvml.Device, nvml.Return) { + for _, d := range server.Devices { + device := d.(*dgxa100.Device) + if device.UUID == uuid { + return device, nvml.SUCCESS + } + } + return nil, nvml.ERROR_INVALID_ARGUMENT + } +} + +// Test 1: Buffered Channel Capacity +func TestCheckHealth_Phase1_BufferedChannelCapacity(t *testing.T) { + healthChan := make(chan *Device, 64) + require.Equal(t, 64, cap(healthChan), "Health channel should have capacity 64") +} + +// Test 2: sendUnhealthyDevice - Successful Send +func TestSendUnhealthyDevice_Success(t *testing.T) { + healthChan := make(chan *Device, 64) + device := &Device{ + Device: pluginapi.Device{ + ID: "GPU-0", + Health: pluginapi.Healthy, + }, + } + + sendUnhealthyDevice(healthChan, device) + + select { + case d := <-healthChan: + require.Equal(t, "GPU-0", d.ID) + case <-time.After(100 * time.Millisecond): + t.Fatal("Device not sent to channel") + } +} + +// Test 3: sendUnhealthyDevice - Channel Full +func TestSendUnhealthyDevice_Phase1_ChannelFull(t *testing.T) { + healthChan := make(chan *Device, 2) + + // Fill the channel + healthChan <- &Device{Device: pluginapi.Device{ID: "dummy1"}} + healthChan <- &Device{Device: pluginapi.Device{ID: "dummy2"}} + + device := &Device{ + Device: pluginapi.Device{ + ID: "GPU-0", + Health: pluginapi.Healthy, + }, + } + + // This should not block + done := make(chan bool) + go func() { + sendUnhealthyDevice(healthChan, device) + done <- true + }() + + select { + case <-done: + // Good - didn't block + require.Equal(t, pluginapi.Unhealthy, device.Health, + "Device health should be updated directly when channel is full") + case <-time.After(100 * time.Millisecond): + t.Fatal("sendUnhealthyDevice blocked on full channel") + } +} + +// Test 4: Graceful Stop Signal +func TestCheckHealth_Phase1_GracefulStop(t *testing.T) { + mockNVML := dgxa100.New() + mockDGXA100Setup(mockNVML) + + // Mock EventSet that always times out (quiet system) + mockNVML.EventSetCreateFunc = func() (nvml.EventSet, nvml.Return) { + eventSet := &mock.EventSet{ + WaitFunc: func(u uint32) (nvml.EventData, nvml.Return) { + return nvml.EventData{}, nvml.ERROR_TIMEOUT + }, + FreeFunc: func() nvml.Return { + return nvml.SUCCESS + }, + } + return eventSet, nvml.SUCCESS + } + + rm := newMockResourceManager(t, mockNVML, 8) + + healthChan := make(chan *Device, 64) + stopChan := make(chan interface{}) + + // Start checkHealth + errChan := make(chan error, 1) + go func() { + errChan <- rm.checkHealth(stopChan, rm.devices, healthChan) + }() + + // Let it run briefly + time.Sleep(100 * time.Millisecond) + + // Send stop signal + stopTime := time.Now() + close(stopChan) + + // Should stop quickly + select { + case err := <-errChan: + elapsed := time.Since(stopTime) + require.NoError(t, err, "checkHealth should stop cleanly") + require.Less(t, elapsed.Milliseconds(), int64(500), + "Should stop within 500ms, took %v", elapsed) + t.Logf("✓ Stopped cleanly in %v", elapsed) + case <-time.After(1 * time.Second): + t.Fatal("checkHealth did not stop within 1 second") + } +} + +// Test 5: XID Event Processing +func TestCheckHealth_Phase1_XIDEventProcessing(t *testing.T) { + testCases := []struct { + name string + xid uint64 + expectMarked bool + disableXIDs string + }{ + { + name: "Critical XID 79 marks unhealthy", + xid: 79, // GPU fallen off bus + expectMarked: true, + }, + { + name: "Application XID 13 ignored (default)", + xid: 13, // Graphics engine exception (default ignored) + expectMarked: false, + }, + { + name: "Critical XID 48 marks unhealthy", + xid: 48, // DBE error + expectMarked: true, + }, + { + name: "Disabled XID not marked", + xid: 79, + disableXIDs: "79", + expectMarked: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + if tc.disableXIDs != "" { + t.Setenv(envDisableHealthChecks, tc.disableXIDs) + } + + mockNVML := dgxa100.New() + mockDGXA100Setup(mockNVML) + + eventSent := false + mockNVML.EventSetCreateFunc = func() (nvml.EventSet, nvml.Return) { + eventSet := &mock.EventSet{ + WaitFunc: func(u uint32) (nvml.EventData, nvml.Return) { + if !eventSent { + eventSent = true + return nvml.EventData{ + EventType: nvml.EventTypeXidCriticalError, + EventData: tc.xid, + Device: mockNVML.Devices[0], + }, nvml.SUCCESS + } + // After one event, just timeout + return nvml.EventData{}, nvml.ERROR_TIMEOUT + }, + FreeFunc: func() nvml.Return { + return nvml.SUCCESS + }, + } + return eventSet, nvml.SUCCESS + } + + rm := newMockResourceManager(t, mockNVML, 8) + + healthChan := make(chan *Device, 64) + stopChan := make(chan interface{}) + + go func() { + _ = rm.checkHealth(stopChan, rm.devices, healthChan) + }() + + // Wait for event processing + time.Sleep(200 * time.Millisecond) + close(stopChan) + + // Check if device was marked unhealthy + select { + case d := <-healthChan: + if tc.expectMarked { + require.NotNil(t, d, "Expected device to be marked unhealthy") + t.Logf("✓ Device %s correctly marked unhealthy for XID-%d", d.ID, tc.xid) + } else { + t.Fatalf("Device marked unhealthy but shouldn't be for XID-%d", tc.xid) + } + case <-time.After(300 * time.Millisecond): + if tc.expectMarked { + t.Fatalf("Expected device to be marked unhealthy for XID-%d", tc.xid) + } else { + t.Logf("✓ Correctly ignored XID-%d", tc.xid) + } + } + }) + } +} + +// Test 6: Error Handling - GPU Lost +func TestCheckHealth_Phase1_ErrorHandling_GPULost(t *testing.T) { + mockNVML := dgxa100.New() + mockDGXA100Setup(mockNVML) + + errorSent := false + mockNVML.EventSetCreateFunc = func() (nvml.EventSet, nvml.Return) { + eventSet := &mock.EventSet{ + WaitFunc: func(u uint32) (nvml.EventData, nvml.Return) { + if !errorSent { + errorSent = true + // Simulate GPU lost error + return nvml.EventData{}, nvml.ERROR_GPU_IS_LOST + } + return nvml.EventData{}, nvml.ERROR_TIMEOUT + }, + FreeFunc: func() nvml.Return { + return nvml.SUCCESS + }, + } + return eventSet, nvml.SUCCESS + } + + rm := newMockResourceManager(t, mockNVML, 8) + + healthChan := make(chan *Device, 64) + stopChan := make(chan interface{}) + + go func() { + _ = rm.checkHealth(stopChan, rm.devices, healthChan) + }() + + // Wait for error processing + time.Sleep(200 * time.Millisecond) + + // Drain channel and count unhealthy devices + unhealthyCount := 0 + timeout := time.After(500 * time.Millisecond) +drainLoop: + for { + select { + case <-healthChan: + unhealthyCount++ + case <-timeout: + break drainLoop + } + } + + close(stopChan) + + require.Equal(t, len(rm.devices), unhealthyCount, + "All %d devices should be marked unhealthy on GPU_LOST error, got %d", + len(rm.devices), unhealthyCount) + t.Logf("✓ All %d devices correctly marked unhealthy on GPU_LOST", unhealthyCount) +} + +// Test 7: Error Handling - Transient Errors +func TestCheckHealth_Phase1_ErrorHandling_Transient(t *testing.T) { + mockNVML := dgxa100.New() + mockDGXA100Setup(mockNVML) + + errorSent := false + mockNVML.EventSetCreateFunc = func() (nvml.EventSet, nvml.Return) { + eventSet := &mock.EventSet{ + WaitFunc: func(u uint32) (nvml.EventData, nvml.Return) { + if !errorSent { + errorSent = true + // Simulate transient error + return nvml.EventData{}, nvml.ERROR_UNKNOWN + } + return nvml.EventData{}, nvml.ERROR_TIMEOUT + }, + FreeFunc: func() nvml.Return { + return nvml.SUCCESS + }, + } + return eventSet, nvml.SUCCESS + } + + rm := newMockResourceManager(t, mockNVML, 8) + + healthChan := make(chan *Device, 64) + stopChan := make(chan interface{}) + + go func() { + _ = rm.checkHealth(stopChan, rm.devices, healthChan) + }() + + // Wait for error processing + time.Sleep(200 * time.Millisecond) + close(stopChan) + + // Should not mark devices unhealthy for transient errors + select { + case d := <-healthChan: + t.Fatalf("Device %s marked unhealthy for transient error, but shouldn't be", d.ID) + case <-time.After(300 * time.Millisecond): + t.Log("✓ Correctly handled transient error without marking devices unhealthy") + } +} + +// Test 8: Stats Collection +func TestCheckHealth_StatsCollection(t *testing.T) { + stats := &healthCheckStats{ + startTime: time.Now(), + xidByType: make(map[uint64]uint64), + } + + // Record some events + stats.recordEvent(79) + stats.recordEvent(48) + stats.recordEvent(79) // Duplicate + stats.recordUnhealthy() + stats.recordUnhealthy() + stats.recordError() + + require.Equal(t, uint64(3), stats.eventsProcessed) + require.Equal(t, uint64(2), stats.devicesMarkedUnhealthy) + require.Equal(t, uint64(1), stats.errorCount) + require.Equal(t, uint64(2), stats.xidByType[79]) + require.Equal(t, uint64(1), stats.xidByType[48]) + + t.Log("✓ Stats correctly collected") +} + +// Test 9: Multiple XIDs in Sequence +func TestCheckHealth_MultipleXIDsInSequence(t *testing.T) { + mockNVML := dgxa100.New() + mockDGXA100Setup(mockNVML) + + xidsToSend := []uint64{79, 48, 64} + xidIndex := 0 + + mockNVML.EventSetCreateFunc = func() (nvml.EventSet, nvml.Return) { + eventSet := &mock.EventSet{ + WaitFunc: func(u uint32) (nvml.EventData, nvml.Return) { + if xidIndex < len(xidsToSend) { + xid := xidsToSend[xidIndex] + deviceIdx := xidIndex % 8 // Spread across devices + xidIndex++ + return nvml.EventData{ + EventType: nvml.EventTypeXidCriticalError, + EventData: xid, + Device: mockNVML.Devices[deviceIdx], + }, nvml.SUCCESS + } + return nvml.EventData{}, nvml.ERROR_TIMEOUT + }, + FreeFunc: func() nvml.Return { + return nvml.SUCCESS + }, + } + return eventSet, nvml.SUCCESS + } + + rm := newMockResourceManager(t, mockNVML, 8) + + healthChan := make(chan *Device, 64) + stopChan := make(chan interface{}) + + go func() { + _ = rm.checkHealth(stopChan, rm.devices, healthChan) + }() + + time.Sleep(300 * time.Millisecond) + close(stopChan) + + // Should have received 3 unhealthy notifications + unhealthyCount := 0 + timeout := time.After(500 * time.Millisecond) +drainLoop: + for { + select { + case <-healthChan: + unhealthyCount++ + case <-timeout: + break drainLoop + } + } + + require.Equal(t, len(xidsToSend), unhealthyCount, + "Should have received %d unhealthy notifications, got %d", + len(xidsToSend), unhealthyCount) + t.Logf("✓ Correctly processed %d XIDs in sequence", unhealthyCount) +} + +// Test 10: Device Registration Errors +func TestCheckHealth_Phase1_DeviceRegistrationErrors(t *testing.T) { + mockNVML := dgxa100.New() + mockDGXA100Setup(mockNVML) + + // Get device 3's UUID before modifying + device3 := mockNVML.Devices[3].(*dgxa100.Device) + device3UUID := device3.UUID + + // Make device 3 fail registration + device3.RegisterEventsFunc = func(u uint64, es nvml.EventSet) nvml.Return { + return nvml.ERROR_NOT_SUPPORTED + } + + // Keep EventSet waiting + mockNVML.EventSetCreateFunc = func() (nvml.EventSet, nvml.Return) { + eventSet := &mock.EventSet{ + WaitFunc: func(u uint32) (nvml.EventData, nvml.Return) { + return nvml.EventData{}, nvml.ERROR_TIMEOUT + }, + FreeFunc: func() nvml.Return { + return nvml.SUCCESS + }, + } + return eventSet, nvml.SUCCESS + } + + rm := newMockResourceManager(t, mockNVML, 8) + + healthChan := make(chan *Device, 64) + stopChan := make(chan interface{}) + + go func() { + _ = rm.checkHealth(stopChan, rm.devices, healthChan) + }() + + time.Sleep(200 * time.Millisecond) + close(stopChan) + + // Device 3 should be marked unhealthy during registration + unhealthyDevices := []string{} + timeout := time.After(300 * time.Millisecond) +drainLoop: + for { + select { + case d := <-healthChan: + unhealthyDevices = append(unhealthyDevices, d.ID) + case <-timeout: + break drainLoop + } + } + + require.Contains(t, unhealthyDevices, device3UUID, + "Device 3 (%s) with registration error should be marked unhealthy", device3UUID) + t.Logf("✓ Device %s with registration error correctly marked unhealthy", device3UUID) +} + +// Test 11: handleEventWaitError behavior for different error codes +func TestHandleEventWaitError_Phase1(t *testing.T) { + testCases := []struct { + name string + errorCode nvml.Return + expectContinue bool + expectAllUnhealthy bool + }{ + { + name: "GPU_IS_LOST marks all unhealthy and continues", + errorCode: nvml.ERROR_GPU_IS_LOST, + expectContinue: true, + expectAllUnhealthy: true, + }, + { + name: "UNINITIALIZED terminates", + errorCode: nvml.ERROR_UNINITIALIZED, + expectContinue: false, + expectAllUnhealthy: false, + }, + { + name: "UNKNOWN continues without marking unhealthy", + errorCode: nvml.ERROR_UNKNOWN, + expectContinue: true, + expectAllUnhealthy: false, + }, + { + name: "NOT_SUPPORTED continues without marking unhealthy", + errorCode: nvml.ERROR_NOT_SUPPORTED, + expectContinue: true, + expectAllUnhealthy: false, + }, + { + name: "Other error marks all unhealthy and continues", + errorCode: nvml.ERROR_INSUFFICIENT_POWER, + expectContinue: true, + expectAllUnhealthy: true, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + mockNVML := dgxa100.New() + mockDGXA100Setup(mockNVML) + + rm := newMockResourceManager(t, mockNVML, 3) + + healthChan := make(chan *Device, 64) + + shouldContinue := rm.handleEventWaitError(tc.errorCode, rm.devices, healthChan) + + require.Equal(t, tc.expectContinue, shouldContinue, + "Error %v should return continue=%v", tc.errorCode, tc.expectContinue) + + // Check if devices were marked unhealthy + unhealthyCount := 0 + timeout := time.After(100 * time.Millisecond) + drainLoop: + for { + select { + case <-healthChan: + unhealthyCount++ + case <-timeout: + break drainLoop + } + } + + if tc.expectAllUnhealthy { + require.Equal(t, len(rm.devices), unhealthyCount, + "All devices should be marked unhealthy for error %v", tc.errorCode) + } else { + require.Equal(t, 0, unhealthyCount, + "No devices should be marked unhealthy for error %v", tc.errorCode) + } + + t.Logf("✓ Error %v: continue=%v, unhealthy=%d", + tc.errorCode, shouldContinue, unhealthyCount) + }) + } +} From 1de31579c8574e0a7f2fa55677ed3dc04d90aa04 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Tue, 18 Nov 2025 15:36:52 +0100 Subject: [PATCH 2/8] feat: health check robustness and auto-recovery Add buffered channels (64), non-blocking writes, graceful shutdown, stats collection, and automatic device recovery detection (30s). Signed-off-by: Carlos Eduardo Arango Gutierrez --- internal/plugin/server.go | 102 +- internal/plugin/server_test.go | 95 + internal/rm/devices.go | 41 + internal/rm/health.go | 1 + internal/rm/health_test.go | 140 +- internal/rm/nvml_manager.go | 42 + internal/rm/rm.go | 1 + internal/rm/rm_mock.go | 45 + internal/rm/tegra_manager.go | 8 + .../go-nvml/pkg/nvml/mock/computeinstance.go | 105 + .../NVIDIA/go-nvml/pkg/nvml/mock/device.go | 10524 ++++++++++ .../go-nvml/pkg/nvml/mock/dgxa100/dgxa100.go | 381 + .../pkg/nvml/mock/dgxa100/mig-profile.go | 471 + .../NVIDIA/go-nvml/pkg/nvml/mock/eventset.go | 112 + .../pkg/nvml/mock/extendedinterface.go | 75 + .../NVIDIA/go-nvml/pkg/nvml/mock/gpmsample.go | 162 + .../go-nvml/pkg/nvml/mock/gpuinstance.go | 785 + .../NVIDIA/go-nvml/pkg/nvml/mock/interface.go | 17317 ++++++++++++++++ .../NVIDIA/go-nvml/pkg/nvml/mock/unit.go | 304 + .../go-nvml/pkg/nvml/mock/vgpuinstance.go | 933 + .../go-nvml/pkg/nvml/mock/vgputypeid.go | 621 + vendor/modules.txt | 2 + 22 files changed, 32262 insertions(+), 5 deletions(-) create mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/computeinstance.go create mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go create mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/dgxa100.go create mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/mig-profile.go create mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/eventset.go create mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/extendedinterface.go create mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpmsample.go create mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpuinstance.go create mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go create mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/unit.go create mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go create mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgputypeid.go diff --git a/internal/plugin/server.go b/internal/plugin/server.go index 4f8387d45..27bd97a6e 100644 --- a/internal/plugin/server.go +++ b/internal/plugin/server.go @@ -72,6 +72,10 @@ type nvidiaDevicePlugin struct { health chan *rm.Device stop chan interface{} + // deviceListUpdate is used to trigger ListAndWatch to send updated device + // list to kubelet (e.g., when devices recover from unhealthy state) + deviceListUpdate chan struct{} + imexChannels imex.Channels mps mpsOptions @@ -118,13 +122,18 @@ func (plugin *nvidiaDevicePlugin) initialize() { plugin.server = grpc.NewServer([]grpc.ServerOption{}...) plugin.health = make(chan *rm.Device, healthChannelBufferSize) plugin.stop = make(chan interface{}) + plugin.deviceListUpdate = make(chan struct{}, 1) } func (plugin *nvidiaDevicePlugin) cleanup() { close(plugin.stop) + if plugin.deviceListUpdate != nil { + close(plugin.deviceListUpdate) + } plugin.server = nil plugin.health = nil plugin.stop = nil + plugin.deviceListUpdate = nil } // Devices returns the full set of devices associated with the plugin. @@ -164,6 +173,9 @@ func (plugin *nvidiaDevicePlugin) Start(kubeletSocket string) error { } }() + // Start recovery worker to detect when unhealthy devices become healthy + go plugin.runRecoveryWorker() + return nil } @@ -271,7 +283,9 @@ func (plugin *nvidiaDevicePlugin) GetDevicePluginOptions(context.Context, *plugi return options, nil } -// ListAndWatch lists devices and update that list according to the health status +// ListAndWatch lists devices and update that list according to the health +// status. This now supports device recovery: when devices that were marked +// unhealthy recover, they are automatically re-advertised to kubelet. func (plugin *nvidiaDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error { if err := s.Send(&pluginapi.ListAndWatchResponse{Devices: plugin.apiDevices()}); err != nil { return err @@ -282,9 +296,17 @@ func (plugin *nvidiaDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.D case <-plugin.stop: return nil case d := <-plugin.health: - // FIXME: there is no way to recover from the Unhealthy state. + // Device marked unhealthy by health check d.Health = pluginapi.Unhealthy - klog.Infof("'%s' device marked unhealthy: %s", plugin.rm.Resource(), d.ID) + klog.Infof("'%s' device marked unhealthy: %s (reason: %s)", + plugin.rm.Resource(), d.ID, d.UnhealthyReason) + if err := s.Send(&pluginapi.ListAndWatchResponse{Devices: plugin.apiDevices()}); err != nil { + return nil + } + case <-plugin.deviceListUpdate: + // Device recovery or other device list change + klog.Infof("'%s' device list updated, notifying kubelet", + plugin.rm.Resource()) if err := s.Send(&pluginapi.ListAndWatchResponse{Devices: plugin.apiDevices()}); err != nil { return nil } @@ -520,6 +542,80 @@ func (plugin *nvidiaDevicePlugin) updateResponseForDeviceMounts(response *plugin } } +// runRecoveryWorker periodically checks if unhealthy devices have recovered +// and notifies kubelet when they do. +func (plugin *nvidiaDevicePlugin) runRecoveryWorker() { + const recoveryInterval = 30 * time.Second + + ticker := time.NewTicker(recoveryInterval) + defer ticker.Stop() + + klog.V(2).Infof("Recovery worker started for '%s' (interval=%v)", + plugin.rm.Resource(), recoveryInterval) + + for { + select { + case <-plugin.stop: + klog.V(2).Info("Recovery worker stopped") + return + case <-ticker.C: + plugin.checkForRecoveredDevices() + } + } +} + +// checkForRecoveredDevices checks all unhealthy devices to see if they have +// recovered. If any have recovered, triggers a device list update to +// kubelet. +func (plugin *nvidiaDevicePlugin) checkForRecoveredDevices() { + recoveredDevices := []*rm.Device{} + + for _, d := range plugin.rm.Devices() { + if !d.IsUnhealthy() { + continue + } + + // Increment recovery attempts + d.RecoveryAttempts++ + + // Check if device has recovered + healthy, err := plugin.rm.CheckDeviceHealth(d) + if err != nil { + klog.V(4).Infof("Device %s recovery check failed (attempt %d): %v", + d.ID, d.RecoveryAttempts, err) + continue + } + + if healthy { + klog.Infof("Device %s has RECOVERED! Was unhealthy for %v (reason: %s)", + d.ID, d.UnhealthyDuration(), d.UnhealthyReason) + d.MarkHealthy() + recoveredDevices = append(recoveredDevices, d) + } else { + klog.V(3).Infof("Device %s still unhealthy (attempt %d, duration %v)", + d.ID, d.RecoveryAttempts, d.UnhealthyDuration()) + } + } + + // If any devices recovered, notify ListAndWatch + if len(recoveredDevices) > 0 { + klog.Infof("Total recovered devices: %d", len(recoveredDevices)) + plugin.triggerDeviceListUpdate() + } +} + +// triggerDeviceListUpdate sends a signal to ListAndWatch to send an updated +// device list to kubelet. Uses a buffered channel with non-blocking send to +// avoid blocking the recovery worker. +func (plugin *nvidiaDevicePlugin) triggerDeviceListUpdate() { + select { + case plugin.deviceListUpdate <- struct{}{}: + klog.V(3).Info("Device list update triggered") + default: + klog.V(4).Info("Device list update already pending, skipping") + } +} + func (plugin *nvidiaDevicePlugin) apiDeviceSpecs(devRoot string, ids []string) []*pluginapi.DeviceSpec { optional := map[string]bool{ "/dev/nvidiactl": true, diff --git a/internal/plugin/server_test.go b/internal/plugin/server_test.go index b9bddbb6a..dd257f8e4 100644 --- a/internal/plugin/server_test.go +++ b/internal/plugin/server_test.go @@ -18,7 +18,9 @@ package plugin import ( "context" + "fmt" "testing" + "time" "github.com/stretchr/testify/require" pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1" @@ -254,3 +256,96 @@ func TestCDIAllocateResponse(t *testing.T) { func ptr[T any](x T) *T { return &x } + +func TestTriggerDeviceListUpdate_Phase2(t *testing.T) { + plugin := &nvidiaDevicePlugin{ + deviceListUpdate: make(chan struct{}, 1), + } + + // First trigger should send signal + plugin.triggerDeviceListUpdate() + select { + case <-plugin.deviceListUpdate: + t.Log("✓ Device list update signal sent") + case <-time.After(100 * time.Millisecond): + t.Fatal("Signal not sent") + } + + // Second trigger with pending signal should not block + plugin.triggerDeviceListUpdate() + plugin.triggerDeviceListUpdate() // Should not block + t.Log("✓ triggerDeviceListUpdate doesn't block when signal pending") +} + +func TestCheckForRecoveredDevices_Phase2(t *testing.T) { + // Create persistent device map + devices := rm.Devices{ + "GPU-0": &rm.Device{ + Device: pluginapi.Device{ + ID: "GPU-0", + Health: pluginapi.Unhealthy, + }, + UnhealthyReason: "XID-79", + }, + "GPU-1": &rm.Device{ + Device: pluginapi.Device{ + ID: "GPU-1", + Health: pluginapi.Unhealthy, + }, + UnhealthyReason: "XID-48", + }, + "GPU-2": &rm.Device{ + Device: pluginapi.Device{ + ID: "GPU-2", + Health: pluginapi.Healthy, + }, + }, + } + + // Create mock resource manager with persistent devices + mockRM := &rm.ResourceManagerMock{ + DevicesFunc: func() rm.Devices { + return devices + }, + CheckDeviceHealthFunc: func(d *rm.Device) (bool, error) { + // GPU-0 recovers, GPU-1 stays unhealthy + if d.ID == "GPU-0" { + return true, nil + } + return false, fmt.Errorf("still unhealthy") + }, + } + + plugin := &nvidiaDevicePlugin{ + rm: mockRM, + deviceListUpdate: make(chan struct{}, 1), + } + + plugin.checkForRecoveredDevices() + + // Verify GPU-0 recovered + gpu0 := devices["GPU-0"] + require.Equal(t, pluginapi.Healthy, gpu0.Health, "GPU-0 should be healthy") + require.Equal(t, "", gpu0.UnhealthyReason) + t.Logf("✓ GPU-0 recovered: Health=%s, Reason=%s", gpu0.Health, gpu0.UnhealthyReason) + + // Verify GPU-1 still unhealthy + gpu1 := devices["GPU-1"] + require.Equal(t, pluginapi.Unhealthy, gpu1.Health, "GPU-1 should still be unhealthy") + require.Equal(t, 1, gpu1.RecoveryAttempts, "GPU-1 recovery attempts should increment") + t.Logf("✓ GPU-1 still unhealthy: attempts=%d", gpu1.RecoveryAttempts) + + // Verify GPU-2 unchanged + gpu2 := devices["GPU-2"] + require.Equal(t, pluginapi.Healthy, gpu2.Health) + require.Equal(t, 0, gpu2.RecoveryAttempts, "Healthy device shouldn't be probed") + t.Log("✓ GPU-2 unchanged (was already healthy)") + + // Verify deviceListUpdate was triggered + select { + case <-plugin.deviceListUpdate: + t.Log("✓ Device list update triggered for recovery") + case <-time.After(100 * time.Millisecond): + t.Fatal("Device list update not triggered") + } +} diff --git a/internal/rm/devices.go b/internal/rm/devices.go index 1049820e8..c05451477 100644 --- a/internal/rm/devices.go +++ b/internal/rm/devices.go @@ -20,6 +20,7 @@ import ( "fmt" "strconv" "strings" + "time" "k8s.io/klog/v2" pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1" @@ -35,6 +36,12 @@ type Device struct { // Replicas stores the total number of times this device is replicated. // If this is 0 or 1 then the device is not shared. Replicas int + + // Health tracking fields for recovery detection + LastHealthyTime time.Time // Last time device was confirmed healthy + LastUnhealthyTime time.Time // When device became unhealthy + UnhealthyReason string // Human-readable reason (e.g., "XID-79") + RecoveryAttempts int // Number of recovery probes attempted } // deviceInfo defines the information the required to construct a Device @@ -239,6 +246,40 @@ func (d *Device) GetUUID() string { return AnnotatedID(d.ID).GetID() } +// MarkUnhealthy marks the device as unhealthy and records the reason and +// timestamp. This should be called when a health check detects a device +// failure (e.g., XID error). +func (d *Device) MarkUnhealthy(reason string) { + d.Health = pluginapi.Unhealthy + d.LastUnhealthyTime = time.Now() + d.UnhealthyReason = reason + d.RecoveryAttempts = 0 +} + +// MarkHealthy marks the device as healthy and clears unhealthy state. This +// should be called when recovery detection confirms the device is working +// again. +func (d *Device) MarkHealthy() { + d.Health = pluginapi.Healthy + d.LastHealthyTime = time.Now() + d.UnhealthyReason = "" + d.RecoveryAttempts = 0 +} + +// IsUnhealthy returns true if the device is currently marked as unhealthy. +func (d *Device) IsUnhealthy() bool { + return d.Health == pluginapi.Unhealthy +} + +// UnhealthyDuration returns how long the device has been unhealthy. Returns +// zero duration if the device is healthy. +func (d *Device) UnhealthyDuration() time.Duration { + if !d.IsUnhealthy() { + return 0 + } + return time.Since(d.LastUnhealthyTime) +} + // NewAnnotatedID creates a new AnnotatedID from an ID and a replica number. func NewAnnotatedID(id string, replica int) AnnotatedID { return AnnotatedID(fmt.Sprintf("%s::%d", id, replica)) diff --git a/internal/rm/health.go b/internal/rm/health.go index 9be461351..38ceb4f9c 100644 --- a/internal/rm/health.go +++ b/internal/rm/health.go @@ -370,6 +370,7 @@ func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devic klog.Infof("XidCriticalError: Xid=%d on Device=%s; marking device as unhealthy.", e.EventData, d.ID) stats.recordUnhealthy() + d.MarkUnhealthy(fmt.Sprintf("XID-%d", e.EventData)) sendUnhealthyDevice(unhealthy, d) } } diff --git a/internal/rm/health_test.go b/internal/rm/health_test.go index a547d6ce0..5b2a291e8 100644 --- a/internal/rm/health_test.go +++ b/internal/rm/health_test.go @@ -22,13 +22,14 @@ import ( "testing" "time" + spec "github.com/NVIDIA/k8s-device-plugin/api/config/v1" + "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" "github.com/NVIDIA/go-nvml/pkg/nvml" "github.com/NVIDIA/go-nvml/pkg/nvml/mock" "github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100" - "github.com/stretchr/testify/require" - spec "github.com/NVIDIA/k8s-device-plugin/api/config/v1" + "github.com/stretchr/testify/require" pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1" ) @@ -849,3 +850,138 @@ func TestHandleEventWaitError_Phase1(t *testing.T) { }) } } + +func TestDevice_Phase2_MarkUnhealthy(t *testing.T) { + device := &Device{ + Device: pluginapi.Device{ + ID: "GPU-test", + Health: pluginapi.Healthy, + }, + } + + device.MarkUnhealthy("XID-79") + + require.Equal(t, pluginapi.Unhealthy, device.Health) + require.Equal(t, "XID-79", device.UnhealthyReason) + require.Equal(t, 0, device.RecoveryAttempts) + require.False(t, device.LastUnhealthyTime.IsZero(), "LastUnhealthyTime should be set") + t.Log("✓ MarkUnhealthy correctly updates device state") +} + +func TestDevice_Phase2_MarkHealthy(t *testing.T) { + device := &Device{ + Device: pluginapi.Device{ + ID: "GPU-test", + Health: pluginapi.Unhealthy, + }, + UnhealthyReason: "XID-79", + RecoveryAttempts: 5, + } + + device.MarkHealthy() + + require.Equal(t, pluginapi.Healthy, device.Health) + require.Equal(t, "", device.UnhealthyReason) + require.Equal(t, 0, device.RecoveryAttempts) + require.False(t, device.LastHealthyTime.IsZero(), "LastHealthyTime should be set") + t.Log("✓ MarkHealthy correctly clears unhealthy state") +} + +func TestDevice_Phase2_IsUnhealthy(t *testing.T) { + healthyDevice := &Device{ + Device: pluginapi.Device{Health: pluginapi.Healthy}, + } + unhealthyDevice := &Device{ + Device: pluginapi.Device{Health: pluginapi.Unhealthy}, + } + + require.False(t, healthyDevice.IsUnhealthy()) + require.True(t, unhealthyDevice.IsUnhealthy()) + t.Log("✓ IsUnhealthy correctly reports device state") +} + +func TestDevice_Phase2_UnhealthyDuration(t *testing.T) { + device := &Device{ + Device: pluginapi.Device{ + ID: "GPU-test", + Health: pluginapi.Unhealthy, + }, + LastUnhealthyTime: time.Now().Add(-5 * time.Minute), + } + + duration := device.UnhealthyDuration() + require.Greater(t, duration, 4*time.Minute, + "Device should report ~5 minutes unhealthy") + require.Less(t, duration, 6*time.Minute, + "Duration should be approximately 5 minutes") + + // Healthy device should return zero duration + device.MarkHealthy() + require.Equal(t, time.Duration(0), device.UnhealthyDuration()) + t.Log("✓ UnhealthyDuration correctly calculates time") +} + +func TestCheckDeviceHealth_Phase2_DeviceRecovers(t *testing.T) { + mockNVML := dgxa100.New() + mockDGXA100Setup(mockNVML) + + // Device responds successfully + mockNVML.Devices[0].(*dgxa100.Device).GetNameFunc = func() (string, nvml.Return) { + return "Tesla V100", nvml.SUCCESS + } + + rm := newMockResourceManager(t, mockNVML, 1) + deviceUUID := mockNVML.Devices[0].(*dgxa100.Device).UUID + device := rm.devices[deviceUUID] + device.MarkUnhealthy("XID-79") + + healthy, err := rm.CheckDeviceHealth(device) + + require.NoError(t, err) + require.True(t, healthy, "Device should be detected as healthy") + t.Log("✓ CheckDeviceHealth detects recovered device") +} + +func TestCheckDeviceHealth_Phase2_DeviceStillFailing(t *testing.T) { + mockNVML := dgxa100.New() + mockDGXA100Setup(mockNVML) + + // Device not responding + mockNVML.Devices[0].(*dgxa100.Device).GetNameFunc = func() (string, nvml.Return) { + return "", nvml.ERROR_GPU_IS_LOST + } + + rm := newMockResourceManager(t, mockNVML, 1) + deviceUUID := mockNVML.Devices[0].(*dgxa100.Device).UUID + device := rm.devices[deviceUUID] + device.MarkUnhealthy("XID-79") + + healthy, err := rm.CheckDeviceHealth(device) + + require.Error(t, err) + require.False(t, healthy, "Device should still be unhealthy") + require.Contains(t, err.Error(), "not responsive") + t.Log("✓ CheckDeviceHealth detects device still failing") +} + +func TestCheckDeviceHealth_Phase2_NVMLInitFailure(t *testing.T) { + mockNVML := dgxa100.New() + mockDGXA100Setup(mockNVML) + + // Make NVML Init fail + mockNVML.InitFunc = func() nvml.Return { + return nvml.ERROR_UNINITIALIZED + } + + rm := newMockResourceManager(t, mockNVML, 1) + deviceUUID := mockNVML.Devices[0].(*dgxa100.Device).UUID + device := rm.devices[deviceUUID] + device.MarkUnhealthy("XID-79") + + healthy, err := rm.CheckDeviceHealth(device) + + require.Error(t, err) + require.False(t, healthy) + require.Contains(t, err.Error(), "NVML init failed") + t.Log("✓ CheckDeviceHealth handles NVML init failures") +} diff --git a/internal/rm/nvml_manager.go b/internal/rm/nvml_manager.go index fac923429..8dcce20c9 100644 --- a/internal/rm/nvml_manager.go +++ b/internal/rm/nvml_manager.go @@ -95,6 +95,48 @@ func (r *nvmlResourceManager) CheckHealth(stop <-chan interface{}, unhealthy cha return r.checkHealth(stop, r.devices, unhealthy) } +// CheckDeviceHealth performs a simple health check on a single device by +// verifying it can be accessed via NVML and responds to basic queries. +// This is used for recovery detection - if a previously unhealthy device +// passes this check, it's considered recovered. We intentionally keep this +// simple and don't try to classify XIDs as recoverable vs permanent - that's +// controlled via DP_DISABLE_HEALTHCHECKS / DP_ENABLE_HEALTHCHECKS env vars. +func (r *nvmlResourceManager) CheckDeviceHealth(d *Device) (bool, error) { + // Initialize NVML for this health check + ret := r.nvml.Init() + if ret != nvml.SUCCESS { + return false, fmt.Errorf("NVML init failed: %v", ret) + } + defer func() { + _ = r.nvml.Shutdown() + }() + + uuid := d.GetUUID() + + // For MIG devices, extract parent UUID + if d.IsMigDevice() { + parentUUID, _, _, err := r.getMigDeviceParts(d) + if err != nil { + return false, fmt.Errorf("cannot determine MIG device parts: %w", err) + } + uuid = parentUUID + } + + // Get device handle + gpu, ret := r.nvml.DeviceGetHandleByUUID(uuid) + if ret != nvml.SUCCESS { + return false, fmt.Errorf("cannot get device handle: %v", ret) + } + + // Perform basic health check - if device responds, consider it healthy + _, ret = gpu.GetName() + if ret != nvml.SUCCESS { + return false, fmt.Errorf("device not responsive (GetName failed): %v", ret) + } + + return true, nil +} + // getPreferredAllocation runs an allocation algorithm over the inputs. // The algorithm chosen is based both on the incoming set of available devices and various config settings. func (r *nvmlResourceManager) getPreferredAllocation(available, required []string, size int) ([]string, error) { diff --git a/internal/rm/rm.go b/internal/rm/rm.go index 33f44b9d8..a9ce5eb4f 100644 --- a/internal/rm/rm.go +++ b/internal/rm/rm.go @@ -45,6 +45,7 @@ type ResourceManager interface { GetDevicePaths([]string) []string GetPreferredAllocation(available, required []string, size int) ([]string, error) CheckHealth(stop <-chan interface{}, unhealthy chan<- *Device) error + CheckDeviceHealth(d *Device) (bool, error) ValidateRequest(AnnotatedIDs) error } diff --git a/internal/rm/rm_mock.go b/internal/rm/rm_mock.go index 4efee5fd9..a9337c7cf 100644 --- a/internal/rm/rm_mock.go +++ b/internal/rm/rm_mock.go @@ -47,6 +47,9 @@ type ResourceManagerMock struct { // CheckHealthFunc mocks the CheckHealth method. CheckHealthFunc func(stop <-chan interface{}, unhealthy chan<- *Device) error + // CheckDeviceHealthFunc mocks the CheckDeviceHealth method. + CheckDeviceHealthFunc func(d *Device) (bool, error) + // DevicesFunc mocks the Devices method. DevicesFunc func() Devices @@ -71,6 +74,11 @@ type ResourceManagerMock struct { // Unhealthy is the unhealthy argument value. Unhealthy chan<- *Device } + // CheckDeviceHealth holds details about calls to the CheckDeviceHealth method. + CheckDeviceHealth []struct { + // D is the d argument value. + D *Device + } // Devices holds details about calls to the Devices method. Devices []struct { } @@ -98,6 +106,7 @@ type ResourceManagerMock struct { } } lockCheckHealth sync.RWMutex + lockCheckDeviceHealth sync.RWMutex lockDevices sync.RWMutex lockGetDevicePaths sync.RWMutex lockGetPreferredAllocation sync.RWMutex @@ -144,6 +153,42 @@ func (mock *ResourceManagerMock) CheckHealthCalls() []struct { return calls } +// CheckDeviceHealth calls CheckDeviceHealthFunc. +func (mock *ResourceManagerMock) CheckDeviceHealth(d *Device) (bool, error) { + callInfo := struct { + D *Device + }{ + D: d, + } + mock.lockCheckDeviceHealth.Lock() + mock.calls.CheckDeviceHealth = append(mock.calls.CheckDeviceHealth, callInfo) + mock.lockCheckDeviceHealth.Unlock() + if mock.CheckDeviceHealthFunc == nil { + var ( + bOut bool + errOut error + ) + return bOut, errOut + } + return mock.CheckDeviceHealthFunc(d) +} + +// CheckDeviceHealthCalls gets all the calls that were made to +// CheckDeviceHealth. Check the length with: +// +// len(mockedResourceManager.CheckDeviceHealthCalls()) +func (mock *ResourceManagerMock) CheckDeviceHealthCalls() []struct { + D *Device +} { + var calls []struct { + D *Device + } + mock.lockCheckDeviceHealth.RLock() + calls = mock.calls.CheckDeviceHealth + mock.lockCheckDeviceHealth.RUnlock() + return calls +} + // Devices calls DevicesFunc. func (mock *ResourceManagerMock) Devices() Devices { callInfo := struct { diff --git a/internal/rm/tegra_manager.go b/internal/rm/tegra_manager.go index 65ca2022f..c716cab1a 100644 --- a/internal/rm/tegra_manager.go +++ b/internal/rm/tegra_manager.go @@ -74,3 +74,11 @@ func (r *tegraResourceManager) GetDevicePaths(ids []string) []string { func (r *tegraResourceManager) CheckHealth(stop <-chan interface{}, unhealthy chan<- *Device) error { return nil } + +// CheckDeviceHealth is not implemented for the tegraResourceManager. +// Tegra devices don't support the same health checking mechanisms as +// NVML-based devices. +func (r *tegraResourceManager) CheckDeviceHealth(d *Device) (bool, error) { + // Always return healthy for Tegra devices (no health checking) + return true, nil +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/computeinstance.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/computeinstance.go new file mode 100644 index 000000000..784fa114c --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/computeinstance.go @@ -0,0 +1,105 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package mock + +import ( + "github.com/NVIDIA/go-nvml/pkg/nvml" + "sync" +) + +// Ensure, that ComputeInstance does implement nvml.ComputeInstance. +// If this is not the case, regenerate this file with moq. +var _ nvml.ComputeInstance = &ComputeInstance{} + +// ComputeInstance is a mock implementation of nvml.ComputeInstance. +// +// func TestSomethingThatUsesComputeInstance(t *testing.T) { +// +// // make and configure a mocked nvml.ComputeInstance +// mockedComputeInstance := &ComputeInstance{ +// DestroyFunc: func() nvml.Return { +// panic("mock out the Destroy method") +// }, +// GetInfoFunc: func() (nvml.ComputeInstanceInfo, nvml.Return) { +// panic("mock out the GetInfo method") +// }, +// } +// +// // use mockedComputeInstance in code that requires nvml.ComputeInstance +// // and then make assertions. +// +// } +type ComputeInstance struct { + // DestroyFunc mocks the Destroy method. + DestroyFunc func() nvml.Return + + // GetInfoFunc mocks the GetInfo method. + GetInfoFunc func() (nvml.ComputeInstanceInfo, nvml.Return) + + // calls tracks calls to the methods. + calls struct { + // Destroy holds details about calls to the Destroy method. + Destroy []struct { + } + // GetInfo holds details about calls to the GetInfo method. + GetInfo []struct { + } + } + lockDestroy sync.RWMutex + lockGetInfo sync.RWMutex +} + +// Destroy calls DestroyFunc. +func (mock *ComputeInstance) Destroy() nvml.Return { + if mock.DestroyFunc == nil { + panic("ComputeInstance.DestroyFunc: method is nil but ComputeInstance.Destroy was just called") + } + callInfo := struct { + }{} + mock.lockDestroy.Lock() + mock.calls.Destroy = append(mock.calls.Destroy, callInfo) + mock.lockDestroy.Unlock() + return mock.DestroyFunc() +} + +// DestroyCalls gets all the calls that were made to Destroy. +// Check the length with: +// +// len(mockedComputeInstance.DestroyCalls()) +func (mock *ComputeInstance) DestroyCalls() []struct { +} { + var calls []struct { + } + mock.lockDestroy.RLock() + calls = mock.calls.Destroy + mock.lockDestroy.RUnlock() + return calls +} + +// GetInfo calls GetInfoFunc. +func (mock *ComputeInstance) GetInfo() (nvml.ComputeInstanceInfo, nvml.Return) { + if mock.GetInfoFunc == nil { + panic("ComputeInstance.GetInfoFunc: method is nil but ComputeInstance.GetInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetInfo.Lock() + mock.calls.GetInfo = append(mock.calls.GetInfo, callInfo) + mock.lockGetInfo.Unlock() + return mock.GetInfoFunc() +} + +// GetInfoCalls gets all the calls that were made to GetInfo. +// Check the length with: +// +// len(mockedComputeInstance.GetInfoCalls()) +func (mock *ComputeInstance) GetInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetInfo.RLock() + calls = mock.calls.GetInfo + mock.lockGetInfo.RUnlock() + return calls +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go new file mode 100644 index 000000000..26397284f --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go @@ -0,0 +1,10524 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package mock + +import ( + "github.com/NVIDIA/go-nvml/pkg/nvml" + "sync" +) + +// Ensure, that Device does implement nvml.Device. +// If this is not the case, regenerate this file with moq. +var _ nvml.Device = &Device{} + +// Device is a mock implementation of nvml.Device. +// +// func TestSomethingThatUsesDevice(t *testing.T) { +// +// // make and configure a mocked nvml.Device +// mockedDevice := &Device{ +// ClearAccountingPidsFunc: func() nvml.Return { +// panic("mock out the ClearAccountingPids method") +// }, +// ClearCpuAffinityFunc: func() nvml.Return { +// panic("mock out the ClearCpuAffinity method") +// }, +// ClearEccErrorCountsFunc: func(eccCounterType nvml.EccCounterType) nvml.Return { +// panic("mock out the ClearEccErrorCounts method") +// }, +// ClearFieldValuesFunc: func(fieldValues []nvml.FieldValue) nvml.Return { +// panic("mock out the ClearFieldValues method") +// }, +// CreateGpuInstanceFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { +// panic("mock out the CreateGpuInstance method") +// }, +// CreateGpuInstanceWithPlacementFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { +// panic("mock out the CreateGpuInstanceWithPlacement method") +// }, +// FreezeNvLinkUtilizationCounterFunc: func(n1 int, n2 int, enableState nvml.EnableState) nvml.Return { +// panic("mock out the FreezeNvLinkUtilizationCounter method") +// }, +// GetAPIRestrictionFunc: func(restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) { +// panic("mock out the GetAPIRestriction method") +// }, +// GetAccountingBufferSizeFunc: func() (int, nvml.Return) { +// panic("mock out the GetAccountingBufferSize method") +// }, +// GetAccountingModeFunc: func() (nvml.EnableState, nvml.Return) { +// panic("mock out the GetAccountingMode method") +// }, +// GetAccountingPidsFunc: func() ([]int, nvml.Return) { +// panic("mock out the GetAccountingPids method") +// }, +// GetAccountingStatsFunc: func(v uint32) (nvml.AccountingStats, nvml.Return) { +// panic("mock out the GetAccountingStats method") +// }, +// GetActiveVgpusFunc: func() ([]nvml.VgpuInstance, nvml.Return) { +// panic("mock out the GetActiveVgpus method") +// }, +// GetAdaptiveClockInfoStatusFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetAdaptiveClockInfoStatus method") +// }, +// GetAddressingModeFunc: func() (nvml.DeviceAddressingMode, nvml.Return) { +// panic("mock out the GetAddressingMode method") +// }, +// GetApplicationsClockFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { +// panic("mock out the GetApplicationsClock method") +// }, +// GetArchitectureFunc: func() (nvml.DeviceArchitecture, nvml.Return) { +// panic("mock out the GetArchitecture method") +// }, +// GetAttributesFunc: func() (nvml.DeviceAttributes, nvml.Return) { +// panic("mock out the GetAttributes method") +// }, +// GetAutoBoostedClocksEnabledFunc: func() (nvml.EnableState, nvml.EnableState, nvml.Return) { +// panic("mock out the GetAutoBoostedClocksEnabled method") +// }, +// GetBAR1MemoryInfoFunc: func() (nvml.BAR1Memory, nvml.Return) { +// panic("mock out the GetBAR1MemoryInfo method") +// }, +// GetBoardIdFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetBoardId method") +// }, +// GetBoardPartNumberFunc: func() (string, nvml.Return) { +// panic("mock out the GetBoardPartNumber method") +// }, +// GetBrandFunc: func() (nvml.BrandType, nvml.Return) { +// panic("mock out the GetBrand method") +// }, +// GetBridgeChipInfoFunc: func() (nvml.BridgeChipHierarchy, nvml.Return) { +// panic("mock out the GetBridgeChipInfo method") +// }, +// GetBusTypeFunc: func() (nvml.BusType, nvml.Return) { +// panic("mock out the GetBusType method") +// }, +// GetC2cModeInfoVFunc: func() nvml.C2cModeInfoHandler { +// panic("mock out the GetC2cModeInfoV method") +// }, +// GetCapabilitiesFunc: func() (nvml.DeviceCapabilities, nvml.Return) { +// panic("mock out the GetCapabilities method") +// }, +// GetClkMonStatusFunc: func() (nvml.ClkMonStatus, nvml.Return) { +// panic("mock out the GetClkMonStatus method") +// }, +// GetClockFunc: func(clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) { +// panic("mock out the GetClock method") +// }, +// GetClockInfoFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { +// panic("mock out the GetClockInfo method") +// }, +// GetClockOffsetsFunc: func() (nvml.ClockOffset, nvml.Return) { +// panic("mock out the GetClockOffsets method") +// }, +// GetComputeInstanceIdFunc: func() (int, nvml.Return) { +// panic("mock out the GetComputeInstanceId method") +// }, +// GetComputeModeFunc: func() (nvml.ComputeMode, nvml.Return) { +// panic("mock out the GetComputeMode method") +// }, +// GetComputeRunningProcessesFunc: func() ([]nvml.ProcessInfo, nvml.Return) { +// panic("mock out the GetComputeRunningProcesses method") +// }, +// GetConfComputeGpuAttestationReportFunc: func(confComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport) nvml.Return { +// panic("mock out the GetConfComputeGpuAttestationReport method") +// }, +// GetConfComputeGpuCertificateFunc: func() (nvml.ConfComputeGpuCertificate, nvml.Return) { +// panic("mock out the GetConfComputeGpuCertificate method") +// }, +// GetConfComputeMemSizeInfoFunc: func() (nvml.ConfComputeMemSizeInfo, nvml.Return) { +// panic("mock out the GetConfComputeMemSizeInfo method") +// }, +// GetConfComputeProtectedMemoryUsageFunc: func() (nvml.Memory, nvml.Return) { +// panic("mock out the GetConfComputeProtectedMemoryUsage method") +// }, +// GetCoolerInfoFunc: func() (nvml.CoolerInfo, nvml.Return) { +// panic("mock out the GetCoolerInfo method") +// }, +// GetCpuAffinityFunc: func(n int) ([]uint, nvml.Return) { +// panic("mock out the GetCpuAffinity method") +// }, +// GetCpuAffinityWithinScopeFunc: func(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { +// panic("mock out the GetCpuAffinityWithinScope method") +// }, +// GetCreatableVgpusFunc: func() ([]nvml.VgpuTypeId, nvml.Return) { +// panic("mock out the GetCreatableVgpus method") +// }, +// GetCudaComputeCapabilityFunc: func() (int, int, nvml.Return) { +// panic("mock out the GetCudaComputeCapability method") +// }, +// GetCurrPcieLinkGenerationFunc: func() (int, nvml.Return) { +// panic("mock out the GetCurrPcieLinkGeneration method") +// }, +// GetCurrPcieLinkWidthFunc: func() (int, nvml.Return) { +// panic("mock out the GetCurrPcieLinkWidth method") +// }, +// GetCurrentClockFreqsFunc: func() (nvml.DeviceCurrentClockFreqs, nvml.Return) { +// panic("mock out the GetCurrentClockFreqs method") +// }, +// GetCurrentClocksEventReasonsFunc: func() (uint64, nvml.Return) { +// panic("mock out the GetCurrentClocksEventReasons method") +// }, +// GetCurrentClocksThrottleReasonsFunc: func() (uint64, nvml.Return) { +// panic("mock out the GetCurrentClocksThrottleReasons method") +// }, +// GetDecoderUtilizationFunc: func() (uint32, uint32, nvml.Return) { +// panic("mock out the GetDecoderUtilization method") +// }, +// GetDefaultApplicationsClockFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { +// panic("mock out the GetDefaultApplicationsClock method") +// }, +// GetDefaultEccModeFunc: func() (nvml.EnableState, nvml.Return) { +// panic("mock out the GetDefaultEccMode method") +// }, +// GetDetailedEccErrorsFunc: func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) { +// panic("mock out the GetDetailedEccErrors method") +// }, +// GetDeviceHandleFromMigDeviceHandleFunc: func() (nvml.Device, nvml.Return) { +// panic("mock out the GetDeviceHandleFromMigDeviceHandle method") +// }, +// GetDisplayActiveFunc: func() (nvml.EnableState, nvml.Return) { +// panic("mock out the GetDisplayActive method") +// }, +// GetDisplayModeFunc: func() (nvml.EnableState, nvml.Return) { +// panic("mock out the GetDisplayMode method") +// }, +// GetDramEncryptionModeFunc: func() (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) { +// panic("mock out the GetDramEncryptionMode method") +// }, +// GetDriverModelFunc: func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { +// panic("mock out the GetDriverModel method") +// }, +// GetDriverModel_v2Func: func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { +// panic("mock out the GetDriverModel_v2 method") +// }, +// GetDynamicPstatesInfoFunc: func() (nvml.GpuDynamicPstatesInfo, nvml.Return) { +// panic("mock out the GetDynamicPstatesInfo method") +// }, +// GetEccModeFunc: func() (nvml.EnableState, nvml.EnableState, nvml.Return) { +// panic("mock out the GetEccMode method") +// }, +// GetEncoderCapacityFunc: func(encoderType nvml.EncoderType) (int, nvml.Return) { +// panic("mock out the GetEncoderCapacity method") +// }, +// GetEncoderSessionsFunc: func() ([]nvml.EncoderSessionInfo, nvml.Return) { +// panic("mock out the GetEncoderSessions method") +// }, +// GetEncoderStatsFunc: func() (int, uint32, uint32, nvml.Return) { +// panic("mock out the GetEncoderStats method") +// }, +// GetEncoderUtilizationFunc: func() (uint32, uint32, nvml.Return) { +// panic("mock out the GetEncoderUtilization method") +// }, +// GetEnforcedPowerLimitFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetEnforcedPowerLimit method") +// }, +// GetFBCSessionsFunc: func() ([]nvml.FBCSessionInfo, nvml.Return) { +// panic("mock out the GetFBCSessions method") +// }, +// GetFBCStatsFunc: func() (nvml.FBCStats, nvml.Return) { +// panic("mock out the GetFBCStats method") +// }, +// GetFanControlPolicy_v2Func: func(n int) (nvml.FanControlPolicy, nvml.Return) { +// panic("mock out the GetFanControlPolicy_v2 method") +// }, +// GetFanSpeedFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetFanSpeed method") +// }, +// GetFanSpeedRPMFunc: func() (nvml.FanSpeedInfo, nvml.Return) { +// panic("mock out the GetFanSpeedRPM method") +// }, +// GetFanSpeed_v2Func: func(n int) (uint32, nvml.Return) { +// panic("mock out the GetFanSpeed_v2 method") +// }, +// GetFieldValuesFunc: func(fieldValues []nvml.FieldValue) nvml.Return { +// panic("mock out the GetFieldValues method") +// }, +// GetGpcClkMinMaxVfOffsetFunc: func() (int, int, nvml.Return) { +// panic("mock out the GetGpcClkMinMaxVfOffset method") +// }, +// GetGpcClkVfOffsetFunc: func() (int, nvml.Return) { +// panic("mock out the GetGpcClkVfOffset method") +// }, +// GetGpuFabricInfoFunc: func() (nvml.GpuFabricInfo, nvml.Return) { +// panic("mock out the GetGpuFabricInfo method") +// }, +// GetGpuFabricInfoVFunc: func() nvml.GpuFabricInfoHandler { +// panic("mock out the GetGpuFabricInfoV method") +// }, +// GetGpuInstanceByIdFunc: func(n int) (nvml.GpuInstance, nvml.Return) { +// panic("mock out the GetGpuInstanceById method") +// }, +// GetGpuInstanceIdFunc: func() (int, nvml.Return) { +// panic("mock out the GetGpuInstanceId method") +// }, +// GetGpuInstancePossiblePlacementsFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { +// panic("mock out the GetGpuInstancePossiblePlacements method") +// }, +// GetGpuInstanceProfileInfoFunc: func(n int) (nvml.GpuInstanceProfileInfo, nvml.Return) { +// panic("mock out the GetGpuInstanceProfileInfo method") +// }, +// GetGpuInstanceProfileInfoByIdVFunc: func(n int) nvml.GpuInstanceProfileInfoByIdHandler { +// panic("mock out the GetGpuInstanceProfileInfoByIdV method") +// }, +// GetGpuInstanceProfileInfoVFunc: func(n int) nvml.GpuInstanceProfileInfoHandler { +// panic("mock out the GetGpuInstanceProfileInfoV method") +// }, +// GetGpuInstanceRemainingCapacityFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) { +// panic("mock out the GetGpuInstanceRemainingCapacity method") +// }, +// GetGpuInstancesFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { +// panic("mock out the GetGpuInstances method") +// }, +// GetGpuMaxPcieLinkGenerationFunc: func() (int, nvml.Return) { +// panic("mock out the GetGpuMaxPcieLinkGeneration method") +// }, +// GetGpuOperationModeFunc: func() (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { +// panic("mock out the GetGpuOperationMode method") +// }, +// GetGraphicsRunningProcessesFunc: func() ([]nvml.ProcessInfo, nvml.Return) { +// panic("mock out the GetGraphicsRunningProcesses method") +// }, +// GetGridLicensableFeaturesFunc: func() (nvml.GridLicensableFeatures, nvml.Return) { +// panic("mock out the GetGridLicensableFeatures method") +// }, +// GetGspFirmwareModeFunc: func() (bool, bool, nvml.Return) { +// panic("mock out the GetGspFirmwareMode method") +// }, +// GetGspFirmwareVersionFunc: func() (string, nvml.Return) { +// panic("mock out the GetGspFirmwareVersion method") +// }, +// GetHostVgpuModeFunc: func() (nvml.HostVgpuMode, nvml.Return) { +// panic("mock out the GetHostVgpuMode method") +// }, +// GetIndexFunc: func() (int, nvml.Return) { +// panic("mock out the GetIndex method") +// }, +// GetInforomConfigurationChecksumFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetInforomConfigurationChecksum method") +// }, +// GetInforomImageVersionFunc: func() (string, nvml.Return) { +// panic("mock out the GetInforomImageVersion method") +// }, +// GetInforomVersionFunc: func(inforomObject nvml.InforomObject) (string, nvml.Return) { +// panic("mock out the GetInforomVersion method") +// }, +// GetIrqNumFunc: func() (int, nvml.Return) { +// panic("mock out the GetIrqNum method") +// }, +// GetJpgUtilizationFunc: func() (uint32, uint32, nvml.Return) { +// panic("mock out the GetJpgUtilization method") +// }, +// GetLastBBXFlushTimeFunc: func() (uint64, uint, nvml.Return) { +// panic("mock out the GetLastBBXFlushTime method") +// }, +// GetMPSComputeRunningProcessesFunc: func() ([]nvml.ProcessInfo, nvml.Return) { +// panic("mock out the GetMPSComputeRunningProcesses method") +// }, +// GetMarginTemperatureFunc: func() (nvml.MarginTemperature, nvml.Return) { +// panic("mock out the GetMarginTemperature method") +// }, +// GetMaxClockInfoFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { +// panic("mock out the GetMaxClockInfo method") +// }, +// GetMaxCustomerBoostClockFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { +// panic("mock out the GetMaxCustomerBoostClock method") +// }, +// GetMaxMigDeviceCountFunc: func() (int, nvml.Return) { +// panic("mock out the GetMaxMigDeviceCount method") +// }, +// GetMaxPcieLinkGenerationFunc: func() (int, nvml.Return) { +// panic("mock out the GetMaxPcieLinkGeneration method") +// }, +// GetMaxPcieLinkWidthFunc: func() (int, nvml.Return) { +// panic("mock out the GetMaxPcieLinkWidth method") +// }, +// GetMemClkMinMaxVfOffsetFunc: func() (int, int, nvml.Return) { +// panic("mock out the GetMemClkMinMaxVfOffset method") +// }, +// GetMemClkVfOffsetFunc: func() (int, nvml.Return) { +// panic("mock out the GetMemClkVfOffset method") +// }, +// GetMemoryAffinityFunc: func(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { +// panic("mock out the GetMemoryAffinity method") +// }, +// GetMemoryBusWidthFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetMemoryBusWidth method") +// }, +// GetMemoryErrorCounterFunc: func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) { +// panic("mock out the GetMemoryErrorCounter method") +// }, +// GetMemoryInfoFunc: func() (nvml.Memory, nvml.Return) { +// panic("mock out the GetMemoryInfo method") +// }, +// GetMemoryInfo_v2Func: func() (nvml.Memory_v2, nvml.Return) { +// panic("mock out the GetMemoryInfo_v2 method") +// }, +// GetMigDeviceHandleByIndexFunc: func(n int) (nvml.Device, nvml.Return) { +// panic("mock out the GetMigDeviceHandleByIndex method") +// }, +// GetMigModeFunc: func() (int, int, nvml.Return) { +// panic("mock out the GetMigMode method") +// }, +// GetMinMaxClockOfPStateFunc: func(clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) { +// panic("mock out the GetMinMaxClockOfPState method") +// }, +// GetMinMaxFanSpeedFunc: func() (int, int, nvml.Return) { +// panic("mock out the GetMinMaxFanSpeed method") +// }, +// GetMinorNumberFunc: func() (int, nvml.Return) { +// panic("mock out the GetMinorNumber method") +// }, +// GetModuleIdFunc: func() (int, nvml.Return) { +// panic("mock out the GetModuleId method") +// }, +// GetMultiGpuBoardFunc: func() (int, nvml.Return) { +// panic("mock out the GetMultiGpuBoard method") +// }, +// GetNameFunc: func() (string, nvml.Return) { +// panic("mock out the GetName method") +// }, +// GetNumFansFunc: func() (int, nvml.Return) { +// panic("mock out the GetNumFans method") +// }, +// GetNumGpuCoresFunc: func() (int, nvml.Return) { +// panic("mock out the GetNumGpuCores method") +// }, +// GetNumaNodeIdFunc: func() (int, nvml.Return) { +// panic("mock out the GetNumaNodeId method") +// }, +// GetNvLinkCapabilityFunc: func(n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) { +// panic("mock out the GetNvLinkCapability method") +// }, +// GetNvLinkErrorCounterFunc: func(n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) { +// panic("mock out the GetNvLinkErrorCounter method") +// }, +// GetNvLinkInfoFunc: func() nvml.NvLinkInfoHandler { +// panic("mock out the GetNvLinkInfo method") +// }, +// GetNvLinkRemoteDeviceTypeFunc: func(n int) (nvml.IntNvLinkDeviceType, nvml.Return) { +// panic("mock out the GetNvLinkRemoteDeviceType method") +// }, +// GetNvLinkRemotePciInfoFunc: func(n int) (nvml.PciInfo, nvml.Return) { +// panic("mock out the GetNvLinkRemotePciInfo method") +// }, +// GetNvLinkStateFunc: func(n int) (nvml.EnableState, nvml.Return) { +// panic("mock out the GetNvLinkState method") +// }, +// GetNvLinkUtilizationControlFunc: func(n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { +// panic("mock out the GetNvLinkUtilizationControl method") +// }, +// GetNvLinkUtilizationCounterFunc: func(n1 int, n2 int) (uint64, uint64, nvml.Return) { +// panic("mock out the GetNvLinkUtilizationCounter method") +// }, +// GetNvLinkVersionFunc: func(n int) (uint32, nvml.Return) { +// panic("mock out the GetNvLinkVersion method") +// }, +// GetNvlinkBwModeFunc: func() (nvml.NvlinkGetBwMode, nvml.Return) { +// panic("mock out the GetNvlinkBwMode method") +// }, +// GetNvlinkSupportedBwModesFunc: func() (nvml.NvlinkSupportedBwModes, nvml.Return) { +// panic("mock out the GetNvlinkSupportedBwModes method") +// }, +// GetOfaUtilizationFunc: func() (uint32, uint32, nvml.Return) { +// panic("mock out the GetOfaUtilization method") +// }, +// GetP2PStatusFunc: func(device nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) { +// panic("mock out the GetP2PStatus method") +// }, +// GetPciInfoFunc: func() (nvml.PciInfo, nvml.Return) { +// panic("mock out the GetPciInfo method") +// }, +// GetPciInfoExtFunc: func() (nvml.PciInfoExt, nvml.Return) { +// panic("mock out the GetPciInfoExt method") +// }, +// GetPcieLinkMaxSpeedFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetPcieLinkMaxSpeed method") +// }, +// GetPcieReplayCounterFunc: func() (int, nvml.Return) { +// panic("mock out the GetPcieReplayCounter method") +// }, +// GetPcieSpeedFunc: func() (int, nvml.Return) { +// panic("mock out the GetPcieSpeed method") +// }, +// GetPcieThroughputFunc: func(pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { +// panic("mock out the GetPcieThroughput method") +// }, +// GetPdiFunc: func() (nvml.Pdi, nvml.Return) { +// panic("mock out the GetPdi method") +// }, +// GetPerformanceModesFunc: func() (nvml.DevicePerfModes, nvml.Return) { +// panic("mock out the GetPerformanceModes method") +// }, +// GetPerformanceStateFunc: func() (nvml.Pstates, nvml.Return) { +// panic("mock out the GetPerformanceState method") +// }, +// GetPersistenceModeFunc: func() (nvml.EnableState, nvml.Return) { +// panic("mock out the GetPersistenceMode method") +// }, +// GetPgpuMetadataStringFunc: func() (string, nvml.Return) { +// panic("mock out the GetPgpuMetadataString method") +// }, +// GetPlatformInfoFunc: func() (nvml.PlatformInfo, nvml.Return) { +// panic("mock out the GetPlatformInfo method") +// }, +// GetPowerManagementDefaultLimitFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetPowerManagementDefaultLimit method") +// }, +// GetPowerManagementLimitFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetPowerManagementLimit method") +// }, +// GetPowerManagementLimitConstraintsFunc: func() (uint32, uint32, nvml.Return) { +// panic("mock out the GetPowerManagementLimitConstraints method") +// }, +// GetPowerManagementModeFunc: func() (nvml.EnableState, nvml.Return) { +// panic("mock out the GetPowerManagementMode method") +// }, +// GetPowerMizerMode_v1Func: func() (nvml.DevicePowerMizerModes_v1, nvml.Return) { +// panic("mock out the GetPowerMizerMode_v1 method") +// }, +// GetPowerSourceFunc: func() (nvml.PowerSource, nvml.Return) { +// panic("mock out the GetPowerSource method") +// }, +// GetPowerStateFunc: func() (nvml.Pstates, nvml.Return) { +// panic("mock out the GetPowerState method") +// }, +// GetPowerUsageFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetPowerUsage method") +// }, +// GetProcessUtilizationFunc: func(v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) { +// panic("mock out the GetProcessUtilization method") +// }, +// GetProcessesUtilizationInfoFunc: func() (nvml.ProcessesUtilizationInfo, nvml.Return) { +// panic("mock out the GetProcessesUtilizationInfo method") +// }, +// GetRemappedRowsFunc: func() (int, int, bool, bool, nvml.Return) { +// panic("mock out the GetRemappedRows method") +// }, +// GetRepairStatusFunc: func() (nvml.RepairStatus, nvml.Return) { +// panic("mock out the GetRepairStatus method") +// }, +// GetRetiredPagesFunc: func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) { +// panic("mock out the GetRetiredPages method") +// }, +// GetRetiredPagesPendingStatusFunc: func() (nvml.EnableState, nvml.Return) { +// panic("mock out the GetRetiredPagesPendingStatus method") +// }, +// GetRetiredPages_v2Func: func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) { +// panic("mock out the GetRetiredPages_v2 method") +// }, +// GetRowRemapperHistogramFunc: func() (nvml.RowRemapperHistogramValues, nvml.Return) { +// panic("mock out the GetRowRemapperHistogram method") +// }, +// GetRunningProcessDetailListFunc: func() (nvml.ProcessDetailList, nvml.Return) { +// panic("mock out the GetRunningProcessDetailList method") +// }, +// GetSamplesFunc: func(samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) { +// panic("mock out the GetSamples method") +// }, +// GetSerialFunc: func() (string, nvml.Return) { +// panic("mock out the GetSerial method") +// }, +// GetSramEccErrorStatusFunc: func() (nvml.EccSramErrorStatus, nvml.Return) { +// panic("mock out the GetSramEccErrorStatus method") +// }, +// GetSramUniqueUncorrectedEccErrorCountsFunc: func(eccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts) nvml.Return { +// panic("mock out the GetSramUniqueUncorrectedEccErrorCounts method") +// }, +// GetSupportedClocksEventReasonsFunc: func() (uint64, nvml.Return) { +// panic("mock out the GetSupportedClocksEventReasons method") +// }, +// GetSupportedClocksThrottleReasonsFunc: func() (uint64, nvml.Return) { +// panic("mock out the GetSupportedClocksThrottleReasons method") +// }, +// GetSupportedEventTypesFunc: func() (uint64, nvml.Return) { +// panic("mock out the GetSupportedEventTypes method") +// }, +// GetSupportedGraphicsClocksFunc: func(n int) (int, uint32, nvml.Return) { +// panic("mock out the GetSupportedGraphicsClocks method") +// }, +// GetSupportedMemoryClocksFunc: func() (int, uint32, nvml.Return) { +// panic("mock out the GetSupportedMemoryClocks method") +// }, +// GetSupportedPerformanceStatesFunc: func() ([]nvml.Pstates, nvml.Return) { +// panic("mock out the GetSupportedPerformanceStates method") +// }, +// GetSupportedVgpusFunc: func() ([]nvml.VgpuTypeId, nvml.Return) { +// panic("mock out the GetSupportedVgpus method") +// }, +// GetTargetFanSpeedFunc: func(n int) (int, nvml.Return) { +// panic("mock out the GetTargetFanSpeed method") +// }, +// GetTemperatureFunc: func(temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) { +// panic("mock out the GetTemperature method") +// }, +// GetTemperatureThresholdFunc: func(temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { +// panic("mock out the GetTemperatureThreshold method") +// }, +// GetTemperatureVFunc: func() nvml.TemperatureHandler { +// panic("mock out the GetTemperatureV method") +// }, +// GetThermalSettingsFunc: func(v uint32) (nvml.GpuThermalSettings, nvml.Return) { +// panic("mock out the GetThermalSettings method") +// }, +// GetTopologyCommonAncestorFunc: func(device nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) { +// panic("mock out the GetTopologyCommonAncestor method") +// }, +// GetTopologyNearestGpusFunc: func(gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) { +// panic("mock out the GetTopologyNearestGpus method") +// }, +// GetTotalEccErrorsFunc: func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) { +// panic("mock out the GetTotalEccErrors method") +// }, +// GetTotalEnergyConsumptionFunc: func() (uint64, nvml.Return) { +// panic("mock out the GetTotalEnergyConsumption method") +// }, +// GetUUIDFunc: func() (string, nvml.Return) { +// panic("mock out the GetUUID method") +// }, +// GetUtilizationRatesFunc: func() (nvml.Utilization, nvml.Return) { +// panic("mock out the GetUtilizationRates method") +// }, +// GetVbiosVersionFunc: func() (string, nvml.Return) { +// panic("mock out the GetVbiosVersion method") +// }, +// GetVgpuCapabilitiesFunc: func(deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) { +// panic("mock out the GetVgpuCapabilities method") +// }, +// GetVgpuHeterogeneousModeFunc: func() (nvml.VgpuHeterogeneousMode, nvml.Return) { +// panic("mock out the GetVgpuHeterogeneousMode method") +// }, +// GetVgpuInstancesUtilizationInfoFunc: func() (nvml.VgpuInstancesUtilizationInfo, nvml.Return) { +// panic("mock out the GetVgpuInstancesUtilizationInfo method") +// }, +// GetVgpuMetadataFunc: func() (nvml.VgpuPgpuMetadata, nvml.Return) { +// panic("mock out the GetVgpuMetadata method") +// }, +// GetVgpuProcessUtilizationFunc: func(v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) { +// panic("mock out the GetVgpuProcessUtilization method") +// }, +// GetVgpuProcessesUtilizationInfoFunc: func() (nvml.VgpuProcessesUtilizationInfo, nvml.Return) { +// panic("mock out the GetVgpuProcessesUtilizationInfo method") +// }, +// GetVgpuSchedulerCapabilitiesFunc: func() (nvml.VgpuSchedulerCapabilities, nvml.Return) { +// panic("mock out the GetVgpuSchedulerCapabilities method") +// }, +// GetVgpuSchedulerLogFunc: func() (nvml.VgpuSchedulerLog, nvml.Return) { +// panic("mock out the GetVgpuSchedulerLog method") +// }, +// GetVgpuSchedulerStateFunc: func() (nvml.VgpuSchedulerGetState, nvml.Return) { +// panic("mock out the GetVgpuSchedulerState method") +// }, +// GetVgpuTypeCreatablePlacementsFunc: func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { +// panic("mock out the GetVgpuTypeCreatablePlacements method") +// }, +// GetVgpuTypeSupportedPlacementsFunc: func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { +// panic("mock out the GetVgpuTypeSupportedPlacements method") +// }, +// GetVgpuUtilizationFunc: func(v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) { +// panic("mock out the GetVgpuUtilization method") +// }, +// GetViolationStatusFunc: func(perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) { +// panic("mock out the GetViolationStatus method") +// }, +// GetVirtualizationModeFunc: func() (nvml.GpuVirtualizationMode, nvml.Return) { +// panic("mock out the GetVirtualizationMode method") +// }, +// GpmMigSampleGetFunc: func(n int, gpmSample nvml.GpmSample) nvml.Return { +// panic("mock out the GpmMigSampleGet method") +// }, +// GpmQueryDeviceSupportFunc: func() (nvml.GpmSupport, nvml.Return) { +// panic("mock out the GpmQueryDeviceSupport method") +// }, +// GpmQueryDeviceSupportVFunc: func() nvml.GpmSupportV { +// panic("mock out the GpmQueryDeviceSupportV method") +// }, +// GpmQueryIfStreamingEnabledFunc: func() (uint32, nvml.Return) { +// panic("mock out the GpmQueryIfStreamingEnabled method") +// }, +// GpmSampleGetFunc: func(gpmSample nvml.GpmSample) nvml.Return { +// panic("mock out the GpmSampleGet method") +// }, +// GpmSetStreamingEnabledFunc: func(v uint32) nvml.Return { +// panic("mock out the GpmSetStreamingEnabled method") +// }, +// IsMigDeviceHandleFunc: func() (bool, nvml.Return) { +// panic("mock out the IsMigDeviceHandle method") +// }, +// OnSameBoardFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the OnSameBoard method") +// }, +// PowerSmoothingActivatePresetProfileFunc: func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { +// panic("mock out the PowerSmoothingActivatePresetProfile method") +// }, +// PowerSmoothingSetStateFunc: func(powerSmoothingState *nvml.PowerSmoothingState) nvml.Return { +// panic("mock out the PowerSmoothingSetState method") +// }, +// PowerSmoothingUpdatePresetProfileParamFunc: func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { +// panic("mock out the PowerSmoothingUpdatePresetProfileParam method") +// }, +// ReadWritePRM_v1Func: func(pRMTLV_v1 *nvml.PRMTLV_v1) nvml.Return { +// panic("mock out the ReadWritePRM_v1 method") +// }, +// RegisterEventsFunc: func(v uint64, eventSet nvml.EventSet) nvml.Return { +// panic("mock out the RegisterEvents method") +// }, +// ResetApplicationsClocksFunc: func() nvml.Return { +// panic("mock out the ResetApplicationsClocks method") +// }, +// ResetGpuLockedClocksFunc: func() nvml.Return { +// panic("mock out the ResetGpuLockedClocks method") +// }, +// ResetMemoryLockedClocksFunc: func() nvml.Return { +// panic("mock out the ResetMemoryLockedClocks method") +// }, +// ResetNvLinkErrorCountersFunc: func(n int) nvml.Return { +// panic("mock out the ResetNvLinkErrorCounters method") +// }, +// ResetNvLinkUtilizationCounterFunc: func(n1 int, n2 int) nvml.Return { +// panic("mock out the ResetNvLinkUtilizationCounter method") +// }, +// SetAPIRestrictionFunc: func(restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return { +// panic("mock out the SetAPIRestriction method") +// }, +// SetAccountingModeFunc: func(enableState nvml.EnableState) nvml.Return { +// panic("mock out the SetAccountingMode method") +// }, +// SetApplicationsClocksFunc: func(v1 uint32, v2 uint32) nvml.Return { +// panic("mock out the SetApplicationsClocks method") +// }, +// SetAutoBoostedClocksEnabledFunc: func(enableState nvml.EnableState) nvml.Return { +// panic("mock out the SetAutoBoostedClocksEnabled method") +// }, +// SetClockOffsetsFunc: func(clockOffset nvml.ClockOffset) nvml.Return { +// panic("mock out the SetClockOffsets method") +// }, +// SetComputeModeFunc: func(computeMode nvml.ComputeMode) nvml.Return { +// panic("mock out the SetComputeMode method") +// }, +// SetConfComputeUnprotectedMemSizeFunc: func(v uint64) nvml.Return { +// panic("mock out the SetConfComputeUnprotectedMemSize method") +// }, +// SetCpuAffinityFunc: func() nvml.Return { +// panic("mock out the SetCpuAffinity method") +// }, +// SetDefaultAutoBoostedClocksEnabledFunc: func(enableState nvml.EnableState, v uint32) nvml.Return { +// panic("mock out the SetDefaultAutoBoostedClocksEnabled method") +// }, +// SetDefaultFanSpeed_v2Func: func(n int) nvml.Return { +// panic("mock out the SetDefaultFanSpeed_v2 method") +// }, +// SetDramEncryptionModeFunc: func(dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return { +// panic("mock out the SetDramEncryptionMode method") +// }, +// SetDriverModelFunc: func(driverModel nvml.DriverModel, v uint32) nvml.Return { +// panic("mock out the SetDriverModel method") +// }, +// SetEccModeFunc: func(enableState nvml.EnableState) nvml.Return { +// panic("mock out the SetEccMode method") +// }, +// SetFanControlPolicyFunc: func(n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return { +// panic("mock out the SetFanControlPolicy method") +// }, +// SetFanSpeed_v2Func: func(n1 int, n2 int) nvml.Return { +// panic("mock out the SetFanSpeed_v2 method") +// }, +// SetGpcClkVfOffsetFunc: func(n int) nvml.Return { +// panic("mock out the SetGpcClkVfOffset method") +// }, +// SetGpuLockedClocksFunc: func(v1 uint32, v2 uint32) nvml.Return { +// panic("mock out the SetGpuLockedClocks method") +// }, +// SetGpuOperationModeFunc: func(gpuOperationMode nvml.GpuOperationMode) nvml.Return { +// panic("mock out the SetGpuOperationMode method") +// }, +// SetMemClkVfOffsetFunc: func(n int) nvml.Return { +// panic("mock out the SetMemClkVfOffset method") +// }, +// SetMemoryLockedClocksFunc: func(v1 uint32, v2 uint32) nvml.Return { +// panic("mock out the SetMemoryLockedClocks method") +// }, +// SetMigModeFunc: func(n int) (nvml.Return, nvml.Return) { +// panic("mock out the SetMigMode method") +// }, +// SetNvLinkDeviceLowPowerThresholdFunc: func(nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return { +// panic("mock out the SetNvLinkDeviceLowPowerThreshold method") +// }, +// SetNvLinkUtilizationControlFunc: func(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { +// panic("mock out the SetNvLinkUtilizationControl method") +// }, +// SetNvlinkBwModeFunc: func(nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { +// panic("mock out the SetNvlinkBwMode method") +// }, +// SetPersistenceModeFunc: func(enableState nvml.EnableState) nvml.Return { +// panic("mock out the SetPersistenceMode method") +// }, +// SetPowerManagementLimitFunc: func(v uint32) nvml.Return { +// panic("mock out the SetPowerManagementLimit method") +// }, +// SetPowerManagementLimit_v2Func: func(powerValue_v2 *nvml.PowerValue_v2) nvml.Return { +// panic("mock out the SetPowerManagementLimit_v2 method") +// }, +// SetTemperatureThresholdFunc: func(temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return { +// panic("mock out the SetTemperatureThreshold method") +// }, +// SetVgpuCapabilitiesFunc: func(deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return { +// panic("mock out the SetVgpuCapabilities method") +// }, +// SetVgpuHeterogeneousModeFunc: func(vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return { +// panic("mock out the SetVgpuHeterogeneousMode method") +// }, +// SetVgpuSchedulerStateFunc: func(vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return { +// panic("mock out the SetVgpuSchedulerState method") +// }, +// SetVirtualizationModeFunc: func(gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { +// panic("mock out the SetVirtualizationMode method") +// }, +// ValidateInforomFunc: func() nvml.Return { +// panic("mock out the ValidateInforom method") +// }, +// VgpuTypeGetMaxInstancesFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { +// panic("mock out the VgpuTypeGetMaxInstances method") +// }, +// WorkloadPowerProfileClearRequestedProfilesFunc: func(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { +// panic("mock out the WorkloadPowerProfileClearRequestedProfiles method") +// }, +// WorkloadPowerProfileGetCurrentProfilesFunc: func() (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) { +// panic("mock out the WorkloadPowerProfileGetCurrentProfiles method") +// }, +// WorkloadPowerProfileGetProfilesInfoFunc: func() (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) { +// panic("mock out the WorkloadPowerProfileGetProfilesInfo method") +// }, +// WorkloadPowerProfileSetRequestedProfilesFunc: func(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { +// panic("mock out the WorkloadPowerProfileSetRequestedProfiles method") +// }, +// } +// +// // use mockedDevice in code that requires nvml.Device +// // and then make assertions. +// +// } +type Device struct { + // ClearAccountingPidsFunc mocks the ClearAccountingPids method. + ClearAccountingPidsFunc func() nvml.Return + + // ClearCpuAffinityFunc mocks the ClearCpuAffinity method. + ClearCpuAffinityFunc func() nvml.Return + + // ClearEccErrorCountsFunc mocks the ClearEccErrorCounts method. + ClearEccErrorCountsFunc func(eccCounterType nvml.EccCounterType) nvml.Return + + // ClearFieldValuesFunc mocks the ClearFieldValues method. + ClearFieldValuesFunc func(fieldValues []nvml.FieldValue) nvml.Return + + // CreateGpuInstanceFunc mocks the CreateGpuInstance method. + CreateGpuInstanceFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) + + // CreateGpuInstanceWithPlacementFunc mocks the CreateGpuInstanceWithPlacement method. + CreateGpuInstanceWithPlacementFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) + + // FreezeNvLinkUtilizationCounterFunc mocks the FreezeNvLinkUtilizationCounter method. + FreezeNvLinkUtilizationCounterFunc func(n1 int, n2 int, enableState nvml.EnableState) nvml.Return + + // GetAPIRestrictionFunc mocks the GetAPIRestriction method. + GetAPIRestrictionFunc func(restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) + + // GetAccountingBufferSizeFunc mocks the GetAccountingBufferSize method. + GetAccountingBufferSizeFunc func() (int, nvml.Return) + + // GetAccountingModeFunc mocks the GetAccountingMode method. + GetAccountingModeFunc func() (nvml.EnableState, nvml.Return) + + // GetAccountingPidsFunc mocks the GetAccountingPids method. + GetAccountingPidsFunc func() ([]int, nvml.Return) + + // GetAccountingStatsFunc mocks the GetAccountingStats method. + GetAccountingStatsFunc func(v uint32) (nvml.AccountingStats, nvml.Return) + + // GetActiveVgpusFunc mocks the GetActiveVgpus method. + GetActiveVgpusFunc func() ([]nvml.VgpuInstance, nvml.Return) + + // GetAdaptiveClockInfoStatusFunc mocks the GetAdaptiveClockInfoStatus method. + GetAdaptiveClockInfoStatusFunc func() (uint32, nvml.Return) + + // GetAddressingModeFunc mocks the GetAddressingMode method. + GetAddressingModeFunc func() (nvml.DeviceAddressingMode, nvml.Return) + + // GetApplicationsClockFunc mocks the GetApplicationsClock method. + GetApplicationsClockFunc func(clockType nvml.ClockType) (uint32, nvml.Return) + + // GetArchitectureFunc mocks the GetArchitecture method. + GetArchitectureFunc func() (nvml.DeviceArchitecture, nvml.Return) + + // GetAttributesFunc mocks the GetAttributes method. + GetAttributesFunc func() (nvml.DeviceAttributes, nvml.Return) + + // GetAutoBoostedClocksEnabledFunc mocks the GetAutoBoostedClocksEnabled method. + GetAutoBoostedClocksEnabledFunc func() (nvml.EnableState, nvml.EnableState, nvml.Return) + + // GetBAR1MemoryInfoFunc mocks the GetBAR1MemoryInfo method. + GetBAR1MemoryInfoFunc func() (nvml.BAR1Memory, nvml.Return) + + // GetBoardIdFunc mocks the GetBoardId method. + GetBoardIdFunc func() (uint32, nvml.Return) + + // GetBoardPartNumberFunc mocks the GetBoardPartNumber method. + GetBoardPartNumberFunc func() (string, nvml.Return) + + // GetBrandFunc mocks the GetBrand method. + GetBrandFunc func() (nvml.BrandType, nvml.Return) + + // GetBridgeChipInfoFunc mocks the GetBridgeChipInfo method. + GetBridgeChipInfoFunc func() (nvml.BridgeChipHierarchy, nvml.Return) + + // GetBusTypeFunc mocks the GetBusType method. + GetBusTypeFunc func() (nvml.BusType, nvml.Return) + + // GetC2cModeInfoVFunc mocks the GetC2cModeInfoV method. + GetC2cModeInfoVFunc func() nvml.C2cModeInfoHandler + + // GetCapabilitiesFunc mocks the GetCapabilities method. + GetCapabilitiesFunc func() (nvml.DeviceCapabilities, nvml.Return) + + // GetClkMonStatusFunc mocks the GetClkMonStatus method. + GetClkMonStatusFunc func() (nvml.ClkMonStatus, nvml.Return) + + // GetClockFunc mocks the GetClock method. + GetClockFunc func(clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) + + // GetClockInfoFunc mocks the GetClockInfo method. + GetClockInfoFunc func(clockType nvml.ClockType) (uint32, nvml.Return) + + // GetClockOffsetsFunc mocks the GetClockOffsets method. + GetClockOffsetsFunc func() (nvml.ClockOffset, nvml.Return) + + // GetComputeInstanceIdFunc mocks the GetComputeInstanceId method. + GetComputeInstanceIdFunc func() (int, nvml.Return) + + // GetComputeModeFunc mocks the GetComputeMode method. + GetComputeModeFunc func() (nvml.ComputeMode, nvml.Return) + + // GetComputeRunningProcessesFunc mocks the GetComputeRunningProcesses method. + GetComputeRunningProcessesFunc func() ([]nvml.ProcessInfo, nvml.Return) + + // GetConfComputeGpuAttestationReportFunc mocks the GetConfComputeGpuAttestationReport method. + GetConfComputeGpuAttestationReportFunc func(confComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport) nvml.Return + + // GetConfComputeGpuCertificateFunc mocks the GetConfComputeGpuCertificate method. + GetConfComputeGpuCertificateFunc func() (nvml.ConfComputeGpuCertificate, nvml.Return) + + // GetConfComputeMemSizeInfoFunc mocks the GetConfComputeMemSizeInfo method. + GetConfComputeMemSizeInfoFunc func() (nvml.ConfComputeMemSizeInfo, nvml.Return) + + // GetConfComputeProtectedMemoryUsageFunc mocks the GetConfComputeProtectedMemoryUsage method. + GetConfComputeProtectedMemoryUsageFunc func() (nvml.Memory, nvml.Return) + + // GetCoolerInfoFunc mocks the GetCoolerInfo method. + GetCoolerInfoFunc func() (nvml.CoolerInfo, nvml.Return) + + // GetCpuAffinityFunc mocks the GetCpuAffinity method. + GetCpuAffinityFunc func(n int) ([]uint, nvml.Return) + + // GetCpuAffinityWithinScopeFunc mocks the GetCpuAffinityWithinScope method. + GetCpuAffinityWithinScopeFunc func(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) + + // GetCreatableVgpusFunc mocks the GetCreatableVgpus method. + GetCreatableVgpusFunc func() ([]nvml.VgpuTypeId, nvml.Return) + + // GetCudaComputeCapabilityFunc mocks the GetCudaComputeCapability method. + GetCudaComputeCapabilityFunc func() (int, int, nvml.Return) + + // GetCurrPcieLinkGenerationFunc mocks the GetCurrPcieLinkGeneration method. + GetCurrPcieLinkGenerationFunc func() (int, nvml.Return) + + // GetCurrPcieLinkWidthFunc mocks the GetCurrPcieLinkWidth method. + GetCurrPcieLinkWidthFunc func() (int, nvml.Return) + + // GetCurrentClockFreqsFunc mocks the GetCurrentClockFreqs method. + GetCurrentClockFreqsFunc func() (nvml.DeviceCurrentClockFreqs, nvml.Return) + + // GetCurrentClocksEventReasonsFunc mocks the GetCurrentClocksEventReasons method. + GetCurrentClocksEventReasonsFunc func() (uint64, nvml.Return) + + // GetCurrentClocksThrottleReasonsFunc mocks the GetCurrentClocksThrottleReasons method. + GetCurrentClocksThrottleReasonsFunc func() (uint64, nvml.Return) + + // GetDecoderUtilizationFunc mocks the GetDecoderUtilization method. + GetDecoderUtilizationFunc func() (uint32, uint32, nvml.Return) + + // GetDefaultApplicationsClockFunc mocks the GetDefaultApplicationsClock method. + GetDefaultApplicationsClockFunc func(clockType nvml.ClockType) (uint32, nvml.Return) + + // GetDefaultEccModeFunc mocks the GetDefaultEccMode method. + GetDefaultEccModeFunc func() (nvml.EnableState, nvml.Return) + + // GetDetailedEccErrorsFunc mocks the GetDetailedEccErrors method. + GetDetailedEccErrorsFunc func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) + + // GetDeviceHandleFromMigDeviceHandleFunc mocks the GetDeviceHandleFromMigDeviceHandle method. + GetDeviceHandleFromMigDeviceHandleFunc func() (nvml.Device, nvml.Return) + + // GetDisplayActiveFunc mocks the GetDisplayActive method. + GetDisplayActiveFunc func() (nvml.EnableState, nvml.Return) + + // GetDisplayModeFunc mocks the GetDisplayMode method. + GetDisplayModeFunc func() (nvml.EnableState, nvml.Return) + + // GetDramEncryptionModeFunc mocks the GetDramEncryptionMode method. + GetDramEncryptionModeFunc func() (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) + + // GetDriverModelFunc mocks the GetDriverModel method. + GetDriverModelFunc func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) + + // GetDriverModel_v2Func mocks the GetDriverModel_v2 method. + GetDriverModel_v2Func func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) + + // GetDynamicPstatesInfoFunc mocks the GetDynamicPstatesInfo method. + GetDynamicPstatesInfoFunc func() (nvml.GpuDynamicPstatesInfo, nvml.Return) + + // GetEccModeFunc mocks the GetEccMode method. + GetEccModeFunc func() (nvml.EnableState, nvml.EnableState, nvml.Return) + + // GetEncoderCapacityFunc mocks the GetEncoderCapacity method. + GetEncoderCapacityFunc func(encoderType nvml.EncoderType) (int, nvml.Return) + + // GetEncoderSessionsFunc mocks the GetEncoderSessions method. + GetEncoderSessionsFunc func() ([]nvml.EncoderSessionInfo, nvml.Return) + + // GetEncoderStatsFunc mocks the GetEncoderStats method. + GetEncoderStatsFunc func() (int, uint32, uint32, nvml.Return) + + // GetEncoderUtilizationFunc mocks the GetEncoderUtilization method. + GetEncoderUtilizationFunc func() (uint32, uint32, nvml.Return) + + // GetEnforcedPowerLimitFunc mocks the GetEnforcedPowerLimit method. + GetEnforcedPowerLimitFunc func() (uint32, nvml.Return) + + // GetFBCSessionsFunc mocks the GetFBCSessions method. + GetFBCSessionsFunc func() ([]nvml.FBCSessionInfo, nvml.Return) + + // GetFBCStatsFunc mocks the GetFBCStats method. + GetFBCStatsFunc func() (nvml.FBCStats, nvml.Return) + + // GetFanControlPolicy_v2Func mocks the GetFanControlPolicy_v2 method. + GetFanControlPolicy_v2Func func(n int) (nvml.FanControlPolicy, nvml.Return) + + // GetFanSpeedFunc mocks the GetFanSpeed method. + GetFanSpeedFunc func() (uint32, nvml.Return) + + // GetFanSpeedRPMFunc mocks the GetFanSpeedRPM method. + GetFanSpeedRPMFunc func() (nvml.FanSpeedInfo, nvml.Return) + + // GetFanSpeed_v2Func mocks the GetFanSpeed_v2 method. + GetFanSpeed_v2Func func(n int) (uint32, nvml.Return) + + // GetFieldValuesFunc mocks the GetFieldValues method. + GetFieldValuesFunc func(fieldValues []nvml.FieldValue) nvml.Return + + // GetGpcClkMinMaxVfOffsetFunc mocks the GetGpcClkMinMaxVfOffset method. + GetGpcClkMinMaxVfOffsetFunc func() (int, int, nvml.Return) + + // GetGpcClkVfOffsetFunc mocks the GetGpcClkVfOffset method. + GetGpcClkVfOffsetFunc func() (int, nvml.Return) + + // GetGpuFabricInfoFunc mocks the GetGpuFabricInfo method. + GetGpuFabricInfoFunc func() (nvml.GpuFabricInfo, nvml.Return) + + // GetGpuFabricInfoVFunc mocks the GetGpuFabricInfoV method. + GetGpuFabricInfoVFunc func() nvml.GpuFabricInfoHandler + + // GetGpuInstanceByIdFunc mocks the GetGpuInstanceById method. + GetGpuInstanceByIdFunc func(n int) (nvml.GpuInstance, nvml.Return) + + // GetGpuInstanceIdFunc mocks the GetGpuInstanceId method. + GetGpuInstanceIdFunc func() (int, nvml.Return) + + // GetGpuInstancePossiblePlacementsFunc mocks the GetGpuInstancePossiblePlacements method. + GetGpuInstancePossiblePlacementsFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) + + // GetGpuInstanceProfileInfoFunc mocks the GetGpuInstanceProfileInfo method. + GetGpuInstanceProfileInfoFunc func(n int) (nvml.GpuInstanceProfileInfo, nvml.Return) + + // GetGpuInstanceProfileInfoByIdVFunc mocks the GetGpuInstanceProfileInfoByIdV method. + GetGpuInstanceProfileInfoByIdVFunc func(n int) nvml.GpuInstanceProfileInfoByIdHandler + + // GetGpuInstanceProfileInfoVFunc mocks the GetGpuInstanceProfileInfoV method. + GetGpuInstanceProfileInfoVFunc func(n int) nvml.GpuInstanceProfileInfoHandler + + // GetGpuInstanceRemainingCapacityFunc mocks the GetGpuInstanceRemainingCapacity method. + GetGpuInstanceRemainingCapacityFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) + + // GetGpuInstancesFunc mocks the GetGpuInstances method. + GetGpuInstancesFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) + + // GetGpuMaxPcieLinkGenerationFunc mocks the GetGpuMaxPcieLinkGeneration method. + GetGpuMaxPcieLinkGenerationFunc func() (int, nvml.Return) + + // GetGpuOperationModeFunc mocks the GetGpuOperationMode method. + GetGpuOperationModeFunc func() (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) + + // GetGraphicsRunningProcessesFunc mocks the GetGraphicsRunningProcesses method. + GetGraphicsRunningProcessesFunc func() ([]nvml.ProcessInfo, nvml.Return) + + // GetGridLicensableFeaturesFunc mocks the GetGridLicensableFeatures method. + GetGridLicensableFeaturesFunc func() (nvml.GridLicensableFeatures, nvml.Return) + + // GetGspFirmwareModeFunc mocks the GetGspFirmwareMode method. + GetGspFirmwareModeFunc func() (bool, bool, nvml.Return) + + // GetGspFirmwareVersionFunc mocks the GetGspFirmwareVersion method. + GetGspFirmwareVersionFunc func() (string, nvml.Return) + + // GetHostVgpuModeFunc mocks the GetHostVgpuMode method. + GetHostVgpuModeFunc func() (nvml.HostVgpuMode, nvml.Return) + + // GetIndexFunc mocks the GetIndex method. + GetIndexFunc func() (int, nvml.Return) + + // GetInforomConfigurationChecksumFunc mocks the GetInforomConfigurationChecksum method. + GetInforomConfigurationChecksumFunc func() (uint32, nvml.Return) + + // GetInforomImageVersionFunc mocks the GetInforomImageVersion method. + GetInforomImageVersionFunc func() (string, nvml.Return) + + // GetInforomVersionFunc mocks the GetInforomVersion method. + GetInforomVersionFunc func(inforomObject nvml.InforomObject) (string, nvml.Return) + + // GetIrqNumFunc mocks the GetIrqNum method. + GetIrqNumFunc func() (int, nvml.Return) + + // GetJpgUtilizationFunc mocks the GetJpgUtilization method. + GetJpgUtilizationFunc func() (uint32, uint32, nvml.Return) + + // GetLastBBXFlushTimeFunc mocks the GetLastBBXFlushTime method. + GetLastBBXFlushTimeFunc func() (uint64, uint, nvml.Return) + + // GetMPSComputeRunningProcessesFunc mocks the GetMPSComputeRunningProcesses method. + GetMPSComputeRunningProcessesFunc func() ([]nvml.ProcessInfo, nvml.Return) + + // GetMarginTemperatureFunc mocks the GetMarginTemperature method. + GetMarginTemperatureFunc func() (nvml.MarginTemperature, nvml.Return) + + // GetMaxClockInfoFunc mocks the GetMaxClockInfo method. + GetMaxClockInfoFunc func(clockType nvml.ClockType) (uint32, nvml.Return) + + // GetMaxCustomerBoostClockFunc mocks the GetMaxCustomerBoostClock method. + GetMaxCustomerBoostClockFunc func(clockType nvml.ClockType) (uint32, nvml.Return) + + // GetMaxMigDeviceCountFunc mocks the GetMaxMigDeviceCount method. + GetMaxMigDeviceCountFunc func() (int, nvml.Return) + + // GetMaxPcieLinkGenerationFunc mocks the GetMaxPcieLinkGeneration method. + GetMaxPcieLinkGenerationFunc func() (int, nvml.Return) + + // GetMaxPcieLinkWidthFunc mocks the GetMaxPcieLinkWidth method. + GetMaxPcieLinkWidthFunc func() (int, nvml.Return) + + // GetMemClkMinMaxVfOffsetFunc mocks the GetMemClkMinMaxVfOffset method. + GetMemClkMinMaxVfOffsetFunc func() (int, int, nvml.Return) + + // GetMemClkVfOffsetFunc mocks the GetMemClkVfOffset method. + GetMemClkVfOffsetFunc func() (int, nvml.Return) + + // GetMemoryAffinityFunc mocks the GetMemoryAffinity method. + GetMemoryAffinityFunc func(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) + + // GetMemoryBusWidthFunc mocks the GetMemoryBusWidth method. + GetMemoryBusWidthFunc func() (uint32, nvml.Return) + + // GetMemoryErrorCounterFunc mocks the GetMemoryErrorCounter method. + GetMemoryErrorCounterFunc func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) + + // GetMemoryInfoFunc mocks the GetMemoryInfo method. + GetMemoryInfoFunc func() (nvml.Memory, nvml.Return) + + // GetMemoryInfo_v2Func mocks the GetMemoryInfo_v2 method. + GetMemoryInfo_v2Func func() (nvml.Memory_v2, nvml.Return) + + // GetMigDeviceHandleByIndexFunc mocks the GetMigDeviceHandleByIndex method. + GetMigDeviceHandleByIndexFunc func(n int) (nvml.Device, nvml.Return) + + // GetMigModeFunc mocks the GetMigMode method. + GetMigModeFunc func() (int, int, nvml.Return) + + // GetMinMaxClockOfPStateFunc mocks the GetMinMaxClockOfPState method. + GetMinMaxClockOfPStateFunc func(clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) + + // GetMinMaxFanSpeedFunc mocks the GetMinMaxFanSpeed method. + GetMinMaxFanSpeedFunc func() (int, int, nvml.Return) + + // GetMinorNumberFunc mocks the GetMinorNumber method. + GetMinorNumberFunc func() (int, nvml.Return) + + // GetModuleIdFunc mocks the GetModuleId method. + GetModuleIdFunc func() (int, nvml.Return) + + // GetMultiGpuBoardFunc mocks the GetMultiGpuBoard method. + GetMultiGpuBoardFunc func() (int, nvml.Return) + + // GetNameFunc mocks the GetName method. + GetNameFunc func() (string, nvml.Return) + + // GetNumFansFunc mocks the GetNumFans method. + GetNumFansFunc func() (int, nvml.Return) + + // GetNumGpuCoresFunc mocks the GetNumGpuCores method. + GetNumGpuCoresFunc func() (int, nvml.Return) + + // GetNumaNodeIdFunc mocks the GetNumaNodeId method. + GetNumaNodeIdFunc func() (int, nvml.Return) + + // GetNvLinkCapabilityFunc mocks the GetNvLinkCapability method. + GetNvLinkCapabilityFunc func(n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) + + // GetNvLinkErrorCounterFunc mocks the GetNvLinkErrorCounter method. + GetNvLinkErrorCounterFunc func(n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) + + // GetNvLinkInfoFunc mocks the GetNvLinkInfo method. + GetNvLinkInfoFunc func() nvml.NvLinkInfoHandler + + // GetNvLinkRemoteDeviceTypeFunc mocks the GetNvLinkRemoteDeviceType method. + GetNvLinkRemoteDeviceTypeFunc func(n int) (nvml.IntNvLinkDeviceType, nvml.Return) + + // GetNvLinkRemotePciInfoFunc mocks the GetNvLinkRemotePciInfo method. + GetNvLinkRemotePciInfoFunc func(n int) (nvml.PciInfo, nvml.Return) + + // GetNvLinkStateFunc mocks the GetNvLinkState method. + GetNvLinkStateFunc func(n int) (nvml.EnableState, nvml.Return) + + // GetNvLinkUtilizationControlFunc mocks the GetNvLinkUtilizationControl method. + GetNvLinkUtilizationControlFunc func(n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) + + // GetNvLinkUtilizationCounterFunc mocks the GetNvLinkUtilizationCounter method. + GetNvLinkUtilizationCounterFunc func(n1 int, n2 int) (uint64, uint64, nvml.Return) + + // GetNvLinkVersionFunc mocks the GetNvLinkVersion method. + GetNvLinkVersionFunc func(n int) (uint32, nvml.Return) + + // GetNvlinkBwModeFunc mocks the GetNvlinkBwMode method. + GetNvlinkBwModeFunc func() (nvml.NvlinkGetBwMode, nvml.Return) + + // GetNvlinkSupportedBwModesFunc mocks the GetNvlinkSupportedBwModes method. + GetNvlinkSupportedBwModesFunc func() (nvml.NvlinkSupportedBwModes, nvml.Return) + + // GetOfaUtilizationFunc mocks the GetOfaUtilization method. + GetOfaUtilizationFunc func() (uint32, uint32, nvml.Return) + + // GetP2PStatusFunc mocks the GetP2PStatus method. + GetP2PStatusFunc func(device nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) + + // GetPciInfoFunc mocks the GetPciInfo method. + GetPciInfoFunc func() (nvml.PciInfo, nvml.Return) + + // GetPciInfoExtFunc mocks the GetPciInfoExt method. + GetPciInfoExtFunc func() (nvml.PciInfoExt, nvml.Return) + + // GetPcieLinkMaxSpeedFunc mocks the GetPcieLinkMaxSpeed method. + GetPcieLinkMaxSpeedFunc func() (uint32, nvml.Return) + + // GetPcieReplayCounterFunc mocks the GetPcieReplayCounter method. + GetPcieReplayCounterFunc func() (int, nvml.Return) + + // GetPcieSpeedFunc mocks the GetPcieSpeed method. + GetPcieSpeedFunc func() (int, nvml.Return) + + // GetPcieThroughputFunc mocks the GetPcieThroughput method. + GetPcieThroughputFunc func(pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) + + // GetPdiFunc mocks the GetPdi method. + GetPdiFunc func() (nvml.Pdi, nvml.Return) + + // GetPerformanceModesFunc mocks the GetPerformanceModes method. + GetPerformanceModesFunc func() (nvml.DevicePerfModes, nvml.Return) + + // GetPerformanceStateFunc mocks the GetPerformanceState method. + GetPerformanceStateFunc func() (nvml.Pstates, nvml.Return) + + // GetPersistenceModeFunc mocks the GetPersistenceMode method. + GetPersistenceModeFunc func() (nvml.EnableState, nvml.Return) + + // GetPgpuMetadataStringFunc mocks the GetPgpuMetadataString method. + GetPgpuMetadataStringFunc func() (string, nvml.Return) + + // GetPlatformInfoFunc mocks the GetPlatformInfo method. + GetPlatformInfoFunc func() (nvml.PlatformInfo, nvml.Return) + + // GetPowerManagementDefaultLimitFunc mocks the GetPowerManagementDefaultLimit method. + GetPowerManagementDefaultLimitFunc func() (uint32, nvml.Return) + + // GetPowerManagementLimitFunc mocks the GetPowerManagementLimit method. + GetPowerManagementLimitFunc func() (uint32, nvml.Return) + + // GetPowerManagementLimitConstraintsFunc mocks the GetPowerManagementLimitConstraints method. + GetPowerManagementLimitConstraintsFunc func() (uint32, uint32, nvml.Return) + + // GetPowerManagementModeFunc mocks the GetPowerManagementMode method. + GetPowerManagementModeFunc func() (nvml.EnableState, nvml.Return) + + // GetPowerMizerMode_v1Func mocks the GetPowerMizerMode_v1 method. + GetPowerMizerMode_v1Func func() (nvml.DevicePowerMizerModes_v1, nvml.Return) + + // GetPowerSourceFunc mocks the GetPowerSource method. + GetPowerSourceFunc func() (nvml.PowerSource, nvml.Return) + + // GetPowerStateFunc mocks the GetPowerState method. + GetPowerStateFunc func() (nvml.Pstates, nvml.Return) + + // GetPowerUsageFunc mocks the GetPowerUsage method. + GetPowerUsageFunc func() (uint32, nvml.Return) + + // GetProcessUtilizationFunc mocks the GetProcessUtilization method. + GetProcessUtilizationFunc func(v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) + + // GetProcessesUtilizationInfoFunc mocks the GetProcessesUtilizationInfo method. + GetProcessesUtilizationInfoFunc func() (nvml.ProcessesUtilizationInfo, nvml.Return) + + // GetRemappedRowsFunc mocks the GetRemappedRows method. + GetRemappedRowsFunc func() (int, int, bool, bool, nvml.Return) + + // GetRepairStatusFunc mocks the GetRepairStatus method. + GetRepairStatusFunc func() (nvml.RepairStatus, nvml.Return) + + // GetRetiredPagesFunc mocks the GetRetiredPages method. + GetRetiredPagesFunc func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) + + // GetRetiredPagesPendingStatusFunc mocks the GetRetiredPagesPendingStatus method. + GetRetiredPagesPendingStatusFunc func() (nvml.EnableState, nvml.Return) + + // GetRetiredPages_v2Func mocks the GetRetiredPages_v2 method. + GetRetiredPages_v2Func func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) + + // GetRowRemapperHistogramFunc mocks the GetRowRemapperHistogram method. + GetRowRemapperHistogramFunc func() (nvml.RowRemapperHistogramValues, nvml.Return) + + // GetRunningProcessDetailListFunc mocks the GetRunningProcessDetailList method. + GetRunningProcessDetailListFunc func() (nvml.ProcessDetailList, nvml.Return) + + // GetSamplesFunc mocks the GetSamples method. + GetSamplesFunc func(samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) + + // GetSerialFunc mocks the GetSerial method. + GetSerialFunc func() (string, nvml.Return) + + // GetSramEccErrorStatusFunc mocks the GetSramEccErrorStatus method. + GetSramEccErrorStatusFunc func() (nvml.EccSramErrorStatus, nvml.Return) + + // GetSramUniqueUncorrectedEccErrorCountsFunc mocks the GetSramUniqueUncorrectedEccErrorCounts method. + GetSramUniqueUncorrectedEccErrorCountsFunc func(eccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts) nvml.Return + + // GetSupportedClocksEventReasonsFunc mocks the GetSupportedClocksEventReasons method. + GetSupportedClocksEventReasonsFunc func() (uint64, nvml.Return) + + // GetSupportedClocksThrottleReasonsFunc mocks the GetSupportedClocksThrottleReasons method. + GetSupportedClocksThrottleReasonsFunc func() (uint64, nvml.Return) + + // GetSupportedEventTypesFunc mocks the GetSupportedEventTypes method. + GetSupportedEventTypesFunc func() (uint64, nvml.Return) + + // GetSupportedGraphicsClocksFunc mocks the GetSupportedGraphicsClocks method. + GetSupportedGraphicsClocksFunc func(n int) (int, uint32, nvml.Return) + + // GetSupportedMemoryClocksFunc mocks the GetSupportedMemoryClocks method. + GetSupportedMemoryClocksFunc func() (int, uint32, nvml.Return) + + // GetSupportedPerformanceStatesFunc mocks the GetSupportedPerformanceStates method. + GetSupportedPerformanceStatesFunc func() ([]nvml.Pstates, nvml.Return) + + // GetSupportedVgpusFunc mocks the GetSupportedVgpus method. + GetSupportedVgpusFunc func() ([]nvml.VgpuTypeId, nvml.Return) + + // GetTargetFanSpeedFunc mocks the GetTargetFanSpeed method. + GetTargetFanSpeedFunc func(n int) (int, nvml.Return) + + // GetTemperatureFunc mocks the GetTemperature method. + GetTemperatureFunc func(temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) + + // GetTemperatureThresholdFunc mocks the GetTemperatureThreshold method. + GetTemperatureThresholdFunc func(temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) + + // GetTemperatureVFunc mocks the GetTemperatureV method. + GetTemperatureVFunc func() nvml.TemperatureHandler + + // GetThermalSettingsFunc mocks the GetThermalSettings method. + GetThermalSettingsFunc func(v uint32) (nvml.GpuThermalSettings, nvml.Return) + + // GetTopologyCommonAncestorFunc mocks the GetTopologyCommonAncestor method. + GetTopologyCommonAncestorFunc func(device nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) + + // GetTopologyNearestGpusFunc mocks the GetTopologyNearestGpus method. + GetTopologyNearestGpusFunc func(gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) + + // GetTotalEccErrorsFunc mocks the GetTotalEccErrors method. + GetTotalEccErrorsFunc func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) + + // GetTotalEnergyConsumptionFunc mocks the GetTotalEnergyConsumption method. + GetTotalEnergyConsumptionFunc func() (uint64, nvml.Return) + + // GetUUIDFunc mocks the GetUUID method. + GetUUIDFunc func() (string, nvml.Return) + + // GetUtilizationRatesFunc mocks the GetUtilizationRates method. + GetUtilizationRatesFunc func() (nvml.Utilization, nvml.Return) + + // GetVbiosVersionFunc mocks the GetVbiosVersion method. + GetVbiosVersionFunc func() (string, nvml.Return) + + // GetVgpuCapabilitiesFunc mocks the GetVgpuCapabilities method. + GetVgpuCapabilitiesFunc func(deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) + + // GetVgpuHeterogeneousModeFunc mocks the GetVgpuHeterogeneousMode method. + GetVgpuHeterogeneousModeFunc func() (nvml.VgpuHeterogeneousMode, nvml.Return) + + // GetVgpuInstancesUtilizationInfoFunc mocks the GetVgpuInstancesUtilizationInfo method. + GetVgpuInstancesUtilizationInfoFunc func() (nvml.VgpuInstancesUtilizationInfo, nvml.Return) + + // GetVgpuMetadataFunc mocks the GetVgpuMetadata method. + GetVgpuMetadataFunc func() (nvml.VgpuPgpuMetadata, nvml.Return) + + // GetVgpuProcessUtilizationFunc mocks the GetVgpuProcessUtilization method. + GetVgpuProcessUtilizationFunc func(v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) + + // GetVgpuProcessesUtilizationInfoFunc mocks the GetVgpuProcessesUtilizationInfo method. + GetVgpuProcessesUtilizationInfoFunc func() (nvml.VgpuProcessesUtilizationInfo, nvml.Return) + + // GetVgpuSchedulerCapabilitiesFunc mocks the GetVgpuSchedulerCapabilities method. + GetVgpuSchedulerCapabilitiesFunc func() (nvml.VgpuSchedulerCapabilities, nvml.Return) + + // GetVgpuSchedulerLogFunc mocks the GetVgpuSchedulerLog method. + GetVgpuSchedulerLogFunc func() (nvml.VgpuSchedulerLog, nvml.Return) + + // GetVgpuSchedulerStateFunc mocks the GetVgpuSchedulerState method. + GetVgpuSchedulerStateFunc func() (nvml.VgpuSchedulerGetState, nvml.Return) + + // GetVgpuTypeCreatablePlacementsFunc mocks the GetVgpuTypeCreatablePlacements method. + GetVgpuTypeCreatablePlacementsFunc func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) + + // GetVgpuTypeSupportedPlacementsFunc mocks the GetVgpuTypeSupportedPlacements method. + GetVgpuTypeSupportedPlacementsFunc func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) + + // GetVgpuUtilizationFunc mocks the GetVgpuUtilization method. + GetVgpuUtilizationFunc func(v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) + + // GetViolationStatusFunc mocks the GetViolationStatus method. + GetViolationStatusFunc func(perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) + + // GetVirtualizationModeFunc mocks the GetVirtualizationMode method. + GetVirtualizationModeFunc func() (nvml.GpuVirtualizationMode, nvml.Return) + + // GpmMigSampleGetFunc mocks the GpmMigSampleGet method. + GpmMigSampleGetFunc func(n int, gpmSample nvml.GpmSample) nvml.Return + + // GpmQueryDeviceSupportFunc mocks the GpmQueryDeviceSupport method. + GpmQueryDeviceSupportFunc func() (nvml.GpmSupport, nvml.Return) + + // GpmQueryDeviceSupportVFunc mocks the GpmQueryDeviceSupportV method. + GpmQueryDeviceSupportVFunc func() nvml.GpmSupportV + + // GpmQueryIfStreamingEnabledFunc mocks the GpmQueryIfStreamingEnabled method. + GpmQueryIfStreamingEnabledFunc func() (uint32, nvml.Return) + + // GpmSampleGetFunc mocks the GpmSampleGet method. + GpmSampleGetFunc func(gpmSample nvml.GpmSample) nvml.Return + + // GpmSetStreamingEnabledFunc mocks the GpmSetStreamingEnabled method. + GpmSetStreamingEnabledFunc func(v uint32) nvml.Return + + // IsMigDeviceHandleFunc mocks the IsMigDeviceHandle method. + IsMigDeviceHandleFunc func() (bool, nvml.Return) + + // OnSameBoardFunc mocks the OnSameBoard method. + OnSameBoardFunc func(device nvml.Device) (int, nvml.Return) + + // PowerSmoothingActivatePresetProfileFunc mocks the PowerSmoothingActivatePresetProfile method. + PowerSmoothingActivatePresetProfileFunc func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return + + // PowerSmoothingSetStateFunc mocks the PowerSmoothingSetState method. + PowerSmoothingSetStateFunc func(powerSmoothingState *nvml.PowerSmoothingState) nvml.Return + + // PowerSmoothingUpdatePresetProfileParamFunc mocks the PowerSmoothingUpdatePresetProfileParam method. + PowerSmoothingUpdatePresetProfileParamFunc func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return + + // ReadWritePRM_v1Func mocks the ReadWritePRM_v1 method. + ReadWritePRM_v1Func func(pRMTLV_v1 *nvml.PRMTLV_v1) nvml.Return + + // RegisterEventsFunc mocks the RegisterEvents method. + RegisterEventsFunc func(v uint64, eventSet nvml.EventSet) nvml.Return + + // ResetApplicationsClocksFunc mocks the ResetApplicationsClocks method. + ResetApplicationsClocksFunc func() nvml.Return + + // ResetGpuLockedClocksFunc mocks the ResetGpuLockedClocks method. + ResetGpuLockedClocksFunc func() nvml.Return + + // ResetMemoryLockedClocksFunc mocks the ResetMemoryLockedClocks method. + ResetMemoryLockedClocksFunc func() nvml.Return + + // ResetNvLinkErrorCountersFunc mocks the ResetNvLinkErrorCounters method. + ResetNvLinkErrorCountersFunc func(n int) nvml.Return + + // ResetNvLinkUtilizationCounterFunc mocks the ResetNvLinkUtilizationCounter method. + ResetNvLinkUtilizationCounterFunc func(n1 int, n2 int) nvml.Return + + // SetAPIRestrictionFunc mocks the SetAPIRestriction method. + SetAPIRestrictionFunc func(restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return + + // SetAccountingModeFunc mocks the SetAccountingMode method. + SetAccountingModeFunc func(enableState nvml.EnableState) nvml.Return + + // SetApplicationsClocksFunc mocks the SetApplicationsClocks method. + SetApplicationsClocksFunc func(v1 uint32, v2 uint32) nvml.Return + + // SetAutoBoostedClocksEnabledFunc mocks the SetAutoBoostedClocksEnabled method. + SetAutoBoostedClocksEnabledFunc func(enableState nvml.EnableState) nvml.Return + + // SetClockOffsetsFunc mocks the SetClockOffsets method. + SetClockOffsetsFunc func(clockOffset nvml.ClockOffset) nvml.Return + + // SetComputeModeFunc mocks the SetComputeMode method. + SetComputeModeFunc func(computeMode nvml.ComputeMode) nvml.Return + + // SetConfComputeUnprotectedMemSizeFunc mocks the SetConfComputeUnprotectedMemSize method. + SetConfComputeUnprotectedMemSizeFunc func(v uint64) nvml.Return + + // SetCpuAffinityFunc mocks the SetCpuAffinity method. + SetCpuAffinityFunc func() nvml.Return + + // SetDefaultAutoBoostedClocksEnabledFunc mocks the SetDefaultAutoBoostedClocksEnabled method. + SetDefaultAutoBoostedClocksEnabledFunc func(enableState nvml.EnableState, v uint32) nvml.Return + + // SetDefaultFanSpeed_v2Func mocks the SetDefaultFanSpeed_v2 method. + SetDefaultFanSpeed_v2Func func(n int) nvml.Return + + // SetDramEncryptionModeFunc mocks the SetDramEncryptionMode method. + SetDramEncryptionModeFunc func(dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return + + // SetDriverModelFunc mocks the SetDriverModel method. + SetDriverModelFunc func(driverModel nvml.DriverModel, v uint32) nvml.Return + + // SetEccModeFunc mocks the SetEccMode method. + SetEccModeFunc func(enableState nvml.EnableState) nvml.Return + + // SetFanControlPolicyFunc mocks the SetFanControlPolicy method. + SetFanControlPolicyFunc func(n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return + + // SetFanSpeed_v2Func mocks the SetFanSpeed_v2 method. + SetFanSpeed_v2Func func(n1 int, n2 int) nvml.Return + + // SetGpcClkVfOffsetFunc mocks the SetGpcClkVfOffset method. + SetGpcClkVfOffsetFunc func(n int) nvml.Return + + // SetGpuLockedClocksFunc mocks the SetGpuLockedClocks method. + SetGpuLockedClocksFunc func(v1 uint32, v2 uint32) nvml.Return + + // SetGpuOperationModeFunc mocks the SetGpuOperationMode method. + SetGpuOperationModeFunc func(gpuOperationMode nvml.GpuOperationMode) nvml.Return + + // SetMemClkVfOffsetFunc mocks the SetMemClkVfOffset method. + SetMemClkVfOffsetFunc func(n int) nvml.Return + + // SetMemoryLockedClocksFunc mocks the SetMemoryLockedClocks method. + SetMemoryLockedClocksFunc func(v1 uint32, v2 uint32) nvml.Return + + // SetMigModeFunc mocks the SetMigMode method. + SetMigModeFunc func(n int) (nvml.Return, nvml.Return) + + // SetNvLinkDeviceLowPowerThresholdFunc mocks the SetNvLinkDeviceLowPowerThreshold method. + SetNvLinkDeviceLowPowerThresholdFunc func(nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return + + // SetNvLinkUtilizationControlFunc mocks the SetNvLinkUtilizationControl method. + SetNvLinkUtilizationControlFunc func(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return + + // SetNvlinkBwModeFunc mocks the SetNvlinkBwMode method. + SetNvlinkBwModeFunc func(nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return + + // SetPersistenceModeFunc mocks the SetPersistenceMode method. + SetPersistenceModeFunc func(enableState nvml.EnableState) nvml.Return + + // SetPowerManagementLimitFunc mocks the SetPowerManagementLimit method. + SetPowerManagementLimitFunc func(v uint32) nvml.Return + + // SetPowerManagementLimit_v2Func mocks the SetPowerManagementLimit_v2 method. + SetPowerManagementLimit_v2Func func(powerValue_v2 *nvml.PowerValue_v2) nvml.Return + + // SetTemperatureThresholdFunc mocks the SetTemperatureThreshold method. + SetTemperatureThresholdFunc func(temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return + + // SetVgpuCapabilitiesFunc mocks the SetVgpuCapabilities method. + SetVgpuCapabilitiesFunc func(deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return + + // SetVgpuHeterogeneousModeFunc mocks the SetVgpuHeterogeneousMode method. + SetVgpuHeterogeneousModeFunc func(vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return + + // SetVgpuSchedulerStateFunc mocks the SetVgpuSchedulerState method. + SetVgpuSchedulerStateFunc func(vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return + + // SetVirtualizationModeFunc mocks the SetVirtualizationMode method. + SetVirtualizationModeFunc func(gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return + + // ValidateInforomFunc mocks the ValidateInforom method. + ValidateInforomFunc func() nvml.Return + + // VgpuTypeGetMaxInstancesFunc mocks the VgpuTypeGetMaxInstances method. + VgpuTypeGetMaxInstancesFunc func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) + + // WorkloadPowerProfileClearRequestedProfilesFunc mocks the WorkloadPowerProfileClearRequestedProfiles method. + WorkloadPowerProfileClearRequestedProfilesFunc func(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return + + // WorkloadPowerProfileGetCurrentProfilesFunc mocks the WorkloadPowerProfileGetCurrentProfiles method. + WorkloadPowerProfileGetCurrentProfilesFunc func() (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) + + // WorkloadPowerProfileGetProfilesInfoFunc mocks the WorkloadPowerProfileGetProfilesInfo method. + WorkloadPowerProfileGetProfilesInfoFunc func() (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) + + // WorkloadPowerProfileSetRequestedProfilesFunc mocks the WorkloadPowerProfileSetRequestedProfiles method. + WorkloadPowerProfileSetRequestedProfilesFunc func(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return + + // calls tracks calls to the methods. + calls struct { + // ClearAccountingPids holds details about calls to the ClearAccountingPids method. + ClearAccountingPids []struct { + } + // ClearCpuAffinity holds details about calls to the ClearCpuAffinity method. + ClearCpuAffinity []struct { + } + // ClearEccErrorCounts holds details about calls to the ClearEccErrorCounts method. + ClearEccErrorCounts []struct { + // EccCounterType is the eccCounterType argument value. + EccCounterType nvml.EccCounterType + } + // ClearFieldValues holds details about calls to the ClearFieldValues method. + ClearFieldValues []struct { + // FieldValues is the fieldValues argument value. + FieldValues []nvml.FieldValue + } + // CreateGpuInstance holds details about calls to the CreateGpuInstance method. + CreateGpuInstance []struct { + // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + // CreateGpuInstanceWithPlacement holds details about calls to the CreateGpuInstanceWithPlacement method. + CreateGpuInstanceWithPlacement []struct { + // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + // GpuInstancePlacement is the gpuInstancePlacement argument value. + GpuInstancePlacement *nvml.GpuInstancePlacement + } + // FreezeNvLinkUtilizationCounter holds details about calls to the FreezeNvLinkUtilizationCounter method. + FreezeNvLinkUtilizationCounter []struct { + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // GetAPIRestriction holds details about calls to the GetAPIRestriction method. + GetAPIRestriction []struct { + // RestrictedAPI is the restrictedAPI argument value. + RestrictedAPI nvml.RestrictedAPI + } + // GetAccountingBufferSize holds details about calls to the GetAccountingBufferSize method. + GetAccountingBufferSize []struct { + } + // GetAccountingMode holds details about calls to the GetAccountingMode method. + GetAccountingMode []struct { + } + // GetAccountingPids holds details about calls to the GetAccountingPids method. + GetAccountingPids []struct { + } + // GetAccountingStats holds details about calls to the GetAccountingStats method. + GetAccountingStats []struct { + // V is the v argument value. + V uint32 + } + // GetActiveVgpus holds details about calls to the GetActiveVgpus method. + GetActiveVgpus []struct { + } + // GetAdaptiveClockInfoStatus holds details about calls to the GetAdaptiveClockInfoStatus method. + GetAdaptiveClockInfoStatus []struct { + } + // GetAddressingMode holds details about calls to the GetAddressingMode method. + GetAddressingMode []struct { + } + // GetApplicationsClock holds details about calls to the GetApplicationsClock method. + GetApplicationsClock []struct { + // ClockType is the clockType argument value. + ClockType nvml.ClockType + } + // GetArchitecture holds details about calls to the GetArchitecture method. + GetArchitecture []struct { + } + // GetAttributes holds details about calls to the GetAttributes method. + GetAttributes []struct { + } + // GetAutoBoostedClocksEnabled holds details about calls to the GetAutoBoostedClocksEnabled method. + GetAutoBoostedClocksEnabled []struct { + } + // GetBAR1MemoryInfo holds details about calls to the GetBAR1MemoryInfo method. + GetBAR1MemoryInfo []struct { + } + // GetBoardId holds details about calls to the GetBoardId method. + GetBoardId []struct { + } + // GetBoardPartNumber holds details about calls to the GetBoardPartNumber method. + GetBoardPartNumber []struct { + } + // GetBrand holds details about calls to the GetBrand method. + GetBrand []struct { + } + // GetBridgeChipInfo holds details about calls to the GetBridgeChipInfo method. + GetBridgeChipInfo []struct { + } + // GetBusType holds details about calls to the GetBusType method. + GetBusType []struct { + } + // GetC2cModeInfoV holds details about calls to the GetC2cModeInfoV method. + GetC2cModeInfoV []struct { + } + // GetCapabilities holds details about calls to the GetCapabilities method. + GetCapabilities []struct { + } + // GetClkMonStatus holds details about calls to the GetClkMonStatus method. + GetClkMonStatus []struct { + } + // GetClock holds details about calls to the GetClock method. + GetClock []struct { + // ClockType is the clockType argument value. + ClockType nvml.ClockType + // ClockId is the clockId argument value. + ClockId nvml.ClockId + } + // GetClockInfo holds details about calls to the GetClockInfo method. + GetClockInfo []struct { + // ClockType is the clockType argument value. + ClockType nvml.ClockType + } + // GetClockOffsets holds details about calls to the GetClockOffsets method. + GetClockOffsets []struct { + } + // GetComputeInstanceId holds details about calls to the GetComputeInstanceId method. + GetComputeInstanceId []struct { + } + // GetComputeMode holds details about calls to the GetComputeMode method. + GetComputeMode []struct { + } + // GetComputeRunningProcesses holds details about calls to the GetComputeRunningProcesses method. + GetComputeRunningProcesses []struct { + } + // GetConfComputeGpuAttestationReport holds details about calls to the GetConfComputeGpuAttestationReport method. + GetConfComputeGpuAttestationReport []struct { + // ConfComputeGpuAttestationReport is the confComputeGpuAttestationReport argument value. + ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport + } + // GetConfComputeGpuCertificate holds details about calls to the GetConfComputeGpuCertificate method. + GetConfComputeGpuCertificate []struct { + } + // GetConfComputeMemSizeInfo holds details about calls to the GetConfComputeMemSizeInfo method. + GetConfComputeMemSizeInfo []struct { + } + // GetConfComputeProtectedMemoryUsage holds details about calls to the GetConfComputeProtectedMemoryUsage method. + GetConfComputeProtectedMemoryUsage []struct { + } + // GetCoolerInfo holds details about calls to the GetCoolerInfo method. + GetCoolerInfo []struct { + } + // GetCpuAffinity holds details about calls to the GetCpuAffinity method. + GetCpuAffinity []struct { + // N is the n argument value. + N int + } + // GetCpuAffinityWithinScope holds details about calls to the GetCpuAffinityWithinScope method. + GetCpuAffinityWithinScope []struct { + // N is the n argument value. + N int + // AffinityScope is the affinityScope argument value. + AffinityScope nvml.AffinityScope + } + // GetCreatableVgpus holds details about calls to the GetCreatableVgpus method. + GetCreatableVgpus []struct { + } + // GetCudaComputeCapability holds details about calls to the GetCudaComputeCapability method. + GetCudaComputeCapability []struct { + } + // GetCurrPcieLinkGeneration holds details about calls to the GetCurrPcieLinkGeneration method. + GetCurrPcieLinkGeneration []struct { + } + // GetCurrPcieLinkWidth holds details about calls to the GetCurrPcieLinkWidth method. + GetCurrPcieLinkWidth []struct { + } + // GetCurrentClockFreqs holds details about calls to the GetCurrentClockFreqs method. + GetCurrentClockFreqs []struct { + } + // GetCurrentClocksEventReasons holds details about calls to the GetCurrentClocksEventReasons method. + GetCurrentClocksEventReasons []struct { + } + // GetCurrentClocksThrottleReasons holds details about calls to the GetCurrentClocksThrottleReasons method. + GetCurrentClocksThrottleReasons []struct { + } + // GetDecoderUtilization holds details about calls to the GetDecoderUtilization method. + GetDecoderUtilization []struct { + } + // GetDefaultApplicationsClock holds details about calls to the GetDefaultApplicationsClock method. + GetDefaultApplicationsClock []struct { + // ClockType is the clockType argument value. + ClockType nvml.ClockType + } + // GetDefaultEccMode holds details about calls to the GetDefaultEccMode method. + GetDefaultEccMode []struct { + } + // GetDetailedEccErrors holds details about calls to the GetDetailedEccErrors method. + GetDetailedEccErrors []struct { + // MemoryErrorType is the memoryErrorType argument value. + MemoryErrorType nvml.MemoryErrorType + // EccCounterType is the eccCounterType argument value. + EccCounterType nvml.EccCounterType + } + // GetDeviceHandleFromMigDeviceHandle holds details about calls to the GetDeviceHandleFromMigDeviceHandle method. + GetDeviceHandleFromMigDeviceHandle []struct { + } + // GetDisplayActive holds details about calls to the GetDisplayActive method. + GetDisplayActive []struct { + } + // GetDisplayMode holds details about calls to the GetDisplayMode method. + GetDisplayMode []struct { + } + // GetDramEncryptionMode holds details about calls to the GetDramEncryptionMode method. + GetDramEncryptionMode []struct { + } + // GetDriverModel holds details about calls to the GetDriverModel method. + GetDriverModel []struct { + } + // GetDriverModel_v2 holds details about calls to the GetDriverModel_v2 method. + GetDriverModel_v2 []struct { + } + // GetDynamicPstatesInfo holds details about calls to the GetDynamicPstatesInfo method. + GetDynamicPstatesInfo []struct { + } + // GetEccMode holds details about calls to the GetEccMode method. + GetEccMode []struct { + } + // GetEncoderCapacity holds details about calls to the GetEncoderCapacity method. + GetEncoderCapacity []struct { + // EncoderType is the encoderType argument value. + EncoderType nvml.EncoderType + } + // GetEncoderSessions holds details about calls to the GetEncoderSessions method. + GetEncoderSessions []struct { + } + // GetEncoderStats holds details about calls to the GetEncoderStats method. + GetEncoderStats []struct { + } + // GetEncoderUtilization holds details about calls to the GetEncoderUtilization method. + GetEncoderUtilization []struct { + } + // GetEnforcedPowerLimit holds details about calls to the GetEnforcedPowerLimit method. + GetEnforcedPowerLimit []struct { + } + // GetFBCSessions holds details about calls to the GetFBCSessions method. + GetFBCSessions []struct { + } + // GetFBCStats holds details about calls to the GetFBCStats method. + GetFBCStats []struct { + } + // GetFanControlPolicy_v2 holds details about calls to the GetFanControlPolicy_v2 method. + GetFanControlPolicy_v2 []struct { + // N is the n argument value. + N int + } + // GetFanSpeed holds details about calls to the GetFanSpeed method. + GetFanSpeed []struct { + } + // GetFanSpeedRPM holds details about calls to the GetFanSpeedRPM method. + GetFanSpeedRPM []struct { + } + // GetFanSpeed_v2 holds details about calls to the GetFanSpeed_v2 method. + GetFanSpeed_v2 []struct { + // N is the n argument value. + N int + } + // GetFieldValues holds details about calls to the GetFieldValues method. + GetFieldValues []struct { + // FieldValues is the fieldValues argument value. + FieldValues []nvml.FieldValue + } + // GetGpcClkMinMaxVfOffset holds details about calls to the GetGpcClkMinMaxVfOffset method. + GetGpcClkMinMaxVfOffset []struct { + } + // GetGpcClkVfOffset holds details about calls to the GetGpcClkVfOffset method. + GetGpcClkVfOffset []struct { + } + // GetGpuFabricInfo holds details about calls to the GetGpuFabricInfo method. + GetGpuFabricInfo []struct { + } + // GetGpuFabricInfoV holds details about calls to the GetGpuFabricInfoV method. + GetGpuFabricInfoV []struct { + } + // GetGpuInstanceById holds details about calls to the GetGpuInstanceById method. + GetGpuInstanceById []struct { + // N is the n argument value. + N int + } + // GetGpuInstanceId holds details about calls to the GetGpuInstanceId method. + GetGpuInstanceId []struct { + } + // GetGpuInstancePossiblePlacements holds details about calls to the GetGpuInstancePossiblePlacements method. + GetGpuInstancePossiblePlacements []struct { + // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + // GetGpuInstanceProfileInfo holds details about calls to the GetGpuInstanceProfileInfo method. + GetGpuInstanceProfileInfo []struct { + // N is the n argument value. + N int + } + // GetGpuInstanceProfileInfoByIdV holds details about calls to the GetGpuInstanceProfileInfoByIdV method. + GetGpuInstanceProfileInfoByIdV []struct { + // N is the n argument value. + N int + } + // GetGpuInstanceProfileInfoV holds details about calls to the GetGpuInstanceProfileInfoV method. + GetGpuInstanceProfileInfoV []struct { + // N is the n argument value. + N int + } + // GetGpuInstanceRemainingCapacity holds details about calls to the GetGpuInstanceRemainingCapacity method. + GetGpuInstanceRemainingCapacity []struct { + // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + // GetGpuInstances holds details about calls to the GetGpuInstances method. + GetGpuInstances []struct { + // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + // GetGpuMaxPcieLinkGeneration holds details about calls to the GetGpuMaxPcieLinkGeneration method. + GetGpuMaxPcieLinkGeneration []struct { + } + // GetGpuOperationMode holds details about calls to the GetGpuOperationMode method. + GetGpuOperationMode []struct { + } + // GetGraphicsRunningProcesses holds details about calls to the GetGraphicsRunningProcesses method. + GetGraphicsRunningProcesses []struct { + } + // GetGridLicensableFeatures holds details about calls to the GetGridLicensableFeatures method. + GetGridLicensableFeatures []struct { + } + // GetGspFirmwareMode holds details about calls to the GetGspFirmwareMode method. + GetGspFirmwareMode []struct { + } + // GetGspFirmwareVersion holds details about calls to the GetGspFirmwareVersion method. + GetGspFirmwareVersion []struct { + } + // GetHostVgpuMode holds details about calls to the GetHostVgpuMode method. + GetHostVgpuMode []struct { + } + // GetIndex holds details about calls to the GetIndex method. + GetIndex []struct { + } + // GetInforomConfigurationChecksum holds details about calls to the GetInforomConfigurationChecksum method. + GetInforomConfigurationChecksum []struct { + } + // GetInforomImageVersion holds details about calls to the GetInforomImageVersion method. + GetInforomImageVersion []struct { + } + // GetInforomVersion holds details about calls to the GetInforomVersion method. + GetInforomVersion []struct { + // InforomObject is the inforomObject argument value. + InforomObject nvml.InforomObject + } + // GetIrqNum holds details about calls to the GetIrqNum method. + GetIrqNum []struct { + } + // GetJpgUtilization holds details about calls to the GetJpgUtilization method. + GetJpgUtilization []struct { + } + // GetLastBBXFlushTime holds details about calls to the GetLastBBXFlushTime method. + GetLastBBXFlushTime []struct { + } + // GetMPSComputeRunningProcesses holds details about calls to the GetMPSComputeRunningProcesses method. + GetMPSComputeRunningProcesses []struct { + } + // GetMarginTemperature holds details about calls to the GetMarginTemperature method. + GetMarginTemperature []struct { + } + // GetMaxClockInfo holds details about calls to the GetMaxClockInfo method. + GetMaxClockInfo []struct { + // ClockType is the clockType argument value. + ClockType nvml.ClockType + } + // GetMaxCustomerBoostClock holds details about calls to the GetMaxCustomerBoostClock method. + GetMaxCustomerBoostClock []struct { + // ClockType is the clockType argument value. + ClockType nvml.ClockType + } + // GetMaxMigDeviceCount holds details about calls to the GetMaxMigDeviceCount method. + GetMaxMigDeviceCount []struct { + } + // GetMaxPcieLinkGeneration holds details about calls to the GetMaxPcieLinkGeneration method. + GetMaxPcieLinkGeneration []struct { + } + // GetMaxPcieLinkWidth holds details about calls to the GetMaxPcieLinkWidth method. + GetMaxPcieLinkWidth []struct { + } + // GetMemClkMinMaxVfOffset holds details about calls to the GetMemClkMinMaxVfOffset method. + GetMemClkMinMaxVfOffset []struct { + } + // GetMemClkVfOffset holds details about calls to the GetMemClkVfOffset method. + GetMemClkVfOffset []struct { + } + // GetMemoryAffinity holds details about calls to the GetMemoryAffinity method. + GetMemoryAffinity []struct { + // N is the n argument value. + N int + // AffinityScope is the affinityScope argument value. + AffinityScope nvml.AffinityScope + } + // GetMemoryBusWidth holds details about calls to the GetMemoryBusWidth method. + GetMemoryBusWidth []struct { + } + // GetMemoryErrorCounter holds details about calls to the GetMemoryErrorCounter method. + GetMemoryErrorCounter []struct { + // MemoryErrorType is the memoryErrorType argument value. + MemoryErrorType nvml.MemoryErrorType + // EccCounterType is the eccCounterType argument value. + EccCounterType nvml.EccCounterType + // MemoryLocation is the memoryLocation argument value. + MemoryLocation nvml.MemoryLocation + } + // GetMemoryInfo holds details about calls to the GetMemoryInfo method. + GetMemoryInfo []struct { + } + // GetMemoryInfo_v2 holds details about calls to the GetMemoryInfo_v2 method. + GetMemoryInfo_v2 []struct { + } + // GetMigDeviceHandleByIndex holds details about calls to the GetMigDeviceHandleByIndex method. + GetMigDeviceHandleByIndex []struct { + // N is the n argument value. + N int + } + // GetMigMode holds details about calls to the GetMigMode method. + GetMigMode []struct { + } + // GetMinMaxClockOfPState holds details about calls to the GetMinMaxClockOfPState method. + GetMinMaxClockOfPState []struct { + // ClockType is the clockType argument value. + ClockType nvml.ClockType + // Pstates is the pstates argument value. + Pstates nvml.Pstates + } + // GetMinMaxFanSpeed holds details about calls to the GetMinMaxFanSpeed method. + GetMinMaxFanSpeed []struct { + } + // GetMinorNumber holds details about calls to the GetMinorNumber method. + GetMinorNumber []struct { + } + // GetModuleId holds details about calls to the GetModuleId method. + GetModuleId []struct { + } + // GetMultiGpuBoard holds details about calls to the GetMultiGpuBoard method. + GetMultiGpuBoard []struct { + } + // GetName holds details about calls to the GetName method. + GetName []struct { + } + // GetNumFans holds details about calls to the GetNumFans method. + GetNumFans []struct { + } + // GetNumGpuCores holds details about calls to the GetNumGpuCores method. + GetNumGpuCores []struct { + } + // GetNumaNodeId holds details about calls to the GetNumaNodeId method. + GetNumaNodeId []struct { + } + // GetNvLinkCapability holds details about calls to the GetNvLinkCapability method. + GetNvLinkCapability []struct { + // N is the n argument value. + N int + // NvLinkCapability is the nvLinkCapability argument value. + NvLinkCapability nvml.NvLinkCapability + } + // GetNvLinkErrorCounter holds details about calls to the GetNvLinkErrorCounter method. + GetNvLinkErrorCounter []struct { + // N is the n argument value. + N int + // NvLinkErrorCounter is the nvLinkErrorCounter argument value. + NvLinkErrorCounter nvml.NvLinkErrorCounter + } + // GetNvLinkInfo holds details about calls to the GetNvLinkInfo method. + GetNvLinkInfo []struct { + } + // GetNvLinkRemoteDeviceType holds details about calls to the GetNvLinkRemoteDeviceType method. + GetNvLinkRemoteDeviceType []struct { + // N is the n argument value. + N int + } + // GetNvLinkRemotePciInfo holds details about calls to the GetNvLinkRemotePciInfo method. + GetNvLinkRemotePciInfo []struct { + // N is the n argument value. + N int + } + // GetNvLinkState holds details about calls to the GetNvLinkState method. + GetNvLinkState []struct { + // N is the n argument value. + N int + } + // GetNvLinkUtilizationControl holds details about calls to the GetNvLinkUtilizationControl method. + GetNvLinkUtilizationControl []struct { + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } + // GetNvLinkUtilizationCounter holds details about calls to the GetNvLinkUtilizationCounter method. + GetNvLinkUtilizationCounter []struct { + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } + // GetNvLinkVersion holds details about calls to the GetNvLinkVersion method. + GetNvLinkVersion []struct { + // N is the n argument value. + N int + } + // GetNvlinkBwMode holds details about calls to the GetNvlinkBwMode method. + GetNvlinkBwMode []struct { + } + // GetNvlinkSupportedBwModes holds details about calls to the GetNvlinkSupportedBwModes method. + GetNvlinkSupportedBwModes []struct { + } + // GetOfaUtilization holds details about calls to the GetOfaUtilization method. + GetOfaUtilization []struct { + } + // GetP2PStatus holds details about calls to the GetP2PStatus method. + GetP2PStatus []struct { + // Device is the device argument value. + Device nvml.Device + // GpuP2PCapsIndex is the gpuP2PCapsIndex argument value. + GpuP2PCapsIndex nvml.GpuP2PCapsIndex + } + // GetPciInfo holds details about calls to the GetPciInfo method. + GetPciInfo []struct { + } + // GetPciInfoExt holds details about calls to the GetPciInfoExt method. + GetPciInfoExt []struct { + } + // GetPcieLinkMaxSpeed holds details about calls to the GetPcieLinkMaxSpeed method. + GetPcieLinkMaxSpeed []struct { + } + // GetPcieReplayCounter holds details about calls to the GetPcieReplayCounter method. + GetPcieReplayCounter []struct { + } + // GetPcieSpeed holds details about calls to the GetPcieSpeed method. + GetPcieSpeed []struct { + } + // GetPcieThroughput holds details about calls to the GetPcieThroughput method. + GetPcieThroughput []struct { + // PcieUtilCounter is the pcieUtilCounter argument value. + PcieUtilCounter nvml.PcieUtilCounter + } + // GetPdi holds details about calls to the GetPdi method. + GetPdi []struct { + } + // GetPerformanceModes holds details about calls to the GetPerformanceModes method. + GetPerformanceModes []struct { + } + // GetPerformanceState holds details about calls to the GetPerformanceState method. + GetPerformanceState []struct { + } + // GetPersistenceMode holds details about calls to the GetPersistenceMode method. + GetPersistenceMode []struct { + } + // GetPgpuMetadataString holds details about calls to the GetPgpuMetadataString method. + GetPgpuMetadataString []struct { + } + // GetPlatformInfo holds details about calls to the GetPlatformInfo method. + GetPlatformInfo []struct { + } + // GetPowerManagementDefaultLimit holds details about calls to the GetPowerManagementDefaultLimit method. + GetPowerManagementDefaultLimit []struct { + } + // GetPowerManagementLimit holds details about calls to the GetPowerManagementLimit method. + GetPowerManagementLimit []struct { + } + // GetPowerManagementLimitConstraints holds details about calls to the GetPowerManagementLimitConstraints method. + GetPowerManagementLimitConstraints []struct { + } + // GetPowerManagementMode holds details about calls to the GetPowerManagementMode method. + GetPowerManagementMode []struct { + } + // GetPowerMizerMode_v1 holds details about calls to the GetPowerMizerMode_v1 method. + GetPowerMizerMode_v1 []struct { + } + // GetPowerSource holds details about calls to the GetPowerSource method. + GetPowerSource []struct { + } + // GetPowerState holds details about calls to the GetPowerState method. + GetPowerState []struct { + } + // GetPowerUsage holds details about calls to the GetPowerUsage method. + GetPowerUsage []struct { + } + // GetProcessUtilization holds details about calls to the GetProcessUtilization method. + GetProcessUtilization []struct { + // V is the v argument value. + V uint64 + } + // GetProcessesUtilizationInfo holds details about calls to the GetProcessesUtilizationInfo method. + GetProcessesUtilizationInfo []struct { + } + // GetRemappedRows holds details about calls to the GetRemappedRows method. + GetRemappedRows []struct { + } + // GetRepairStatus holds details about calls to the GetRepairStatus method. + GetRepairStatus []struct { + } + // GetRetiredPages holds details about calls to the GetRetiredPages method. + GetRetiredPages []struct { + // PageRetirementCause is the pageRetirementCause argument value. + PageRetirementCause nvml.PageRetirementCause + } + // GetRetiredPagesPendingStatus holds details about calls to the GetRetiredPagesPendingStatus method. + GetRetiredPagesPendingStatus []struct { + } + // GetRetiredPages_v2 holds details about calls to the GetRetiredPages_v2 method. + GetRetiredPages_v2 []struct { + // PageRetirementCause is the pageRetirementCause argument value. + PageRetirementCause nvml.PageRetirementCause + } + // GetRowRemapperHistogram holds details about calls to the GetRowRemapperHistogram method. + GetRowRemapperHistogram []struct { + } + // GetRunningProcessDetailList holds details about calls to the GetRunningProcessDetailList method. + GetRunningProcessDetailList []struct { + } + // GetSamples holds details about calls to the GetSamples method. + GetSamples []struct { + // SamplingType is the samplingType argument value. + SamplingType nvml.SamplingType + // V is the v argument value. + V uint64 + } + // GetSerial holds details about calls to the GetSerial method. + GetSerial []struct { + } + // GetSramEccErrorStatus holds details about calls to the GetSramEccErrorStatus method. + GetSramEccErrorStatus []struct { + } + // GetSramUniqueUncorrectedEccErrorCounts holds details about calls to the GetSramUniqueUncorrectedEccErrorCounts method. + GetSramUniqueUncorrectedEccErrorCounts []struct { + // EccSramUniqueUncorrectedErrorCounts is the eccSramUniqueUncorrectedErrorCounts argument value. + EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts + } + // GetSupportedClocksEventReasons holds details about calls to the GetSupportedClocksEventReasons method. + GetSupportedClocksEventReasons []struct { + } + // GetSupportedClocksThrottleReasons holds details about calls to the GetSupportedClocksThrottleReasons method. + GetSupportedClocksThrottleReasons []struct { + } + // GetSupportedEventTypes holds details about calls to the GetSupportedEventTypes method. + GetSupportedEventTypes []struct { + } + // GetSupportedGraphicsClocks holds details about calls to the GetSupportedGraphicsClocks method. + GetSupportedGraphicsClocks []struct { + // N is the n argument value. + N int + } + // GetSupportedMemoryClocks holds details about calls to the GetSupportedMemoryClocks method. + GetSupportedMemoryClocks []struct { + } + // GetSupportedPerformanceStates holds details about calls to the GetSupportedPerformanceStates method. + GetSupportedPerformanceStates []struct { + } + // GetSupportedVgpus holds details about calls to the GetSupportedVgpus method. + GetSupportedVgpus []struct { + } + // GetTargetFanSpeed holds details about calls to the GetTargetFanSpeed method. + GetTargetFanSpeed []struct { + // N is the n argument value. + N int + } + // GetTemperature holds details about calls to the GetTemperature method. + GetTemperature []struct { + // TemperatureSensors is the temperatureSensors argument value. + TemperatureSensors nvml.TemperatureSensors + } + // GetTemperatureThreshold holds details about calls to the GetTemperatureThreshold method. + GetTemperatureThreshold []struct { + // TemperatureThresholds is the temperatureThresholds argument value. + TemperatureThresholds nvml.TemperatureThresholds + } + // GetTemperatureV holds details about calls to the GetTemperatureV method. + GetTemperatureV []struct { + } + // GetThermalSettings holds details about calls to the GetThermalSettings method. + GetThermalSettings []struct { + // V is the v argument value. + V uint32 + } + // GetTopologyCommonAncestor holds details about calls to the GetTopologyCommonAncestor method. + GetTopologyCommonAncestor []struct { + // Device is the device argument value. + Device nvml.Device + } + // GetTopologyNearestGpus holds details about calls to the GetTopologyNearestGpus method. + GetTopologyNearestGpus []struct { + // GpuTopologyLevel is the gpuTopologyLevel argument value. + GpuTopologyLevel nvml.GpuTopologyLevel + } + // GetTotalEccErrors holds details about calls to the GetTotalEccErrors method. + GetTotalEccErrors []struct { + // MemoryErrorType is the memoryErrorType argument value. + MemoryErrorType nvml.MemoryErrorType + // EccCounterType is the eccCounterType argument value. + EccCounterType nvml.EccCounterType + } + // GetTotalEnergyConsumption holds details about calls to the GetTotalEnergyConsumption method. + GetTotalEnergyConsumption []struct { + } + // GetUUID holds details about calls to the GetUUID method. + GetUUID []struct { + } + // GetUtilizationRates holds details about calls to the GetUtilizationRates method. + GetUtilizationRates []struct { + } + // GetVbiosVersion holds details about calls to the GetVbiosVersion method. + GetVbiosVersion []struct { + } + // GetVgpuCapabilities holds details about calls to the GetVgpuCapabilities method. + GetVgpuCapabilities []struct { + // DeviceVgpuCapability is the deviceVgpuCapability argument value. + DeviceVgpuCapability nvml.DeviceVgpuCapability + } + // GetVgpuHeterogeneousMode holds details about calls to the GetVgpuHeterogeneousMode method. + GetVgpuHeterogeneousMode []struct { + } + // GetVgpuInstancesUtilizationInfo holds details about calls to the GetVgpuInstancesUtilizationInfo method. + GetVgpuInstancesUtilizationInfo []struct { + } + // GetVgpuMetadata holds details about calls to the GetVgpuMetadata method. + GetVgpuMetadata []struct { + } + // GetVgpuProcessUtilization holds details about calls to the GetVgpuProcessUtilization method. + GetVgpuProcessUtilization []struct { + // V is the v argument value. + V uint64 + } + // GetVgpuProcessesUtilizationInfo holds details about calls to the GetVgpuProcessesUtilizationInfo method. + GetVgpuProcessesUtilizationInfo []struct { + } + // GetVgpuSchedulerCapabilities holds details about calls to the GetVgpuSchedulerCapabilities method. + GetVgpuSchedulerCapabilities []struct { + } + // GetVgpuSchedulerLog holds details about calls to the GetVgpuSchedulerLog method. + GetVgpuSchedulerLog []struct { + } + // GetVgpuSchedulerState holds details about calls to the GetVgpuSchedulerState method. + GetVgpuSchedulerState []struct { + } + // GetVgpuTypeCreatablePlacements holds details about calls to the GetVgpuTypeCreatablePlacements method. + GetVgpuTypeCreatablePlacements []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // GetVgpuTypeSupportedPlacements holds details about calls to the GetVgpuTypeSupportedPlacements method. + GetVgpuTypeSupportedPlacements []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // GetVgpuUtilization holds details about calls to the GetVgpuUtilization method. + GetVgpuUtilization []struct { + // V is the v argument value. + V uint64 + } + // GetViolationStatus holds details about calls to the GetViolationStatus method. + GetViolationStatus []struct { + // PerfPolicyType is the perfPolicyType argument value. + PerfPolicyType nvml.PerfPolicyType + } + // GetVirtualizationMode holds details about calls to the GetVirtualizationMode method. + GetVirtualizationMode []struct { + } + // GpmMigSampleGet holds details about calls to the GpmMigSampleGet method. + GpmMigSampleGet []struct { + // N is the n argument value. + N int + // GpmSample is the gpmSample argument value. + GpmSample nvml.GpmSample + } + // GpmQueryDeviceSupport holds details about calls to the GpmQueryDeviceSupport method. + GpmQueryDeviceSupport []struct { + } + // GpmQueryDeviceSupportV holds details about calls to the GpmQueryDeviceSupportV method. + GpmQueryDeviceSupportV []struct { + } + // GpmQueryIfStreamingEnabled holds details about calls to the GpmQueryIfStreamingEnabled method. + GpmQueryIfStreamingEnabled []struct { + } + // GpmSampleGet holds details about calls to the GpmSampleGet method. + GpmSampleGet []struct { + // GpmSample is the gpmSample argument value. + GpmSample nvml.GpmSample + } + // GpmSetStreamingEnabled holds details about calls to the GpmSetStreamingEnabled method. + GpmSetStreamingEnabled []struct { + // V is the v argument value. + V uint32 + } + // IsMigDeviceHandle holds details about calls to the IsMigDeviceHandle method. + IsMigDeviceHandle []struct { + } + // OnSameBoard holds details about calls to the OnSameBoard method. + OnSameBoard []struct { + // Device is the device argument value. + Device nvml.Device + } + // PowerSmoothingActivatePresetProfile holds details about calls to the PowerSmoothingActivatePresetProfile method. + PowerSmoothingActivatePresetProfile []struct { + // PowerSmoothingProfile is the powerSmoothingProfile argument value. + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + // PowerSmoothingSetState holds details about calls to the PowerSmoothingSetState method. + PowerSmoothingSetState []struct { + // PowerSmoothingState is the powerSmoothingState argument value. + PowerSmoothingState *nvml.PowerSmoothingState + } + // PowerSmoothingUpdatePresetProfileParam holds details about calls to the PowerSmoothingUpdatePresetProfileParam method. + PowerSmoothingUpdatePresetProfileParam []struct { + // PowerSmoothingProfile is the powerSmoothingProfile argument value. + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + // ReadWritePRM_v1 holds details about calls to the ReadWritePRM_v1 method. + ReadWritePRM_v1 []struct { + // PRMTLV_v1 is the pRMTLV_v1 argument value. + PRMTLV_v1 *nvml.PRMTLV_v1 + } + // RegisterEvents holds details about calls to the RegisterEvents method. + RegisterEvents []struct { + // V is the v argument value. + V uint64 + // EventSet is the eventSet argument value. + EventSet nvml.EventSet + } + // ResetApplicationsClocks holds details about calls to the ResetApplicationsClocks method. + ResetApplicationsClocks []struct { + } + // ResetGpuLockedClocks holds details about calls to the ResetGpuLockedClocks method. + ResetGpuLockedClocks []struct { + } + // ResetMemoryLockedClocks holds details about calls to the ResetMemoryLockedClocks method. + ResetMemoryLockedClocks []struct { + } + // ResetNvLinkErrorCounters holds details about calls to the ResetNvLinkErrorCounters method. + ResetNvLinkErrorCounters []struct { + // N is the n argument value. + N int + } + // ResetNvLinkUtilizationCounter holds details about calls to the ResetNvLinkUtilizationCounter method. + ResetNvLinkUtilizationCounter []struct { + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } + // SetAPIRestriction holds details about calls to the SetAPIRestriction method. + SetAPIRestriction []struct { + // RestrictedAPI is the restrictedAPI argument value. + RestrictedAPI nvml.RestrictedAPI + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // SetAccountingMode holds details about calls to the SetAccountingMode method. + SetAccountingMode []struct { + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // SetApplicationsClocks holds details about calls to the SetApplicationsClocks method. + SetApplicationsClocks []struct { + // V1 is the v1 argument value. + V1 uint32 + // V2 is the v2 argument value. + V2 uint32 + } + // SetAutoBoostedClocksEnabled holds details about calls to the SetAutoBoostedClocksEnabled method. + SetAutoBoostedClocksEnabled []struct { + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // SetClockOffsets holds details about calls to the SetClockOffsets method. + SetClockOffsets []struct { + // ClockOffset is the clockOffset argument value. + ClockOffset nvml.ClockOffset + } + // SetComputeMode holds details about calls to the SetComputeMode method. + SetComputeMode []struct { + // ComputeMode is the computeMode argument value. + ComputeMode nvml.ComputeMode + } + // SetConfComputeUnprotectedMemSize holds details about calls to the SetConfComputeUnprotectedMemSize method. + SetConfComputeUnprotectedMemSize []struct { + // V is the v argument value. + V uint64 + } + // SetCpuAffinity holds details about calls to the SetCpuAffinity method. + SetCpuAffinity []struct { + } + // SetDefaultAutoBoostedClocksEnabled holds details about calls to the SetDefaultAutoBoostedClocksEnabled method. + SetDefaultAutoBoostedClocksEnabled []struct { + // EnableState is the enableState argument value. + EnableState nvml.EnableState + // V is the v argument value. + V uint32 + } + // SetDefaultFanSpeed_v2 holds details about calls to the SetDefaultFanSpeed_v2 method. + SetDefaultFanSpeed_v2 []struct { + // N is the n argument value. + N int + } + // SetDramEncryptionMode holds details about calls to the SetDramEncryptionMode method. + SetDramEncryptionMode []struct { + // DramEncryptionInfo is the dramEncryptionInfo argument value. + DramEncryptionInfo *nvml.DramEncryptionInfo + } + // SetDriverModel holds details about calls to the SetDriverModel method. + SetDriverModel []struct { + // DriverModel is the driverModel argument value. + DriverModel nvml.DriverModel + // V is the v argument value. + V uint32 + } + // SetEccMode holds details about calls to the SetEccMode method. + SetEccMode []struct { + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // SetFanControlPolicy holds details about calls to the SetFanControlPolicy method. + SetFanControlPolicy []struct { + // N is the n argument value. + N int + // FanControlPolicy is the fanControlPolicy argument value. + FanControlPolicy nvml.FanControlPolicy + } + // SetFanSpeed_v2 holds details about calls to the SetFanSpeed_v2 method. + SetFanSpeed_v2 []struct { + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } + // SetGpcClkVfOffset holds details about calls to the SetGpcClkVfOffset method. + SetGpcClkVfOffset []struct { + // N is the n argument value. + N int + } + // SetGpuLockedClocks holds details about calls to the SetGpuLockedClocks method. + SetGpuLockedClocks []struct { + // V1 is the v1 argument value. + V1 uint32 + // V2 is the v2 argument value. + V2 uint32 + } + // SetGpuOperationMode holds details about calls to the SetGpuOperationMode method. + SetGpuOperationMode []struct { + // GpuOperationMode is the gpuOperationMode argument value. + GpuOperationMode nvml.GpuOperationMode + } + // SetMemClkVfOffset holds details about calls to the SetMemClkVfOffset method. + SetMemClkVfOffset []struct { + // N is the n argument value. + N int + } + // SetMemoryLockedClocks holds details about calls to the SetMemoryLockedClocks method. + SetMemoryLockedClocks []struct { + // V1 is the v1 argument value. + V1 uint32 + // V2 is the v2 argument value. + V2 uint32 + } + // SetMigMode holds details about calls to the SetMigMode method. + SetMigMode []struct { + // N is the n argument value. + N int + } + // SetNvLinkDeviceLowPowerThreshold holds details about calls to the SetNvLinkDeviceLowPowerThreshold method. + SetNvLinkDeviceLowPowerThreshold []struct { + // NvLinkPowerThres is the nvLinkPowerThres argument value. + NvLinkPowerThres *nvml.NvLinkPowerThres + } + // SetNvLinkUtilizationControl holds details about calls to the SetNvLinkUtilizationControl method. + SetNvLinkUtilizationControl []struct { + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + // NvLinkUtilizationControl is the nvLinkUtilizationControl argument value. + NvLinkUtilizationControl *nvml.NvLinkUtilizationControl + // B is the b argument value. + B bool + } + // SetNvlinkBwMode holds details about calls to the SetNvlinkBwMode method. + SetNvlinkBwMode []struct { + // NvlinkSetBwMode is the nvlinkSetBwMode argument value. + NvlinkSetBwMode *nvml.NvlinkSetBwMode + } + // SetPersistenceMode holds details about calls to the SetPersistenceMode method. + SetPersistenceMode []struct { + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // SetPowerManagementLimit holds details about calls to the SetPowerManagementLimit method. + SetPowerManagementLimit []struct { + // V is the v argument value. + V uint32 + } + // SetPowerManagementLimit_v2 holds details about calls to the SetPowerManagementLimit_v2 method. + SetPowerManagementLimit_v2 []struct { + // PowerValue_v2 is the powerValue_v2 argument value. + PowerValue_v2 *nvml.PowerValue_v2 + } + // SetTemperatureThreshold holds details about calls to the SetTemperatureThreshold method. + SetTemperatureThreshold []struct { + // TemperatureThresholds is the temperatureThresholds argument value. + TemperatureThresholds nvml.TemperatureThresholds + // N is the n argument value. + N int + } + // SetVgpuCapabilities holds details about calls to the SetVgpuCapabilities method. + SetVgpuCapabilities []struct { + // DeviceVgpuCapability is the deviceVgpuCapability argument value. + DeviceVgpuCapability nvml.DeviceVgpuCapability + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // SetVgpuHeterogeneousMode holds details about calls to the SetVgpuHeterogeneousMode method. + SetVgpuHeterogeneousMode []struct { + // VgpuHeterogeneousMode is the vgpuHeterogeneousMode argument value. + VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode + } + // SetVgpuSchedulerState holds details about calls to the SetVgpuSchedulerState method. + SetVgpuSchedulerState []struct { + // VgpuSchedulerSetState is the vgpuSchedulerSetState argument value. + VgpuSchedulerSetState *nvml.VgpuSchedulerSetState + } + // SetVirtualizationMode holds details about calls to the SetVirtualizationMode method. + SetVirtualizationMode []struct { + // GpuVirtualizationMode is the gpuVirtualizationMode argument value. + GpuVirtualizationMode nvml.GpuVirtualizationMode + } + // ValidateInforom holds details about calls to the ValidateInforom method. + ValidateInforom []struct { + } + // VgpuTypeGetMaxInstances holds details about calls to the VgpuTypeGetMaxInstances method. + VgpuTypeGetMaxInstances []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // WorkloadPowerProfileClearRequestedProfiles holds details about calls to the WorkloadPowerProfileClearRequestedProfiles method. + WorkloadPowerProfileClearRequestedProfiles []struct { + // WorkloadPowerProfileRequestedProfiles is the workloadPowerProfileRequestedProfiles argument value. + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + // WorkloadPowerProfileGetCurrentProfiles holds details about calls to the WorkloadPowerProfileGetCurrentProfiles method. + WorkloadPowerProfileGetCurrentProfiles []struct { + } + // WorkloadPowerProfileGetProfilesInfo holds details about calls to the WorkloadPowerProfileGetProfilesInfo method. + WorkloadPowerProfileGetProfilesInfo []struct { + } + // WorkloadPowerProfileSetRequestedProfiles holds details about calls to the WorkloadPowerProfileSetRequestedProfiles method. + WorkloadPowerProfileSetRequestedProfiles []struct { + // WorkloadPowerProfileRequestedProfiles is the workloadPowerProfileRequestedProfiles argument value. + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + } + lockClearAccountingPids sync.RWMutex + lockClearCpuAffinity sync.RWMutex + lockClearEccErrorCounts sync.RWMutex + lockClearFieldValues sync.RWMutex + lockCreateGpuInstance sync.RWMutex + lockCreateGpuInstanceWithPlacement sync.RWMutex + lockFreezeNvLinkUtilizationCounter sync.RWMutex + lockGetAPIRestriction sync.RWMutex + lockGetAccountingBufferSize sync.RWMutex + lockGetAccountingMode sync.RWMutex + lockGetAccountingPids sync.RWMutex + lockGetAccountingStats sync.RWMutex + lockGetActiveVgpus sync.RWMutex + lockGetAdaptiveClockInfoStatus sync.RWMutex + lockGetAddressingMode sync.RWMutex + lockGetApplicationsClock sync.RWMutex + lockGetArchitecture sync.RWMutex + lockGetAttributes sync.RWMutex + lockGetAutoBoostedClocksEnabled sync.RWMutex + lockGetBAR1MemoryInfo sync.RWMutex + lockGetBoardId sync.RWMutex + lockGetBoardPartNumber sync.RWMutex + lockGetBrand sync.RWMutex + lockGetBridgeChipInfo sync.RWMutex + lockGetBusType sync.RWMutex + lockGetC2cModeInfoV sync.RWMutex + lockGetCapabilities sync.RWMutex + lockGetClkMonStatus sync.RWMutex + lockGetClock sync.RWMutex + lockGetClockInfo sync.RWMutex + lockGetClockOffsets sync.RWMutex + lockGetComputeInstanceId sync.RWMutex + lockGetComputeMode sync.RWMutex + lockGetComputeRunningProcesses sync.RWMutex + lockGetConfComputeGpuAttestationReport sync.RWMutex + lockGetConfComputeGpuCertificate sync.RWMutex + lockGetConfComputeMemSizeInfo sync.RWMutex + lockGetConfComputeProtectedMemoryUsage sync.RWMutex + lockGetCoolerInfo sync.RWMutex + lockGetCpuAffinity sync.RWMutex + lockGetCpuAffinityWithinScope sync.RWMutex + lockGetCreatableVgpus sync.RWMutex + lockGetCudaComputeCapability sync.RWMutex + lockGetCurrPcieLinkGeneration sync.RWMutex + lockGetCurrPcieLinkWidth sync.RWMutex + lockGetCurrentClockFreqs sync.RWMutex + lockGetCurrentClocksEventReasons sync.RWMutex + lockGetCurrentClocksThrottleReasons sync.RWMutex + lockGetDecoderUtilization sync.RWMutex + lockGetDefaultApplicationsClock sync.RWMutex + lockGetDefaultEccMode sync.RWMutex + lockGetDetailedEccErrors sync.RWMutex + lockGetDeviceHandleFromMigDeviceHandle sync.RWMutex + lockGetDisplayActive sync.RWMutex + lockGetDisplayMode sync.RWMutex + lockGetDramEncryptionMode sync.RWMutex + lockGetDriverModel sync.RWMutex + lockGetDriverModel_v2 sync.RWMutex + lockGetDynamicPstatesInfo sync.RWMutex + lockGetEccMode sync.RWMutex + lockGetEncoderCapacity sync.RWMutex + lockGetEncoderSessions sync.RWMutex + lockGetEncoderStats sync.RWMutex + lockGetEncoderUtilization sync.RWMutex + lockGetEnforcedPowerLimit sync.RWMutex + lockGetFBCSessions sync.RWMutex + lockGetFBCStats sync.RWMutex + lockGetFanControlPolicy_v2 sync.RWMutex + lockGetFanSpeed sync.RWMutex + lockGetFanSpeedRPM sync.RWMutex + lockGetFanSpeed_v2 sync.RWMutex + lockGetFieldValues sync.RWMutex + lockGetGpcClkMinMaxVfOffset sync.RWMutex + lockGetGpcClkVfOffset sync.RWMutex + lockGetGpuFabricInfo sync.RWMutex + lockGetGpuFabricInfoV sync.RWMutex + lockGetGpuInstanceById sync.RWMutex + lockGetGpuInstanceId sync.RWMutex + lockGetGpuInstancePossiblePlacements sync.RWMutex + lockGetGpuInstanceProfileInfo sync.RWMutex + lockGetGpuInstanceProfileInfoByIdV sync.RWMutex + lockGetGpuInstanceProfileInfoV sync.RWMutex + lockGetGpuInstanceRemainingCapacity sync.RWMutex + lockGetGpuInstances sync.RWMutex + lockGetGpuMaxPcieLinkGeneration sync.RWMutex + lockGetGpuOperationMode sync.RWMutex + lockGetGraphicsRunningProcesses sync.RWMutex + lockGetGridLicensableFeatures sync.RWMutex + lockGetGspFirmwareMode sync.RWMutex + lockGetGspFirmwareVersion sync.RWMutex + lockGetHostVgpuMode sync.RWMutex + lockGetIndex sync.RWMutex + lockGetInforomConfigurationChecksum sync.RWMutex + lockGetInforomImageVersion sync.RWMutex + lockGetInforomVersion sync.RWMutex + lockGetIrqNum sync.RWMutex + lockGetJpgUtilization sync.RWMutex + lockGetLastBBXFlushTime sync.RWMutex + lockGetMPSComputeRunningProcesses sync.RWMutex + lockGetMarginTemperature sync.RWMutex + lockGetMaxClockInfo sync.RWMutex + lockGetMaxCustomerBoostClock sync.RWMutex + lockGetMaxMigDeviceCount sync.RWMutex + lockGetMaxPcieLinkGeneration sync.RWMutex + lockGetMaxPcieLinkWidth sync.RWMutex + lockGetMemClkMinMaxVfOffset sync.RWMutex + lockGetMemClkVfOffset sync.RWMutex + lockGetMemoryAffinity sync.RWMutex + lockGetMemoryBusWidth sync.RWMutex + lockGetMemoryErrorCounter sync.RWMutex + lockGetMemoryInfo sync.RWMutex + lockGetMemoryInfo_v2 sync.RWMutex + lockGetMigDeviceHandleByIndex sync.RWMutex + lockGetMigMode sync.RWMutex + lockGetMinMaxClockOfPState sync.RWMutex + lockGetMinMaxFanSpeed sync.RWMutex + lockGetMinorNumber sync.RWMutex + lockGetModuleId sync.RWMutex + lockGetMultiGpuBoard sync.RWMutex + lockGetName sync.RWMutex + lockGetNumFans sync.RWMutex + lockGetNumGpuCores sync.RWMutex + lockGetNumaNodeId sync.RWMutex + lockGetNvLinkCapability sync.RWMutex + lockGetNvLinkErrorCounter sync.RWMutex + lockGetNvLinkInfo sync.RWMutex + lockGetNvLinkRemoteDeviceType sync.RWMutex + lockGetNvLinkRemotePciInfo sync.RWMutex + lockGetNvLinkState sync.RWMutex + lockGetNvLinkUtilizationControl sync.RWMutex + lockGetNvLinkUtilizationCounter sync.RWMutex + lockGetNvLinkVersion sync.RWMutex + lockGetNvlinkBwMode sync.RWMutex + lockGetNvlinkSupportedBwModes sync.RWMutex + lockGetOfaUtilization sync.RWMutex + lockGetP2PStatus sync.RWMutex + lockGetPciInfo sync.RWMutex + lockGetPciInfoExt sync.RWMutex + lockGetPcieLinkMaxSpeed sync.RWMutex + lockGetPcieReplayCounter sync.RWMutex + lockGetPcieSpeed sync.RWMutex + lockGetPcieThroughput sync.RWMutex + lockGetPdi sync.RWMutex + lockGetPerformanceModes sync.RWMutex + lockGetPerformanceState sync.RWMutex + lockGetPersistenceMode sync.RWMutex + lockGetPgpuMetadataString sync.RWMutex + lockGetPlatformInfo sync.RWMutex + lockGetPowerManagementDefaultLimit sync.RWMutex + lockGetPowerManagementLimit sync.RWMutex + lockGetPowerManagementLimitConstraints sync.RWMutex + lockGetPowerManagementMode sync.RWMutex + lockGetPowerMizerMode_v1 sync.RWMutex + lockGetPowerSource sync.RWMutex + lockGetPowerState sync.RWMutex + lockGetPowerUsage sync.RWMutex + lockGetProcessUtilization sync.RWMutex + lockGetProcessesUtilizationInfo sync.RWMutex + lockGetRemappedRows sync.RWMutex + lockGetRepairStatus sync.RWMutex + lockGetRetiredPages sync.RWMutex + lockGetRetiredPagesPendingStatus sync.RWMutex + lockGetRetiredPages_v2 sync.RWMutex + lockGetRowRemapperHistogram sync.RWMutex + lockGetRunningProcessDetailList sync.RWMutex + lockGetSamples sync.RWMutex + lockGetSerial sync.RWMutex + lockGetSramEccErrorStatus sync.RWMutex + lockGetSramUniqueUncorrectedEccErrorCounts sync.RWMutex + lockGetSupportedClocksEventReasons sync.RWMutex + lockGetSupportedClocksThrottleReasons sync.RWMutex + lockGetSupportedEventTypes sync.RWMutex + lockGetSupportedGraphicsClocks sync.RWMutex + lockGetSupportedMemoryClocks sync.RWMutex + lockGetSupportedPerformanceStates sync.RWMutex + lockGetSupportedVgpus sync.RWMutex + lockGetTargetFanSpeed sync.RWMutex + lockGetTemperature sync.RWMutex + lockGetTemperatureThreshold sync.RWMutex + lockGetTemperatureV sync.RWMutex + lockGetThermalSettings sync.RWMutex + lockGetTopologyCommonAncestor sync.RWMutex + lockGetTopologyNearestGpus sync.RWMutex + lockGetTotalEccErrors sync.RWMutex + lockGetTotalEnergyConsumption sync.RWMutex + lockGetUUID sync.RWMutex + lockGetUtilizationRates sync.RWMutex + lockGetVbiosVersion sync.RWMutex + lockGetVgpuCapabilities sync.RWMutex + lockGetVgpuHeterogeneousMode sync.RWMutex + lockGetVgpuInstancesUtilizationInfo sync.RWMutex + lockGetVgpuMetadata sync.RWMutex + lockGetVgpuProcessUtilization sync.RWMutex + lockGetVgpuProcessesUtilizationInfo sync.RWMutex + lockGetVgpuSchedulerCapabilities sync.RWMutex + lockGetVgpuSchedulerLog sync.RWMutex + lockGetVgpuSchedulerState sync.RWMutex + lockGetVgpuTypeCreatablePlacements sync.RWMutex + lockGetVgpuTypeSupportedPlacements sync.RWMutex + lockGetVgpuUtilization sync.RWMutex + lockGetViolationStatus sync.RWMutex + lockGetVirtualizationMode sync.RWMutex + lockGpmMigSampleGet sync.RWMutex + lockGpmQueryDeviceSupport sync.RWMutex + lockGpmQueryDeviceSupportV sync.RWMutex + lockGpmQueryIfStreamingEnabled sync.RWMutex + lockGpmSampleGet sync.RWMutex + lockGpmSetStreamingEnabled sync.RWMutex + lockIsMigDeviceHandle sync.RWMutex + lockOnSameBoard sync.RWMutex + lockPowerSmoothingActivatePresetProfile sync.RWMutex + lockPowerSmoothingSetState sync.RWMutex + lockPowerSmoothingUpdatePresetProfileParam sync.RWMutex + lockReadWritePRM_v1 sync.RWMutex + lockRegisterEvents sync.RWMutex + lockResetApplicationsClocks sync.RWMutex + lockResetGpuLockedClocks sync.RWMutex + lockResetMemoryLockedClocks sync.RWMutex + lockResetNvLinkErrorCounters sync.RWMutex + lockResetNvLinkUtilizationCounter sync.RWMutex + lockSetAPIRestriction sync.RWMutex + lockSetAccountingMode sync.RWMutex + lockSetApplicationsClocks sync.RWMutex + lockSetAutoBoostedClocksEnabled sync.RWMutex + lockSetClockOffsets sync.RWMutex + lockSetComputeMode sync.RWMutex + lockSetConfComputeUnprotectedMemSize sync.RWMutex + lockSetCpuAffinity sync.RWMutex + lockSetDefaultAutoBoostedClocksEnabled sync.RWMutex + lockSetDefaultFanSpeed_v2 sync.RWMutex + lockSetDramEncryptionMode sync.RWMutex + lockSetDriverModel sync.RWMutex + lockSetEccMode sync.RWMutex + lockSetFanControlPolicy sync.RWMutex + lockSetFanSpeed_v2 sync.RWMutex + lockSetGpcClkVfOffset sync.RWMutex + lockSetGpuLockedClocks sync.RWMutex + lockSetGpuOperationMode sync.RWMutex + lockSetMemClkVfOffset sync.RWMutex + lockSetMemoryLockedClocks sync.RWMutex + lockSetMigMode sync.RWMutex + lockSetNvLinkDeviceLowPowerThreshold sync.RWMutex + lockSetNvLinkUtilizationControl sync.RWMutex + lockSetNvlinkBwMode sync.RWMutex + lockSetPersistenceMode sync.RWMutex + lockSetPowerManagementLimit sync.RWMutex + lockSetPowerManagementLimit_v2 sync.RWMutex + lockSetTemperatureThreshold sync.RWMutex + lockSetVgpuCapabilities sync.RWMutex + lockSetVgpuHeterogeneousMode sync.RWMutex + lockSetVgpuSchedulerState sync.RWMutex + lockSetVirtualizationMode sync.RWMutex + lockValidateInforom sync.RWMutex + lockVgpuTypeGetMaxInstances sync.RWMutex + lockWorkloadPowerProfileClearRequestedProfiles sync.RWMutex + lockWorkloadPowerProfileGetCurrentProfiles sync.RWMutex + lockWorkloadPowerProfileGetProfilesInfo sync.RWMutex + lockWorkloadPowerProfileSetRequestedProfiles sync.RWMutex +} + +// ClearAccountingPids calls ClearAccountingPidsFunc. +func (mock *Device) ClearAccountingPids() nvml.Return { + if mock.ClearAccountingPidsFunc == nil { + panic("Device.ClearAccountingPidsFunc: method is nil but Device.ClearAccountingPids was just called") + } + callInfo := struct { + }{} + mock.lockClearAccountingPids.Lock() + mock.calls.ClearAccountingPids = append(mock.calls.ClearAccountingPids, callInfo) + mock.lockClearAccountingPids.Unlock() + return mock.ClearAccountingPidsFunc() +} + +// ClearAccountingPidsCalls gets all the calls that were made to ClearAccountingPids. +// Check the length with: +// +// len(mockedDevice.ClearAccountingPidsCalls()) +func (mock *Device) ClearAccountingPidsCalls() []struct { +} { + var calls []struct { + } + mock.lockClearAccountingPids.RLock() + calls = mock.calls.ClearAccountingPids + mock.lockClearAccountingPids.RUnlock() + return calls +} + +// ClearCpuAffinity calls ClearCpuAffinityFunc. +func (mock *Device) ClearCpuAffinity() nvml.Return { + if mock.ClearCpuAffinityFunc == nil { + panic("Device.ClearCpuAffinityFunc: method is nil but Device.ClearCpuAffinity was just called") + } + callInfo := struct { + }{} + mock.lockClearCpuAffinity.Lock() + mock.calls.ClearCpuAffinity = append(mock.calls.ClearCpuAffinity, callInfo) + mock.lockClearCpuAffinity.Unlock() + return mock.ClearCpuAffinityFunc() +} + +// ClearCpuAffinityCalls gets all the calls that were made to ClearCpuAffinity. +// Check the length with: +// +// len(mockedDevice.ClearCpuAffinityCalls()) +func (mock *Device) ClearCpuAffinityCalls() []struct { +} { + var calls []struct { + } + mock.lockClearCpuAffinity.RLock() + calls = mock.calls.ClearCpuAffinity + mock.lockClearCpuAffinity.RUnlock() + return calls +} + +// ClearEccErrorCounts calls ClearEccErrorCountsFunc. +func (mock *Device) ClearEccErrorCounts(eccCounterType nvml.EccCounterType) nvml.Return { + if mock.ClearEccErrorCountsFunc == nil { + panic("Device.ClearEccErrorCountsFunc: method is nil but Device.ClearEccErrorCounts was just called") + } + callInfo := struct { + EccCounterType nvml.EccCounterType + }{ + EccCounterType: eccCounterType, + } + mock.lockClearEccErrorCounts.Lock() + mock.calls.ClearEccErrorCounts = append(mock.calls.ClearEccErrorCounts, callInfo) + mock.lockClearEccErrorCounts.Unlock() + return mock.ClearEccErrorCountsFunc(eccCounterType) +} + +// ClearEccErrorCountsCalls gets all the calls that were made to ClearEccErrorCounts. +// Check the length with: +// +// len(mockedDevice.ClearEccErrorCountsCalls()) +func (mock *Device) ClearEccErrorCountsCalls() []struct { + EccCounterType nvml.EccCounterType +} { + var calls []struct { + EccCounterType nvml.EccCounterType + } + mock.lockClearEccErrorCounts.RLock() + calls = mock.calls.ClearEccErrorCounts + mock.lockClearEccErrorCounts.RUnlock() + return calls +} + +// ClearFieldValues calls ClearFieldValuesFunc. +func (mock *Device) ClearFieldValues(fieldValues []nvml.FieldValue) nvml.Return { + if mock.ClearFieldValuesFunc == nil { + panic("Device.ClearFieldValuesFunc: method is nil but Device.ClearFieldValues was just called") + } + callInfo := struct { + FieldValues []nvml.FieldValue + }{ + FieldValues: fieldValues, + } + mock.lockClearFieldValues.Lock() + mock.calls.ClearFieldValues = append(mock.calls.ClearFieldValues, callInfo) + mock.lockClearFieldValues.Unlock() + return mock.ClearFieldValuesFunc(fieldValues) +} + +// ClearFieldValuesCalls gets all the calls that were made to ClearFieldValues. +// Check the length with: +// +// len(mockedDevice.ClearFieldValuesCalls()) +func (mock *Device) ClearFieldValuesCalls() []struct { + FieldValues []nvml.FieldValue +} { + var calls []struct { + FieldValues []nvml.FieldValue + } + mock.lockClearFieldValues.RLock() + calls = mock.calls.ClearFieldValues + mock.lockClearFieldValues.RUnlock() + return calls +} + +// CreateGpuInstance calls CreateGpuInstanceFunc. +func (mock *Device) CreateGpuInstance(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { + if mock.CreateGpuInstanceFunc == nil { + panic("Device.CreateGpuInstanceFunc: method is nil but Device.CreateGpuInstance was just called") + } + callInfo := struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + }{ + GpuInstanceProfileInfo: gpuInstanceProfileInfo, + } + mock.lockCreateGpuInstance.Lock() + mock.calls.CreateGpuInstance = append(mock.calls.CreateGpuInstance, callInfo) + mock.lockCreateGpuInstance.Unlock() + return mock.CreateGpuInstanceFunc(gpuInstanceProfileInfo) +} + +// CreateGpuInstanceCalls gets all the calls that were made to CreateGpuInstance. +// Check the length with: +// +// len(mockedDevice.CreateGpuInstanceCalls()) +func (mock *Device) CreateGpuInstanceCalls() []struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo +} { + var calls []struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + mock.lockCreateGpuInstance.RLock() + calls = mock.calls.CreateGpuInstance + mock.lockCreateGpuInstance.RUnlock() + return calls +} + +// CreateGpuInstanceWithPlacement calls CreateGpuInstanceWithPlacementFunc. +func (mock *Device) CreateGpuInstanceWithPlacement(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { + if mock.CreateGpuInstanceWithPlacementFunc == nil { + panic("Device.CreateGpuInstanceWithPlacementFunc: method is nil but Device.CreateGpuInstanceWithPlacement was just called") + } + callInfo := struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + GpuInstancePlacement *nvml.GpuInstancePlacement + }{ + GpuInstanceProfileInfo: gpuInstanceProfileInfo, + GpuInstancePlacement: gpuInstancePlacement, + } + mock.lockCreateGpuInstanceWithPlacement.Lock() + mock.calls.CreateGpuInstanceWithPlacement = append(mock.calls.CreateGpuInstanceWithPlacement, callInfo) + mock.lockCreateGpuInstanceWithPlacement.Unlock() + return mock.CreateGpuInstanceWithPlacementFunc(gpuInstanceProfileInfo, gpuInstancePlacement) +} + +// CreateGpuInstanceWithPlacementCalls gets all the calls that were made to CreateGpuInstanceWithPlacement. +// Check the length with: +// +// len(mockedDevice.CreateGpuInstanceWithPlacementCalls()) +func (mock *Device) CreateGpuInstanceWithPlacementCalls() []struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + GpuInstancePlacement *nvml.GpuInstancePlacement +} { + var calls []struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + GpuInstancePlacement *nvml.GpuInstancePlacement + } + mock.lockCreateGpuInstanceWithPlacement.RLock() + calls = mock.calls.CreateGpuInstanceWithPlacement + mock.lockCreateGpuInstanceWithPlacement.RUnlock() + return calls +} + +// FreezeNvLinkUtilizationCounter calls FreezeNvLinkUtilizationCounterFunc. +func (mock *Device) FreezeNvLinkUtilizationCounter(n1 int, n2 int, enableState nvml.EnableState) nvml.Return { + if mock.FreezeNvLinkUtilizationCounterFunc == nil { + panic("Device.FreezeNvLinkUtilizationCounterFunc: method is nil but Device.FreezeNvLinkUtilizationCounter was just called") + } + callInfo := struct { + N1 int + N2 int + EnableState nvml.EnableState + }{ + N1: n1, + N2: n2, + EnableState: enableState, + } + mock.lockFreezeNvLinkUtilizationCounter.Lock() + mock.calls.FreezeNvLinkUtilizationCounter = append(mock.calls.FreezeNvLinkUtilizationCounter, callInfo) + mock.lockFreezeNvLinkUtilizationCounter.Unlock() + return mock.FreezeNvLinkUtilizationCounterFunc(n1, n2, enableState) +} + +// FreezeNvLinkUtilizationCounterCalls gets all the calls that were made to FreezeNvLinkUtilizationCounter. +// Check the length with: +// +// len(mockedDevice.FreezeNvLinkUtilizationCounterCalls()) +func (mock *Device) FreezeNvLinkUtilizationCounterCalls() []struct { + N1 int + N2 int + EnableState nvml.EnableState +} { + var calls []struct { + N1 int + N2 int + EnableState nvml.EnableState + } + mock.lockFreezeNvLinkUtilizationCounter.RLock() + calls = mock.calls.FreezeNvLinkUtilizationCounter + mock.lockFreezeNvLinkUtilizationCounter.RUnlock() + return calls +} + +// GetAPIRestriction calls GetAPIRestrictionFunc. +func (mock *Device) GetAPIRestriction(restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) { + if mock.GetAPIRestrictionFunc == nil { + panic("Device.GetAPIRestrictionFunc: method is nil but Device.GetAPIRestriction was just called") + } + callInfo := struct { + RestrictedAPI nvml.RestrictedAPI + }{ + RestrictedAPI: restrictedAPI, + } + mock.lockGetAPIRestriction.Lock() + mock.calls.GetAPIRestriction = append(mock.calls.GetAPIRestriction, callInfo) + mock.lockGetAPIRestriction.Unlock() + return mock.GetAPIRestrictionFunc(restrictedAPI) +} + +// GetAPIRestrictionCalls gets all the calls that were made to GetAPIRestriction. +// Check the length with: +// +// len(mockedDevice.GetAPIRestrictionCalls()) +func (mock *Device) GetAPIRestrictionCalls() []struct { + RestrictedAPI nvml.RestrictedAPI +} { + var calls []struct { + RestrictedAPI nvml.RestrictedAPI + } + mock.lockGetAPIRestriction.RLock() + calls = mock.calls.GetAPIRestriction + mock.lockGetAPIRestriction.RUnlock() + return calls +} + +// GetAccountingBufferSize calls GetAccountingBufferSizeFunc. +func (mock *Device) GetAccountingBufferSize() (int, nvml.Return) { + if mock.GetAccountingBufferSizeFunc == nil { + panic("Device.GetAccountingBufferSizeFunc: method is nil but Device.GetAccountingBufferSize was just called") + } + callInfo := struct { + }{} + mock.lockGetAccountingBufferSize.Lock() + mock.calls.GetAccountingBufferSize = append(mock.calls.GetAccountingBufferSize, callInfo) + mock.lockGetAccountingBufferSize.Unlock() + return mock.GetAccountingBufferSizeFunc() +} + +// GetAccountingBufferSizeCalls gets all the calls that were made to GetAccountingBufferSize. +// Check the length with: +// +// len(mockedDevice.GetAccountingBufferSizeCalls()) +func (mock *Device) GetAccountingBufferSizeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetAccountingBufferSize.RLock() + calls = mock.calls.GetAccountingBufferSize + mock.lockGetAccountingBufferSize.RUnlock() + return calls +} + +// GetAccountingMode calls GetAccountingModeFunc. +func (mock *Device) GetAccountingMode() (nvml.EnableState, nvml.Return) { + if mock.GetAccountingModeFunc == nil { + panic("Device.GetAccountingModeFunc: method is nil but Device.GetAccountingMode was just called") + } + callInfo := struct { + }{} + mock.lockGetAccountingMode.Lock() + mock.calls.GetAccountingMode = append(mock.calls.GetAccountingMode, callInfo) + mock.lockGetAccountingMode.Unlock() + return mock.GetAccountingModeFunc() +} + +// GetAccountingModeCalls gets all the calls that were made to GetAccountingMode. +// Check the length with: +// +// len(mockedDevice.GetAccountingModeCalls()) +func (mock *Device) GetAccountingModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetAccountingMode.RLock() + calls = mock.calls.GetAccountingMode + mock.lockGetAccountingMode.RUnlock() + return calls +} + +// GetAccountingPids calls GetAccountingPidsFunc. +func (mock *Device) GetAccountingPids() ([]int, nvml.Return) { + if mock.GetAccountingPidsFunc == nil { + panic("Device.GetAccountingPidsFunc: method is nil but Device.GetAccountingPids was just called") + } + callInfo := struct { + }{} + mock.lockGetAccountingPids.Lock() + mock.calls.GetAccountingPids = append(mock.calls.GetAccountingPids, callInfo) + mock.lockGetAccountingPids.Unlock() + return mock.GetAccountingPidsFunc() +} + +// GetAccountingPidsCalls gets all the calls that were made to GetAccountingPids. +// Check the length with: +// +// len(mockedDevice.GetAccountingPidsCalls()) +func (mock *Device) GetAccountingPidsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetAccountingPids.RLock() + calls = mock.calls.GetAccountingPids + mock.lockGetAccountingPids.RUnlock() + return calls +} + +// GetAccountingStats calls GetAccountingStatsFunc. +func (mock *Device) GetAccountingStats(v uint32) (nvml.AccountingStats, nvml.Return) { + if mock.GetAccountingStatsFunc == nil { + panic("Device.GetAccountingStatsFunc: method is nil but Device.GetAccountingStats was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockGetAccountingStats.Lock() + mock.calls.GetAccountingStats = append(mock.calls.GetAccountingStats, callInfo) + mock.lockGetAccountingStats.Unlock() + return mock.GetAccountingStatsFunc(v) +} + +// GetAccountingStatsCalls gets all the calls that were made to GetAccountingStats. +// Check the length with: +// +// len(mockedDevice.GetAccountingStatsCalls()) +func (mock *Device) GetAccountingStatsCalls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockGetAccountingStats.RLock() + calls = mock.calls.GetAccountingStats + mock.lockGetAccountingStats.RUnlock() + return calls +} + +// GetActiveVgpus calls GetActiveVgpusFunc. +func (mock *Device) GetActiveVgpus() ([]nvml.VgpuInstance, nvml.Return) { + if mock.GetActiveVgpusFunc == nil { + panic("Device.GetActiveVgpusFunc: method is nil but Device.GetActiveVgpus was just called") + } + callInfo := struct { + }{} + mock.lockGetActiveVgpus.Lock() + mock.calls.GetActiveVgpus = append(mock.calls.GetActiveVgpus, callInfo) + mock.lockGetActiveVgpus.Unlock() + return mock.GetActiveVgpusFunc() +} + +// GetActiveVgpusCalls gets all the calls that were made to GetActiveVgpus. +// Check the length with: +// +// len(mockedDevice.GetActiveVgpusCalls()) +func (mock *Device) GetActiveVgpusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetActiveVgpus.RLock() + calls = mock.calls.GetActiveVgpus + mock.lockGetActiveVgpus.RUnlock() + return calls +} + +// GetAdaptiveClockInfoStatus calls GetAdaptiveClockInfoStatusFunc. +func (mock *Device) GetAdaptiveClockInfoStatus() (uint32, nvml.Return) { + if mock.GetAdaptiveClockInfoStatusFunc == nil { + panic("Device.GetAdaptiveClockInfoStatusFunc: method is nil but Device.GetAdaptiveClockInfoStatus was just called") + } + callInfo := struct { + }{} + mock.lockGetAdaptiveClockInfoStatus.Lock() + mock.calls.GetAdaptiveClockInfoStatus = append(mock.calls.GetAdaptiveClockInfoStatus, callInfo) + mock.lockGetAdaptiveClockInfoStatus.Unlock() + return mock.GetAdaptiveClockInfoStatusFunc() +} + +// GetAdaptiveClockInfoStatusCalls gets all the calls that were made to GetAdaptiveClockInfoStatus. +// Check the length with: +// +// len(mockedDevice.GetAdaptiveClockInfoStatusCalls()) +func (mock *Device) GetAdaptiveClockInfoStatusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetAdaptiveClockInfoStatus.RLock() + calls = mock.calls.GetAdaptiveClockInfoStatus + mock.lockGetAdaptiveClockInfoStatus.RUnlock() + return calls +} + +// GetAddressingMode calls GetAddressingModeFunc. +func (mock *Device) GetAddressingMode() (nvml.DeviceAddressingMode, nvml.Return) { + if mock.GetAddressingModeFunc == nil { + panic("Device.GetAddressingModeFunc: method is nil but Device.GetAddressingMode was just called") + } + callInfo := struct { + }{} + mock.lockGetAddressingMode.Lock() + mock.calls.GetAddressingMode = append(mock.calls.GetAddressingMode, callInfo) + mock.lockGetAddressingMode.Unlock() + return mock.GetAddressingModeFunc() +} + +// GetAddressingModeCalls gets all the calls that were made to GetAddressingMode. +// Check the length with: +// +// len(mockedDevice.GetAddressingModeCalls()) +func (mock *Device) GetAddressingModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetAddressingMode.RLock() + calls = mock.calls.GetAddressingMode + mock.lockGetAddressingMode.RUnlock() + return calls +} + +// GetApplicationsClock calls GetApplicationsClockFunc. +func (mock *Device) GetApplicationsClock(clockType nvml.ClockType) (uint32, nvml.Return) { + if mock.GetApplicationsClockFunc == nil { + panic("Device.GetApplicationsClockFunc: method is nil but Device.GetApplicationsClock was just called") + } + callInfo := struct { + ClockType nvml.ClockType + }{ + ClockType: clockType, + } + mock.lockGetApplicationsClock.Lock() + mock.calls.GetApplicationsClock = append(mock.calls.GetApplicationsClock, callInfo) + mock.lockGetApplicationsClock.Unlock() + return mock.GetApplicationsClockFunc(clockType) +} + +// GetApplicationsClockCalls gets all the calls that were made to GetApplicationsClock. +// Check the length with: +// +// len(mockedDevice.GetApplicationsClockCalls()) +func (mock *Device) GetApplicationsClockCalls() []struct { + ClockType nvml.ClockType +} { + var calls []struct { + ClockType nvml.ClockType + } + mock.lockGetApplicationsClock.RLock() + calls = mock.calls.GetApplicationsClock + mock.lockGetApplicationsClock.RUnlock() + return calls +} + +// GetArchitecture calls GetArchitectureFunc. +func (mock *Device) GetArchitecture() (nvml.DeviceArchitecture, nvml.Return) { + if mock.GetArchitectureFunc == nil { + panic("Device.GetArchitectureFunc: method is nil but Device.GetArchitecture was just called") + } + callInfo := struct { + }{} + mock.lockGetArchitecture.Lock() + mock.calls.GetArchitecture = append(mock.calls.GetArchitecture, callInfo) + mock.lockGetArchitecture.Unlock() + return mock.GetArchitectureFunc() +} + +// GetArchitectureCalls gets all the calls that were made to GetArchitecture. +// Check the length with: +// +// len(mockedDevice.GetArchitectureCalls()) +func (mock *Device) GetArchitectureCalls() []struct { +} { + var calls []struct { + } + mock.lockGetArchitecture.RLock() + calls = mock.calls.GetArchitecture + mock.lockGetArchitecture.RUnlock() + return calls +} + +// GetAttributes calls GetAttributesFunc. +func (mock *Device) GetAttributes() (nvml.DeviceAttributes, nvml.Return) { + if mock.GetAttributesFunc == nil { + panic("Device.GetAttributesFunc: method is nil but Device.GetAttributes was just called") + } + callInfo := struct { + }{} + mock.lockGetAttributes.Lock() + mock.calls.GetAttributes = append(mock.calls.GetAttributes, callInfo) + mock.lockGetAttributes.Unlock() + return mock.GetAttributesFunc() +} + +// GetAttributesCalls gets all the calls that were made to GetAttributes. +// Check the length with: +// +// len(mockedDevice.GetAttributesCalls()) +func (mock *Device) GetAttributesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetAttributes.RLock() + calls = mock.calls.GetAttributes + mock.lockGetAttributes.RUnlock() + return calls +} + +// GetAutoBoostedClocksEnabled calls GetAutoBoostedClocksEnabledFunc. +func (mock *Device) GetAutoBoostedClocksEnabled() (nvml.EnableState, nvml.EnableState, nvml.Return) { + if mock.GetAutoBoostedClocksEnabledFunc == nil { + panic("Device.GetAutoBoostedClocksEnabledFunc: method is nil but Device.GetAutoBoostedClocksEnabled was just called") + } + callInfo := struct { + }{} + mock.lockGetAutoBoostedClocksEnabled.Lock() + mock.calls.GetAutoBoostedClocksEnabled = append(mock.calls.GetAutoBoostedClocksEnabled, callInfo) + mock.lockGetAutoBoostedClocksEnabled.Unlock() + return mock.GetAutoBoostedClocksEnabledFunc() +} + +// GetAutoBoostedClocksEnabledCalls gets all the calls that were made to GetAutoBoostedClocksEnabled. +// Check the length with: +// +// len(mockedDevice.GetAutoBoostedClocksEnabledCalls()) +func (mock *Device) GetAutoBoostedClocksEnabledCalls() []struct { +} { + var calls []struct { + } + mock.lockGetAutoBoostedClocksEnabled.RLock() + calls = mock.calls.GetAutoBoostedClocksEnabled + mock.lockGetAutoBoostedClocksEnabled.RUnlock() + return calls +} + +// GetBAR1MemoryInfo calls GetBAR1MemoryInfoFunc. +func (mock *Device) GetBAR1MemoryInfo() (nvml.BAR1Memory, nvml.Return) { + if mock.GetBAR1MemoryInfoFunc == nil { + panic("Device.GetBAR1MemoryInfoFunc: method is nil but Device.GetBAR1MemoryInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetBAR1MemoryInfo.Lock() + mock.calls.GetBAR1MemoryInfo = append(mock.calls.GetBAR1MemoryInfo, callInfo) + mock.lockGetBAR1MemoryInfo.Unlock() + return mock.GetBAR1MemoryInfoFunc() +} + +// GetBAR1MemoryInfoCalls gets all the calls that were made to GetBAR1MemoryInfo. +// Check the length with: +// +// len(mockedDevice.GetBAR1MemoryInfoCalls()) +func (mock *Device) GetBAR1MemoryInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetBAR1MemoryInfo.RLock() + calls = mock.calls.GetBAR1MemoryInfo + mock.lockGetBAR1MemoryInfo.RUnlock() + return calls +} + +// GetBoardId calls GetBoardIdFunc. +func (mock *Device) GetBoardId() (uint32, nvml.Return) { + if mock.GetBoardIdFunc == nil { + panic("Device.GetBoardIdFunc: method is nil but Device.GetBoardId was just called") + } + callInfo := struct { + }{} + mock.lockGetBoardId.Lock() + mock.calls.GetBoardId = append(mock.calls.GetBoardId, callInfo) + mock.lockGetBoardId.Unlock() + return mock.GetBoardIdFunc() +} + +// GetBoardIdCalls gets all the calls that were made to GetBoardId. +// Check the length with: +// +// len(mockedDevice.GetBoardIdCalls()) +func (mock *Device) GetBoardIdCalls() []struct { +} { + var calls []struct { + } + mock.lockGetBoardId.RLock() + calls = mock.calls.GetBoardId + mock.lockGetBoardId.RUnlock() + return calls +} + +// GetBoardPartNumber calls GetBoardPartNumberFunc. +func (mock *Device) GetBoardPartNumber() (string, nvml.Return) { + if mock.GetBoardPartNumberFunc == nil { + panic("Device.GetBoardPartNumberFunc: method is nil but Device.GetBoardPartNumber was just called") + } + callInfo := struct { + }{} + mock.lockGetBoardPartNumber.Lock() + mock.calls.GetBoardPartNumber = append(mock.calls.GetBoardPartNumber, callInfo) + mock.lockGetBoardPartNumber.Unlock() + return mock.GetBoardPartNumberFunc() +} + +// GetBoardPartNumberCalls gets all the calls that were made to GetBoardPartNumber. +// Check the length with: +// +// len(mockedDevice.GetBoardPartNumberCalls()) +func (mock *Device) GetBoardPartNumberCalls() []struct { +} { + var calls []struct { + } + mock.lockGetBoardPartNumber.RLock() + calls = mock.calls.GetBoardPartNumber + mock.lockGetBoardPartNumber.RUnlock() + return calls +} + +// GetBrand calls GetBrandFunc. +func (mock *Device) GetBrand() (nvml.BrandType, nvml.Return) { + if mock.GetBrandFunc == nil { + panic("Device.GetBrandFunc: method is nil but Device.GetBrand was just called") + } + callInfo := struct { + }{} + mock.lockGetBrand.Lock() + mock.calls.GetBrand = append(mock.calls.GetBrand, callInfo) + mock.lockGetBrand.Unlock() + return mock.GetBrandFunc() +} + +// GetBrandCalls gets all the calls that were made to GetBrand. +// Check the length with: +// +// len(mockedDevice.GetBrandCalls()) +func (mock *Device) GetBrandCalls() []struct { +} { + var calls []struct { + } + mock.lockGetBrand.RLock() + calls = mock.calls.GetBrand + mock.lockGetBrand.RUnlock() + return calls +} + +// GetBridgeChipInfo calls GetBridgeChipInfoFunc. +func (mock *Device) GetBridgeChipInfo() (nvml.BridgeChipHierarchy, nvml.Return) { + if mock.GetBridgeChipInfoFunc == nil { + panic("Device.GetBridgeChipInfoFunc: method is nil but Device.GetBridgeChipInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetBridgeChipInfo.Lock() + mock.calls.GetBridgeChipInfo = append(mock.calls.GetBridgeChipInfo, callInfo) + mock.lockGetBridgeChipInfo.Unlock() + return mock.GetBridgeChipInfoFunc() +} + +// GetBridgeChipInfoCalls gets all the calls that were made to GetBridgeChipInfo. +// Check the length with: +// +// len(mockedDevice.GetBridgeChipInfoCalls()) +func (mock *Device) GetBridgeChipInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetBridgeChipInfo.RLock() + calls = mock.calls.GetBridgeChipInfo + mock.lockGetBridgeChipInfo.RUnlock() + return calls +} + +// GetBusType calls GetBusTypeFunc. +func (mock *Device) GetBusType() (nvml.BusType, nvml.Return) { + if mock.GetBusTypeFunc == nil { + panic("Device.GetBusTypeFunc: method is nil but Device.GetBusType was just called") + } + callInfo := struct { + }{} + mock.lockGetBusType.Lock() + mock.calls.GetBusType = append(mock.calls.GetBusType, callInfo) + mock.lockGetBusType.Unlock() + return mock.GetBusTypeFunc() +} + +// GetBusTypeCalls gets all the calls that were made to GetBusType. +// Check the length with: +// +// len(mockedDevice.GetBusTypeCalls()) +func (mock *Device) GetBusTypeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetBusType.RLock() + calls = mock.calls.GetBusType + mock.lockGetBusType.RUnlock() + return calls +} + +// GetC2cModeInfoV calls GetC2cModeInfoVFunc. +func (mock *Device) GetC2cModeInfoV() nvml.C2cModeInfoHandler { + if mock.GetC2cModeInfoVFunc == nil { + panic("Device.GetC2cModeInfoVFunc: method is nil but Device.GetC2cModeInfoV was just called") + } + callInfo := struct { + }{} + mock.lockGetC2cModeInfoV.Lock() + mock.calls.GetC2cModeInfoV = append(mock.calls.GetC2cModeInfoV, callInfo) + mock.lockGetC2cModeInfoV.Unlock() + return mock.GetC2cModeInfoVFunc() +} + +// GetC2cModeInfoVCalls gets all the calls that were made to GetC2cModeInfoV. +// Check the length with: +// +// len(mockedDevice.GetC2cModeInfoVCalls()) +func (mock *Device) GetC2cModeInfoVCalls() []struct { +} { + var calls []struct { + } + mock.lockGetC2cModeInfoV.RLock() + calls = mock.calls.GetC2cModeInfoV + mock.lockGetC2cModeInfoV.RUnlock() + return calls +} + +// GetCapabilities calls GetCapabilitiesFunc. +func (mock *Device) GetCapabilities() (nvml.DeviceCapabilities, nvml.Return) { + if mock.GetCapabilitiesFunc == nil { + panic("Device.GetCapabilitiesFunc: method is nil but Device.GetCapabilities was just called") + } + callInfo := struct { + }{} + mock.lockGetCapabilities.Lock() + mock.calls.GetCapabilities = append(mock.calls.GetCapabilities, callInfo) + mock.lockGetCapabilities.Unlock() + return mock.GetCapabilitiesFunc() +} + +// GetCapabilitiesCalls gets all the calls that were made to GetCapabilities. +// Check the length with: +// +// len(mockedDevice.GetCapabilitiesCalls()) +func (mock *Device) GetCapabilitiesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCapabilities.RLock() + calls = mock.calls.GetCapabilities + mock.lockGetCapabilities.RUnlock() + return calls +} + +// GetClkMonStatus calls GetClkMonStatusFunc. +func (mock *Device) GetClkMonStatus() (nvml.ClkMonStatus, nvml.Return) { + if mock.GetClkMonStatusFunc == nil { + panic("Device.GetClkMonStatusFunc: method is nil but Device.GetClkMonStatus was just called") + } + callInfo := struct { + }{} + mock.lockGetClkMonStatus.Lock() + mock.calls.GetClkMonStatus = append(mock.calls.GetClkMonStatus, callInfo) + mock.lockGetClkMonStatus.Unlock() + return mock.GetClkMonStatusFunc() +} + +// GetClkMonStatusCalls gets all the calls that were made to GetClkMonStatus. +// Check the length with: +// +// len(mockedDevice.GetClkMonStatusCalls()) +func (mock *Device) GetClkMonStatusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetClkMonStatus.RLock() + calls = mock.calls.GetClkMonStatus + mock.lockGetClkMonStatus.RUnlock() + return calls +} + +// GetClock calls GetClockFunc. +func (mock *Device) GetClock(clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) { + if mock.GetClockFunc == nil { + panic("Device.GetClockFunc: method is nil but Device.GetClock was just called") + } + callInfo := struct { + ClockType nvml.ClockType + ClockId nvml.ClockId + }{ + ClockType: clockType, + ClockId: clockId, + } + mock.lockGetClock.Lock() + mock.calls.GetClock = append(mock.calls.GetClock, callInfo) + mock.lockGetClock.Unlock() + return mock.GetClockFunc(clockType, clockId) +} + +// GetClockCalls gets all the calls that were made to GetClock. +// Check the length with: +// +// len(mockedDevice.GetClockCalls()) +func (mock *Device) GetClockCalls() []struct { + ClockType nvml.ClockType + ClockId nvml.ClockId +} { + var calls []struct { + ClockType nvml.ClockType + ClockId nvml.ClockId + } + mock.lockGetClock.RLock() + calls = mock.calls.GetClock + mock.lockGetClock.RUnlock() + return calls +} + +// GetClockInfo calls GetClockInfoFunc. +func (mock *Device) GetClockInfo(clockType nvml.ClockType) (uint32, nvml.Return) { + if mock.GetClockInfoFunc == nil { + panic("Device.GetClockInfoFunc: method is nil but Device.GetClockInfo was just called") + } + callInfo := struct { + ClockType nvml.ClockType + }{ + ClockType: clockType, + } + mock.lockGetClockInfo.Lock() + mock.calls.GetClockInfo = append(mock.calls.GetClockInfo, callInfo) + mock.lockGetClockInfo.Unlock() + return mock.GetClockInfoFunc(clockType) +} + +// GetClockInfoCalls gets all the calls that were made to GetClockInfo. +// Check the length with: +// +// len(mockedDevice.GetClockInfoCalls()) +func (mock *Device) GetClockInfoCalls() []struct { + ClockType nvml.ClockType +} { + var calls []struct { + ClockType nvml.ClockType + } + mock.lockGetClockInfo.RLock() + calls = mock.calls.GetClockInfo + mock.lockGetClockInfo.RUnlock() + return calls +} + +// GetClockOffsets calls GetClockOffsetsFunc. +func (mock *Device) GetClockOffsets() (nvml.ClockOffset, nvml.Return) { + if mock.GetClockOffsetsFunc == nil { + panic("Device.GetClockOffsetsFunc: method is nil but Device.GetClockOffsets was just called") + } + callInfo := struct { + }{} + mock.lockGetClockOffsets.Lock() + mock.calls.GetClockOffsets = append(mock.calls.GetClockOffsets, callInfo) + mock.lockGetClockOffsets.Unlock() + return mock.GetClockOffsetsFunc() +} + +// GetClockOffsetsCalls gets all the calls that were made to GetClockOffsets. +// Check the length with: +// +// len(mockedDevice.GetClockOffsetsCalls()) +func (mock *Device) GetClockOffsetsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetClockOffsets.RLock() + calls = mock.calls.GetClockOffsets + mock.lockGetClockOffsets.RUnlock() + return calls +} + +// GetComputeInstanceId calls GetComputeInstanceIdFunc. +func (mock *Device) GetComputeInstanceId() (int, nvml.Return) { + if mock.GetComputeInstanceIdFunc == nil { + panic("Device.GetComputeInstanceIdFunc: method is nil but Device.GetComputeInstanceId was just called") + } + callInfo := struct { + }{} + mock.lockGetComputeInstanceId.Lock() + mock.calls.GetComputeInstanceId = append(mock.calls.GetComputeInstanceId, callInfo) + mock.lockGetComputeInstanceId.Unlock() + return mock.GetComputeInstanceIdFunc() +} + +// GetComputeInstanceIdCalls gets all the calls that were made to GetComputeInstanceId. +// Check the length with: +// +// len(mockedDevice.GetComputeInstanceIdCalls()) +func (mock *Device) GetComputeInstanceIdCalls() []struct { +} { + var calls []struct { + } + mock.lockGetComputeInstanceId.RLock() + calls = mock.calls.GetComputeInstanceId + mock.lockGetComputeInstanceId.RUnlock() + return calls +} + +// GetComputeMode calls GetComputeModeFunc. +func (mock *Device) GetComputeMode() (nvml.ComputeMode, nvml.Return) { + if mock.GetComputeModeFunc == nil { + panic("Device.GetComputeModeFunc: method is nil but Device.GetComputeMode was just called") + } + callInfo := struct { + }{} + mock.lockGetComputeMode.Lock() + mock.calls.GetComputeMode = append(mock.calls.GetComputeMode, callInfo) + mock.lockGetComputeMode.Unlock() + return mock.GetComputeModeFunc() +} + +// GetComputeModeCalls gets all the calls that were made to GetComputeMode. +// Check the length with: +// +// len(mockedDevice.GetComputeModeCalls()) +func (mock *Device) GetComputeModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetComputeMode.RLock() + calls = mock.calls.GetComputeMode + mock.lockGetComputeMode.RUnlock() + return calls +} + +// GetComputeRunningProcesses calls GetComputeRunningProcessesFunc. +func (mock *Device) GetComputeRunningProcesses() ([]nvml.ProcessInfo, nvml.Return) { + if mock.GetComputeRunningProcessesFunc == nil { + panic("Device.GetComputeRunningProcessesFunc: method is nil but Device.GetComputeRunningProcesses was just called") + } + callInfo := struct { + }{} + mock.lockGetComputeRunningProcesses.Lock() + mock.calls.GetComputeRunningProcesses = append(mock.calls.GetComputeRunningProcesses, callInfo) + mock.lockGetComputeRunningProcesses.Unlock() + return mock.GetComputeRunningProcessesFunc() +} + +// GetComputeRunningProcessesCalls gets all the calls that were made to GetComputeRunningProcesses. +// Check the length with: +// +// len(mockedDevice.GetComputeRunningProcessesCalls()) +func (mock *Device) GetComputeRunningProcessesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetComputeRunningProcesses.RLock() + calls = mock.calls.GetComputeRunningProcesses + mock.lockGetComputeRunningProcesses.RUnlock() + return calls +} + +// GetConfComputeGpuAttestationReport calls GetConfComputeGpuAttestationReportFunc. +func (mock *Device) GetConfComputeGpuAttestationReport(confComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport) nvml.Return { + if mock.GetConfComputeGpuAttestationReportFunc == nil { + panic("Device.GetConfComputeGpuAttestationReportFunc: method is nil but Device.GetConfComputeGpuAttestationReport was just called") + } + callInfo := struct { + ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport + }{ + ConfComputeGpuAttestationReport: confComputeGpuAttestationReport, + } + mock.lockGetConfComputeGpuAttestationReport.Lock() + mock.calls.GetConfComputeGpuAttestationReport = append(mock.calls.GetConfComputeGpuAttestationReport, callInfo) + mock.lockGetConfComputeGpuAttestationReport.Unlock() + return mock.GetConfComputeGpuAttestationReportFunc(confComputeGpuAttestationReport) +} + +// GetConfComputeGpuAttestationReportCalls gets all the calls that were made to GetConfComputeGpuAttestationReport. +// Check the length with: +// +// len(mockedDevice.GetConfComputeGpuAttestationReportCalls()) +func (mock *Device) GetConfComputeGpuAttestationReportCalls() []struct { + ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport +} { + var calls []struct { + ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport + } + mock.lockGetConfComputeGpuAttestationReport.RLock() + calls = mock.calls.GetConfComputeGpuAttestationReport + mock.lockGetConfComputeGpuAttestationReport.RUnlock() + return calls +} + +// GetConfComputeGpuCertificate calls GetConfComputeGpuCertificateFunc. +func (mock *Device) GetConfComputeGpuCertificate() (nvml.ConfComputeGpuCertificate, nvml.Return) { + if mock.GetConfComputeGpuCertificateFunc == nil { + panic("Device.GetConfComputeGpuCertificateFunc: method is nil but Device.GetConfComputeGpuCertificate was just called") + } + callInfo := struct { + }{} + mock.lockGetConfComputeGpuCertificate.Lock() + mock.calls.GetConfComputeGpuCertificate = append(mock.calls.GetConfComputeGpuCertificate, callInfo) + mock.lockGetConfComputeGpuCertificate.Unlock() + return mock.GetConfComputeGpuCertificateFunc() +} + +// GetConfComputeGpuCertificateCalls gets all the calls that were made to GetConfComputeGpuCertificate. +// Check the length with: +// +// len(mockedDevice.GetConfComputeGpuCertificateCalls()) +func (mock *Device) GetConfComputeGpuCertificateCalls() []struct { +} { + var calls []struct { + } + mock.lockGetConfComputeGpuCertificate.RLock() + calls = mock.calls.GetConfComputeGpuCertificate + mock.lockGetConfComputeGpuCertificate.RUnlock() + return calls +} + +// GetConfComputeMemSizeInfo calls GetConfComputeMemSizeInfoFunc. +func (mock *Device) GetConfComputeMemSizeInfo() (nvml.ConfComputeMemSizeInfo, nvml.Return) { + if mock.GetConfComputeMemSizeInfoFunc == nil { + panic("Device.GetConfComputeMemSizeInfoFunc: method is nil but Device.GetConfComputeMemSizeInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetConfComputeMemSizeInfo.Lock() + mock.calls.GetConfComputeMemSizeInfo = append(mock.calls.GetConfComputeMemSizeInfo, callInfo) + mock.lockGetConfComputeMemSizeInfo.Unlock() + return mock.GetConfComputeMemSizeInfoFunc() +} + +// GetConfComputeMemSizeInfoCalls gets all the calls that were made to GetConfComputeMemSizeInfo. +// Check the length with: +// +// len(mockedDevice.GetConfComputeMemSizeInfoCalls()) +func (mock *Device) GetConfComputeMemSizeInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetConfComputeMemSizeInfo.RLock() + calls = mock.calls.GetConfComputeMemSizeInfo + mock.lockGetConfComputeMemSizeInfo.RUnlock() + return calls +} + +// GetConfComputeProtectedMemoryUsage calls GetConfComputeProtectedMemoryUsageFunc. +func (mock *Device) GetConfComputeProtectedMemoryUsage() (nvml.Memory, nvml.Return) { + if mock.GetConfComputeProtectedMemoryUsageFunc == nil { + panic("Device.GetConfComputeProtectedMemoryUsageFunc: method is nil but Device.GetConfComputeProtectedMemoryUsage was just called") + } + callInfo := struct { + }{} + mock.lockGetConfComputeProtectedMemoryUsage.Lock() + mock.calls.GetConfComputeProtectedMemoryUsage = append(mock.calls.GetConfComputeProtectedMemoryUsage, callInfo) + mock.lockGetConfComputeProtectedMemoryUsage.Unlock() + return mock.GetConfComputeProtectedMemoryUsageFunc() +} + +// GetConfComputeProtectedMemoryUsageCalls gets all the calls that were made to GetConfComputeProtectedMemoryUsage. +// Check the length with: +// +// len(mockedDevice.GetConfComputeProtectedMemoryUsageCalls()) +func (mock *Device) GetConfComputeProtectedMemoryUsageCalls() []struct { +} { + var calls []struct { + } + mock.lockGetConfComputeProtectedMemoryUsage.RLock() + calls = mock.calls.GetConfComputeProtectedMemoryUsage + mock.lockGetConfComputeProtectedMemoryUsage.RUnlock() + return calls +} + +// GetCoolerInfo calls GetCoolerInfoFunc. +func (mock *Device) GetCoolerInfo() (nvml.CoolerInfo, nvml.Return) { + if mock.GetCoolerInfoFunc == nil { + panic("Device.GetCoolerInfoFunc: method is nil but Device.GetCoolerInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetCoolerInfo.Lock() + mock.calls.GetCoolerInfo = append(mock.calls.GetCoolerInfo, callInfo) + mock.lockGetCoolerInfo.Unlock() + return mock.GetCoolerInfoFunc() +} + +// GetCoolerInfoCalls gets all the calls that were made to GetCoolerInfo. +// Check the length with: +// +// len(mockedDevice.GetCoolerInfoCalls()) +func (mock *Device) GetCoolerInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCoolerInfo.RLock() + calls = mock.calls.GetCoolerInfo + mock.lockGetCoolerInfo.RUnlock() + return calls +} + +// GetCpuAffinity calls GetCpuAffinityFunc. +func (mock *Device) GetCpuAffinity(n int) ([]uint, nvml.Return) { + if mock.GetCpuAffinityFunc == nil { + panic("Device.GetCpuAffinityFunc: method is nil but Device.GetCpuAffinity was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetCpuAffinity.Lock() + mock.calls.GetCpuAffinity = append(mock.calls.GetCpuAffinity, callInfo) + mock.lockGetCpuAffinity.Unlock() + return mock.GetCpuAffinityFunc(n) +} + +// GetCpuAffinityCalls gets all the calls that were made to GetCpuAffinity. +// Check the length with: +// +// len(mockedDevice.GetCpuAffinityCalls()) +func (mock *Device) GetCpuAffinityCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetCpuAffinity.RLock() + calls = mock.calls.GetCpuAffinity + mock.lockGetCpuAffinity.RUnlock() + return calls +} + +// GetCpuAffinityWithinScope calls GetCpuAffinityWithinScopeFunc. +func (mock *Device) GetCpuAffinityWithinScope(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { + if mock.GetCpuAffinityWithinScopeFunc == nil { + panic("Device.GetCpuAffinityWithinScopeFunc: method is nil but Device.GetCpuAffinityWithinScope was just called") + } + callInfo := struct { + N int + AffinityScope nvml.AffinityScope + }{ + N: n, + AffinityScope: affinityScope, + } + mock.lockGetCpuAffinityWithinScope.Lock() + mock.calls.GetCpuAffinityWithinScope = append(mock.calls.GetCpuAffinityWithinScope, callInfo) + mock.lockGetCpuAffinityWithinScope.Unlock() + return mock.GetCpuAffinityWithinScopeFunc(n, affinityScope) +} + +// GetCpuAffinityWithinScopeCalls gets all the calls that were made to GetCpuAffinityWithinScope. +// Check the length with: +// +// len(mockedDevice.GetCpuAffinityWithinScopeCalls()) +func (mock *Device) GetCpuAffinityWithinScopeCalls() []struct { + N int + AffinityScope nvml.AffinityScope +} { + var calls []struct { + N int + AffinityScope nvml.AffinityScope + } + mock.lockGetCpuAffinityWithinScope.RLock() + calls = mock.calls.GetCpuAffinityWithinScope + mock.lockGetCpuAffinityWithinScope.RUnlock() + return calls +} + +// GetCreatableVgpus calls GetCreatableVgpusFunc. +func (mock *Device) GetCreatableVgpus() ([]nvml.VgpuTypeId, nvml.Return) { + if mock.GetCreatableVgpusFunc == nil { + panic("Device.GetCreatableVgpusFunc: method is nil but Device.GetCreatableVgpus was just called") + } + callInfo := struct { + }{} + mock.lockGetCreatableVgpus.Lock() + mock.calls.GetCreatableVgpus = append(mock.calls.GetCreatableVgpus, callInfo) + mock.lockGetCreatableVgpus.Unlock() + return mock.GetCreatableVgpusFunc() +} + +// GetCreatableVgpusCalls gets all the calls that were made to GetCreatableVgpus. +// Check the length with: +// +// len(mockedDevice.GetCreatableVgpusCalls()) +func (mock *Device) GetCreatableVgpusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCreatableVgpus.RLock() + calls = mock.calls.GetCreatableVgpus + mock.lockGetCreatableVgpus.RUnlock() + return calls +} + +// GetCudaComputeCapability calls GetCudaComputeCapabilityFunc. +func (mock *Device) GetCudaComputeCapability() (int, int, nvml.Return) { + if mock.GetCudaComputeCapabilityFunc == nil { + panic("Device.GetCudaComputeCapabilityFunc: method is nil but Device.GetCudaComputeCapability was just called") + } + callInfo := struct { + }{} + mock.lockGetCudaComputeCapability.Lock() + mock.calls.GetCudaComputeCapability = append(mock.calls.GetCudaComputeCapability, callInfo) + mock.lockGetCudaComputeCapability.Unlock() + return mock.GetCudaComputeCapabilityFunc() +} + +// GetCudaComputeCapabilityCalls gets all the calls that were made to GetCudaComputeCapability. +// Check the length with: +// +// len(mockedDevice.GetCudaComputeCapabilityCalls()) +func (mock *Device) GetCudaComputeCapabilityCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCudaComputeCapability.RLock() + calls = mock.calls.GetCudaComputeCapability + mock.lockGetCudaComputeCapability.RUnlock() + return calls +} + +// GetCurrPcieLinkGeneration calls GetCurrPcieLinkGenerationFunc. +func (mock *Device) GetCurrPcieLinkGeneration() (int, nvml.Return) { + if mock.GetCurrPcieLinkGenerationFunc == nil { + panic("Device.GetCurrPcieLinkGenerationFunc: method is nil but Device.GetCurrPcieLinkGeneration was just called") + } + callInfo := struct { + }{} + mock.lockGetCurrPcieLinkGeneration.Lock() + mock.calls.GetCurrPcieLinkGeneration = append(mock.calls.GetCurrPcieLinkGeneration, callInfo) + mock.lockGetCurrPcieLinkGeneration.Unlock() + return mock.GetCurrPcieLinkGenerationFunc() +} + +// GetCurrPcieLinkGenerationCalls gets all the calls that were made to GetCurrPcieLinkGeneration. +// Check the length with: +// +// len(mockedDevice.GetCurrPcieLinkGenerationCalls()) +func (mock *Device) GetCurrPcieLinkGenerationCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCurrPcieLinkGeneration.RLock() + calls = mock.calls.GetCurrPcieLinkGeneration + mock.lockGetCurrPcieLinkGeneration.RUnlock() + return calls +} + +// GetCurrPcieLinkWidth calls GetCurrPcieLinkWidthFunc. +func (mock *Device) GetCurrPcieLinkWidth() (int, nvml.Return) { + if mock.GetCurrPcieLinkWidthFunc == nil { + panic("Device.GetCurrPcieLinkWidthFunc: method is nil but Device.GetCurrPcieLinkWidth was just called") + } + callInfo := struct { + }{} + mock.lockGetCurrPcieLinkWidth.Lock() + mock.calls.GetCurrPcieLinkWidth = append(mock.calls.GetCurrPcieLinkWidth, callInfo) + mock.lockGetCurrPcieLinkWidth.Unlock() + return mock.GetCurrPcieLinkWidthFunc() +} + +// GetCurrPcieLinkWidthCalls gets all the calls that were made to GetCurrPcieLinkWidth. +// Check the length with: +// +// len(mockedDevice.GetCurrPcieLinkWidthCalls()) +func (mock *Device) GetCurrPcieLinkWidthCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCurrPcieLinkWidth.RLock() + calls = mock.calls.GetCurrPcieLinkWidth + mock.lockGetCurrPcieLinkWidth.RUnlock() + return calls +} + +// GetCurrentClockFreqs calls GetCurrentClockFreqsFunc. +func (mock *Device) GetCurrentClockFreqs() (nvml.DeviceCurrentClockFreqs, nvml.Return) { + if mock.GetCurrentClockFreqsFunc == nil { + panic("Device.GetCurrentClockFreqsFunc: method is nil but Device.GetCurrentClockFreqs was just called") + } + callInfo := struct { + }{} + mock.lockGetCurrentClockFreqs.Lock() + mock.calls.GetCurrentClockFreqs = append(mock.calls.GetCurrentClockFreqs, callInfo) + mock.lockGetCurrentClockFreqs.Unlock() + return mock.GetCurrentClockFreqsFunc() +} + +// GetCurrentClockFreqsCalls gets all the calls that were made to GetCurrentClockFreqs. +// Check the length with: +// +// len(mockedDevice.GetCurrentClockFreqsCalls()) +func (mock *Device) GetCurrentClockFreqsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCurrentClockFreqs.RLock() + calls = mock.calls.GetCurrentClockFreqs + mock.lockGetCurrentClockFreqs.RUnlock() + return calls +} + +// GetCurrentClocksEventReasons calls GetCurrentClocksEventReasonsFunc. +func (mock *Device) GetCurrentClocksEventReasons() (uint64, nvml.Return) { + if mock.GetCurrentClocksEventReasonsFunc == nil { + panic("Device.GetCurrentClocksEventReasonsFunc: method is nil but Device.GetCurrentClocksEventReasons was just called") + } + callInfo := struct { + }{} + mock.lockGetCurrentClocksEventReasons.Lock() + mock.calls.GetCurrentClocksEventReasons = append(mock.calls.GetCurrentClocksEventReasons, callInfo) + mock.lockGetCurrentClocksEventReasons.Unlock() + return mock.GetCurrentClocksEventReasonsFunc() +} + +// GetCurrentClocksEventReasonsCalls gets all the calls that were made to GetCurrentClocksEventReasons. +// Check the length with: +// +// len(mockedDevice.GetCurrentClocksEventReasonsCalls()) +func (mock *Device) GetCurrentClocksEventReasonsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCurrentClocksEventReasons.RLock() + calls = mock.calls.GetCurrentClocksEventReasons + mock.lockGetCurrentClocksEventReasons.RUnlock() + return calls +} + +// GetCurrentClocksThrottleReasons calls GetCurrentClocksThrottleReasonsFunc. +func (mock *Device) GetCurrentClocksThrottleReasons() (uint64, nvml.Return) { + if mock.GetCurrentClocksThrottleReasonsFunc == nil { + panic("Device.GetCurrentClocksThrottleReasonsFunc: method is nil but Device.GetCurrentClocksThrottleReasons was just called") + } + callInfo := struct { + }{} + mock.lockGetCurrentClocksThrottleReasons.Lock() + mock.calls.GetCurrentClocksThrottleReasons = append(mock.calls.GetCurrentClocksThrottleReasons, callInfo) + mock.lockGetCurrentClocksThrottleReasons.Unlock() + return mock.GetCurrentClocksThrottleReasonsFunc() +} + +// GetCurrentClocksThrottleReasonsCalls gets all the calls that were made to GetCurrentClocksThrottleReasons. +// Check the length with: +// +// len(mockedDevice.GetCurrentClocksThrottleReasonsCalls()) +func (mock *Device) GetCurrentClocksThrottleReasonsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCurrentClocksThrottleReasons.RLock() + calls = mock.calls.GetCurrentClocksThrottleReasons + mock.lockGetCurrentClocksThrottleReasons.RUnlock() + return calls +} + +// GetDecoderUtilization calls GetDecoderUtilizationFunc. +func (mock *Device) GetDecoderUtilization() (uint32, uint32, nvml.Return) { + if mock.GetDecoderUtilizationFunc == nil { + panic("Device.GetDecoderUtilizationFunc: method is nil but Device.GetDecoderUtilization was just called") + } + callInfo := struct { + }{} + mock.lockGetDecoderUtilization.Lock() + mock.calls.GetDecoderUtilization = append(mock.calls.GetDecoderUtilization, callInfo) + mock.lockGetDecoderUtilization.Unlock() + return mock.GetDecoderUtilizationFunc() +} + +// GetDecoderUtilizationCalls gets all the calls that were made to GetDecoderUtilization. +// Check the length with: +// +// len(mockedDevice.GetDecoderUtilizationCalls()) +func (mock *Device) GetDecoderUtilizationCalls() []struct { +} { + var calls []struct { + } + mock.lockGetDecoderUtilization.RLock() + calls = mock.calls.GetDecoderUtilization + mock.lockGetDecoderUtilization.RUnlock() + return calls +} + +// GetDefaultApplicationsClock calls GetDefaultApplicationsClockFunc. +func (mock *Device) GetDefaultApplicationsClock(clockType nvml.ClockType) (uint32, nvml.Return) { + if mock.GetDefaultApplicationsClockFunc == nil { + panic("Device.GetDefaultApplicationsClockFunc: method is nil but Device.GetDefaultApplicationsClock was just called") + } + callInfo := struct { + ClockType nvml.ClockType + }{ + ClockType: clockType, + } + mock.lockGetDefaultApplicationsClock.Lock() + mock.calls.GetDefaultApplicationsClock = append(mock.calls.GetDefaultApplicationsClock, callInfo) + mock.lockGetDefaultApplicationsClock.Unlock() + return mock.GetDefaultApplicationsClockFunc(clockType) +} + +// GetDefaultApplicationsClockCalls gets all the calls that were made to GetDefaultApplicationsClock. +// Check the length with: +// +// len(mockedDevice.GetDefaultApplicationsClockCalls()) +func (mock *Device) GetDefaultApplicationsClockCalls() []struct { + ClockType nvml.ClockType +} { + var calls []struct { + ClockType nvml.ClockType + } + mock.lockGetDefaultApplicationsClock.RLock() + calls = mock.calls.GetDefaultApplicationsClock + mock.lockGetDefaultApplicationsClock.RUnlock() + return calls +} + +// GetDefaultEccMode calls GetDefaultEccModeFunc. +func (mock *Device) GetDefaultEccMode() (nvml.EnableState, nvml.Return) { + if mock.GetDefaultEccModeFunc == nil { + panic("Device.GetDefaultEccModeFunc: method is nil but Device.GetDefaultEccMode was just called") + } + callInfo := struct { + }{} + mock.lockGetDefaultEccMode.Lock() + mock.calls.GetDefaultEccMode = append(mock.calls.GetDefaultEccMode, callInfo) + mock.lockGetDefaultEccMode.Unlock() + return mock.GetDefaultEccModeFunc() +} + +// GetDefaultEccModeCalls gets all the calls that were made to GetDefaultEccMode. +// Check the length with: +// +// len(mockedDevice.GetDefaultEccModeCalls()) +func (mock *Device) GetDefaultEccModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetDefaultEccMode.RLock() + calls = mock.calls.GetDefaultEccMode + mock.lockGetDefaultEccMode.RUnlock() + return calls +} + +// GetDetailedEccErrors calls GetDetailedEccErrorsFunc. +func (mock *Device) GetDetailedEccErrors(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) { + if mock.GetDetailedEccErrorsFunc == nil { + panic("Device.GetDetailedEccErrorsFunc: method is nil but Device.GetDetailedEccErrors was just called") + } + callInfo := struct { + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + }{ + MemoryErrorType: memoryErrorType, + EccCounterType: eccCounterType, + } + mock.lockGetDetailedEccErrors.Lock() + mock.calls.GetDetailedEccErrors = append(mock.calls.GetDetailedEccErrors, callInfo) + mock.lockGetDetailedEccErrors.Unlock() + return mock.GetDetailedEccErrorsFunc(memoryErrorType, eccCounterType) +} + +// GetDetailedEccErrorsCalls gets all the calls that were made to GetDetailedEccErrors. +// Check the length with: +// +// len(mockedDevice.GetDetailedEccErrorsCalls()) +func (mock *Device) GetDetailedEccErrorsCalls() []struct { + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType +} { + var calls []struct { + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + } + mock.lockGetDetailedEccErrors.RLock() + calls = mock.calls.GetDetailedEccErrors + mock.lockGetDetailedEccErrors.RUnlock() + return calls +} + +// GetDeviceHandleFromMigDeviceHandle calls GetDeviceHandleFromMigDeviceHandleFunc. +func (mock *Device) GetDeviceHandleFromMigDeviceHandle() (nvml.Device, nvml.Return) { + if mock.GetDeviceHandleFromMigDeviceHandleFunc == nil { + panic("Device.GetDeviceHandleFromMigDeviceHandleFunc: method is nil but Device.GetDeviceHandleFromMigDeviceHandle was just called") + } + callInfo := struct { + }{} + mock.lockGetDeviceHandleFromMigDeviceHandle.Lock() + mock.calls.GetDeviceHandleFromMigDeviceHandle = append(mock.calls.GetDeviceHandleFromMigDeviceHandle, callInfo) + mock.lockGetDeviceHandleFromMigDeviceHandle.Unlock() + return mock.GetDeviceHandleFromMigDeviceHandleFunc() +} + +// GetDeviceHandleFromMigDeviceHandleCalls gets all the calls that were made to GetDeviceHandleFromMigDeviceHandle. +// Check the length with: +// +// len(mockedDevice.GetDeviceHandleFromMigDeviceHandleCalls()) +func (mock *Device) GetDeviceHandleFromMigDeviceHandleCalls() []struct { +} { + var calls []struct { + } + mock.lockGetDeviceHandleFromMigDeviceHandle.RLock() + calls = mock.calls.GetDeviceHandleFromMigDeviceHandle + mock.lockGetDeviceHandleFromMigDeviceHandle.RUnlock() + return calls +} + +// GetDisplayActive calls GetDisplayActiveFunc. +func (mock *Device) GetDisplayActive() (nvml.EnableState, nvml.Return) { + if mock.GetDisplayActiveFunc == nil { + panic("Device.GetDisplayActiveFunc: method is nil but Device.GetDisplayActive was just called") + } + callInfo := struct { + }{} + mock.lockGetDisplayActive.Lock() + mock.calls.GetDisplayActive = append(mock.calls.GetDisplayActive, callInfo) + mock.lockGetDisplayActive.Unlock() + return mock.GetDisplayActiveFunc() +} + +// GetDisplayActiveCalls gets all the calls that were made to GetDisplayActive. +// Check the length with: +// +// len(mockedDevice.GetDisplayActiveCalls()) +func (mock *Device) GetDisplayActiveCalls() []struct { +} { + var calls []struct { + } + mock.lockGetDisplayActive.RLock() + calls = mock.calls.GetDisplayActive + mock.lockGetDisplayActive.RUnlock() + return calls +} + +// GetDisplayMode calls GetDisplayModeFunc. +func (mock *Device) GetDisplayMode() (nvml.EnableState, nvml.Return) { + if mock.GetDisplayModeFunc == nil { + panic("Device.GetDisplayModeFunc: method is nil but Device.GetDisplayMode was just called") + } + callInfo := struct { + }{} + mock.lockGetDisplayMode.Lock() + mock.calls.GetDisplayMode = append(mock.calls.GetDisplayMode, callInfo) + mock.lockGetDisplayMode.Unlock() + return mock.GetDisplayModeFunc() +} + +// GetDisplayModeCalls gets all the calls that were made to GetDisplayMode. +// Check the length with: +// +// len(mockedDevice.GetDisplayModeCalls()) +func (mock *Device) GetDisplayModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetDisplayMode.RLock() + calls = mock.calls.GetDisplayMode + mock.lockGetDisplayMode.RUnlock() + return calls +} + +// GetDramEncryptionMode calls GetDramEncryptionModeFunc. +func (mock *Device) GetDramEncryptionMode() (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) { + if mock.GetDramEncryptionModeFunc == nil { + panic("Device.GetDramEncryptionModeFunc: method is nil but Device.GetDramEncryptionMode was just called") + } + callInfo := struct { + }{} + mock.lockGetDramEncryptionMode.Lock() + mock.calls.GetDramEncryptionMode = append(mock.calls.GetDramEncryptionMode, callInfo) + mock.lockGetDramEncryptionMode.Unlock() + return mock.GetDramEncryptionModeFunc() +} + +// GetDramEncryptionModeCalls gets all the calls that were made to GetDramEncryptionMode. +// Check the length with: +// +// len(mockedDevice.GetDramEncryptionModeCalls()) +func (mock *Device) GetDramEncryptionModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetDramEncryptionMode.RLock() + calls = mock.calls.GetDramEncryptionMode + mock.lockGetDramEncryptionMode.RUnlock() + return calls +} + +// GetDriverModel calls GetDriverModelFunc. +func (mock *Device) GetDriverModel() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { + if mock.GetDriverModelFunc == nil { + panic("Device.GetDriverModelFunc: method is nil but Device.GetDriverModel was just called") + } + callInfo := struct { + }{} + mock.lockGetDriverModel.Lock() + mock.calls.GetDriverModel = append(mock.calls.GetDriverModel, callInfo) + mock.lockGetDriverModel.Unlock() + return mock.GetDriverModelFunc() +} + +// GetDriverModelCalls gets all the calls that were made to GetDriverModel. +// Check the length with: +// +// len(mockedDevice.GetDriverModelCalls()) +func (mock *Device) GetDriverModelCalls() []struct { +} { + var calls []struct { + } + mock.lockGetDriverModel.RLock() + calls = mock.calls.GetDriverModel + mock.lockGetDriverModel.RUnlock() + return calls +} + +// GetDriverModel_v2 calls GetDriverModel_v2Func. +func (mock *Device) GetDriverModel_v2() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { + if mock.GetDriverModel_v2Func == nil { + panic("Device.GetDriverModel_v2Func: method is nil but Device.GetDriverModel_v2 was just called") + } + callInfo := struct { + }{} + mock.lockGetDriverModel_v2.Lock() + mock.calls.GetDriverModel_v2 = append(mock.calls.GetDriverModel_v2, callInfo) + mock.lockGetDriverModel_v2.Unlock() + return mock.GetDriverModel_v2Func() +} + +// GetDriverModel_v2Calls gets all the calls that were made to GetDriverModel_v2. +// Check the length with: +// +// len(mockedDevice.GetDriverModel_v2Calls()) +func (mock *Device) GetDriverModel_v2Calls() []struct { +} { + var calls []struct { + } + mock.lockGetDriverModel_v2.RLock() + calls = mock.calls.GetDriverModel_v2 + mock.lockGetDriverModel_v2.RUnlock() + return calls +} + +// GetDynamicPstatesInfo calls GetDynamicPstatesInfoFunc. +func (mock *Device) GetDynamicPstatesInfo() (nvml.GpuDynamicPstatesInfo, nvml.Return) { + if mock.GetDynamicPstatesInfoFunc == nil { + panic("Device.GetDynamicPstatesInfoFunc: method is nil but Device.GetDynamicPstatesInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetDynamicPstatesInfo.Lock() + mock.calls.GetDynamicPstatesInfo = append(mock.calls.GetDynamicPstatesInfo, callInfo) + mock.lockGetDynamicPstatesInfo.Unlock() + return mock.GetDynamicPstatesInfoFunc() +} + +// GetDynamicPstatesInfoCalls gets all the calls that were made to GetDynamicPstatesInfo. +// Check the length with: +// +// len(mockedDevice.GetDynamicPstatesInfoCalls()) +func (mock *Device) GetDynamicPstatesInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetDynamicPstatesInfo.RLock() + calls = mock.calls.GetDynamicPstatesInfo + mock.lockGetDynamicPstatesInfo.RUnlock() + return calls +} + +// GetEccMode calls GetEccModeFunc. +func (mock *Device) GetEccMode() (nvml.EnableState, nvml.EnableState, nvml.Return) { + if mock.GetEccModeFunc == nil { + panic("Device.GetEccModeFunc: method is nil but Device.GetEccMode was just called") + } + callInfo := struct { + }{} + mock.lockGetEccMode.Lock() + mock.calls.GetEccMode = append(mock.calls.GetEccMode, callInfo) + mock.lockGetEccMode.Unlock() + return mock.GetEccModeFunc() +} + +// GetEccModeCalls gets all the calls that were made to GetEccMode. +// Check the length with: +// +// len(mockedDevice.GetEccModeCalls()) +func (mock *Device) GetEccModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetEccMode.RLock() + calls = mock.calls.GetEccMode + mock.lockGetEccMode.RUnlock() + return calls +} + +// GetEncoderCapacity calls GetEncoderCapacityFunc. +func (mock *Device) GetEncoderCapacity(encoderType nvml.EncoderType) (int, nvml.Return) { + if mock.GetEncoderCapacityFunc == nil { + panic("Device.GetEncoderCapacityFunc: method is nil but Device.GetEncoderCapacity was just called") + } + callInfo := struct { + EncoderType nvml.EncoderType + }{ + EncoderType: encoderType, + } + mock.lockGetEncoderCapacity.Lock() + mock.calls.GetEncoderCapacity = append(mock.calls.GetEncoderCapacity, callInfo) + mock.lockGetEncoderCapacity.Unlock() + return mock.GetEncoderCapacityFunc(encoderType) +} + +// GetEncoderCapacityCalls gets all the calls that were made to GetEncoderCapacity. +// Check the length with: +// +// len(mockedDevice.GetEncoderCapacityCalls()) +func (mock *Device) GetEncoderCapacityCalls() []struct { + EncoderType nvml.EncoderType +} { + var calls []struct { + EncoderType nvml.EncoderType + } + mock.lockGetEncoderCapacity.RLock() + calls = mock.calls.GetEncoderCapacity + mock.lockGetEncoderCapacity.RUnlock() + return calls +} + +// GetEncoderSessions calls GetEncoderSessionsFunc. +func (mock *Device) GetEncoderSessions() ([]nvml.EncoderSessionInfo, nvml.Return) { + if mock.GetEncoderSessionsFunc == nil { + panic("Device.GetEncoderSessionsFunc: method is nil but Device.GetEncoderSessions was just called") + } + callInfo := struct { + }{} + mock.lockGetEncoderSessions.Lock() + mock.calls.GetEncoderSessions = append(mock.calls.GetEncoderSessions, callInfo) + mock.lockGetEncoderSessions.Unlock() + return mock.GetEncoderSessionsFunc() +} + +// GetEncoderSessionsCalls gets all the calls that were made to GetEncoderSessions. +// Check the length with: +// +// len(mockedDevice.GetEncoderSessionsCalls()) +func (mock *Device) GetEncoderSessionsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetEncoderSessions.RLock() + calls = mock.calls.GetEncoderSessions + mock.lockGetEncoderSessions.RUnlock() + return calls +} + +// GetEncoderStats calls GetEncoderStatsFunc. +func (mock *Device) GetEncoderStats() (int, uint32, uint32, nvml.Return) { + if mock.GetEncoderStatsFunc == nil { + panic("Device.GetEncoderStatsFunc: method is nil but Device.GetEncoderStats was just called") + } + callInfo := struct { + }{} + mock.lockGetEncoderStats.Lock() + mock.calls.GetEncoderStats = append(mock.calls.GetEncoderStats, callInfo) + mock.lockGetEncoderStats.Unlock() + return mock.GetEncoderStatsFunc() +} + +// GetEncoderStatsCalls gets all the calls that were made to GetEncoderStats. +// Check the length with: +// +// len(mockedDevice.GetEncoderStatsCalls()) +func (mock *Device) GetEncoderStatsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetEncoderStats.RLock() + calls = mock.calls.GetEncoderStats + mock.lockGetEncoderStats.RUnlock() + return calls +} + +// GetEncoderUtilization calls GetEncoderUtilizationFunc. +func (mock *Device) GetEncoderUtilization() (uint32, uint32, nvml.Return) { + if mock.GetEncoderUtilizationFunc == nil { + panic("Device.GetEncoderUtilizationFunc: method is nil but Device.GetEncoderUtilization was just called") + } + callInfo := struct { + }{} + mock.lockGetEncoderUtilization.Lock() + mock.calls.GetEncoderUtilization = append(mock.calls.GetEncoderUtilization, callInfo) + mock.lockGetEncoderUtilization.Unlock() + return mock.GetEncoderUtilizationFunc() +} + +// GetEncoderUtilizationCalls gets all the calls that were made to GetEncoderUtilization. +// Check the length with: +// +// len(mockedDevice.GetEncoderUtilizationCalls()) +func (mock *Device) GetEncoderUtilizationCalls() []struct { +} { + var calls []struct { + } + mock.lockGetEncoderUtilization.RLock() + calls = mock.calls.GetEncoderUtilization + mock.lockGetEncoderUtilization.RUnlock() + return calls +} + +// GetEnforcedPowerLimit calls GetEnforcedPowerLimitFunc. +func (mock *Device) GetEnforcedPowerLimit() (uint32, nvml.Return) { + if mock.GetEnforcedPowerLimitFunc == nil { + panic("Device.GetEnforcedPowerLimitFunc: method is nil but Device.GetEnforcedPowerLimit was just called") + } + callInfo := struct { + }{} + mock.lockGetEnforcedPowerLimit.Lock() + mock.calls.GetEnforcedPowerLimit = append(mock.calls.GetEnforcedPowerLimit, callInfo) + mock.lockGetEnforcedPowerLimit.Unlock() + return mock.GetEnforcedPowerLimitFunc() +} + +// GetEnforcedPowerLimitCalls gets all the calls that were made to GetEnforcedPowerLimit. +// Check the length with: +// +// len(mockedDevice.GetEnforcedPowerLimitCalls()) +func (mock *Device) GetEnforcedPowerLimitCalls() []struct { +} { + var calls []struct { + } + mock.lockGetEnforcedPowerLimit.RLock() + calls = mock.calls.GetEnforcedPowerLimit + mock.lockGetEnforcedPowerLimit.RUnlock() + return calls +} + +// GetFBCSessions calls GetFBCSessionsFunc. +func (mock *Device) GetFBCSessions() ([]nvml.FBCSessionInfo, nvml.Return) { + if mock.GetFBCSessionsFunc == nil { + panic("Device.GetFBCSessionsFunc: method is nil but Device.GetFBCSessions was just called") + } + callInfo := struct { + }{} + mock.lockGetFBCSessions.Lock() + mock.calls.GetFBCSessions = append(mock.calls.GetFBCSessions, callInfo) + mock.lockGetFBCSessions.Unlock() + return mock.GetFBCSessionsFunc() +} + +// GetFBCSessionsCalls gets all the calls that were made to GetFBCSessions. +// Check the length with: +// +// len(mockedDevice.GetFBCSessionsCalls()) +func (mock *Device) GetFBCSessionsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFBCSessions.RLock() + calls = mock.calls.GetFBCSessions + mock.lockGetFBCSessions.RUnlock() + return calls +} + +// GetFBCStats calls GetFBCStatsFunc. +func (mock *Device) GetFBCStats() (nvml.FBCStats, nvml.Return) { + if mock.GetFBCStatsFunc == nil { + panic("Device.GetFBCStatsFunc: method is nil but Device.GetFBCStats was just called") + } + callInfo := struct { + }{} + mock.lockGetFBCStats.Lock() + mock.calls.GetFBCStats = append(mock.calls.GetFBCStats, callInfo) + mock.lockGetFBCStats.Unlock() + return mock.GetFBCStatsFunc() +} + +// GetFBCStatsCalls gets all the calls that were made to GetFBCStats. +// Check the length with: +// +// len(mockedDevice.GetFBCStatsCalls()) +func (mock *Device) GetFBCStatsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFBCStats.RLock() + calls = mock.calls.GetFBCStats + mock.lockGetFBCStats.RUnlock() + return calls +} + +// GetFanControlPolicy_v2 calls GetFanControlPolicy_v2Func. +func (mock *Device) GetFanControlPolicy_v2(n int) (nvml.FanControlPolicy, nvml.Return) { + if mock.GetFanControlPolicy_v2Func == nil { + panic("Device.GetFanControlPolicy_v2Func: method is nil but Device.GetFanControlPolicy_v2 was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetFanControlPolicy_v2.Lock() + mock.calls.GetFanControlPolicy_v2 = append(mock.calls.GetFanControlPolicy_v2, callInfo) + mock.lockGetFanControlPolicy_v2.Unlock() + return mock.GetFanControlPolicy_v2Func(n) +} + +// GetFanControlPolicy_v2Calls gets all the calls that were made to GetFanControlPolicy_v2. +// Check the length with: +// +// len(mockedDevice.GetFanControlPolicy_v2Calls()) +func (mock *Device) GetFanControlPolicy_v2Calls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetFanControlPolicy_v2.RLock() + calls = mock.calls.GetFanControlPolicy_v2 + mock.lockGetFanControlPolicy_v2.RUnlock() + return calls +} + +// GetFanSpeed calls GetFanSpeedFunc. +func (mock *Device) GetFanSpeed() (uint32, nvml.Return) { + if mock.GetFanSpeedFunc == nil { + panic("Device.GetFanSpeedFunc: method is nil but Device.GetFanSpeed was just called") + } + callInfo := struct { + }{} + mock.lockGetFanSpeed.Lock() + mock.calls.GetFanSpeed = append(mock.calls.GetFanSpeed, callInfo) + mock.lockGetFanSpeed.Unlock() + return mock.GetFanSpeedFunc() +} + +// GetFanSpeedCalls gets all the calls that were made to GetFanSpeed. +// Check the length with: +// +// len(mockedDevice.GetFanSpeedCalls()) +func (mock *Device) GetFanSpeedCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFanSpeed.RLock() + calls = mock.calls.GetFanSpeed + mock.lockGetFanSpeed.RUnlock() + return calls +} + +// GetFanSpeedRPM calls GetFanSpeedRPMFunc. +func (mock *Device) GetFanSpeedRPM() (nvml.FanSpeedInfo, nvml.Return) { + if mock.GetFanSpeedRPMFunc == nil { + panic("Device.GetFanSpeedRPMFunc: method is nil but Device.GetFanSpeedRPM was just called") + } + callInfo := struct { + }{} + mock.lockGetFanSpeedRPM.Lock() + mock.calls.GetFanSpeedRPM = append(mock.calls.GetFanSpeedRPM, callInfo) + mock.lockGetFanSpeedRPM.Unlock() + return mock.GetFanSpeedRPMFunc() +} + +// GetFanSpeedRPMCalls gets all the calls that were made to GetFanSpeedRPM. +// Check the length with: +// +// len(mockedDevice.GetFanSpeedRPMCalls()) +func (mock *Device) GetFanSpeedRPMCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFanSpeedRPM.RLock() + calls = mock.calls.GetFanSpeedRPM + mock.lockGetFanSpeedRPM.RUnlock() + return calls +} + +// GetFanSpeed_v2 calls GetFanSpeed_v2Func. +func (mock *Device) GetFanSpeed_v2(n int) (uint32, nvml.Return) { + if mock.GetFanSpeed_v2Func == nil { + panic("Device.GetFanSpeed_v2Func: method is nil but Device.GetFanSpeed_v2 was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetFanSpeed_v2.Lock() + mock.calls.GetFanSpeed_v2 = append(mock.calls.GetFanSpeed_v2, callInfo) + mock.lockGetFanSpeed_v2.Unlock() + return mock.GetFanSpeed_v2Func(n) +} + +// GetFanSpeed_v2Calls gets all the calls that were made to GetFanSpeed_v2. +// Check the length with: +// +// len(mockedDevice.GetFanSpeed_v2Calls()) +func (mock *Device) GetFanSpeed_v2Calls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetFanSpeed_v2.RLock() + calls = mock.calls.GetFanSpeed_v2 + mock.lockGetFanSpeed_v2.RUnlock() + return calls +} + +// GetFieldValues calls GetFieldValuesFunc. +func (mock *Device) GetFieldValues(fieldValues []nvml.FieldValue) nvml.Return { + if mock.GetFieldValuesFunc == nil { + panic("Device.GetFieldValuesFunc: method is nil but Device.GetFieldValues was just called") + } + callInfo := struct { + FieldValues []nvml.FieldValue + }{ + FieldValues: fieldValues, + } + mock.lockGetFieldValues.Lock() + mock.calls.GetFieldValues = append(mock.calls.GetFieldValues, callInfo) + mock.lockGetFieldValues.Unlock() + return mock.GetFieldValuesFunc(fieldValues) +} + +// GetFieldValuesCalls gets all the calls that were made to GetFieldValues. +// Check the length with: +// +// len(mockedDevice.GetFieldValuesCalls()) +func (mock *Device) GetFieldValuesCalls() []struct { + FieldValues []nvml.FieldValue +} { + var calls []struct { + FieldValues []nvml.FieldValue + } + mock.lockGetFieldValues.RLock() + calls = mock.calls.GetFieldValues + mock.lockGetFieldValues.RUnlock() + return calls +} + +// GetGpcClkMinMaxVfOffset calls GetGpcClkMinMaxVfOffsetFunc. +func (mock *Device) GetGpcClkMinMaxVfOffset() (int, int, nvml.Return) { + if mock.GetGpcClkMinMaxVfOffsetFunc == nil { + panic("Device.GetGpcClkMinMaxVfOffsetFunc: method is nil but Device.GetGpcClkMinMaxVfOffset was just called") + } + callInfo := struct { + }{} + mock.lockGetGpcClkMinMaxVfOffset.Lock() + mock.calls.GetGpcClkMinMaxVfOffset = append(mock.calls.GetGpcClkMinMaxVfOffset, callInfo) + mock.lockGetGpcClkMinMaxVfOffset.Unlock() + return mock.GetGpcClkMinMaxVfOffsetFunc() +} + +// GetGpcClkMinMaxVfOffsetCalls gets all the calls that were made to GetGpcClkMinMaxVfOffset. +// Check the length with: +// +// len(mockedDevice.GetGpcClkMinMaxVfOffsetCalls()) +func (mock *Device) GetGpcClkMinMaxVfOffsetCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGpcClkMinMaxVfOffset.RLock() + calls = mock.calls.GetGpcClkMinMaxVfOffset + mock.lockGetGpcClkMinMaxVfOffset.RUnlock() + return calls +} + +// GetGpcClkVfOffset calls GetGpcClkVfOffsetFunc. +func (mock *Device) GetGpcClkVfOffset() (int, nvml.Return) { + if mock.GetGpcClkVfOffsetFunc == nil { + panic("Device.GetGpcClkVfOffsetFunc: method is nil but Device.GetGpcClkVfOffset was just called") + } + callInfo := struct { + }{} + mock.lockGetGpcClkVfOffset.Lock() + mock.calls.GetGpcClkVfOffset = append(mock.calls.GetGpcClkVfOffset, callInfo) + mock.lockGetGpcClkVfOffset.Unlock() + return mock.GetGpcClkVfOffsetFunc() +} + +// GetGpcClkVfOffsetCalls gets all the calls that were made to GetGpcClkVfOffset. +// Check the length with: +// +// len(mockedDevice.GetGpcClkVfOffsetCalls()) +func (mock *Device) GetGpcClkVfOffsetCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGpcClkVfOffset.RLock() + calls = mock.calls.GetGpcClkVfOffset + mock.lockGetGpcClkVfOffset.RUnlock() + return calls +} + +// GetGpuFabricInfo calls GetGpuFabricInfoFunc. +func (mock *Device) GetGpuFabricInfo() (nvml.GpuFabricInfo, nvml.Return) { + if mock.GetGpuFabricInfoFunc == nil { + panic("Device.GetGpuFabricInfoFunc: method is nil but Device.GetGpuFabricInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetGpuFabricInfo.Lock() + mock.calls.GetGpuFabricInfo = append(mock.calls.GetGpuFabricInfo, callInfo) + mock.lockGetGpuFabricInfo.Unlock() + return mock.GetGpuFabricInfoFunc() +} + +// GetGpuFabricInfoCalls gets all the calls that were made to GetGpuFabricInfo. +// Check the length with: +// +// len(mockedDevice.GetGpuFabricInfoCalls()) +func (mock *Device) GetGpuFabricInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGpuFabricInfo.RLock() + calls = mock.calls.GetGpuFabricInfo + mock.lockGetGpuFabricInfo.RUnlock() + return calls +} + +// GetGpuFabricInfoV calls GetGpuFabricInfoVFunc. +func (mock *Device) GetGpuFabricInfoV() nvml.GpuFabricInfoHandler { + if mock.GetGpuFabricInfoVFunc == nil { + panic("Device.GetGpuFabricInfoVFunc: method is nil but Device.GetGpuFabricInfoV was just called") + } + callInfo := struct { + }{} + mock.lockGetGpuFabricInfoV.Lock() + mock.calls.GetGpuFabricInfoV = append(mock.calls.GetGpuFabricInfoV, callInfo) + mock.lockGetGpuFabricInfoV.Unlock() + return mock.GetGpuFabricInfoVFunc() +} + +// GetGpuFabricInfoVCalls gets all the calls that were made to GetGpuFabricInfoV. +// Check the length with: +// +// len(mockedDevice.GetGpuFabricInfoVCalls()) +func (mock *Device) GetGpuFabricInfoVCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGpuFabricInfoV.RLock() + calls = mock.calls.GetGpuFabricInfoV + mock.lockGetGpuFabricInfoV.RUnlock() + return calls +} + +// GetGpuInstanceById calls GetGpuInstanceByIdFunc. +func (mock *Device) GetGpuInstanceById(n int) (nvml.GpuInstance, nvml.Return) { + if mock.GetGpuInstanceByIdFunc == nil { + panic("Device.GetGpuInstanceByIdFunc: method is nil but Device.GetGpuInstanceById was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetGpuInstanceById.Lock() + mock.calls.GetGpuInstanceById = append(mock.calls.GetGpuInstanceById, callInfo) + mock.lockGetGpuInstanceById.Unlock() + return mock.GetGpuInstanceByIdFunc(n) +} + +// GetGpuInstanceByIdCalls gets all the calls that were made to GetGpuInstanceById. +// Check the length with: +// +// len(mockedDevice.GetGpuInstanceByIdCalls()) +func (mock *Device) GetGpuInstanceByIdCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetGpuInstanceById.RLock() + calls = mock.calls.GetGpuInstanceById + mock.lockGetGpuInstanceById.RUnlock() + return calls +} + +// GetGpuInstanceId calls GetGpuInstanceIdFunc. +func (mock *Device) GetGpuInstanceId() (int, nvml.Return) { + if mock.GetGpuInstanceIdFunc == nil { + panic("Device.GetGpuInstanceIdFunc: method is nil but Device.GetGpuInstanceId was just called") + } + callInfo := struct { + }{} + mock.lockGetGpuInstanceId.Lock() + mock.calls.GetGpuInstanceId = append(mock.calls.GetGpuInstanceId, callInfo) + mock.lockGetGpuInstanceId.Unlock() + return mock.GetGpuInstanceIdFunc() +} + +// GetGpuInstanceIdCalls gets all the calls that were made to GetGpuInstanceId. +// Check the length with: +// +// len(mockedDevice.GetGpuInstanceIdCalls()) +func (mock *Device) GetGpuInstanceIdCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGpuInstanceId.RLock() + calls = mock.calls.GetGpuInstanceId + mock.lockGetGpuInstanceId.RUnlock() + return calls +} + +// GetGpuInstancePossiblePlacements calls GetGpuInstancePossiblePlacementsFunc. +func (mock *Device) GetGpuInstancePossiblePlacements(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { + if mock.GetGpuInstancePossiblePlacementsFunc == nil { + panic("Device.GetGpuInstancePossiblePlacementsFunc: method is nil but Device.GetGpuInstancePossiblePlacements was just called") + } + callInfo := struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + }{ + GpuInstanceProfileInfo: gpuInstanceProfileInfo, + } + mock.lockGetGpuInstancePossiblePlacements.Lock() + mock.calls.GetGpuInstancePossiblePlacements = append(mock.calls.GetGpuInstancePossiblePlacements, callInfo) + mock.lockGetGpuInstancePossiblePlacements.Unlock() + return mock.GetGpuInstancePossiblePlacementsFunc(gpuInstanceProfileInfo) +} + +// GetGpuInstancePossiblePlacementsCalls gets all the calls that were made to GetGpuInstancePossiblePlacements. +// Check the length with: +// +// len(mockedDevice.GetGpuInstancePossiblePlacementsCalls()) +func (mock *Device) GetGpuInstancePossiblePlacementsCalls() []struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo +} { + var calls []struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + mock.lockGetGpuInstancePossiblePlacements.RLock() + calls = mock.calls.GetGpuInstancePossiblePlacements + mock.lockGetGpuInstancePossiblePlacements.RUnlock() + return calls +} + +// GetGpuInstanceProfileInfo calls GetGpuInstanceProfileInfoFunc. +func (mock *Device) GetGpuInstanceProfileInfo(n int) (nvml.GpuInstanceProfileInfo, nvml.Return) { + if mock.GetGpuInstanceProfileInfoFunc == nil { + panic("Device.GetGpuInstanceProfileInfoFunc: method is nil but Device.GetGpuInstanceProfileInfo was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetGpuInstanceProfileInfo.Lock() + mock.calls.GetGpuInstanceProfileInfo = append(mock.calls.GetGpuInstanceProfileInfo, callInfo) + mock.lockGetGpuInstanceProfileInfo.Unlock() + return mock.GetGpuInstanceProfileInfoFunc(n) +} + +// GetGpuInstanceProfileInfoCalls gets all the calls that were made to GetGpuInstanceProfileInfo. +// Check the length with: +// +// len(mockedDevice.GetGpuInstanceProfileInfoCalls()) +func (mock *Device) GetGpuInstanceProfileInfoCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetGpuInstanceProfileInfo.RLock() + calls = mock.calls.GetGpuInstanceProfileInfo + mock.lockGetGpuInstanceProfileInfo.RUnlock() + return calls +} + +// GetGpuInstanceProfileInfoByIdV calls GetGpuInstanceProfileInfoByIdVFunc. +func (mock *Device) GetGpuInstanceProfileInfoByIdV(n int) nvml.GpuInstanceProfileInfoByIdHandler { + if mock.GetGpuInstanceProfileInfoByIdVFunc == nil { + panic("Device.GetGpuInstanceProfileInfoByIdVFunc: method is nil but Device.GetGpuInstanceProfileInfoByIdV was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetGpuInstanceProfileInfoByIdV.Lock() + mock.calls.GetGpuInstanceProfileInfoByIdV = append(mock.calls.GetGpuInstanceProfileInfoByIdV, callInfo) + mock.lockGetGpuInstanceProfileInfoByIdV.Unlock() + return mock.GetGpuInstanceProfileInfoByIdVFunc(n) +} + +// GetGpuInstanceProfileInfoByIdVCalls gets all the calls that were made to GetGpuInstanceProfileInfoByIdV. +// Check the length with: +// +// len(mockedDevice.GetGpuInstanceProfileInfoByIdVCalls()) +func (mock *Device) GetGpuInstanceProfileInfoByIdVCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetGpuInstanceProfileInfoByIdV.RLock() + calls = mock.calls.GetGpuInstanceProfileInfoByIdV + mock.lockGetGpuInstanceProfileInfoByIdV.RUnlock() + return calls +} + +// GetGpuInstanceProfileInfoV calls GetGpuInstanceProfileInfoVFunc. +func (mock *Device) GetGpuInstanceProfileInfoV(n int) nvml.GpuInstanceProfileInfoHandler { + if mock.GetGpuInstanceProfileInfoVFunc == nil { + panic("Device.GetGpuInstanceProfileInfoVFunc: method is nil but Device.GetGpuInstanceProfileInfoV was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetGpuInstanceProfileInfoV.Lock() + mock.calls.GetGpuInstanceProfileInfoV = append(mock.calls.GetGpuInstanceProfileInfoV, callInfo) + mock.lockGetGpuInstanceProfileInfoV.Unlock() + return mock.GetGpuInstanceProfileInfoVFunc(n) +} + +// GetGpuInstanceProfileInfoVCalls gets all the calls that were made to GetGpuInstanceProfileInfoV. +// Check the length with: +// +// len(mockedDevice.GetGpuInstanceProfileInfoVCalls()) +func (mock *Device) GetGpuInstanceProfileInfoVCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetGpuInstanceProfileInfoV.RLock() + calls = mock.calls.GetGpuInstanceProfileInfoV + mock.lockGetGpuInstanceProfileInfoV.RUnlock() + return calls +} + +// GetGpuInstanceRemainingCapacity calls GetGpuInstanceRemainingCapacityFunc. +func (mock *Device) GetGpuInstanceRemainingCapacity(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) { + if mock.GetGpuInstanceRemainingCapacityFunc == nil { + panic("Device.GetGpuInstanceRemainingCapacityFunc: method is nil but Device.GetGpuInstanceRemainingCapacity was just called") + } + callInfo := struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + }{ + GpuInstanceProfileInfo: gpuInstanceProfileInfo, + } + mock.lockGetGpuInstanceRemainingCapacity.Lock() + mock.calls.GetGpuInstanceRemainingCapacity = append(mock.calls.GetGpuInstanceRemainingCapacity, callInfo) + mock.lockGetGpuInstanceRemainingCapacity.Unlock() + return mock.GetGpuInstanceRemainingCapacityFunc(gpuInstanceProfileInfo) +} + +// GetGpuInstanceRemainingCapacityCalls gets all the calls that were made to GetGpuInstanceRemainingCapacity. +// Check the length with: +// +// len(mockedDevice.GetGpuInstanceRemainingCapacityCalls()) +func (mock *Device) GetGpuInstanceRemainingCapacityCalls() []struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo +} { + var calls []struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + mock.lockGetGpuInstanceRemainingCapacity.RLock() + calls = mock.calls.GetGpuInstanceRemainingCapacity + mock.lockGetGpuInstanceRemainingCapacity.RUnlock() + return calls +} + +// GetGpuInstances calls GetGpuInstancesFunc. +func (mock *Device) GetGpuInstances(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { + if mock.GetGpuInstancesFunc == nil { + panic("Device.GetGpuInstancesFunc: method is nil but Device.GetGpuInstances was just called") + } + callInfo := struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + }{ + GpuInstanceProfileInfo: gpuInstanceProfileInfo, + } + mock.lockGetGpuInstances.Lock() + mock.calls.GetGpuInstances = append(mock.calls.GetGpuInstances, callInfo) + mock.lockGetGpuInstances.Unlock() + return mock.GetGpuInstancesFunc(gpuInstanceProfileInfo) +} + +// GetGpuInstancesCalls gets all the calls that were made to GetGpuInstances. +// Check the length with: +// +// len(mockedDevice.GetGpuInstancesCalls()) +func (mock *Device) GetGpuInstancesCalls() []struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo +} { + var calls []struct { + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + mock.lockGetGpuInstances.RLock() + calls = mock.calls.GetGpuInstances + mock.lockGetGpuInstances.RUnlock() + return calls +} + +// GetGpuMaxPcieLinkGeneration calls GetGpuMaxPcieLinkGenerationFunc. +func (mock *Device) GetGpuMaxPcieLinkGeneration() (int, nvml.Return) { + if mock.GetGpuMaxPcieLinkGenerationFunc == nil { + panic("Device.GetGpuMaxPcieLinkGenerationFunc: method is nil but Device.GetGpuMaxPcieLinkGeneration was just called") + } + callInfo := struct { + }{} + mock.lockGetGpuMaxPcieLinkGeneration.Lock() + mock.calls.GetGpuMaxPcieLinkGeneration = append(mock.calls.GetGpuMaxPcieLinkGeneration, callInfo) + mock.lockGetGpuMaxPcieLinkGeneration.Unlock() + return mock.GetGpuMaxPcieLinkGenerationFunc() +} + +// GetGpuMaxPcieLinkGenerationCalls gets all the calls that were made to GetGpuMaxPcieLinkGeneration. +// Check the length with: +// +// len(mockedDevice.GetGpuMaxPcieLinkGenerationCalls()) +func (mock *Device) GetGpuMaxPcieLinkGenerationCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGpuMaxPcieLinkGeneration.RLock() + calls = mock.calls.GetGpuMaxPcieLinkGeneration + mock.lockGetGpuMaxPcieLinkGeneration.RUnlock() + return calls +} + +// GetGpuOperationMode calls GetGpuOperationModeFunc. +func (mock *Device) GetGpuOperationMode() (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { + if mock.GetGpuOperationModeFunc == nil { + panic("Device.GetGpuOperationModeFunc: method is nil but Device.GetGpuOperationMode was just called") + } + callInfo := struct { + }{} + mock.lockGetGpuOperationMode.Lock() + mock.calls.GetGpuOperationMode = append(mock.calls.GetGpuOperationMode, callInfo) + mock.lockGetGpuOperationMode.Unlock() + return mock.GetGpuOperationModeFunc() +} + +// GetGpuOperationModeCalls gets all the calls that were made to GetGpuOperationMode. +// Check the length with: +// +// len(mockedDevice.GetGpuOperationModeCalls()) +func (mock *Device) GetGpuOperationModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGpuOperationMode.RLock() + calls = mock.calls.GetGpuOperationMode + mock.lockGetGpuOperationMode.RUnlock() + return calls +} + +// GetGraphicsRunningProcesses calls GetGraphicsRunningProcessesFunc. +func (mock *Device) GetGraphicsRunningProcesses() ([]nvml.ProcessInfo, nvml.Return) { + if mock.GetGraphicsRunningProcessesFunc == nil { + panic("Device.GetGraphicsRunningProcessesFunc: method is nil but Device.GetGraphicsRunningProcesses was just called") + } + callInfo := struct { + }{} + mock.lockGetGraphicsRunningProcesses.Lock() + mock.calls.GetGraphicsRunningProcesses = append(mock.calls.GetGraphicsRunningProcesses, callInfo) + mock.lockGetGraphicsRunningProcesses.Unlock() + return mock.GetGraphicsRunningProcessesFunc() +} + +// GetGraphicsRunningProcessesCalls gets all the calls that were made to GetGraphicsRunningProcesses. +// Check the length with: +// +// len(mockedDevice.GetGraphicsRunningProcessesCalls()) +func (mock *Device) GetGraphicsRunningProcessesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGraphicsRunningProcesses.RLock() + calls = mock.calls.GetGraphicsRunningProcesses + mock.lockGetGraphicsRunningProcesses.RUnlock() + return calls +} + +// GetGridLicensableFeatures calls GetGridLicensableFeaturesFunc. +func (mock *Device) GetGridLicensableFeatures() (nvml.GridLicensableFeatures, nvml.Return) { + if mock.GetGridLicensableFeaturesFunc == nil { + panic("Device.GetGridLicensableFeaturesFunc: method is nil but Device.GetGridLicensableFeatures was just called") + } + callInfo := struct { + }{} + mock.lockGetGridLicensableFeatures.Lock() + mock.calls.GetGridLicensableFeatures = append(mock.calls.GetGridLicensableFeatures, callInfo) + mock.lockGetGridLicensableFeatures.Unlock() + return mock.GetGridLicensableFeaturesFunc() +} + +// GetGridLicensableFeaturesCalls gets all the calls that were made to GetGridLicensableFeatures. +// Check the length with: +// +// len(mockedDevice.GetGridLicensableFeaturesCalls()) +func (mock *Device) GetGridLicensableFeaturesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGridLicensableFeatures.RLock() + calls = mock.calls.GetGridLicensableFeatures + mock.lockGetGridLicensableFeatures.RUnlock() + return calls +} + +// GetGspFirmwareMode calls GetGspFirmwareModeFunc. +func (mock *Device) GetGspFirmwareMode() (bool, bool, nvml.Return) { + if mock.GetGspFirmwareModeFunc == nil { + panic("Device.GetGspFirmwareModeFunc: method is nil but Device.GetGspFirmwareMode was just called") + } + callInfo := struct { + }{} + mock.lockGetGspFirmwareMode.Lock() + mock.calls.GetGspFirmwareMode = append(mock.calls.GetGspFirmwareMode, callInfo) + mock.lockGetGspFirmwareMode.Unlock() + return mock.GetGspFirmwareModeFunc() +} + +// GetGspFirmwareModeCalls gets all the calls that were made to GetGspFirmwareMode. +// Check the length with: +// +// len(mockedDevice.GetGspFirmwareModeCalls()) +func (mock *Device) GetGspFirmwareModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGspFirmwareMode.RLock() + calls = mock.calls.GetGspFirmwareMode + mock.lockGetGspFirmwareMode.RUnlock() + return calls +} + +// GetGspFirmwareVersion calls GetGspFirmwareVersionFunc. +func (mock *Device) GetGspFirmwareVersion() (string, nvml.Return) { + if mock.GetGspFirmwareVersionFunc == nil { + panic("Device.GetGspFirmwareVersionFunc: method is nil but Device.GetGspFirmwareVersion was just called") + } + callInfo := struct { + }{} + mock.lockGetGspFirmwareVersion.Lock() + mock.calls.GetGspFirmwareVersion = append(mock.calls.GetGspFirmwareVersion, callInfo) + mock.lockGetGspFirmwareVersion.Unlock() + return mock.GetGspFirmwareVersionFunc() +} + +// GetGspFirmwareVersionCalls gets all the calls that were made to GetGspFirmwareVersion. +// Check the length with: +// +// len(mockedDevice.GetGspFirmwareVersionCalls()) +func (mock *Device) GetGspFirmwareVersionCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGspFirmwareVersion.RLock() + calls = mock.calls.GetGspFirmwareVersion + mock.lockGetGspFirmwareVersion.RUnlock() + return calls +} + +// GetHostVgpuMode calls GetHostVgpuModeFunc. +func (mock *Device) GetHostVgpuMode() (nvml.HostVgpuMode, nvml.Return) { + if mock.GetHostVgpuModeFunc == nil { + panic("Device.GetHostVgpuModeFunc: method is nil but Device.GetHostVgpuMode was just called") + } + callInfo := struct { + }{} + mock.lockGetHostVgpuMode.Lock() + mock.calls.GetHostVgpuMode = append(mock.calls.GetHostVgpuMode, callInfo) + mock.lockGetHostVgpuMode.Unlock() + return mock.GetHostVgpuModeFunc() +} + +// GetHostVgpuModeCalls gets all the calls that were made to GetHostVgpuMode. +// Check the length with: +// +// len(mockedDevice.GetHostVgpuModeCalls()) +func (mock *Device) GetHostVgpuModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetHostVgpuMode.RLock() + calls = mock.calls.GetHostVgpuMode + mock.lockGetHostVgpuMode.RUnlock() + return calls +} + +// GetIndex calls GetIndexFunc. +func (mock *Device) GetIndex() (int, nvml.Return) { + if mock.GetIndexFunc == nil { + panic("Device.GetIndexFunc: method is nil but Device.GetIndex was just called") + } + callInfo := struct { + }{} + mock.lockGetIndex.Lock() + mock.calls.GetIndex = append(mock.calls.GetIndex, callInfo) + mock.lockGetIndex.Unlock() + return mock.GetIndexFunc() +} + +// GetIndexCalls gets all the calls that were made to GetIndex. +// Check the length with: +// +// len(mockedDevice.GetIndexCalls()) +func (mock *Device) GetIndexCalls() []struct { +} { + var calls []struct { + } + mock.lockGetIndex.RLock() + calls = mock.calls.GetIndex + mock.lockGetIndex.RUnlock() + return calls +} + +// GetInforomConfigurationChecksum calls GetInforomConfigurationChecksumFunc. +func (mock *Device) GetInforomConfigurationChecksum() (uint32, nvml.Return) { + if mock.GetInforomConfigurationChecksumFunc == nil { + panic("Device.GetInforomConfigurationChecksumFunc: method is nil but Device.GetInforomConfigurationChecksum was just called") + } + callInfo := struct { + }{} + mock.lockGetInforomConfigurationChecksum.Lock() + mock.calls.GetInforomConfigurationChecksum = append(mock.calls.GetInforomConfigurationChecksum, callInfo) + mock.lockGetInforomConfigurationChecksum.Unlock() + return mock.GetInforomConfigurationChecksumFunc() +} + +// GetInforomConfigurationChecksumCalls gets all the calls that were made to GetInforomConfigurationChecksum. +// Check the length with: +// +// len(mockedDevice.GetInforomConfigurationChecksumCalls()) +func (mock *Device) GetInforomConfigurationChecksumCalls() []struct { +} { + var calls []struct { + } + mock.lockGetInforomConfigurationChecksum.RLock() + calls = mock.calls.GetInforomConfigurationChecksum + mock.lockGetInforomConfigurationChecksum.RUnlock() + return calls +} + +// GetInforomImageVersion calls GetInforomImageVersionFunc. +func (mock *Device) GetInforomImageVersion() (string, nvml.Return) { + if mock.GetInforomImageVersionFunc == nil { + panic("Device.GetInforomImageVersionFunc: method is nil but Device.GetInforomImageVersion was just called") + } + callInfo := struct { + }{} + mock.lockGetInforomImageVersion.Lock() + mock.calls.GetInforomImageVersion = append(mock.calls.GetInforomImageVersion, callInfo) + mock.lockGetInforomImageVersion.Unlock() + return mock.GetInforomImageVersionFunc() +} + +// GetInforomImageVersionCalls gets all the calls that were made to GetInforomImageVersion. +// Check the length with: +// +// len(mockedDevice.GetInforomImageVersionCalls()) +func (mock *Device) GetInforomImageVersionCalls() []struct { +} { + var calls []struct { + } + mock.lockGetInforomImageVersion.RLock() + calls = mock.calls.GetInforomImageVersion + mock.lockGetInforomImageVersion.RUnlock() + return calls +} + +// GetInforomVersion calls GetInforomVersionFunc. +func (mock *Device) GetInforomVersion(inforomObject nvml.InforomObject) (string, nvml.Return) { + if mock.GetInforomVersionFunc == nil { + panic("Device.GetInforomVersionFunc: method is nil but Device.GetInforomVersion was just called") + } + callInfo := struct { + InforomObject nvml.InforomObject + }{ + InforomObject: inforomObject, + } + mock.lockGetInforomVersion.Lock() + mock.calls.GetInforomVersion = append(mock.calls.GetInforomVersion, callInfo) + mock.lockGetInforomVersion.Unlock() + return mock.GetInforomVersionFunc(inforomObject) +} + +// GetInforomVersionCalls gets all the calls that were made to GetInforomVersion. +// Check the length with: +// +// len(mockedDevice.GetInforomVersionCalls()) +func (mock *Device) GetInforomVersionCalls() []struct { + InforomObject nvml.InforomObject +} { + var calls []struct { + InforomObject nvml.InforomObject + } + mock.lockGetInforomVersion.RLock() + calls = mock.calls.GetInforomVersion + mock.lockGetInforomVersion.RUnlock() + return calls +} + +// GetIrqNum calls GetIrqNumFunc. +func (mock *Device) GetIrqNum() (int, nvml.Return) { + if mock.GetIrqNumFunc == nil { + panic("Device.GetIrqNumFunc: method is nil but Device.GetIrqNum was just called") + } + callInfo := struct { + }{} + mock.lockGetIrqNum.Lock() + mock.calls.GetIrqNum = append(mock.calls.GetIrqNum, callInfo) + mock.lockGetIrqNum.Unlock() + return mock.GetIrqNumFunc() +} + +// GetIrqNumCalls gets all the calls that were made to GetIrqNum. +// Check the length with: +// +// len(mockedDevice.GetIrqNumCalls()) +func (mock *Device) GetIrqNumCalls() []struct { +} { + var calls []struct { + } + mock.lockGetIrqNum.RLock() + calls = mock.calls.GetIrqNum + mock.lockGetIrqNum.RUnlock() + return calls +} + +// GetJpgUtilization calls GetJpgUtilizationFunc. +func (mock *Device) GetJpgUtilization() (uint32, uint32, nvml.Return) { + if mock.GetJpgUtilizationFunc == nil { + panic("Device.GetJpgUtilizationFunc: method is nil but Device.GetJpgUtilization was just called") + } + callInfo := struct { + }{} + mock.lockGetJpgUtilization.Lock() + mock.calls.GetJpgUtilization = append(mock.calls.GetJpgUtilization, callInfo) + mock.lockGetJpgUtilization.Unlock() + return mock.GetJpgUtilizationFunc() +} + +// GetJpgUtilizationCalls gets all the calls that were made to GetJpgUtilization. +// Check the length with: +// +// len(mockedDevice.GetJpgUtilizationCalls()) +func (mock *Device) GetJpgUtilizationCalls() []struct { +} { + var calls []struct { + } + mock.lockGetJpgUtilization.RLock() + calls = mock.calls.GetJpgUtilization + mock.lockGetJpgUtilization.RUnlock() + return calls +} + +// GetLastBBXFlushTime calls GetLastBBXFlushTimeFunc. +func (mock *Device) GetLastBBXFlushTime() (uint64, uint, nvml.Return) { + if mock.GetLastBBXFlushTimeFunc == nil { + panic("Device.GetLastBBXFlushTimeFunc: method is nil but Device.GetLastBBXFlushTime was just called") + } + callInfo := struct { + }{} + mock.lockGetLastBBXFlushTime.Lock() + mock.calls.GetLastBBXFlushTime = append(mock.calls.GetLastBBXFlushTime, callInfo) + mock.lockGetLastBBXFlushTime.Unlock() + return mock.GetLastBBXFlushTimeFunc() +} + +// GetLastBBXFlushTimeCalls gets all the calls that were made to GetLastBBXFlushTime. +// Check the length with: +// +// len(mockedDevice.GetLastBBXFlushTimeCalls()) +func (mock *Device) GetLastBBXFlushTimeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetLastBBXFlushTime.RLock() + calls = mock.calls.GetLastBBXFlushTime + mock.lockGetLastBBXFlushTime.RUnlock() + return calls +} + +// GetMPSComputeRunningProcesses calls GetMPSComputeRunningProcessesFunc. +func (mock *Device) GetMPSComputeRunningProcesses() ([]nvml.ProcessInfo, nvml.Return) { + if mock.GetMPSComputeRunningProcessesFunc == nil { + panic("Device.GetMPSComputeRunningProcessesFunc: method is nil but Device.GetMPSComputeRunningProcesses was just called") + } + callInfo := struct { + }{} + mock.lockGetMPSComputeRunningProcesses.Lock() + mock.calls.GetMPSComputeRunningProcesses = append(mock.calls.GetMPSComputeRunningProcesses, callInfo) + mock.lockGetMPSComputeRunningProcesses.Unlock() + return mock.GetMPSComputeRunningProcessesFunc() +} + +// GetMPSComputeRunningProcessesCalls gets all the calls that were made to GetMPSComputeRunningProcesses. +// Check the length with: +// +// len(mockedDevice.GetMPSComputeRunningProcessesCalls()) +func (mock *Device) GetMPSComputeRunningProcessesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMPSComputeRunningProcesses.RLock() + calls = mock.calls.GetMPSComputeRunningProcesses + mock.lockGetMPSComputeRunningProcesses.RUnlock() + return calls +} + +// GetMarginTemperature calls GetMarginTemperatureFunc. +func (mock *Device) GetMarginTemperature() (nvml.MarginTemperature, nvml.Return) { + if mock.GetMarginTemperatureFunc == nil { + panic("Device.GetMarginTemperatureFunc: method is nil but Device.GetMarginTemperature was just called") + } + callInfo := struct { + }{} + mock.lockGetMarginTemperature.Lock() + mock.calls.GetMarginTemperature = append(mock.calls.GetMarginTemperature, callInfo) + mock.lockGetMarginTemperature.Unlock() + return mock.GetMarginTemperatureFunc() +} + +// GetMarginTemperatureCalls gets all the calls that were made to GetMarginTemperature. +// Check the length with: +// +// len(mockedDevice.GetMarginTemperatureCalls()) +func (mock *Device) GetMarginTemperatureCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMarginTemperature.RLock() + calls = mock.calls.GetMarginTemperature + mock.lockGetMarginTemperature.RUnlock() + return calls +} + +// GetMaxClockInfo calls GetMaxClockInfoFunc. +func (mock *Device) GetMaxClockInfo(clockType nvml.ClockType) (uint32, nvml.Return) { + if mock.GetMaxClockInfoFunc == nil { + panic("Device.GetMaxClockInfoFunc: method is nil but Device.GetMaxClockInfo was just called") + } + callInfo := struct { + ClockType nvml.ClockType + }{ + ClockType: clockType, + } + mock.lockGetMaxClockInfo.Lock() + mock.calls.GetMaxClockInfo = append(mock.calls.GetMaxClockInfo, callInfo) + mock.lockGetMaxClockInfo.Unlock() + return mock.GetMaxClockInfoFunc(clockType) +} + +// GetMaxClockInfoCalls gets all the calls that were made to GetMaxClockInfo. +// Check the length with: +// +// len(mockedDevice.GetMaxClockInfoCalls()) +func (mock *Device) GetMaxClockInfoCalls() []struct { + ClockType nvml.ClockType +} { + var calls []struct { + ClockType nvml.ClockType + } + mock.lockGetMaxClockInfo.RLock() + calls = mock.calls.GetMaxClockInfo + mock.lockGetMaxClockInfo.RUnlock() + return calls +} + +// GetMaxCustomerBoostClock calls GetMaxCustomerBoostClockFunc. +func (mock *Device) GetMaxCustomerBoostClock(clockType nvml.ClockType) (uint32, nvml.Return) { + if mock.GetMaxCustomerBoostClockFunc == nil { + panic("Device.GetMaxCustomerBoostClockFunc: method is nil but Device.GetMaxCustomerBoostClock was just called") + } + callInfo := struct { + ClockType nvml.ClockType + }{ + ClockType: clockType, + } + mock.lockGetMaxCustomerBoostClock.Lock() + mock.calls.GetMaxCustomerBoostClock = append(mock.calls.GetMaxCustomerBoostClock, callInfo) + mock.lockGetMaxCustomerBoostClock.Unlock() + return mock.GetMaxCustomerBoostClockFunc(clockType) +} + +// GetMaxCustomerBoostClockCalls gets all the calls that were made to GetMaxCustomerBoostClock. +// Check the length with: +// +// len(mockedDevice.GetMaxCustomerBoostClockCalls()) +func (mock *Device) GetMaxCustomerBoostClockCalls() []struct { + ClockType nvml.ClockType +} { + var calls []struct { + ClockType nvml.ClockType + } + mock.lockGetMaxCustomerBoostClock.RLock() + calls = mock.calls.GetMaxCustomerBoostClock + mock.lockGetMaxCustomerBoostClock.RUnlock() + return calls +} + +// GetMaxMigDeviceCount calls GetMaxMigDeviceCountFunc. +func (mock *Device) GetMaxMigDeviceCount() (int, nvml.Return) { + if mock.GetMaxMigDeviceCountFunc == nil { + panic("Device.GetMaxMigDeviceCountFunc: method is nil but Device.GetMaxMigDeviceCount was just called") + } + callInfo := struct { + }{} + mock.lockGetMaxMigDeviceCount.Lock() + mock.calls.GetMaxMigDeviceCount = append(mock.calls.GetMaxMigDeviceCount, callInfo) + mock.lockGetMaxMigDeviceCount.Unlock() + return mock.GetMaxMigDeviceCountFunc() +} + +// GetMaxMigDeviceCountCalls gets all the calls that were made to GetMaxMigDeviceCount. +// Check the length with: +// +// len(mockedDevice.GetMaxMigDeviceCountCalls()) +func (mock *Device) GetMaxMigDeviceCountCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMaxMigDeviceCount.RLock() + calls = mock.calls.GetMaxMigDeviceCount + mock.lockGetMaxMigDeviceCount.RUnlock() + return calls +} + +// GetMaxPcieLinkGeneration calls GetMaxPcieLinkGenerationFunc. +func (mock *Device) GetMaxPcieLinkGeneration() (int, nvml.Return) { + if mock.GetMaxPcieLinkGenerationFunc == nil { + panic("Device.GetMaxPcieLinkGenerationFunc: method is nil but Device.GetMaxPcieLinkGeneration was just called") + } + callInfo := struct { + }{} + mock.lockGetMaxPcieLinkGeneration.Lock() + mock.calls.GetMaxPcieLinkGeneration = append(mock.calls.GetMaxPcieLinkGeneration, callInfo) + mock.lockGetMaxPcieLinkGeneration.Unlock() + return mock.GetMaxPcieLinkGenerationFunc() +} + +// GetMaxPcieLinkGenerationCalls gets all the calls that were made to GetMaxPcieLinkGeneration. +// Check the length with: +// +// len(mockedDevice.GetMaxPcieLinkGenerationCalls()) +func (mock *Device) GetMaxPcieLinkGenerationCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMaxPcieLinkGeneration.RLock() + calls = mock.calls.GetMaxPcieLinkGeneration + mock.lockGetMaxPcieLinkGeneration.RUnlock() + return calls +} + +// GetMaxPcieLinkWidth calls GetMaxPcieLinkWidthFunc. +func (mock *Device) GetMaxPcieLinkWidth() (int, nvml.Return) { + if mock.GetMaxPcieLinkWidthFunc == nil { + panic("Device.GetMaxPcieLinkWidthFunc: method is nil but Device.GetMaxPcieLinkWidth was just called") + } + callInfo := struct { + }{} + mock.lockGetMaxPcieLinkWidth.Lock() + mock.calls.GetMaxPcieLinkWidth = append(mock.calls.GetMaxPcieLinkWidth, callInfo) + mock.lockGetMaxPcieLinkWidth.Unlock() + return mock.GetMaxPcieLinkWidthFunc() +} + +// GetMaxPcieLinkWidthCalls gets all the calls that were made to GetMaxPcieLinkWidth. +// Check the length with: +// +// len(mockedDevice.GetMaxPcieLinkWidthCalls()) +func (mock *Device) GetMaxPcieLinkWidthCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMaxPcieLinkWidth.RLock() + calls = mock.calls.GetMaxPcieLinkWidth + mock.lockGetMaxPcieLinkWidth.RUnlock() + return calls +} + +// GetMemClkMinMaxVfOffset calls GetMemClkMinMaxVfOffsetFunc. +func (mock *Device) GetMemClkMinMaxVfOffset() (int, int, nvml.Return) { + if mock.GetMemClkMinMaxVfOffsetFunc == nil { + panic("Device.GetMemClkMinMaxVfOffsetFunc: method is nil but Device.GetMemClkMinMaxVfOffset was just called") + } + callInfo := struct { + }{} + mock.lockGetMemClkMinMaxVfOffset.Lock() + mock.calls.GetMemClkMinMaxVfOffset = append(mock.calls.GetMemClkMinMaxVfOffset, callInfo) + mock.lockGetMemClkMinMaxVfOffset.Unlock() + return mock.GetMemClkMinMaxVfOffsetFunc() +} + +// GetMemClkMinMaxVfOffsetCalls gets all the calls that were made to GetMemClkMinMaxVfOffset. +// Check the length with: +// +// len(mockedDevice.GetMemClkMinMaxVfOffsetCalls()) +func (mock *Device) GetMemClkMinMaxVfOffsetCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMemClkMinMaxVfOffset.RLock() + calls = mock.calls.GetMemClkMinMaxVfOffset + mock.lockGetMemClkMinMaxVfOffset.RUnlock() + return calls +} + +// GetMemClkVfOffset calls GetMemClkVfOffsetFunc. +func (mock *Device) GetMemClkVfOffset() (int, nvml.Return) { + if mock.GetMemClkVfOffsetFunc == nil { + panic("Device.GetMemClkVfOffsetFunc: method is nil but Device.GetMemClkVfOffset was just called") + } + callInfo := struct { + }{} + mock.lockGetMemClkVfOffset.Lock() + mock.calls.GetMemClkVfOffset = append(mock.calls.GetMemClkVfOffset, callInfo) + mock.lockGetMemClkVfOffset.Unlock() + return mock.GetMemClkVfOffsetFunc() +} + +// GetMemClkVfOffsetCalls gets all the calls that were made to GetMemClkVfOffset. +// Check the length with: +// +// len(mockedDevice.GetMemClkVfOffsetCalls()) +func (mock *Device) GetMemClkVfOffsetCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMemClkVfOffset.RLock() + calls = mock.calls.GetMemClkVfOffset + mock.lockGetMemClkVfOffset.RUnlock() + return calls +} + +// GetMemoryAffinity calls GetMemoryAffinityFunc. +func (mock *Device) GetMemoryAffinity(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { + if mock.GetMemoryAffinityFunc == nil { + panic("Device.GetMemoryAffinityFunc: method is nil but Device.GetMemoryAffinity was just called") + } + callInfo := struct { + N int + AffinityScope nvml.AffinityScope + }{ + N: n, + AffinityScope: affinityScope, + } + mock.lockGetMemoryAffinity.Lock() + mock.calls.GetMemoryAffinity = append(mock.calls.GetMemoryAffinity, callInfo) + mock.lockGetMemoryAffinity.Unlock() + return mock.GetMemoryAffinityFunc(n, affinityScope) +} + +// GetMemoryAffinityCalls gets all the calls that were made to GetMemoryAffinity. +// Check the length with: +// +// len(mockedDevice.GetMemoryAffinityCalls()) +func (mock *Device) GetMemoryAffinityCalls() []struct { + N int + AffinityScope nvml.AffinityScope +} { + var calls []struct { + N int + AffinityScope nvml.AffinityScope + } + mock.lockGetMemoryAffinity.RLock() + calls = mock.calls.GetMemoryAffinity + mock.lockGetMemoryAffinity.RUnlock() + return calls +} + +// GetMemoryBusWidth calls GetMemoryBusWidthFunc. +func (mock *Device) GetMemoryBusWidth() (uint32, nvml.Return) { + if mock.GetMemoryBusWidthFunc == nil { + panic("Device.GetMemoryBusWidthFunc: method is nil but Device.GetMemoryBusWidth was just called") + } + callInfo := struct { + }{} + mock.lockGetMemoryBusWidth.Lock() + mock.calls.GetMemoryBusWidth = append(mock.calls.GetMemoryBusWidth, callInfo) + mock.lockGetMemoryBusWidth.Unlock() + return mock.GetMemoryBusWidthFunc() +} + +// GetMemoryBusWidthCalls gets all the calls that were made to GetMemoryBusWidth. +// Check the length with: +// +// len(mockedDevice.GetMemoryBusWidthCalls()) +func (mock *Device) GetMemoryBusWidthCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMemoryBusWidth.RLock() + calls = mock.calls.GetMemoryBusWidth + mock.lockGetMemoryBusWidth.RUnlock() + return calls +} + +// GetMemoryErrorCounter calls GetMemoryErrorCounterFunc. +func (mock *Device) GetMemoryErrorCounter(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) { + if mock.GetMemoryErrorCounterFunc == nil { + panic("Device.GetMemoryErrorCounterFunc: method is nil but Device.GetMemoryErrorCounter was just called") + } + callInfo := struct { + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + MemoryLocation nvml.MemoryLocation + }{ + MemoryErrorType: memoryErrorType, + EccCounterType: eccCounterType, + MemoryLocation: memoryLocation, + } + mock.lockGetMemoryErrorCounter.Lock() + mock.calls.GetMemoryErrorCounter = append(mock.calls.GetMemoryErrorCounter, callInfo) + mock.lockGetMemoryErrorCounter.Unlock() + return mock.GetMemoryErrorCounterFunc(memoryErrorType, eccCounterType, memoryLocation) +} + +// GetMemoryErrorCounterCalls gets all the calls that were made to GetMemoryErrorCounter. +// Check the length with: +// +// len(mockedDevice.GetMemoryErrorCounterCalls()) +func (mock *Device) GetMemoryErrorCounterCalls() []struct { + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + MemoryLocation nvml.MemoryLocation +} { + var calls []struct { + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + MemoryLocation nvml.MemoryLocation + } + mock.lockGetMemoryErrorCounter.RLock() + calls = mock.calls.GetMemoryErrorCounter + mock.lockGetMemoryErrorCounter.RUnlock() + return calls +} + +// GetMemoryInfo calls GetMemoryInfoFunc. +func (mock *Device) GetMemoryInfo() (nvml.Memory, nvml.Return) { + if mock.GetMemoryInfoFunc == nil { + panic("Device.GetMemoryInfoFunc: method is nil but Device.GetMemoryInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetMemoryInfo.Lock() + mock.calls.GetMemoryInfo = append(mock.calls.GetMemoryInfo, callInfo) + mock.lockGetMemoryInfo.Unlock() + return mock.GetMemoryInfoFunc() +} + +// GetMemoryInfoCalls gets all the calls that were made to GetMemoryInfo. +// Check the length with: +// +// len(mockedDevice.GetMemoryInfoCalls()) +func (mock *Device) GetMemoryInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMemoryInfo.RLock() + calls = mock.calls.GetMemoryInfo + mock.lockGetMemoryInfo.RUnlock() + return calls +} + +// GetMemoryInfo_v2 calls GetMemoryInfo_v2Func. +func (mock *Device) GetMemoryInfo_v2() (nvml.Memory_v2, nvml.Return) { + if mock.GetMemoryInfo_v2Func == nil { + panic("Device.GetMemoryInfo_v2Func: method is nil but Device.GetMemoryInfo_v2 was just called") + } + callInfo := struct { + }{} + mock.lockGetMemoryInfo_v2.Lock() + mock.calls.GetMemoryInfo_v2 = append(mock.calls.GetMemoryInfo_v2, callInfo) + mock.lockGetMemoryInfo_v2.Unlock() + return mock.GetMemoryInfo_v2Func() +} + +// GetMemoryInfo_v2Calls gets all the calls that were made to GetMemoryInfo_v2. +// Check the length with: +// +// len(mockedDevice.GetMemoryInfo_v2Calls()) +func (mock *Device) GetMemoryInfo_v2Calls() []struct { +} { + var calls []struct { + } + mock.lockGetMemoryInfo_v2.RLock() + calls = mock.calls.GetMemoryInfo_v2 + mock.lockGetMemoryInfo_v2.RUnlock() + return calls +} + +// GetMigDeviceHandleByIndex calls GetMigDeviceHandleByIndexFunc. +func (mock *Device) GetMigDeviceHandleByIndex(n int) (nvml.Device, nvml.Return) { + if mock.GetMigDeviceHandleByIndexFunc == nil { + panic("Device.GetMigDeviceHandleByIndexFunc: method is nil but Device.GetMigDeviceHandleByIndex was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetMigDeviceHandleByIndex.Lock() + mock.calls.GetMigDeviceHandleByIndex = append(mock.calls.GetMigDeviceHandleByIndex, callInfo) + mock.lockGetMigDeviceHandleByIndex.Unlock() + return mock.GetMigDeviceHandleByIndexFunc(n) +} + +// GetMigDeviceHandleByIndexCalls gets all the calls that were made to GetMigDeviceHandleByIndex. +// Check the length with: +// +// len(mockedDevice.GetMigDeviceHandleByIndexCalls()) +func (mock *Device) GetMigDeviceHandleByIndexCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetMigDeviceHandleByIndex.RLock() + calls = mock.calls.GetMigDeviceHandleByIndex + mock.lockGetMigDeviceHandleByIndex.RUnlock() + return calls +} + +// GetMigMode calls GetMigModeFunc. +func (mock *Device) GetMigMode() (int, int, nvml.Return) { + if mock.GetMigModeFunc == nil { + panic("Device.GetMigModeFunc: method is nil but Device.GetMigMode was just called") + } + callInfo := struct { + }{} + mock.lockGetMigMode.Lock() + mock.calls.GetMigMode = append(mock.calls.GetMigMode, callInfo) + mock.lockGetMigMode.Unlock() + return mock.GetMigModeFunc() +} + +// GetMigModeCalls gets all the calls that were made to GetMigMode. +// Check the length with: +// +// len(mockedDevice.GetMigModeCalls()) +func (mock *Device) GetMigModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMigMode.RLock() + calls = mock.calls.GetMigMode + mock.lockGetMigMode.RUnlock() + return calls +} + +// GetMinMaxClockOfPState calls GetMinMaxClockOfPStateFunc. +func (mock *Device) GetMinMaxClockOfPState(clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) { + if mock.GetMinMaxClockOfPStateFunc == nil { + panic("Device.GetMinMaxClockOfPStateFunc: method is nil but Device.GetMinMaxClockOfPState was just called") + } + callInfo := struct { + ClockType nvml.ClockType + Pstates nvml.Pstates + }{ + ClockType: clockType, + Pstates: pstates, + } + mock.lockGetMinMaxClockOfPState.Lock() + mock.calls.GetMinMaxClockOfPState = append(mock.calls.GetMinMaxClockOfPState, callInfo) + mock.lockGetMinMaxClockOfPState.Unlock() + return mock.GetMinMaxClockOfPStateFunc(clockType, pstates) +} + +// GetMinMaxClockOfPStateCalls gets all the calls that were made to GetMinMaxClockOfPState. +// Check the length with: +// +// len(mockedDevice.GetMinMaxClockOfPStateCalls()) +func (mock *Device) GetMinMaxClockOfPStateCalls() []struct { + ClockType nvml.ClockType + Pstates nvml.Pstates +} { + var calls []struct { + ClockType nvml.ClockType + Pstates nvml.Pstates + } + mock.lockGetMinMaxClockOfPState.RLock() + calls = mock.calls.GetMinMaxClockOfPState + mock.lockGetMinMaxClockOfPState.RUnlock() + return calls +} + +// GetMinMaxFanSpeed calls GetMinMaxFanSpeedFunc. +func (mock *Device) GetMinMaxFanSpeed() (int, int, nvml.Return) { + if mock.GetMinMaxFanSpeedFunc == nil { + panic("Device.GetMinMaxFanSpeedFunc: method is nil but Device.GetMinMaxFanSpeed was just called") + } + callInfo := struct { + }{} + mock.lockGetMinMaxFanSpeed.Lock() + mock.calls.GetMinMaxFanSpeed = append(mock.calls.GetMinMaxFanSpeed, callInfo) + mock.lockGetMinMaxFanSpeed.Unlock() + return mock.GetMinMaxFanSpeedFunc() +} + +// GetMinMaxFanSpeedCalls gets all the calls that were made to GetMinMaxFanSpeed. +// Check the length with: +// +// len(mockedDevice.GetMinMaxFanSpeedCalls()) +func (mock *Device) GetMinMaxFanSpeedCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMinMaxFanSpeed.RLock() + calls = mock.calls.GetMinMaxFanSpeed + mock.lockGetMinMaxFanSpeed.RUnlock() + return calls +} + +// GetMinorNumber calls GetMinorNumberFunc. +func (mock *Device) GetMinorNumber() (int, nvml.Return) { + if mock.GetMinorNumberFunc == nil { + panic("Device.GetMinorNumberFunc: method is nil but Device.GetMinorNumber was just called") + } + callInfo := struct { + }{} + mock.lockGetMinorNumber.Lock() + mock.calls.GetMinorNumber = append(mock.calls.GetMinorNumber, callInfo) + mock.lockGetMinorNumber.Unlock() + return mock.GetMinorNumberFunc() +} + +// GetMinorNumberCalls gets all the calls that were made to GetMinorNumber. +// Check the length with: +// +// len(mockedDevice.GetMinorNumberCalls()) +func (mock *Device) GetMinorNumberCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMinorNumber.RLock() + calls = mock.calls.GetMinorNumber + mock.lockGetMinorNumber.RUnlock() + return calls +} + +// GetModuleId calls GetModuleIdFunc. +func (mock *Device) GetModuleId() (int, nvml.Return) { + if mock.GetModuleIdFunc == nil { + panic("Device.GetModuleIdFunc: method is nil but Device.GetModuleId was just called") + } + callInfo := struct { + }{} + mock.lockGetModuleId.Lock() + mock.calls.GetModuleId = append(mock.calls.GetModuleId, callInfo) + mock.lockGetModuleId.Unlock() + return mock.GetModuleIdFunc() +} + +// GetModuleIdCalls gets all the calls that were made to GetModuleId. +// Check the length with: +// +// len(mockedDevice.GetModuleIdCalls()) +func (mock *Device) GetModuleIdCalls() []struct { +} { + var calls []struct { + } + mock.lockGetModuleId.RLock() + calls = mock.calls.GetModuleId + mock.lockGetModuleId.RUnlock() + return calls +} + +// GetMultiGpuBoard calls GetMultiGpuBoardFunc. +func (mock *Device) GetMultiGpuBoard() (int, nvml.Return) { + if mock.GetMultiGpuBoardFunc == nil { + panic("Device.GetMultiGpuBoardFunc: method is nil but Device.GetMultiGpuBoard was just called") + } + callInfo := struct { + }{} + mock.lockGetMultiGpuBoard.Lock() + mock.calls.GetMultiGpuBoard = append(mock.calls.GetMultiGpuBoard, callInfo) + mock.lockGetMultiGpuBoard.Unlock() + return mock.GetMultiGpuBoardFunc() +} + +// GetMultiGpuBoardCalls gets all the calls that were made to GetMultiGpuBoard. +// Check the length with: +// +// len(mockedDevice.GetMultiGpuBoardCalls()) +func (mock *Device) GetMultiGpuBoardCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMultiGpuBoard.RLock() + calls = mock.calls.GetMultiGpuBoard + mock.lockGetMultiGpuBoard.RUnlock() + return calls +} + +// GetName calls GetNameFunc. +func (mock *Device) GetName() (string, nvml.Return) { + if mock.GetNameFunc == nil { + panic("Device.GetNameFunc: method is nil but Device.GetName was just called") + } + callInfo := struct { + }{} + mock.lockGetName.Lock() + mock.calls.GetName = append(mock.calls.GetName, callInfo) + mock.lockGetName.Unlock() + return mock.GetNameFunc() +} + +// GetNameCalls gets all the calls that were made to GetName. +// Check the length with: +// +// len(mockedDevice.GetNameCalls()) +func (mock *Device) GetNameCalls() []struct { +} { + var calls []struct { + } + mock.lockGetName.RLock() + calls = mock.calls.GetName + mock.lockGetName.RUnlock() + return calls +} + +// GetNumFans calls GetNumFansFunc. +func (mock *Device) GetNumFans() (int, nvml.Return) { + if mock.GetNumFansFunc == nil { + panic("Device.GetNumFansFunc: method is nil but Device.GetNumFans was just called") + } + callInfo := struct { + }{} + mock.lockGetNumFans.Lock() + mock.calls.GetNumFans = append(mock.calls.GetNumFans, callInfo) + mock.lockGetNumFans.Unlock() + return mock.GetNumFansFunc() +} + +// GetNumFansCalls gets all the calls that were made to GetNumFans. +// Check the length with: +// +// len(mockedDevice.GetNumFansCalls()) +func (mock *Device) GetNumFansCalls() []struct { +} { + var calls []struct { + } + mock.lockGetNumFans.RLock() + calls = mock.calls.GetNumFans + mock.lockGetNumFans.RUnlock() + return calls +} + +// GetNumGpuCores calls GetNumGpuCoresFunc. +func (mock *Device) GetNumGpuCores() (int, nvml.Return) { + if mock.GetNumGpuCoresFunc == nil { + panic("Device.GetNumGpuCoresFunc: method is nil but Device.GetNumGpuCores was just called") + } + callInfo := struct { + }{} + mock.lockGetNumGpuCores.Lock() + mock.calls.GetNumGpuCores = append(mock.calls.GetNumGpuCores, callInfo) + mock.lockGetNumGpuCores.Unlock() + return mock.GetNumGpuCoresFunc() +} + +// GetNumGpuCoresCalls gets all the calls that were made to GetNumGpuCores. +// Check the length with: +// +// len(mockedDevice.GetNumGpuCoresCalls()) +func (mock *Device) GetNumGpuCoresCalls() []struct { +} { + var calls []struct { + } + mock.lockGetNumGpuCores.RLock() + calls = mock.calls.GetNumGpuCores + mock.lockGetNumGpuCores.RUnlock() + return calls +} + +// GetNumaNodeId calls GetNumaNodeIdFunc. +func (mock *Device) GetNumaNodeId() (int, nvml.Return) { + if mock.GetNumaNodeIdFunc == nil { + panic("Device.GetNumaNodeIdFunc: method is nil but Device.GetNumaNodeId was just called") + } + callInfo := struct { + }{} + mock.lockGetNumaNodeId.Lock() + mock.calls.GetNumaNodeId = append(mock.calls.GetNumaNodeId, callInfo) + mock.lockGetNumaNodeId.Unlock() + return mock.GetNumaNodeIdFunc() +} + +// GetNumaNodeIdCalls gets all the calls that were made to GetNumaNodeId. +// Check the length with: +// +// len(mockedDevice.GetNumaNodeIdCalls()) +func (mock *Device) GetNumaNodeIdCalls() []struct { +} { + var calls []struct { + } + mock.lockGetNumaNodeId.RLock() + calls = mock.calls.GetNumaNodeId + mock.lockGetNumaNodeId.RUnlock() + return calls +} + +// GetNvLinkCapability calls GetNvLinkCapabilityFunc. +func (mock *Device) GetNvLinkCapability(n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) { + if mock.GetNvLinkCapabilityFunc == nil { + panic("Device.GetNvLinkCapabilityFunc: method is nil but Device.GetNvLinkCapability was just called") + } + callInfo := struct { + N int + NvLinkCapability nvml.NvLinkCapability + }{ + N: n, + NvLinkCapability: nvLinkCapability, + } + mock.lockGetNvLinkCapability.Lock() + mock.calls.GetNvLinkCapability = append(mock.calls.GetNvLinkCapability, callInfo) + mock.lockGetNvLinkCapability.Unlock() + return mock.GetNvLinkCapabilityFunc(n, nvLinkCapability) +} + +// GetNvLinkCapabilityCalls gets all the calls that were made to GetNvLinkCapability. +// Check the length with: +// +// len(mockedDevice.GetNvLinkCapabilityCalls()) +func (mock *Device) GetNvLinkCapabilityCalls() []struct { + N int + NvLinkCapability nvml.NvLinkCapability +} { + var calls []struct { + N int + NvLinkCapability nvml.NvLinkCapability + } + mock.lockGetNvLinkCapability.RLock() + calls = mock.calls.GetNvLinkCapability + mock.lockGetNvLinkCapability.RUnlock() + return calls +} + +// GetNvLinkErrorCounter calls GetNvLinkErrorCounterFunc. +func (mock *Device) GetNvLinkErrorCounter(n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) { + if mock.GetNvLinkErrorCounterFunc == nil { + panic("Device.GetNvLinkErrorCounterFunc: method is nil but Device.GetNvLinkErrorCounter was just called") + } + callInfo := struct { + N int + NvLinkErrorCounter nvml.NvLinkErrorCounter + }{ + N: n, + NvLinkErrorCounter: nvLinkErrorCounter, + } + mock.lockGetNvLinkErrorCounter.Lock() + mock.calls.GetNvLinkErrorCounter = append(mock.calls.GetNvLinkErrorCounter, callInfo) + mock.lockGetNvLinkErrorCounter.Unlock() + return mock.GetNvLinkErrorCounterFunc(n, nvLinkErrorCounter) +} + +// GetNvLinkErrorCounterCalls gets all the calls that were made to GetNvLinkErrorCounter. +// Check the length with: +// +// len(mockedDevice.GetNvLinkErrorCounterCalls()) +func (mock *Device) GetNvLinkErrorCounterCalls() []struct { + N int + NvLinkErrorCounter nvml.NvLinkErrorCounter +} { + var calls []struct { + N int + NvLinkErrorCounter nvml.NvLinkErrorCounter + } + mock.lockGetNvLinkErrorCounter.RLock() + calls = mock.calls.GetNvLinkErrorCounter + mock.lockGetNvLinkErrorCounter.RUnlock() + return calls +} + +// GetNvLinkInfo calls GetNvLinkInfoFunc. +func (mock *Device) GetNvLinkInfo() nvml.NvLinkInfoHandler { + if mock.GetNvLinkInfoFunc == nil { + panic("Device.GetNvLinkInfoFunc: method is nil but Device.GetNvLinkInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetNvLinkInfo.Lock() + mock.calls.GetNvLinkInfo = append(mock.calls.GetNvLinkInfo, callInfo) + mock.lockGetNvLinkInfo.Unlock() + return mock.GetNvLinkInfoFunc() +} + +// GetNvLinkInfoCalls gets all the calls that were made to GetNvLinkInfo. +// Check the length with: +// +// len(mockedDevice.GetNvLinkInfoCalls()) +func (mock *Device) GetNvLinkInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetNvLinkInfo.RLock() + calls = mock.calls.GetNvLinkInfo + mock.lockGetNvLinkInfo.RUnlock() + return calls +} + +// GetNvLinkRemoteDeviceType calls GetNvLinkRemoteDeviceTypeFunc. +func (mock *Device) GetNvLinkRemoteDeviceType(n int) (nvml.IntNvLinkDeviceType, nvml.Return) { + if mock.GetNvLinkRemoteDeviceTypeFunc == nil { + panic("Device.GetNvLinkRemoteDeviceTypeFunc: method is nil but Device.GetNvLinkRemoteDeviceType was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetNvLinkRemoteDeviceType.Lock() + mock.calls.GetNvLinkRemoteDeviceType = append(mock.calls.GetNvLinkRemoteDeviceType, callInfo) + mock.lockGetNvLinkRemoteDeviceType.Unlock() + return mock.GetNvLinkRemoteDeviceTypeFunc(n) +} + +// GetNvLinkRemoteDeviceTypeCalls gets all the calls that were made to GetNvLinkRemoteDeviceType. +// Check the length with: +// +// len(mockedDevice.GetNvLinkRemoteDeviceTypeCalls()) +func (mock *Device) GetNvLinkRemoteDeviceTypeCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetNvLinkRemoteDeviceType.RLock() + calls = mock.calls.GetNvLinkRemoteDeviceType + mock.lockGetNvLinkRemoteDeviceType.RUnlock() + return calls +} + +// GetNvLinkRemotePciInfo calls GetNvLinkRemotePciInfoFunc. +func (mock *Device) GetNvLinkRemotePciInfo(n int) (nvml.PciInfo, nvml.Return) { + if mock.GetNvLinkRemotePciInfoFunc == nil { + panic("Device.GetNvLinkRemotePciInfoFunc: method is nil but Device.GetNvLinkRemotePciInfo was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetNvLinkRemotePciInfo.Lock() + mock.calls.GetNvLinkRemotePciInfo = append(mock.calls.GetNvLinkRemotePciInfo, callInfo) + mock.lockGetNvLinkRemotePciInfo.Unlock() + return mock.GetNvLinkRemotePciInfoFunc(n) +} + +// GetNvLinkRemotePciInfoCalls gets all the calls that were made to GetNvLinkRemotePciInfo. +// Check the length with: +// +// len(mockedDevice.GetNvLinkRemotePciInfoCalls()) +func (mock *Device) GetNvLinkRemotePciInfoCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetNvLinkRemotePciInfo.RLock() + calls = mock.calls.GetNvLinkRemotePciInfo + mock.lockGetNvLinkRemotePciInfo.RUnlock() + return calls +} + +// GetNvLinkState calls GetNvLinkStateFunc. +func (mock *Device) GetNvLinkState(n int) (nvml.EnableState, nvml.Return) { + if mock.GetNvLinkStateFunc == nil { + panic("Device.GetNvLinkStateFunc: method is nil but Device.GetNvLinkState was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetNvLinkState.Lock() + mock.calls.GetNvLinkState = append(mock.calls.GetNvLinkState, callInfo) + mock.lockGetNvLinkState.Unlock() + return mock.GetNvLinkStateFunc(n) +} + +// GetNvLinkStateCalls gets all the calls that were made to GetNvLinkState. +// Check the length with: +// +// len(mockedDevice.GetNvLinkStateCalls()) +func (mock *Device) GetNvLinkStateCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetNvLinkState.RLock() + calls = mock.calls.GetNvLinkState + mock.lockGetNvLinkState.RUnlock() + return calls +} + +// GetNvLinkUtilizationControl calls GetNvLinkUtilizationControlFunc. +func (mock *Device) GetNvLinkUtilizationControl(n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { + if mock.GetNvLinkUtilizationControlFunc == nil { + panic("Device.GetNvLinkUtilizationControlFunc: method is nil but Device.GetNvLinkUtilizationControl was just called") + } + callInfo := struct { + N1 int + N2 int + }{ + N1: n1, + N2: n2, + } + mock.lockGetNvLinkUtilizationControl.Lock() + mock.calls.GetNvLinkUtilizationControl = append(mock.calls.GetNvLinkUtilizationControl, callInfo) + mock.lockGetNvLinkUtilizationControl.Unlock() + return mock.GetNvLinkUtilizationControlFunc(n1, n2) +} + +// GetNvLinkUtilizationControlCalls gets all the calls that were made to GetNvLinkUtilizationControl. +// Check the length with: +// +// len(mockedDevice.GetNvLinkUtilizationControlCalls()) +func (mock *Device) GetNvLinkUtilizationControlCalls() []struct { + N1 int + N2 int +} { + var calls []struct { + N1 int + N2 int + } + mock.lockGetNvLinkUtilizationControl.RLock() + calls = mock.calls.GetNvLinkUtilizationControl + mock.lockGetNvLinkUtilizationControl.RUnlock() + return calls +} + +// GetNvLinkUtilizationCounter calls GetNvLinkUtilizationCounterFunc. +func (mock *Device) GetNvLinkUtilizationCounter(n1 int, n2 int) (uint64, uint64, nvml.Return) { + if mock.GetNvLinkUtilizationCounterFunc == nil { + panic("Device.GetNvLinkUtilizationCounterFunc: method is nil but Device.GetNvLinkUtilizationCounter was just called") + } + callInfo := struct { + N1 int + N2 int + }{ + N1: n1, + N2: n2, + } + mock.lockGetNvLinkUtilizationCounter.Lock() + mock.calls.GetNvLinkUtilizationCounter = append(mock.calls.GetNvLinkUtilizationCounter, callInfo) + mock.lockGetNvLinkUtilizationCounter.Unlock() + return mock.GetNvLinkUtilizationCounterFunc(n1, n2) +} + +// GetNvLinkUtilizationCounterCalls gets all the calls that were made to GetNvLinkUtilizationCounter. +// Check the length with: +// +// len(mockedDevice.GetNvLinkUtilizationCounterCalls()) +func (mock *Device) GetNvLinkUtilizationCounterCalls() []struct { + N1 int + N2 int +} { + var calls []struct { + N1 int + N2 int + } + mock.lockGetNvLinkUtilizationCounter.RLock() + calls = mock.calls.GetNvLinkUtilizationCounter + mock.lockGetNvLinkUtilizationCounter.RUnlock() + return calls +} + +// GetNvLinkVersion calls GetNvLinkVersionFunc. +func (mock *Device) GetNvLinkVersion(n int) (uint32, nvml.Return) { + if mock.GetNvLinkVersionFunc == nil { + panic("Device.GetNvLinkVersionFunc: method is nil but Device.GetNvLinkVersion was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetNvLinkVersion.Lock() + mock.calls.GetNvLinkVersion = append(mock.calls.GetNvLinkVersion, callInfo) + mock.lockGetNvLinkVersion.Unlock() + return mock.GetNvLinkVersionFunc(n) +} + +// GetNvLinkVersionCalls gets all the calls that were made to GetNvLinkVersion. +// Check the length with: +// +// len(mockedDevice.GetNvLinkVersionCalls()) +func (mock *Device) GetNvLinkVersionCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetNvLinkVersion.RLock() + calls = mock.calls.GetNvLinkVersion + mock.lockGetNvLinkVersion.RUnlock() + return calls +} + +// GetNvlinkBwMode calls GetNvlinkBwModeFunc. +func (mock *Device) GetNvlinkBwMode() (nvml.NvlinkGetBwMode, nvml.Return) { + if mock.GetNvlinkBwModeFunc == nil { + panic("Device.GetNvlinkBwModeFunc: method is nil but Device.GetNvlinkBwMode was just called") + } + callInfo := struct { + }{} + mock.lockGetNvlinkBwMode.Lock() + mock.calls.GetNvlinkBwMode = append(mock.calls.GetNvlinkBwMode, callInfo) + mock.lockGetNvlinkBwMode.Unlock() + return mock.GetNvlinkBwModeFunc() +} + +// GetNvlinkBwModeCalls gets all the calls that were made to GetNvlinkBwMode. +// Check the length with: +// +// len(mockedDevice.GetNvlinkBwModeCalls()) +func (mock *Device) GetNvlinkBwModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetNvlinkBwMode.RLock() + calls = mock.calls.GetNvlinkBwMode + mock.lockGetNvlinkBwMode.RUnlock() + return calls +} + +// GetNvlinkSupportedBwModes calls GetNvlinkSupportedBwModesFunc. +func (mock *Device) GetNvlinkSupportedBwModes() (nvml.NvlinkSupportedBwModes, nvml.Return) { + if mock.GetNvlinkSupportedBwModesFunc == nil { + panic("Device.GetNvlinkSupportedBwModesFunc: method is nil but Device.GetNvlinkSupportedBwModes was just called") + } + callInfo := struct { + }{} + mock.lockGetNvlinkSupportedBwModes.Lock() + mock.calls.GetNvlinkSupportedBwModes = append(mock.calls.GetNvlinkSupportedBwModes, callInfo) + mock.lockGetNvlinkSupportedBwModes.Unlock() + return mock.GetNvlinkSupportedBwModesFunc() +} + +// GetNvlinkSupportedBwModesCalls gets all the calls that were made to GetNvlinkSupportedBwModes. +// Check the length with: +// +// len(mockedDevice.GetNvlinkSupportedBwModesCalls()) +func (mock *Device) GetNvlinkSupportedBwModesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetNvlinkSupportedBwModes.RLock() + calls = mock.calls.GetNvlinkSupportedBwModes + mock.lockGetNvlinkSupportedBwModes.RUnlock() + return calls +} + +// GetOfaUtilization calls GetOfaUtilizationFunc. +func (mock *Device) GetOfaUtilization() (uint32, uint32, nvml.Return) { + if mock.GetOfaUtilizationFunc == nil { + panic("Device.GetOfaUtilizationFunc: method is nil but Device.GetOfaUtilization was just called") + } + callInfo := struct { + }{} + mock.lockGetOfaUtilization.Lock() + mock.calls.GetOfaUtilization = append(mock.calls.GetOfaUtilization, callInfo) + mock.lockGetOfaUtilization.Unlock() + return mock.GetOfaUtilizationFunc() +} + +// GetOfaUtilizationCalls gets all the calls that were made to GetOfaUtilization. +// Check the length with: +// +// len(mockedDevice.GetOfaUtilizationCalls()) +func (mock *Device) GetOfaUtilizationCalls() []struct { +} { + var calls []struct { + } + mock.lockGetOfaUtilization.RLock() + calls = mock.calls.GetOfaUtilization + mock.lockGetOfaUtilization.RUnlock() + return calls +} + +// GetP2PStatus calls GetP2PStatusFunc. +func (mock *Device) GetP2PStatus(device nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) { + if mock.GetP2PStatusFunc == nil { + panic("Device.GetP2PStatusFunc: method is nil but Device.GetP2PStatus was just called") + } + callInfo := struct { + Device nvml.Device + GpuP2PCapsIndex nvml.GpuP2PCapsIndex + }{ + Device: device, + GpuP2PCapsIndex: gpuP2PCapsIndex, + } + mock.lockGetP2PStatus.Lock() + mock.calls.GetP2PStatus = append(mock.calls.GetP2PStatus, callInfo) + mock.lockGetP2PStatus.Unlock() + return mock.GetP2PStatusFunc(device, gpuP2PCapsIndex) +} + +// GetP2PStatusCalls gets all the calls that were made to GetP2PStatus. +// Check the length with: +// +// len(mockedDevice.GetP2PStatusCalls()) +func (mock *Device) GetP2PStatusCalls() []struct { + Device nvml.Device + GpuP2PCapsIndex nvml.GpuP2PCapsIndex +} { + var calls []struct { + Device nvml.Device + GpuP2PCapsIndex nvml.GpuP2PCapsIndex + } + mock.lockGetP2PStatus.RLock() + calls = mock.calls.GetP2PStatus + mock.lockGetP2PStatus.RUnlock() + return calls +} + +// GetPciInfo calls GetPciInfoFunc. +func (mock *Device) GetPciInfo() (nvml.PciInfo, nvml.Return) { + if mock.GetPciInfoFunc == nil { + panic("Device.GetPciInfoFunc: method is nil but Device.GetPciInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetPciInfo.Lock() + mock.calls.GetPciInfo = append(mock.calls.GetPciInfo, callInfo) + mock.lockGetPciInfo.Unlock() + return mock.GetPciInfoFunc() +} + +// GetPciInfoCalls gets all the calls that were made to GetPciInfo. +// Check the length with: +// +// len(mockedDevice.GetPciInfoCalls()) +func (mock *Device) GetPciInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPciInfo.RLock() + calls = mock.calls.GetPciInfo + mock.lockGetPciInfo.RUnlock() + return calls +} + +// GetPciInfoExt calls GetPciInfoExtFunc. +func (mock *Device) GetPciInfoExt() (nvml.PciInfoExt, nvml.Return) { + if mock.GetPciInfoExtFunc == nil { + panic("Device.GetPciInfoExtFunc: method is nil but Device.GetPciInfoExt was just called") + } + callInfo := struct { + }{} + mock.lockGetPciInfoExt.Lock() + mock.calls.GetPciInfoExt = append(mock.calls.GetPciInfoExt, callInfo) + mock.lockGetPciInfoExt.Unlock() + return mock.GetPciInfoExtFunc() +} + +// GetPciInfoExtCalls gets all the calls that were made to GetPciInfoExt. +// Check the length with: +// +// len(mockedDevice.GetPciInfoExtCalls()) +func (mock *Device) GetPciInfoExtCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPciInfoExt.RLock() + calls = mock.calls.GetPciInfoExt + mock.lockGetPciInfoExt.RUnlock() + return calls +} + +// GetPcieLinkMaxSpeed calls GetPcieLinkMaxSpeedFunc. +func (mock *Device) GetPcieLinkMaxSpeed() (uint32, nvml.Return) { + if mock.GetPcieLinkMaxSpeedFunc == nil { + panic("Device.GetPcieLinkMaxSpeedFunc: method is nil but Device.GetPcieLinkMaxSpeed was just called") + } + callInfo := struct { + }{} + mock.lockGetPcieLinkMaxSpeed.Lock() + mock.calls.GetPcieLinkMaxSpeed = append(mock.calls.GetPcieLinkMaxSpeed, callInfo) + mock.lockGetPcieLinkMaxSpeed.Unlock() + return mock.GetPcieLinkMaxSpeedFunc() +} + +// GetPcieLinkMaxSpeedCalls gets all the calls that were made to GetPcieLinkMaxSpeed. +// Check the length with: +// +// len(mockedDevice.GetPcieLinkMaxSpeedCalls()) +func (mock *Device) GetPcieLinkMaxSpeedCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPcieLinkMaxSpeed.RLock() + calls = mock.calls.GetPcieLinkMaxSpeed + mock.lockGetPcieLinkMaxSpeed.RUnlock() + return calls +} + +// GetPcieReplayCounter calls GetPcieReplayCounterFunc. +func (mock *Device) GetPcieReplayCounter() (int, nvml.Return) { + if mock.GetPcieReplayCounterFunc == nil { + panic("Device.GetPcieReplayCounterFunc: method is nil but Device.GetPcieReplayCounter was just called") + } + callInfo := struct { + }{} + mock.lockGetPcieReplayCounter.Lock() + mock.calls.GetPcieReplayCounter = append(mock.calls.GetPcieReplayCounter, callInfo) + mock.lockGetPcieReplayCounter.Unlock() + return mock.GetPcieReplayCounterFunc() +} + +// GetPcieReplayCounterCalls gets all the calls that were made to GetPcieReplayCounter. +// Check the length with: +// +// len(mockedDevice.GetPcieReplayCounterCalls()) +func (mock *Device) GetPcieReplayCounterCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPcieReplayCounter.RLock() + calls = mock.calls.GetPcieReplayCounter + mock.lockGetPcieReplayCounter.RUnlock() + return calls +} + +// GetPcieSpeed calls GetPcieSpeedFunc. +func (mock *Device) GetPcieSpeed() (int, nvml.Return) { + if mock.GetPcieSpeedFunc == nil { + panic("Device.GetPcieSpeedFunc: method is nil but Device.GetPcieSpeed was just called") + } + callInfo := struct { + }{} + mock.lockGetPcieSpeed.Lock() + mock.calls.GetPcieSpeed = append(mock.calls.GetPcieSpeed, callInfo) + mock.lockGetPcieSpeed.Unlock() + return mock.GetPcieSpeedFunc() +} + +// GetPcieSpeedCalls gets all the calls that were made to GetPcieSpeed. +// Check the length with: +// +// len(mockedDevice.GetPcieSpeedCalls()) +func (mock *Device) GetPcieSpeedCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPcieSpeed.RLock() + calls = mock.calls.GetPcieSpeed + mock.lockGetPcieSpeed.RUnlock() + return calls +} + +// GetPcieThroughput calls GetPcieThroughputFunc. +func (mock *Device) GetPcieThroughput(pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { + if mock.GetPcieThroughputFunc == nil { + panic("Device.GetPcieThroughputFunc: method is nil but Device.GetPcieThroughput was just called") + } + callInfo := struct { + PcieUtilCounter nvml.PcieUtilCounter + }{ + PcieUtilCounter: pcieUtilCounter, + } + mock.lockGetPcieThroughput.Lock() + mock.calls.GetPcieThroughput = append(mock.calls.GetPcieThroughput, callInfo) + mock.lockGetPcieThroughput.Unlock() + return mock.GetPcieThroughputFunc(pcieUtilCounter) +} + +// GetPcieThroughputCalls gets all the calls that were made to GetPcieThroughput. +// Check the length with: +// +// len(mockedDevice.GetPcieThroughputCalls()) +func (mock *Device) GetPcieThroughputCalls() []struct { + PcieUtilCounter nvml.PcieUtilCounter +} { + var calls []struct { + PcieUtilCounter nvml.PcieUtilCounter + } + mock.lockGetPcieThroughput.RLock() + calls = mock.calls.GetPcieThroughput + mock.lockGetPcieThroughput.RUnlock() + return calls +} + +// GetPdi calls GetPdiFunc. +func (mock *Device) GetPdi() (nvml.Pdi, nvml.Return) { + if mock.GetPdiFunc == nil { + panic("Device.GetPdiFunc: method is nil but Device.GetPdi was just called") + } + callInfo := struct { + }{} + mock.lockGetPdi.Lock() + mock.calls.GetPdi = append(mock.calls.GetPdi, callInfo) + mock.lockGetPdi.Unlock() + return mock.GetPdiFunc() +} + +// GetPdiCalls gets all the calls that were made to GetPdi. +// Check the length with: +// +// len(mockedDevice.GetPdiCalls()) +func (mock *Device) GetPdiCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPdi.RLock() + calls = mock.calls.GetPdi + mock.lockGetPdi.RUnlock() + return calls +} + +// GetPerformanceModes calls GetPerformanceModesFunc. +func (mock *Device) GetPerformanceModes() (nvml.DevicePerfModes, nvml.Return) { + if mock.GetPerformanceModesFunc == nil { + panic("Device.GetPerformanceModesFunc: method is nil but Device.GetPerformanceModes was just called") + } + callInfo := struct { + }{} + mock.lockGetPerformanceModes.Lock() + mock.calls.GetPerformanceModes = append(mock.calls.GetPerformanceModes, callInfo) + mock.lockGetPerformanceModes.Unlock() + return mock.GetPerformanceModesFunc() +} + +// GetPerformanceModesCalls gets all the calls that were made to GetPerformanceModes. +// Check the length with: +// +// len(mockedDevice.GetPerformanceModesCalls()) +func (mock *Device) GetPerformanceModesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPerformanceModes.RLock() + calls = mock.calls.GetPerformanceModes + mock.lockGetPerformanceModes.RUnlock() + return calls +} + +// GetPerformanceState calls GetPerformanceStateFunc. +func (mock *Device) GetPerformanceState() (nvml.Pstates, nvml.Return) { + if mock.GetPerformanceStateFunc == nil { + panic("Device.GetPerformanceStateFunc: method is nil but Device.GetPerformanceState was just called") + } + callInfo := struct { + }{} + mock.lockGetPerformanceState.Lock() + mock.calls.GetPerformanceState = append(mock.calls.GetPerformanceState, callInfo) + mock.lockGetPerformanceState.Unlock() + return mock.GetPerformanceStateFunc() +} + +// GetPerformanceStateCalls gets all the calls that were made to GetPerformanceState. +// Check the length with: +// +// len(mockedDevice.GetPerformanceStateCalls()) +func (mock *Device) GetPerformanceStateCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPerformanceState.RLock() + calls = mock.calls.GetPerformanceState + mock.lockGetPerformanceState.RUnlock() + return calls +} + +// GetPersistenceMode calls GetPersistenceModeFunc. +func (mock *Device) GetPersistenceMode() (nvml.EnableState, nvml.Return) { + if mock.GetPersistenceModeFunc == nil { + panic("Device.GetPersistenceModeFunc: method is nil but Device.GetPersistenceMode was just called") + } + callInfo := struct { + }{} + mock.lockGetPersistenceMode.Lock() + mock.calls.GetPersistenceMode = append(mock.calls.GetPersistenceMode, callInfo) + mock.lockGetPersistenceMode.Unlock() + return mock.GetPersistenceModeFunc() +} + +// GetPersistenceModeCalls gets all the calls that were made to GetPersistenceMode. +// Check the length with: +// +// len(mockedDevice.GetPersistenceModeCalls()) +func (mock *Device) GetPersistenceModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPersistenceMode.RLock() + calls = mock.calls.GetPersistenceMode + mock.lockGetPersistenceMode.RUnlock() + return calls +} + +// GetPgpuMetadataString calls GetPgpuMetadataStringFunc. +func (mock *Device) GetPgpuMetadataString() (string, nvml.Return) { + if mock.GetPgpuMetadataStringFunc == nil { + panic("Device.GetPgpuMetadataStringFunc: method is nil but Device.GetPgpuMetadataString was just called") + } + callInfo := struct { + }{} + mock.lockGetPgpuMetadataString.Lock() + mock.calls.GetPgpuMetadataString = append(mock.calls.GetPgpuMetadataString, callInfo) + mock.lockGetPgpuMetadataString.Unlock() + return mock.GetPgpuMetadataStringFunc() +} + +// GetPgpuMetadataStringCalls gets all the calls that were made to GetPgpuMetadataString. +// Check the length with: +// +// len(mockedDevice.GetPgpuMetadataStringCalls()) +func (mock *Device) GetPgpuMetadataStringCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPgpuMetadataString.RLock() + calls = mock.calls.GetPgpuMetadataString + mock.lockGetPgpuMetadataString.RUnlock() + return calls +} + +// GetPlatformInfo calls GetPlatformInfoFunc. +func (mock *Device) GetPlatformInfo() (nvml.PlatformInfo, nvml.Return) { + if mock.GetPlatformInfoFunc == nil { + panic("Device.GetPlatformInfoFunc: method is nil but Device.GetPlatformInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetPlatformInfo.Lock() + mock.calls.GetPlatformInfo = append(mock.calls.GetPlatformInfo, callInfo) + mock.lockGetPlatformInfo.Unlock() + return mock.GetPlatformInfoFunc() +} + +// GetPlatformInfoCalls gets all the calls that were made to GetPlatformInfo. +// Check the length with: +// +// len(mockedDevice.GetPlatformInfoCalls()) +func (mock *Device) GetPlatformInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPlatformInfo.RLock() + calls = mock.calls.GetPlatformInfo + mock.lockGetPlatformInfo.RUnlock() + return calls +} + +// GetPowerManagementDefaultLimit calls GetPowerManagementDefaultLimitFunc. +func (mock *Device) GetPowerManagementDefaultLimit() (uint32, nvml.Return) { + if mock.GetPowerManagementDefaultLimitFunc == nil { + panic("Device.GetPowerManagementDefaultLimitFunc: method is nil but Device.GetPowerManagementDefaultLimit was just called") + } + callInfo := struct { + }{} + mock.lockGetPowerManagementDefaultLimit.Lock() + mock.calls.GetPowerManagementDefaultLimit = append(mock.calls.GetPowerManagementDefaultLimit, callInfo) + mock.lockGetPowerManagementDefaultLimit.Unlock() + return mock.GetPowerManagementDefaultLimitFunc() +} + +// GetPowerManagementDefaultLimitCalls gets all the calls that were made to GetPowerManagementDefaultLimit. +// Check the length with: +// +// len(mockedDevice.GetPowerManagementDefaultLimitCalls()) +func (mock *Device) GetPowerManagementDefaultLimitCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPowerManagementDefaultLimit.RLock() + calls = mock.calls.GetPowerManagementDefaultLimit + mock.lockGetPowerManagementDefaultLimit.RUnlock() + return calls +} + +// GetPowerManagementLimit calls GetPowerManagementLimitFunc. +func (mock *Device) GetPowerManagementLimit() (uint32, nvml.Return) { + if mock.GetPowerManagementLimitFunc == nil { + panic("Device.GetPowerManagementLimitFunc: method is nil but Device.GetPowerManagementLimit was just called") + } + callInfo := struct { + }{} + mock.lockGetPowerManagementLimit.Lock() + mock.calls.GetPowerManagementLimit = append(mock.calls.GetPowerManagementLimit, callInfo) + mock.lockGetPowerManagementLimit.Unlock() + return mock.GetPowerManagementLimitFunc() +} + +// GetPowerManagementLimitCalls gets all the calls that were made to GetPowerManagementLimit. +// Check the length with: +// +// len(mockedDevice.GetPowerManagementLimitCalls()) +func (mock *Device) GetPowerManagementLimitCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPowerManagementLimit.RLock() + calls = mock.calls.GetPowerManagementLimit + mock.lockGetPowerManagementLimit.RUnlock() + return calls +} + +// GetPowerManagementLimitConstraints calls GetPowerManagementLimitConstraintsFunc. +func (mock *Device) GetPowerManagementLimitConstraints() (uint32, uint32, nvml.Return) { + if mock.GetPowerManagementLimitConstraintsFunc == nil { + panic("Device.GetPowerManagementLimitConstraintsFunc: method is nil but Device.GetPowerManagementLimitConstraints was just called") + } + callInfo := struct { + }{} + mock.lockGetPowerManagementLimitConstraints.Lock() + mock.calls.GetPowerManagementLimitConstraints = append(mock.calls.GetPowerManagementLimitConstraints, callInfo) + mock.lockGetPowerManagementLimitConstraints.Unlock() + return mock.GetPowerManagementLimitConstraintsFunc() +} + +// GetPowerManagementLimitConstraintsCalls gets all the calls that were made to GetPowerManagementLimitConstraints. +// Check the length with: +// +// len(mockedDevice.GetPowerManagementLimitConstraintsCalls()) +func (mock *Device) GetPowerManagementLimitConstraintsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPowerManagementLimitConstraints.RLock() + calls = mock.calls.GetPowerManagementLimitConstraints + mock.lockGetPowerManagementLimitConstraints.RUnlock() + return calls +} + +// GetPowerManagementMode calls GetPowerManagementModeFunc. +func (mock *Device) GetPowerManagementMode() (nvml.EnableState, nvml.Return) { + if mock.GetPowerManagementModeFunc == nil { + panic("Device.GetPowerManagementModeFunc: method is nil but Device.GetPowerManagementMode was just called") + } + callInfo := struct { + }{} + mock.lockGetPowerManagementMode.Lock() + mock.calls.GetPowerManagementMode = append(mock.calls.GetPowerManagementMode, callInfo) + mock.lockGetPowerManagementMode.Unlock() + return mock.GetPowerManagementModeFunc() +} + +// GetPowerManagementModeCalls gets all the calls that were made to GetPowerManagementMode. +// Check the length with: +// +// len(mockedDevice.GetPowerManagementModeCalls()) +func (mock *Device) GetPowerManagementModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPowerManagementMode.RLock() + calls = mock.calls.GetPowerManagementMode + mock.lockGetPowerManagementMode.RUnlock() + return calls +} + +// GetPowerMizerMode_v1 calls GetPowerMizerMode_v1Func. +func (mock *Device) GetPowerMizerMode_v1() (nvml.DevicePowerMizerModes_v1, nvml.Return) { + if mock.GetPowerMizerMode_v1Func == nil { + panic("Device.GetPowerMizerMode_v1Func: method is nil but Device.GetPowerMizerMode_v1 was just called") + } + callInfo := struct { + }{} + mock.lockGetPowerMizerMode_v1.Lock() + mock.calls.GetPowerMizerMode_v1 = append(mock.calls.GetPowerMizerMode_v1, callInfo) + mock.lockGetPowerMizerMode_v1.Unlock() + return mock.GetPowerMizerMode_v1Func() +} + +// GetPowerMizerMode_v1Calls gets all the calls that were made to GetPowerMizerMode_v1. +// Check the length with: +// +// len(mockedDevice.GetPowerMizerMode_v1Calls()) +func (mock *Device) GetPowerMizerMode_v1Calls() []struct { +} { + var calls []struct { + } + mock.lockGetPowerMizerMode_v1.RLock() + calls = mock.calls.GetPowerMizerMode_v1 + mock.lockGetPowerMizerMode_v1.RUnlock() + return calls +} + +// GetPowerSource calls GetPowerSourceFunc. +func (mock *Device) GetPowerSource() (nvml.PowerSource, nvml.Return) { + if mock.GetPowerSourceFunc == nil { + panic("Device.GetPowerSourceFunc: method is nil but Device.GetPowerSource was just called") + } + callInfo := struct { + }{} + mock.lockGetPowerSource.Lock() + mock.calls.GetPowerSource = append(mock.calls.GetPowerSource, callInfo) + mock.lockGetPowerSource.Unlock() + return mock.GetPowerSourceFunc() +} + +// GetPowerSourceCalls gets all the calls that were made to GetPowerSource. +// Check the length with: +// +// len(mockedDevice.GetPowerSourceCalls()) +func (mock *Device) GetPowerSourceCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPowerSource.RLock() + calls = mock.calls.GetPowerSource + mock.lockGetPowerSource.RUnlock() + return calls +} + +// GetPowerState calls GetPowerStateFunc. +func (mock *Device) GetPowerState() (nvml.Pstates, nvml.Return) { + if mock.GetPowerStateFunc == nil { + panic("Device.GetPowerStateFunc: method is nil but Device.GetPowerState was just called") + } + callInfo := struct { + }{} + mock.lockGetPowerState.Lock() + mock.calls.GetPowerState = append(mock.calls.GetPowerState, callInfo) + mock.lockGetPowerState.Unlock() + return mock.GetPowerStateFunc() +} + +// GetPowerStateCalls gets all the calls that were made to GetPowerState. +// Check the length with: +// +// len(mockedDevice.GetPowerStateCalls()) +func (mock *Device) GetPowerStateCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPowerState.RLock() + calls = mock.calls.GetPowerState + mock.lockGetPowerState.RUnlock() + return calls +} + +// GetPowerUsage calls GetPowerUsageFunc. +func (mock *Device) GetPowerUsage() (uint32, nvml.Return) { + if mock.GetPowerUsageFunc == nil { + panic("Device.GetPowerUsageFunc: method is nil but Device.GetPowerUsage was just called") + } + callInfo := struct { + }{} + mock.lockGetPowerUsage.Lock() + mock.calls.GetPowerUsage = append(mock.calls.GetPowerUsage, callInfo) + mock.lockGetPowerUsage.Unlock() + return mock.GetPowerUsageFunc() +} + +// GetPowerUsageCalls gets all the calls that were made to GetPowerUsage. +// Check the length with: +// +// len(mockedDevice.GetPowerUsageCalls()) +func (mock *Device) GetPowerUsageCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPowerUsage.RLock() + calls = mock.calls.GetPowerUsage + mock.lockGetPowerUsage.RUnlock() + return calls +} + +// GetProcessUtilization calls GetProcessUtilizationFunc. +func (mock *Device) GetProcessUtilization(v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) { + if mock.GetProcessUtilizationFunc == nil { + panic("Device.GetProcessUtilizationFunc: method is nil but Device.GetProcessUtilization was just called") + } + callInfo := struct { + V uint64 + }{ + V: v, + } + mock.lockGetProcessUtilization.Lock() + mock.calls.GetProcessUtilization = append(mock.calls.GetProcessUtilization, callInfo) + mock.lockGetProcessUtilization.Unlock() + return mock.GetProcessUtilizationFunc(v) +} + +// GetProcessUtilizationCalls gets all the calls that were made to GetProcessUtilization. +// Check the length with: +// +// len(mockedDevice.GetProcessUtilizationCalls()) +func (mock *Device) GetProcessUtilizationCalls() []struct { + V uint64 +} { + var calls []struct { + V uint64 + } + mock.lockGetProcessUtilization.RLock() + calls = mock.calls.GetProcessUtilization + mock.lockGetProcessUtilization.RUnlock() + return calls +} + +// GetProcessesUtilizationInfo calls GetProcessesUtilizationInfoFunc. +func (mock *Device) GetProcessesUtilizationInfo() (nvml.ProcessesUtilizationInfo, nvml.Return) { + if mock.GetProcessesUtilizationInfoFunc == nil { + panic("Device.GetProcessesUtilizationInfoFunc: method is nil but Device.GetProcessesUtilizationInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetProcessesUtilizationInfo.Lock() + mock.calls.GetProcessesUtilizationInfo = append(mock.calls.GetProcessesUtilizationInfo, callInfo) + mock.lockGetProcessesUtilizationInfo.Unlock() + return mock.GetProcessesUtilizationInfoFunc() +} + +// GetProcessesUtilizationInfoCalls gets all the calls that were made to GetProcessesUtilizationInfo. +// Check the length with: +// +// len(mockedDevice.GetProcessesUtilizationInfoCalls()) +func (mock *Device) GetProcessesUtilizationInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetProcessesUtilizationInfo.RLock() + calls = mock.calls.GetProcessesUtilizationInfo + mock.lockGetProcessesUtilizationInfo.RUnlock() + return calls +} + +// GetRemappedRows calls GetRemappedRowsFunc. +func (mock *Device) GetRemappedRows() (int, int, bool, bool, nvml.Return) { + if mock.GetRemappedRowsFunc == nil { + panic("Device.GetRemappedRowsFunc: method is nil but Device.GetRemappedRows was just called") + } + callInfo := struct { + }{} + mock.lockGetRemappedRows.Lock() + mock.calls.GetRemappedRows = append(mock.calls.GetRemappedRows, callInfo) + mock.lockGetRemappedRows.Unlock() + return mock.GetRemappedRowsFunc() +} + +// GetRemappedRowsCalls gets all the calls that were made to GetRemappedRows. +// Check the length with: +// +// len(mockedDevice.GetRemappedRowsCalls()) +func (mock *Device) GetRemappedRowsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetRemappedRows.RLock() + calls = mock.calls.GetRemappedRows + mock.lockGetRemappedRows.RUnlock() + return calls +} + +// GetRepairStatus calls GetRepairStatusFunc. +func (mock *Device) GetRepairStatus() (nvml.RepairStatus, nvml.Return) { + if mock.GetRepairStatusFunc == nil { + panic("Device.GetRepairStatusFunc: method is nil but Device.GetRepairStatus was just called") + } + callInfo := struct { + }{} + mock.lockGetRepairStatus.Lock() + mock.calls.GetRepairStatus = append(mock.calls.GetRepairStatus, callInfo) + mock.lockGetRepairStatus.Unlock() + return mock.GetRepairStatusFunc() +} + +// GetRepairStatusCalls gets all the calls that were made to GetRepairStatus. +// Check the length with: +// +// len(mockedDevice.GetRepairStatusCalls()) +func (mock *Device) GetRepairStatusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetRepairStatus.RLock() + calls = mock.calls.GetRepairStatus + mock.lockGetRepairStatus.RUnlock() + return calls +} + +// GetRetiredPages calls GetRetiredPagesFunc. +func (mock *Device) GetRetiredPages(pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) { + if mock.GetRetiredPagesFunc == nil { + panic("Device.GetRetiredPagesFunc: method is nil but Device.GetRetiredPages was just called") + } + callInfo := struct { + PageRetirementCause nvml.PageRetirementCause + }{ + PageRetirementCause: pageRetirementCause, + } + mock.lockGetRetiredPages.Lock() + mock.calls.GetRetiredPages = append(mock.calls.GetRetiredPages, callInfo) + mock.lockGetRetiredPages.Unlock() + return mock.GetRetiredPagesFunc(pageRetirementCause) +} + +// GetRetiredPagesCalls gets all the calls that were made to GetRetiredPages. +// Check the length with: +// +// len(mockedDevice.GetRetiredPagesCalls()) +func (mock *Device) GetRetiredPagesCalls() []struct { + PageRetirementCause nvml.PageRetirementCause +} { + var calls []struct { + PageRetirementCause nvml.PageRetirementCause + } + mock.lockGetRetiredPages.RLock() + calls = mock.calls.GetRetiredPages + mock.lockGetRetiredPages.RUnlock() + return calls +} + +// GetRetiredPagesPendingStatus calls GetRetiredPagesPendingStatusFunc. +func (mock *Device) GetRetiredPagesPendingStatus() (nvml.EnableState, nvml.Return) { + if mock.GetRetiredPagesPendingStatusFunc == nil { + panic("Device.GetRetiredPagesPendingStatusFunc: method is nil but Device.GetRetiredPagesPendingStatus was just called") + } + callInfo := struct { + }{} + mock.lockGetRetiredPagesPendingStatus.Lock() + mock.calls.GetRetiredPagesPendingStatus = append(mock.calls.GetRetiredPagesPendingStatus, callInfo) + mock.lockGetRetiredPagesPendingStatus.Unlock() + return mock.GetRetiredPagesPendingStatusFunc() +} + +// GetRetiredPagesPendingStatusCalls gets all the calls that were made to GetRetiredPagesPendingStatus. +// Check the length with: +// +// len(mockedDevice.GetRetiredPagesPendingStatusCalls()) +func (mock *Device) GetRetiredPagesPendingStatusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetRetiredPagesPendingStatus.RLock() + calls = mock.calls.GetRetiredPagesPendingStatus + mock.lockGetRetiredPagesPendingStatus.RUnlock() + return calls +} + +// GetRetiredPages_v2 calls GetRetiredPages_v2Func. +func (mock *Device) GetRetiredPages_v2(pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) { + if mock.GetRetiredPages_v2Func == nil { + panic("Device.GetRetiredPages_v2Func: method is nil but Device.GetRetiredPages_v2 was just called") + } + callInfo := struct { + PageRetirementCause nvml.PageRetirementCause + }{ + PageRetirementCause: pageRetirementCause, + } + mock.lockGetRetiredPages_v2.Lock() + mock.calls.GetRetiredPages_v2 = append(mock.calls.GetRetiredPages_v2, callInfo) + mock.lockGetRetiredPages_v2.Unlock() + return mock.GetRetiredPages_v2Func(pageRetirementCause) +} + +// GetRetiredPages_v2Calls gets all the calls that were made to GetRetiredPages_v2. +// Check the length with: +// +// len(mockedDevice.GetRetiredPages_v2Calls()) +func (mock *Device) GetRetiredPages_v2Calls() []struct { + PageRetirementCause nvml.PageRetirementCause +} { + var calls []struct { + PageRetirementCause nvml.PageRetirementCause + } + mock.lockGetRetiredPages_v2.RLock() + calls = mock.calls.GetRetiredPages_v2 + mock.lockGetRetiredPages_v2.RUnlock() + return calls +} + +// GetRowRemapperHistogram calls GetRowRemapperHistogramFunc. +func (mock *Device) GetRowRemapperHistogram() (nvml.RowRemapperHistogramValues, nvml.Return) { + if mock.GetRowRemapperHistogramFunc == nil { + panic("Device.GetRowRemapperHistogramFunc: method is nil but Device.GetRowRemapperHistogram was just called") + } + callInfo := struct { + }{} + mock.lockGetRowRemapperHistogram.Lock() + mock.calls.GetRowRemapperHistogram = append(mock.calls.GetRowRemapperHistogram, callInfo) + mock.lockGetRowRemapperHistogram.Unlock() + return mock.GetRowRemapperHistogramFunc() +} + +// GetRowRemapperHistogramCalls gets all the calls that were made to GetRowRemapperHistogram. +// Check the length with: +// +// len(mockedDevice.GetRowRemapperHistogramCalls()) +func (mock *Device) GetRowRemapperHistogramCalls() []struct { +} { + var calls []struct { + } + mock.lockGetRowRemapperHistogram.RLock() + calls = mock.calls.GetRowRemapperHistogram + mock.lockGetRowRemapperHistogram.RUnlock() + return calls +} + +// GetRunningProcessDetailList calls GetRunningProcessDetailListFunc. +func (mock *Device) GetRunningProcessDetailList() (nvml.ProcessDetailList, nvml.Return) { + if mock.GetRunningProcessDetailListFunc == nil { + panic("Device.GetRunningProcessDetailListFunc: method is nil but Device.GetRunningProcessDetailList was just called") + } + callInfo := struct { + }{} + mock.lockGetRunningProcessDetailList.Lock() + mock.calls.GetRunningProcessDetailList = append(mock.calls.GetRunningProcessDetailList, callInfo) + mock.lockGetRunningProcessDetailList.Unlock() + return mock.GetRunningProcessDetailListFunc() +} + +// GetRunningProcessDetailListCalls gets all the calls that were made to GetRunningProcessDetailList. +// Check the length with: +// +// len(mockedDevice.GetRunningProcessDetailListCalls()) +func (mock *Device) GetRunningProcessDetailListCalls() []struct { +} { + var calls []struct { + } + mock.lockGetRunningProcessDetailList.RLock() + calls = mock.calls.GetRunningProcessDetailList + mock.lockGetRunningProcessDetailList.RUnlock() + return calls +} + +// GetSamples calls GetSamplesFunc. +func (mock *Device) GetSamples(samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) { + if mock.GetSamplesFunc == nil { + panic("Device.GetSamplesFunc: method is nil but Device.GetSamples was just called") + } + callInfo := struct { + SamplingType nvml.SamplingType + V uint64 + }{ + SamplingType: samplingType, + V: v, + } + mock.lockGetSamples.Lock() + mock.calls.GetSamples = append(mock.calls.GetSamples, callInfo) + mock.lockGetSamples.Unlock() + return mock.GetSamplesFunc(samplingType, v) +} + +// GetSamplesCalls gets all the calls that were made to GetSamples. +// Check the length with: +// +// len(mockedDevice.GetSamplesCalls()) +func (mock *Device) GetSamplesCalls() []struct { + SamplingType nvml.SamplingType + V uint64 +} { + var calls []struct { + SamplingType nvml.SamplingType + V uint64 + } + mock.lockGetSamples.RLock() + calls = mock.calls.GetSamples + mock.lockGetSamples.RUnlock() + return calls +} + +// GetSerial calls GetSerialFunc. +func (mock *Device) GetSerial() (string, nvml.Return) { + if mock.GetSerialFunc == nil { + panic("Device.GetSerialFunc: method is nil but Device.GetSerial was just called") + } + callInfo := struct { + }{} + mock.lockGetSerial.Lock() + mock.calls.GetSerial = append(mock.calls.GetSerial, callInfo) + mock.lockGetSerial.Unlock() + return mock.GetSerialFunc() +} + +// GetSerialCalls gets all the calls that were made to GetSerial. +// Check the length with: +// +// len(mockedDevice.GetSerialCalls()) +func (mock *Device) GetSerialCalls() []struct { +} { + var calls []struct { + } + mock.lockGetSerial.RLock() + calls = mock.calls.GetSerial + mock.lockGetSerial.RUnlock() + return calls +} + +// GetSramEccErrorStatus calls GetSramEccErrorStatusFunc. +func (mock *Device) GetSramEccErrorStatus() (nvml.EccSramErrorStatus, nvml.Return) { + if mock.GetSramEccErrorStatusFunc == nil { + panic("Device.GetSramEccErrorStatusFunc: method is nil but Device.GetSramEccErrorStatus was just called") + } + callInfo := struct { + }{} + mock.lockGetSramEccErrorStatus.Lock() + mock.calls.GetSramEccErrorStatus = append(mock.calls.GetSramEccErrorStatus, callInfo) + mock.lockGetSramEccErrorStatus.Unlock() + return mock.GetSramEccErrorStatusFunc() +} + +// GetSramEccErrorStatusCalls gets all the calls that were made to GetSramEccErrorStatus. +// Check the length with: +// +// len(mockedDevice.GetSramEccErrorStatusCalls()) +func (mock *Device) GetSramEccErrorStatusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetSramEccErrorStatus.RLock() + calls = mock.calls.GetSramEccErrorStatus + mock.lockGetSramEccErrorStatus.RUnlock() + return calls +} + +// GetSramUniqueUncorrectedEccErrorCounts calls GetSramUniqueUncorrectedEccErrorCountsFunc. +func (mock *Device) GetSramUniqueUncorrectedEccErrorCounts(eccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts) nvml.Return { + if mock.GetSramUniqueUncorrectedEccErrorCountsFunc == nil { + panic("Device.GetSramUniqueUncorrectedEccErrorCountsFunc: method is nil but Device.GetSramUniqueUncorrectedEccErrorCounts was just called") + } + callInfo := struct { + EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts + }{ + EccSramUniqueUncorrectedErrorCounts: eccSramUniqueUncorrectedErrorCounts, + } + mock.lockGetSramUniqueUncorrectedEccErrorCounts.Lock() + mock.calls.GetSramUniqueUncorrectedEccErrorCounts = append(mock.calls.GetSramUniqueUncorrectedEccErrorCounts, callInfo) + mock.lockGetSramUniqueUncorrectedEccErrorCounts.Unlock() + return mock.GetSramUniqueUncorrectedEccErrorCountsFunc(eccSramUniqueUncorrectedErrorCounts) +} + +// GetSramUniqueUncorrectedEccErrorCountsCalls gets all the calls that were made to GetSramUniqueUncorrectedEccErrorCounts. +// Check the length with: +// +// len(mockedDevice.GetSramUniqueUncorrectedEccErrorCountsCalls()) +func (mock *Device) GetSramUniqueUncorrectedEccErrorCountsCalls() []struct { + EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts +} { + var calls []struct { + EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts + } + mock.lockGetSramUniqueUncorrectedEccErrorCounts.RLock() + calls = mock.calls.GetSramUniqueUncorrectedEccErrorCounts + mock.lockGetSramUniqueUncorrectedEccErrorCounts.RUnlock() + return calls +} + +// GetSupportedClocksEventReasons calls GetSupportedClocksEventReasonsFunc. +func (mock *Device) GetSupportedClocksEventReasons() (uint64, nvml.Return) { + if mock.GetSupportedClocksEventReasonsFunc == nil { + panic("Device.GetSupportedClocksEventReasonsFunc: method is nil but Device.GetSupportedClocksEventReasons was just called") + } + callInfo := struct { + }{} + mock.lockGetSupportedClocksEventReasons.Lock() + mock.calls.GetSupportedClocksEventReasons = append(mock.calls.GetSupportedClocksEventReasons, callInfo) + mock.lockGetSupportedClocksEventReasons.Unlock() + return mock.GetSupportedClocksEventReasonsFunc() +} + +// GetSupportedClocksEventReasonsCalls gets all the calls that were made to GetSupportedClocksEventReasons. +// Check the length with: +// +// len(mockedDevice.GetSupportedClocksEventReasonsCalls()) +func (mock *Device) GetSupportedClocksEventReasonsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetSupportedClocksEventReasons.RLock() + calls = mock.calls.GetSupportedClocksEventReasons + mock.lockGetSupportedClocksEventReasons.RUnlock() + return calls +} + +// GetSupportedClocksThrottleReasons calls GetSupportedClocksThrottleReasonsFunc. +func (mock *Device) GetSupportedClocksThrottleReasons() (uint64, nvml.Return) { + if mock.GetSupportedClocksThrottleReasonsFunc == nil { + panic("Device.GetSupportedClocksThrottleReasonsFunc: method is nil but Device.GetSupportedClocksThrottleReasons was just called") + } + callInfo := struct { + }{} + mock.lockGetSupportedClocksThrottleReasons.Lock() + mock.calls.GetSupportedClocksThrottleReasons = append(mock.calls.GetSupportedClocksThrottleReasons, callInfo) + mock.lockGetSupportedClocksThrottleReasons.Unlock() + return mock.GetSupportedClocksThrottleReasonsFunc() +} + +// GetSupportedClocksThrottleReasonsCalls gets all the calls that were made to GetSupportedClocksThrottleReasons. +// Check the length with: +// +// len(mockedDevice.GetSupportedClocksThrottleReasonsCalls()) +func (mock *Device) GetSupportedClocksThrottleReasonsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetSupportedClocksThrottleReasons.RLock() + calls = mock.calls.GetSupportedClocksThrottleReasons + mock.lockGetSupportedClocksThrottleReasons.RUnlock() + return calls +} + +// GetSupportedEventTypes calls GetSupportedEventTypesFunc. +func (mock *Device) GetSupportedEventTypes() (uint64, nvml.Return) { + if mock.GetSupportedEventTypesFunc == nil { + panic("Device.GetSupportedEventTypesFunc: method is nil but Device.GetSupportedEventTypes was just called") + } + callInfo := struct { + }{} + mock.lockGetSupportedEventTypes.Lock() + mock.calls.GetSupportedEventTypes = append(mock.calls.GetSupportedEventTypes, callInfo) + mock.lockGetSupportedEventTypes.Unlock() + return mock.GetSupportedEventTypesFunc() +} + +// GetSupportedEventTypesCalls gets all the calls that were made to GetSupportedEventTypes. +// Check the length with: +// +// len(mockedDevice.GetSupportedEventTypesCalls()) +func (mock *Device) GetSupportedEventTypesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetSupportedEventTypes.RLock() + calls = mock.calls.GetSupportedEventTypes + mock.lockGetSupportedEventTypes.RUnlock() + return calls +} + +// GetSupportedGraphicsClocks calls GetSupportedGraphicsClocksFunc. +func (mock *Device) GetSupportedGraphicsClocks(n int) (int, uint32, nvml.Return) { + if mock.GetSupportedGraphicsClocksFunc == nil { + panic("Device.GetSupportedGraphicsClocksFunc: method is nil but Device.GetSupportedGraphicsClocks was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetSupportedGraphicsClocks.Lock() + mock.calls.GetSupportedGraphicsClocks = append(mock.calls.GetSupportedGraphicsClocks, callInfo) + mock.lockGetSupportedGraphicsClocks.Unlock() + return mock.GetSupportedGraphicsClocksFunc(n) +} + +// GetSupportedGraphicsClocksCalls gets all the calls that were made to GetSupportedGraphicsClocks. +// Check the length with: +// +// len(mockedDevice.GetSupportedGraphicsClocksCalls()) +func (mock *Device) GetSupportedGraphicsClocksCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetSupportedGraphicsClocks.RLock() + calls = mock.calls.GetSupportedGraphicsClocks + mock.lockGetSupportedGraphicsClocks.RUnlock() + return calls +} + +// GetSupportedMemoryClocks calls GetSupportedMemoryClocksFunc. +func (mock *Device) GetSupportedMemoryClocks() (int, uint32, nvml.Return) { + if mock.GetSupportedMemoryClocksFunc == nil { + panic("Device.GetSupportedMemoryClocksFunc: method is nil but Device.GetSupportedMemoryClocks was just called") + } + callInfo := struct { + }{} + mock.lockGetSupportedMemoryClocks.Lock() + mock.calls.GetSupportedMemoryClocks = append(mock.calls.GetSupportedMemoryClocks, callInfo) + mock.lockGetSupportedMemoryClocks.Unlock() + return mock.GetSupportedMemoryClocksFunc() +} + +// GetSupportedMemoryClocksCalls gets all the calls that were made to GetSupportedMemoryClocks. +// Check the length with: +// +// len(mockedDevice.GetSupportedMemoryClocksCalls()) +func (mock *Device) GetSupportedMemoryClocksCalls() []struct { +} { + var calls []struct { + } + mock.lockGetSupportedMemoryClocks.RLock() + calls = mock.calls.GetSupportedMemoryClocks + mock.lockGetSupportedMemoryClocks.RUnlock() + return calls +} + +// GetSupportedPerformanceStates calls GetSupportedPerformanceStatesFunc. +func (mock *Device) GetSupportedPerformanceStates() ([]nvml.Pstates, nvml.Return) { + if mock.GetSupportedPerformanceStatesFunc == nil { + panic("Device.GetSupportedPerformanceStatesFunc: method is nil but Device.GetSupportedPerformanceStates was just called") + } + callInfo := struct { + }{} + mock.lockGetSupportedPerformanceStates.Lock() + mock.calls.GetSupportedPerformanceStates = append(mock.calls.GetSupportedPerformanceStates, callInfo) + mock.lockGetSupportedPerformanceStates.Unlock() + return mock.GetSupportedPerformanceStatesFunc() +} + +// GetSupportedPerformanceStatesCalls gets all the calls that were made to GetSupportedPerformanceStates. +// Check the length with: +// +// len(mockedDevice.GetSupportedPerformanceStatesCalls()) +func (mock *Device) GetSupportedPerformanceStatesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetSupportedPerformanceStates.RLock() + calls = mock.calls.GetSupportedPerformanceStates + mock.lockGetSupportedPerformanceStates.RUnlock() + return calls +} + +// GetSupportedVgpus calls GetSupportedVgpusFunc. +func (mock *Device) GetSupportedVgpus() ([]nvml.VgpuTypeId, nvml.Return) { + if mock.GetSupportedVgpusFunc == nil { + panic("Device.GetSupportedVgpusFunc: method is nil but Device.GetSupportedVgpus was just called") + } + callInfo := struct { + }{} + mock.lockGetSupportedVgpus.Lock() + mock.calls.GetSupportedVgpus = append(mock.calls.GetSupportedVgpus, callInfo) + mock.lockGetSupportedVgpus.Unlock() + return mock.GetSupportedVgpusFunc() +} + +// GetSupportedVgpusCalls gets all the calls that were made to GetSupportedVgpus. +// Check the length with: +// +// len(mockedDevice.GetSupportedVgpusCalls()) +func (mock *Device) GetSupportedVgpusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetSupportedVgpus.RLock() + calls = mock.calls.GetSupportedVgpus + mock.lockGetSupportedVgpus.RUnlock() + return calls +} + +// GetTargetFanSpeed calls GetTargetFanSpeedFunc. +func (mock *Device) GetTargetFanSpeed(n int) (int, nvml.Return) { + if mock.GetTargetFanSpeedFunc == nil { + panic("Device.GetTargetFanSpeedFunc: method is nil but Device.GetTargetFanSpeed was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetTargetFanSpeed.Lock() + mock.calls.GetTargetFanSpeed = append(mock.calls.GetTargetFanSpeed, callInfo) + mock.lockGetTargetFanSpeed.Unlock() + return mock.GetTargetFanSpeedFunc(n) +} + +// GetTargetFanSpeedCalls gets all the calls that were made to GetTargetFanSpeed. +// Check the length with: +// +// len(mockedDevice.GetTargetFanSpeedCalls()) +func (mock *Device) GetTargetFanSpeedCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetTargetFanSpeed.RLock() + calls = mock.calls.GetTargetFanSpeed + mock.lockGetTargetFanSpeed.RUnlock() + return calls +} + +// GetTemperature calls GetTemperatureFunc. +func (mock *Device) GetTemperature(temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) { + if mock.GetTemperatureFunc == nil { + panic("Device.GetTemperatureFunc: method is nil but Device.GetTemperature was just called") + } + callInfo := struct { + TemperatureSensors nvml.TemperatureSensors + }{ + TemperatureSensors: temperatureSensors, + } + mock.lockGetTemperature.Lock() + mock.calls.GetTemperature = append(mock.calls.GetTemperature, callInfo) + mock.lockGetTemperature.Unlock() + return mock.GetTemperatureFunc(temperatureSensors) +} + +// GetTemperatureCalls gets all the calls that were made to GetTemperature. +// Check the length with: +// +// len(mockedDevice.GetTemperatureCalls()) +func (mock *Device) GetTemperatureCalls() []struct { + TemperatureSensors nvml.TemperatureSensors +} { + var calls []struct { + TemperatureSensors nvml.TemperatureSensors + } + mock.lockGetTemperature.RLock() + calls = mock.calls.GetTemperature + mock.lockGetTemperature.RUnlock() + return calls +} + +// GetTemperatureThreshold calls GetTemperatureThresholdFunc. +func (mock *Device) GetTemperatureThreshold(temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { + if mock.GetTemperatureThresholdFunc == nil { + panic("Device.GetTemperatureThresholdFunc: method is nil but Device.GetTemperatureThreshold was just called") + } + callInfo := struct { + TemperatureThresholds nvml.TemperatureThresholds + }{ + TemperatureThresholds: temperatureThresholds, + } + mock.lockGetTemperatureThreshold.Lock() + mock.calls.GetTemperatureThreshold = append(mock.calls.GetTemperatureThreshold, callInfo) + mock.lockGetTemperatureThreshold.Unlock() + return mock.GetTemperatureThresholdFunc(temperatureThresholds) +} + +// GetTemperatureThresholdCalls gets all the calls that were made to GetTemperatureThreshold. +// Check the length with: +// +// len(mockedDevice.GetTemperatureThresholdCalls()) +func (mock *Device) GetTemperatureThresholdCalls() []struct { + TemperatureThresholds nvml.TemperatureThresholds +} { + var calls []struct { + TemperatureThresholds nvml.TemperatureThresholds + } + mock.lockGetTemperatureThreshold.RLock() + calls = mock.calls.GetTemperatureThreshold + mock.lockGetTemperatureThreshold.RUnlock() + return calls +} + +// GetTemperatureV calls GetTemperatureVFunc. +func (mock *Device) GetTemperatureV() nvml.TemperatureHandler { + if mock.GetTemperatureVFunc == nil { + panic("Device.GetTemperatureVFunc: method is nil but Device.GetTemperatureV was just called") + } + callInfo := struct { + }{} + mock.lockGetTemperatureV.Lock() + mock.calls.GetTemperatureV = append(mock.calls.GetTemperatureV, callInfo) + mock.lockGetTemperatureV.Unlock() + return mock.GetTemperatureVFunc() +} + +// GetTemperatureVCalls gets all the calls that were made to GetTemperatureV. +// Check the length with: +// +// len(mockedDevice.GetTemperatureVCalls()) +func (mock *Device) GetTemperatureVCalls() []struct { +} { + var calls []struct { + } + mock.lockGetTemperatureV.RLock() + calls = mock.calls.GetTemperatureV + mock.lockGetTemperatureV.RUnlock() + return calls +} + +// GetThermalSettings calls GetThermalSettingsFunc. +func (mock *Device) GetThermalSettings(v uint32) (nvml.GpuThermalSettings, nvml.Return) { + if mock.GetThermalSettingsFunc == nil { + panic("Device.GetThermalSettingsFunc: method is nil but Device.GetThermalSettings was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockGetThermalSettings.Lock() + mock.calls.GetThermalSettings = append(mock.calls.GetThermalSettings, callInfo) + mock.lockGetThermalSettings.Unlock() + return mock.GetThermalSettingsFunc(v) +} + +// GetThermalSettingsCalls gets all the calls that were made to GetThermalSettings. +// Check the length with: +// +// len(mockedDevice.GetThermalSettingsCalls()) +func (mock *Device) GetThermalSettingsCalls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockGetThermalSettings.RLock() + calls = mock.calls.GetThermalSettings + mock.lockGetThermalSettings.RUnlock() + return calls +} + +// GetTopologyCommonAncestor calls GetTopologyCommonAncestorFunc. +func (mock *Device) GetTopologyCommonAncestor(device nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) { + if mock.GetTopologyCommonAncestorFunc == nil { + panic("Device.GetTopologyCommonAncestorFunc: method is nil but Device.GetTopologyCommonAncestor was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockGetTopologyCommonAncestor.Lock() + mock.calls.GetTopologyCommonAncestor = append(mock.calls.GetTopologyCommonAncestor, callInfo) + mock.lockGetTopologyCommonAncestor.Unlock() + return mock.GetTopologyCommonAncestorFunc(device) +} + +// GetTopologyCommonAncestorCalls gets all the calls that were made to GetTopologyCommonAncestor. +// Check the length with: +// +// len(mockedDevice.GetTopologyCommonAncestorCalls()) +func (mock *Device) GetTopologyCommonAncestorCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockGetTopologyCommonAncestor.RLock() + calls = mock.calls.GetTopologyCommonAncestor + mock.lockGetTopologyCommonAncestor.RUnlock() + return calls +} + +// GetTopologyNearestGpus calls GetTopologyNearestGpusFunc. +func (mock *Device) GetTopologyNearestGpus(gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) { + if mock.GetTopologyNearestGpusFunc == nil { + panic("Device.GetTopologyNearestGpusFunc: method is nil but Device.GetTopologyNearestGpus was just called") + } + callInfo := struct { + GpuTopologyLevel nvml.GpuTopologyLevel + }{ + GpuTopologyLevel: gpuTopologyLevel, + } + mock.lockGetTopologyNearestGpus.Lock() + mock.calls.GetTopologyNearestGpus = append(mock.calls.GetTopologyNearestGpus, callInfo) + mock.lockGetTopologyNearestGpus.Unlock() + return mock.GetTopologyNearestGpusFunc(gpuTopologyLevel) +} + +// GetTopologyNearestGpusCalls gets all the calls that were made to GetTopologyNearestGpus. +// Check the length with: +// +// len(mockedDevice.GetTopologyNearestGpusCalls()) +func (mock *Device) GetTopologyNearestGpusCalls() []struct { + GpuTopologyLevel nvml.GpuTopologyLevel +} { + var calls []struct { + GpuTopologyLevel nvml.GpuTopologyLevel + } + mock.lockGetTopologyNearestGpus.RLock() + calls = mock.calls.GetTopologyNearestGpus + mock.lockGetTopologyNearestGpus.RUnlock() + return calls +} + +// GetTotalEccErrors calls GetTotalEccErrorsFunc. +func (mock *Device) GetTotalEccErrors(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) { + if mock.GetTotalEccErrorsFunc == nil { + panic("Device.GetTotalEccErrorsFunc: method is nil but Device.GetTotalEccErrors was just called") + } + callInfo := struct { + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + }{ + MemoryErrorType: memoryErrorType, + EccCounterType: eccCounterType, + } + mock.lockGetTotalEccErrors.Lock() + mock.calls.GetTotalEccErrors = append(mock.calls.GetTotalEccErrors, callInfo) + mock.lockGetTotalEccErrors.Unlock() + return mock.GetTotalEccErrorsFunc(memoryErrorType, eccCounterType) +} + +// GetTotalEccErrorsCalls gets all the calls that were made to GetTotalEccErrors. +// Check the length with: +// +// len(mockedDevice.GetTotalEccErrorsCalls()) +func (mock *Device) GetTotalEccErrorsCalls() []struct { + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType +} { + var calls []struct { + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + } + mock.lockGetTotalEccErrors.RLock() + calls = mock.calls.GetTotalEccErrors + mock.lockGetTotalEccErrors.RUnlock() + return calls +} + +// GetTotalEnergyConsumption calls GetTotalEnergyConsumptionFunc. +func (mock *Device) GetTotalEnergyConsumption() (uint64, nvml.Return) { + if mock.GetTotalEnergyConsumptionFunc == nil { + panic("Device.GetTotalEnergyConsumptionFunc: method is nil but Device.GetTotalEnergyConsumption was just called") + } + callInfo := struct { + }{} + mock.lockGetTotalEnergyConsumption.Lock() + mock.calls.GetTotalEnergyConsumption = append(mock.calls.GetTotalEnergyConsumption, callInfo) + mock.lockGetTotalEnergyConsumption.Unlock() + return mock.GetTotalEnergyConsumptionFunc() +} + +// GetTotalEnergyConsumptionCalls gets all the calls that were made to GetTotalEnergyConsumption. +// Check the length with: +// +// len(mockedDevice.GetTotalEnergyConsumptionCalls()) +func (mock *Device) GetTotalEnergyConsumptionCalls() []struct { +} { + var calls []struct { + } + mock.lockGetTotalEnergyConsumption.RLock() + calls = mock.calls.GetTotalEnergyConsumption + mock.lockGetTotalEnergyConsumption.RUnlock() + return calls +} + +// GetUUID calls GetUUIDFunc. +func (mock *Device) GetUUID() (string, nvml.Return) { + if mock.GetUUIDFunc == nil { + panic("Device.GetUUIDFunc: method is nil but Device.GetUUID was just called") + } + callInfo := struct { + }{} + mock.lockGetUUID.Lock() + mock.calls.GetUUID = append(mock.calls.GetUUID, callInfo) + mock.lockGetUUID.Unlock() + return mock.GetUUIDFunc() +} + +// GetUUIDCalls gets all the calls that were made to GetUUID. +// Check the length with: +// +// len(mockedDevice.GetUUIDCalls()) +func (mock *Device) GetUUIDCalls() []struct { +} { + var calls []struct { + } + mock.lockGetUUID.RLock() + calls = mock.calls.GetUUID + mock.lockGetUUID.RUnlock() + return calls +} + +// GetUtilizationRates calls GetUtilizationRatesFunc. +func (mock *Device) GetUtilizationRates() (nvml.Utilization, nvml.Return) { + if mock.GetUtilizationRatesFunc == nil { + panic("Device.GetUtilizationRatesFunc: method is nil but Device.GetUtilizationRates was just called") + } + callInfo := struct { + }{} + mock.lockGetUtilizationRates.Lock() + mock.calls.GetUtilizationRates = append(mock.calls.GetUtilizationRates, callInfo) + mock.lockGetUtilizationRates.Unlock() + return mock.GetUtilizationRatesFunc() +} + +// GetUtilizationRatesCalls gets all the calls that were made to GetUtilizationRates. +// Check the length with: +// +// len(mockedDevice.GetUtilizationRatesCalls()) +func (mock *Device) GetUtilizationRatesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetUtilizationRates.RLock() + calls = mock.calls.GetUtilizationRates + mock.lockGetUtilizationRates.RUnlock() + return calls +} + +// GetVbiosVersion calls GetVbiosVersionFunc. +func (mock *Device) GetVbiosVersion() (string, nvml.Return) { + if mock.GetVbiosVersionFunc == nil { + panic("Device.GetVbiosVersionFunc: method is nil but Device.GetVbiosVersion was just called") + } + callInfo := struct { + }{} + mock.lockGetVbiosVersion.Lock() + mock.calls.GetVbiosVersion = append(mock.calls.GetVbiosVersion, callInfo) + mock.lockGetVbiosVersion.Unlock() + return mock.GetVbiosVersionFunc() +} + +// GetVbiosVersionCalls gets all the calls that were made to GetVbiosVersion. +// Check the length with: +// +// len(mockedDevice.GetVbiosVersionCalls()) +func (mock *Device) GetVbiosVersionCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVbiosVersion.RLock() + calls = mock.calls.GetVbiosVersion + mock.lockGetVbiosVersion.RUnlock() + return calls +} + +// GetVgpuCapabilities calls GetVgpuCapabilitiesFunc. +func (mock *Device) GetVgpuCapabilities(deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) { + if mock.GetVgpuCapabilitiesFunc == nil { + panic("Device.GetVgpuCapabilitiesFunc: method is nil but Device.GetVgpuCapabilities was just called") + } + callInfo := struct { + DeviceVgpuCapability nvml.DeviceVgpuCapability + }{ + DeviceVgpuCapability: deviceVgpuCapability, + } + mock.lockGetVgpuCapabilities.Lock() + mock.calls.GetVgpuCapabilities = append(mock.calls.GetVgpuCapabilities, callInfo) + mock.lockGetVgpuCapabilities.Unlock() + return mock.GetVgpuCapabilitiesFunc(deviceVgpuCapability) +} + +// GetVgpuCapabilitiesCalls gets all the calls that were made to GetVgpuCapabilities. +// Check the length with: +// +// len(mockedDevice.GetVgpuCapabilitiesCalls()) +func (mock *Device) GetVgpuCapabilitiesCalls() []struct { + DeviceVgpuCapability nvml.DeviceVgpuCapability +} { + var calls []struct { + DeviceVgpuCapability nvml.DeviceVgpuCapability + } + mock.lockGetVgpuCapabilities.RLock() + calls = mock.calls.GetVgpuCapabilities + mock.lockGetVgpuCapabilities.RUnlock() + return calls +} + +// GetVgpuHeterogeneousMode calls GetVgpuHeterogeneousModeFunc. +func (mock *Device) GetVgpuHeterogeneousMode() (nvml.VgpuHeterogeneousMode, nvml.Return) { + if mock.GetVgpuHeterogeneousModeFunc == nil { + panic("Device.GetVgpuHeterogeneousModeFunc: method is nil but Device.GetVgpuHeterogeneousMode was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuHeterogeneousMode.Lock() + mock.calls.GetVgpuHeterogeneousMode = append(mock.calls.GetVgpuHeterogeneousMode, callInfo) + mock.lockGetVgpuHeterogeneousMode.Unlock() + return mock.GetVgpuHeterogeneousModeFunc() +} + +// GetVgpuHeterogeneousModeCalls gets all the calls that were made to GetVgpuHeterogeneousMode. +// Check the length with: +// +// len(mockedDevice.GetVgpuHeterogeneousModeCalls()) +func (mock *Device) GetVgpuHeterogeneousModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuHeterogeneousMode.RLock() + calls = mock.calls.GetVgpuHeterogeneousMode + mock.lockGetVgpuHeterogeneousMode.RUnlock() + return calls +} + +// GetVgpuInstancesUtilizationInfo calls GetVgpuInstancesUtilizationInfoFunc. +func (mock *Device) GetVgpuInstancesUtilizationInfo() (nvml.VgpuInstancesUtilizationInfo, nvml.Return) { + if mock.GetVgpuInstancesUtilizationInfoFunc == nil { + panic("Device.GetVgpuInstancesUtilizationInfoFunc: method is nil but Device.GetVgpuInstancesUtilizationInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuInstancesUtilizationInfo.Lock() + mock.calls.GetVgpuInstancesUtilizationInfo = append(mock.calls.GetVgpuInstancesUtilizationInfo, callInfo) + mock.lockGetVgpuInstancesUtilizationInfo.Unlock() + return mock.GetVgpuInstancesUtilizationInfoFunc() +} + +// GetVgpuInstancesUtilizationInfoCalls gets all the calls that were made to GetVgpuInstancesUtilizationInfo. +// Check the length with: +// +// len(mockedDevice.GetVgpuInstancesUtilizationInfoCalls()) +func (mock *Device) GetVgpuInstancesUtilizationInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuInstancesUtilizationInfo.RLock() + calls = mock.calls.GetVgpuInstancesUtilizationInfo + mock.lockGetVgpuInstancesUtilizationInfo.RUnlock() + return calls +} + +// GetVgpuMetadata calls GetVgpuMetadataFunc. +func (mock *Device) GetVgpuMetadata() (nvml.VgpuPgpuMetadata, nvml.Return) { + if mock.GetVgpuMetadataFunc == nil { + panic("Device.GetVgpuMetadataFunc: method is nil but Device.GetVgpuMetadata was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuMetadata.Lock() + mock.calls.GetVgpuMetadata = append(mock.calls.GetVgpuMetadata, callInfo) + mock.lockGetVgpuMetadata.Unlock() + return mock.GetVgpuMetadataFunc() +} + +// GetVgpuMetadataCalls gets all the calls that were made to GetVgpuMetadata. +// Check the length with: +// +// len(mockedDevice.GetVgpuMetadataCalls()) +func (mock *Device) GetVgpuMetadataCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuMetadata.RLock() + calls = mock.calls.GetVgpuMetadata + mock.lockGetVgpuMetadata.RUnlock() + return calls +} + +// GetVgpuProcessUtilization calls GetVgpuProcessUtilizationFunc. +func (mock *Device) GetVgpuProcessUtilization(v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) { + if mock.GetVgpuProcessUtilizationFunc == nil { + panic("Device.GetVgpuProcessUtilizationFunc: method is nil but Device.GetVgpuProcessUtilization was just called") + } + callInfo := struct { + V uint64 + }{ + V: v, + } + mock.lockGetVgpuProcessUtilization.Lock() + mock.calls.GetVgpuProcessUtilization = append(mock.calls.GetVgpuProcessUtilization, callInfo) + mock.lockGetVgpuProcessUtilization.Unlock() + return mock.GetVgpuProcessUtilizationFunc(v) +} + +// GetVgpuProcessUtilizationCalls gets all the calls that were made to GetVgpuProcessUtilization. +// Check the length with: +// +// len(mockedDevice.GetVgpuProcessUtilizationCalls()) +func (mock *Device) GetVgpuProcessUtilizationCalls() []struct { + V uint64 +} { + var calls []struct { + V uint64 + } + mock.lockGetVgpuProcessUtilization.RLock() + calls = mock.calls.GetVgpuProcessUtilization + mock.lockGetVgpuProcessUtilization.RUnlock() + return calls +} + +// GetVgpuProcessesUtilizationInfo calls GetVgpuProcessesUtilizationInfoFunc. +func (mock *Device) GetVgpuProcessesUtilizationInfo() (nvml.VgpuProcessesUtilizationInfo, nvml.Return) { + if mock.GetVgpuProcessesUtilizationInfoFunc == nil { + panic("Device.GetVgpuProcessesUtilizationInfoFunc: method is nil but Device.GetVgpuProcessesUtilizationInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuProcessesUtilizationInfo.Lock() + mock.calls.GetVgpuProcessesUtilizationInfo = append(mock.calls.GetVgpuProcessesUtilizationInfo, callInfo) + mock.lockGetVgpuProcessesUtilizationInfo.Unlock() + return mock.GetVgpuProcessesUtilizationInfoFunc() +} + +// GetVgpuProcessesUtilizationInfoCalls gets all the calls that were made to GetVgpuProcessesUtilizationInfo. +// Check the length with: +// +// len(mockedDevice.GetVgpuProcessesUtilizationInfoCalls()) +func (mock *Device) GetVgpuProcessesUtilizationInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuProcessesUtilizationInfo.RLock() + calls = mock.calls.GetVgpuProcessesUtilizationInfo + mock.lockGetVgpuProcessesUtilizationInfo.RUnlock() + return calls +} + +// GetVgpuSchedulerCapabilities calls GetVgpuSchedulerCapabilitiesFunc. +func (mock *Device) GetVgpuSchedulerCapabilities() (nvml.VgpuSchedulerCapabilities, nvml.Return) { + if mock.GetVgpuSchedulerCapabilitiesFunc == nil { + panic("Device.GetVgpuSchedulerCapabilitiesFunc: method is nil but Device.GetVgpuSchedulerCapabilities was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuSchedulerCapabilities.Lock() + mock.calls.GetVgpuSchedulerCapabilities = append(mock.calls.GetVgpuSchedulerCapabilities, callInfo) + mock.lockGetVgpuSchedulerCapabilities.Unlock() + return mock.GetVgpuSchedulerCapabilitiesFunc() +} + +// GetVgpuSchedulerCapabilitiesCalls gets all the calls that were made to GetVgpuSchedulerCapabilities. +// Check the length with: +// +// len(mockedDevice.GetVgpuSchedulerCapabilitiesCalls()) +func (mock *Device) GetVgpuSchedulerCapabilitiesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuSchedulerCapabilities.RLock() + calls = mock.calls.GetVgpuSchedulerCapabilities + mock.lockGetVgpuSchedulerCapabilities.RUnlock() + return calls +} + +// GetVgpuSchedulerLog calls GetVgpuSchedulerLogFunc. +func (mock *Device) GetVgpuSchedulerLog() (nvml.VgpuSchedulerLog, nvml.Return) { + if mock.GetVgpuSchedulerLogFunc == nil { + panic("Device.GetVgpuSchedulerLogFunc: method is nil but Device.GetVgpuSchedulerLog was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuSchedulerLog.Lock() + mock.calls.GetVgpuSchedulerLog = append(mock.calls.GetVgpuSchedulerLog, callInfo) + mock.lockGetVgpuSchedulerLog.Unlock() + return mock.GetVgpuSchedulerLogFunc() +} + +// GetVgpuSchedulerLogCalls gets all the calls that were made to GetVgpuSchedulerLog. +// Check the length with: +// +// len(mockedDevice.GetVgpuSchedulerLogCalls()) +func (mock *Device) GetVgpuSchedulerLogCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuSchedulerLog.RLock() + calls = mock.calls.GetVgpuSchedulerLog + mock.lockGetVgpuSchedulerLog.RUnlock() + return calls +} + +// GetVgpuSchedulerState calls GetVgpuSchedulerStateFunc. +func (mock *Device) GetVgpuSchedulerState() (nvml.VgpuSchedulerGetState, nvml.Return) { + if mock.GetVgpuSchedulerStateFunc == nil { + panic("Device.GetVgpuSchedulerStateFunc: method is nil but Device.GetVgpuSchedulerState was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuSchedulerState.Lock() + mock.calls.GetVgpuSchedulerState = append(mock.calls.GetVgpuSchedulerState, callInfo) + mock.lockGetVgpuSchedulerState.Unlock() + return mock.GetVgpuSchedulerStateFunc() +} + +// GetVgpuSchedulerStateCalls gets all the calls that were made to GetVgpuSchedulerState. +// Check the length with: +// +// len(mockedDevice.GetVgpuSchedulerStateCalls()) +func (mock *Device) GetVgpuSchedulerStateCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuSchedulerState.RLock() + calls = mock.calls.GetVgpuSchedulerState + mock.lockGetVgpuSchedulerState.RUnlock() + return calls +} + +// GetVgpuTypeCreatablePlacements calls GetVgpuTypeCreatablePlacementsFunc. +func (mock *Device) GetVgpuTypeCreatablePlacements(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { + if mock.GetVgpuTypeCreatablePlacementsFunc == nil { + panic("Device.GetVgpuTypeCreatablePlacementsFunc: method is nil but Device.GetVgpuTypeCreatablePlacements was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockGetVgpuTypeCreatablePlacements.Lock() + mock.calls.GetVgpuTypeCreatablePlacements = append(mock.calls.GetVgpuTypeCreatablePlacements, callInfo) + mock.lockGetVgpuTypeCreatablePlacements.Unlock() + return mock.GetVgpuTypeCreatablePlacementsFunc(vgpuTypeId) +} + +// GetVgpuTypeCreatablePlacementsCalls gets all the calls that were made to GetVgpuTypeCreatablePlacements. +// Check the length with: +// +// len(mockedDevice.GetVgpuTypeCreatablePlacementsCalls()) +func (mock *Device) GetVgpuTypeCreatablePlacementsCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockGetVgpuTypeCreatablePlacements.RLock() + calls = mock.calls.GetVgpuTypeCreatablePlacements + mock.lockGetVgpuTypeCreatablePlacements.RUnlock() + return calls +} + +// GetVgpuTypeSupportedPlacements calls GetVgpuTypeSupportedPlacementsFunc. +func (mock *Device) GetVgpuTypeSupportedPlacements(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { + if mock.GetVgpuTypeSupportedPlacementsFunc == nil { + panic("Device.GetVgpuTypeSupportedPlacementsFunc: method is nil but Device.GetVgpuTypeSupportedPlacements was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockGetVgpuTypeSupportedPlacements.Lock() + mock.calls.GetVgpuTypeSupportedPlacements = append(mock.calls.GetVgpuTypeSupportedPlacements, callInfo) + mock.lockGetVgpuTypeSupportedPlacements.Unlock() + return mock.GetVgpuTypeSupportedPlacementsFunc(vgpuTypeId) +} + +// GetVgpuTypeSupportedPlacementsCalls gets all the calls that were made to GetVgpuTypeSupportedPlacements. +// Check the length with: +// +// len(mockedDevice.GetVgpuTypeSupportedPlacementsCalls()) +func (mock *Device) GetVgpuTypeSupportedPlacementsCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockGetVgpuTypeSupportedPlacements.RLock() + calls = mock.calls.GetVgpuTypeSupportedPlacements + mock.lockGetVgpuTypeSupportedPlacements.RUnlock() + return calls +} + +// GetVgpuUtilization calls GetVgpuUtilizationFunc. +func (mock *Device) GetVgpuUtilization(v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) { + if mock.GetVgpuUtilizationFunc == nil { + panic("Device.GetVgpuUtilizationFunc: method is nil but Device.GetVgpuUtilization was just called") + } + callInfo := struct { + V uint64 + }{ + V: v, + } + mock.lockGetVgpuUtilization.Lock() + mock.calls.GetVgpuUtilization = append(mock.calls.GetVgpuUtilization, callInfo) + mock.lockGetVgpuUtilization.Unlock() + return mock.GetVgpuUtilizationFunc(v) +} + +// GetVgpuUtilizationCalls gets all the calls that were made to GetVgpuUtilization. +// Check the length with: +// +// len(mockedDevice.GetVgpuUtilizationCalls()) +func (mock *Device) GetVgpuUtilizationCalls() []struct { + V uint64 +} { + var calls []struct { + V uint64 + } + mock.lockGetVgpuUtilization.RLock() + calls = mock.calls.GetVgpuUtilization + mock.lockGetVgpuUtilization.RUnlock() + return calls +} + +// GetViolationStatus calls GetViolationStatusFunc. +func (mock *Device) GetViolationStatus(perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) { + if mock.GetViolationStatusFunc == nil { + panic("Device.GetViolationStatusFunc: method is nil but Device.GetViolationStatus was just called") + } + callInfo := struct { + PerfPolicyType nvml.PerfPolicyType + }{ + PerfPolicyType: perfPolicyType, + } + mock.lockGetViolationStatus.Lock() + mock.calls.GetViolationStatus = append(mock.calls.GetViolationStatus, callInfo) + mock.lockGetViolationStatus.Unlock() + return mock.GetViolationStatusFunc(perfPolicyType) +} + +// GetViolationStatusCalls gets all the calls that were made to GetViolationStatus. +// Check the length with: +// +// len(mockedDevice.GetViolationStatusCalls()) +func (mock *Device) GetViolationStatusCalls() []struct { + PerfPolicyType nvml.PerfPolicyType +} { + var calls []struct { + PerfPolicyType nvml.PerfPolicyType + } + mock.lockGetViolationStatus.RLock() + calls = mock.calls.GetViolationStatus + mock.lockGetViolationStatus.RUnlock() + return calls +} + +// GetVirtualizationMode calls GetVirtualizationModeFunc. +func (mock *Device) GetVirtualizationMode() (nvml.GpuVirtualizationMode, nvml.Return) { + if mock.GetVirtualizationModeFunc == nil { + panic("Device.GetVirtualizationModeFunc: method is nil but Device.GetVirtualizationMode was just called") + } + callInfo := struct { + }{} + mock.lockGetVirtualizationMode.Lock() + mock.calls.GetVirtualizationMode = append(mock.calls.GetVirtualizationMode, callInfo) + mock.lockGetVirtualizationMode.Unlock() + return mock.GetVirtualizationModeFunc() +} + +// GetVirtualizationModeCalls gets all the calls that were made to GetVirtualizationMode. +// Check the length with: +// +// len(mockedDevice.GetVirtualizationModeCalls()) +func (mock *Device) GetVirtualizationModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVirtualizationMode.RLock() + calls = mock.calls.GetVirtualizationMode + mock.lockGetVirtualizationMode.RUnlock() + return calls +} + +// GpmMigSampleGet calls GpmMigSampleGetFunc. +func (mock *Device) GpmMigSampleGet(n int, gpmSample nvml.GpmSample) nvml.Return { + if mock.GpmMigSampleGetFunc == nil { + panic("Device.GpmMigSampleGetFunc: method is nil but Device.GpmMigSampleGet was just called") + } + callInfo := struct { + N int + GpmSample nvml.GpmSample + }{ + N: n, + GpmSample: gpmSample, + } + mock.lockGpmMigSampleGet.Lock() + mock.calls.GpmMigSampleGet = append(mock.calls.GpmMigSampleGet, callInfo) + mock.lockGpmMigSampleGet.Unlock() + return mock.GpmMigSampleGetFunc(n, gpmSample) +} + +// GpmMigSampleGetCalls gets all the calls that were made to GpmMigSampleGet. +// Check the length with: +// +// len(mockedDevice.GpmMigSampleGetCalls()) +func (mock *Device) GpmMigSampleGetCalls() []struct { + N int + GpmSample nvml.GpmSample +} { + var calls []struct { + N int + GpmSample nvml.GpmSample + } + mock.lockGpmMigSampleGet.RLock() + calls = mock.calls.GpmMigSampleGet + mock.lockGpmMigSampleGet.RUnlock() + return calls +} + +// GpmQueryDeviceSupport calls GpmQueryDeviceSupportFunc. +func (mock *Device) GpmQueryDeviceSupport() (nvml.GpmSupport, nvml.Return) { + if mock.GpmQueryDeviceSupportFunc == nil { + panic("Device.GpmQueryDeviceSupportFunc: method is nil but Device.GpmQueryDeviceSupport was just called") + } + callInfo := struct { + }{} + mock.lockGpmQueryDeviceSupport.Lock() + mock.calls.GpmQueryDeviceSupport = append(mock.calls.GpmQueryDeviceSupport, callInfo) + mock.lockGpmQueryDeviceSupport.Unlock() + return mock.GpmQueryDeviceSupportFunc() +} + +// GpmQueryDeviceSupportCalls gets all the calls that were made to GpmQueryDeviceSupport. +// Check the length with: +// +// len(mockedDevice.GpmQueryDeviceSupportCalls()) +func (mock *Device) GpmQueryDeviceSupportCalls() []struct { +} { + var calls []struct { + } + mock.lockGpmQueryDeviceSupport.RLock() + calls = mock.calls.GpmQueryDeviceSupport + mock.lockGpmQueryDeviceSupport.RUnlock() + return calls +} + +// GpmQueryDeviceSupportV calls GpmQueryDeviceSupportVFunc. +func (mock *Device) GpmQueryDeviceSupportV() nvml.GpmSupportV { + if mock.GpmQueryDeviceSupportVFunc == nil { + panic("Device.GpmQueryDeviceSupportVFunc: method is nil but Device.GpmQueryDeviceSupportV was just called") + } + callInfo := struct { + }{} + mock.lockGpmQueryDeviceSupportV.Lock() + mock.calls.GpmQueryDeviceSupportV = append(mock.calls.GpmQueryDeviceSupportV, callInfo) + mock.lockGpmQueryDeviceSupportV.Unlock() + return mock.GpmQueryDeviceSupportVFunc() +} + +// GpmQueryDeviceSupportVCalls gets all the calls that were made to GpmQueryDeviceSupportV. +// Check the length with: +// +// len(mockedDevice.GpmQueryDeviceSupportVCalls()) +func (mock *Device) GpmQueryDeviceSupportVCalls() []struct { +} { + var calls []struct { + } + mock.lockGpmQueryDeviceSupportV.RLock() + calls = mock.calls.GpmQueryDeviceSupportV + mock.lockGpmQueryDeviceSupportV.RUnlock() + return calls +} + +// GpmQueryIfStreamingEnabled calls GpmQueryIfStreamingEnabledFunc. +func (mock *Device) GpmQueryIfStreamingEnabled() (uint32, nvml.Return) { + if mock.GpmQueryIfStreamingEnabledFunc == nil { + panic("Device.GpmQueryIfStreamingEnabledFunc: method is nil but Device.GpmQueryIfStreamingEnabled was just called") + } + callInfo := struct { + }{} + mock.lockGpmQueryIfStreamingEnabled.Lock() + mock.calls.GpmQueryIfStreamingEnabled = append(mock.calls.GpmQueryIfStreamingEnabled, callInfo) + mock.lockGpmQueryIfStreamingEnabled.Unlock() + return mock.GpmQueryIfStreamingEnabledFunc() +} + +// GpmQueryIfStreamingEnabledCalls gets all the calls that were made to GpmQueryIfStreamingEnabled. +// Check the length with: +// +// len(mockedDevice.GpmQueryIfStreamingEnabledCalls()) +func (mock *Device) GpmQueryIfStreamingEnabledCalls() []struct { +} { + var calls []struct { + } + mock.lockGpmQueryIfStreamingEnabled.RLock() + calls = mock.calls.GpmQueryIfStreamingEnabled + mock.lockGpmQueryIfStreamingEnabled.RUnlock() + return calls +} + +// GpmSampleGet calls GpmSampleGetFunc. +func (mock *Device) GpmSampleGet(gpmSample nvml.GpmSample) nvml.Return { + if mock.GpmSampleGetFunc == nil { + panic("Device.GpmSampleGetFunc: method is nil but Device.GpmSampleGet was just called") + } + callInfo := struct { + GpmSample nvml.GpmSample + }{ + GpmSample: gpmSample, + } + mock.lockGpmSampleGet.Lock() + mock.calls.GpmSampleGet = append(mock.calls.GpmSampleGet, callInfo) + mock.lockGpmSampleGet.Unlock() + return mock.GpmSampleGetFunc(gpmSample) +} + +// GpmSampleGetCalls gets all the calls that were made to GpmSampleGet. +// Check the length with: +// +// len(mockedDevice.GpmSampleGetCalls()) +func (mock *Device) GpmSampleGetCalls() []struct { + GpmSample nvml.GpmSample +} { + var calls []struct { + GpmSample nvml.GpmSample + } + mock.lockGpmSampleGet.RLock() + calls = mock.calls.GpmSampleGet + mock.lockGpmSampleGet.RUnlock() + return calls +} + +// GpmSetStreamingEnabled calls GpmSetStreamingEnabledFunc. +func (mock *Device) GpmSetStreamingEnabled(v uint32) nvml.Return { + if mock.GpmSetStreamingEnabledFunc == nil { + panic("Device.GpmSetStreamingEnabledFunc: method is nil but Device.GpmSetStreamingEnabled was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockGpmSetStreamingEnabled.Lock() + mock.calls.GpmSetStreamingEnabled = append(mock.calls.GpmSetStreamingEnabled, callInfo) + mock.lockGpmSetStreamingEnabled.Unlock() + return mock.GpmSetStreamingEnabledFunc(v) +} + +// GpmSetStreamingEnabledCalls gets all the calls that were made to GpmSetStreamingEnabled. +// Check the length with: +// +// len(mockedDevice.GpmSetStreamingEnabledCalls()) +func (mock *Device) GpmSetStreamingEnabledCalls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockGpmSetStreamingEnabled.RLock() + calls = mock.calls.GpmSetStreamingEnabled + mock.lockGpmSetStreamingEnabled.RUnlock() + return calls +} + +// IsMigDeviceHandle calls IsMigDeviceHandleFunc. +func (mock *Device) IsMigDeviceHandle() (bool, nvml.Return) { + if mock.IsMigDeviceHandleFunc == nil { + panic("Device.IsMigDeviceHandleFunc: method is nil but Device.IsMigDeviceHandle was just called") + } + callInfo := struct { + }{} + mock.lockIsMigDeviceHandle.Lock() + mock.calls.IsMigDeviceHandle = append(mock.calls.IsMigDeviceHandle, callInfo) + mock.lockIsMigDeviceHandle.Unlock() + return mock.IsMigDeviceHandleFunc() +} + +// IsMigDeviceHandleCalls gets all the calls that were made to IsMigDeviceHandle. +// Check the length with: +// +// len(mockedDevice.IsMigDeviceHandleCalls()) +func (mock *Device) IsMigDeviceHandleCalls() []struct { +} { + var calls []struct { + } + mock.lockIsMigDeviceHandle.RLock() + calls = mock.calls.IsMigDeviceHandle + mock.lockIsMigDeviceHandle.RUnlock() + return calls +} + +// OnSameBoard calls OnSameBoardFunc. +func (mock *Device) OnSameBoard(device nvml.Device) (int, nvml.Return) { + if mock.OnSameBoardFunc == nil { + panic("Device.OnSameBoardFunc: method is nil but Device.OnSameBoard was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockOnSameBoard.Lock() + mock.calls.OnSameBoard = append(mock.calls.OnSameBoard, callInfo) + mock.lockOnSameBoard.Unlock() + return mock.OnSameBoardFunc(device) +} + +// OnSameBoardCalls gets all the calls that were made to OnSameBoard. +// Check the length with: +// +// len(mockedDevice.OnSameBoardCalls()) +func (mock *Device) OnSameBoardCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockOnSameBoard.RLock() + calls = mock.calls.OnSameBoard + mock.lockOnSameBoard.RUnlock() + return calls +} + +// PowerSmoothingActivatePresetProfile calls PowerSmoothingActivatePresetProfileFunc. +func (mock *Device) PowerSmoothingActivatePresetProfile(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { + if mock.PowerSmoothingActivatePresetProfileFunc == nil { + panic("Device.PowerSmoothingActivatePresetProfileFunc: method is nil but Device.PowerSmoothingActivatePresetProfile was just called") + } + callInfo := struct { + PowerSmoothingProfile *nvml.PowerSmoothingProfile + }{ + PowerSmoothingProfile: powerSmoothingProfile, + } + mock.lockPowerSmoothingActivatePresetProfile.Lock() + mock.calls.PowerSmoothingActivatePresetProfile = append(mock.calls.PowerSmoothingActivatePresetProfile, callInfo) + mock.lockPowerSmoothingActivatePresetProfile.Unlock() + return mock.PowerSmoothingActivatePresetProfileFunc(powerSmoothingProfile) +} + +// PowerSmoothingActivatePresetProfileCalls gets all the calls that were made to PowerSmoothingActivatePresetProfile. +// Check the length with: +// +// len(mockedDevice.PowerSmoothingActivatePresetProfileCalls()) +func (mock *Device) PowerSmoothingActivatePresetProfileCalls() []struct { + PowerSmoothingProfile *nvml.PowerSmoothingProfile +} { + var calls []struct { + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + mock.lockPowerSmoothingActivatePresetProfile.RLock() + calls = mock.calls.PowerSmoothingActivatePresetProfile + mock.lockPowerSmoothingActivatePresetProfile.RUnlock() + return calls +} + +// PowerSmoothingSetState calls PowerSmoothingSetStateFunc. +func (mock *Device) PowerSmoothingSetState(powerSmoothingState *nvml.PowerSmoothingState) nvml.Return { + if mock.PowerSmoothingSetStateFunc == nil { + panic("Device.PowerSmoothingSetStateFunc: method is nil but Device.PowerSmoothingSetState was just called") + } + callInfo := struct { + PowerSmoothingState *nvml.PowerSmoothingState + }{ + PowerSmoothingState: powerSmoothingState, + } + mock.lockPowerSmoothingSetState.Lock() + mock.calls.PowerSmoothingSetState = append(mock.calls.PowerSmoothingSetState, callInfo) + mock.lockPowerSmoothingSetState.Unlock() + return mock.PowerSmoothingSetStateFunc(powerSmoothingState) +} + +// PowerSmoothingSetStateCalls gets all the calls that were made to PowerSmoothingSetState. +// Check the length with: +// +// len(mockedDevice.PowerSmoothingSetStateCalls()) +func (mock *Device) PowerSmoothingSetStateCalls() []struct { + PowerSmoothingState *nvml.PowerSmoothingState +} { + var calls []struct { + PowerSmoothingState *nvml.PowerSmoothingState + } + mock.lockPowerSmoothingSetState.RLock() + calls = mock.calls.PowerSmoothingSetState + mock.lockPowerSmoothingSetState.RUnlock() + return calls +} + +// PowerSmoothingUpdatePresetProfileParam calls PowerSmoothingUpdatePresetProfileParamFunc. +func (mock *Device) PowerSmoothingUpdatePresetProfileParam(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { + if mock.PowerSmoothingUpdatePresetProfileParamFunc == nil { + panic("Device.PowerSmoothingUpdatePresetProfileParamFunc: method is nil but Device.PowerSmoothingUpdatePresetProfileParam was just called") + } + callInfo := struct { + PowerSmoothingProfile *nvml.PowerSmoothingProfile + }{ + PowerSmoothingProfile: powerSmoothingProfile, + } + mock.lockPowerSmoothingUpdatePresetProfileParam.Lock() + mock.calls.PowerSmoothingUpdatePresetProfileParam = append(mock.calls.PowerSmoothingUpdatePresetProfileParam, callInfo) + mock.lockPowerSmoothingUpdatePresetProfileParam.Unlock() + return mock.PowerSmoothingUpdatePresetProfileParamFunc(powerSmoothingProfile) +} + +// PowerSmoothingUpdatePresetProfileParamCalls gets all the calls that were made to PowerSmoothingUpdatePresetProfileParam. +// Check the length with: +// +// len(mockedDevice.PowerSmoothingUpdatePresetProfileParamCalls()) +func (mock *Device) PowerSmoothingUpdatePresetProfileParamCalls() []struct { + PowerSmoothingProfile *nvml.PowerSmoothingProfile +} { + var calls []struct { + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + mock.lockPowerSmoothingUpdatePresetProfileParam.RLock() + calls = mock.calls.PowerSmoothingUpdatePresetProfileParam + mock.lockPowerSmoothingUpdatePresetProfileParam.RUnlock() + return calls +} + +// ReadWritePRM_v1 calls ReadWritePRM_v1Func. +func (mock *Device) ReadWritePRM_v1(pRMTLV_v1 *nvml.PRMTLV_v1) nvml.Return { + if mock.ReadWritePRM_v1Func == nil { + panic("Device.ReadWritePRM_v1Func: method is nil but Device.ReadWritePRM_v1 was just called") + } + callInfo := struct { + PRMTLV_v1 *nvml.PRMTLV_v1 + }{ + PRMTLV_v1: pRMTLV_v1, + } + mock.lockReadWritePRM_v1.Lock() + mock.calls.ReadWritePRM_v1 = append(mock.calls.ReadWritePRM_v1, callInfo) + mock.lockReadWritePRM_v1.Unlock() + return mock.ReadWritePRM_v1Func(pRMTLV_v1) +} + +// ReadWritePRM_v1Calls gets all the calls that were made to ReadWritePRM_v1. +// Check the length with: +// +// len(mockedDevice.ReadWritePRM_v1Calls()) +func (mock *Device) ReadWritePRM_v1Calls() []struct { + PRMTLV_v1 *nvml.PRMTLV_v1 +} { + var calls []struct { + PRMTLV_v1 *nvml.PRMTLV_v1 + } + mock.lockReadWritePRM_v1.RLock() + calls = mock.calls.ReadWritePRM_v1 + mock.lockReadWritePRM_v1.RUnlock() + return calls +} + +// RegisterEvents calls RegisterEventsFunc. +func (mock *Device) RegisterEvents(v uint64, eventSet nvml.EventSet) nvml.Return { + if mock.RegisterEventsFunc == nil { + panic("Device.RegisterEventsFunc: method is nil but Device.RegisterEvents was just called") + } + callInfo := struct { + V uint64 + EventSet nvml.EventSet + }{ + V: v, + EventSet: eventSet, + } + mock.lockRegisterEvents.Lock() + mock.calls.RegisterEvents = append(mock.calls.RegisterEvents, callInfo) + mock.lockRegisterEvents.Unlock() + return mock.RegisterEventsFunc(v, eventSet) +} + +// RegisterEventsCalls gets all the calls that were made to RegisterEvents. +// Check the length with: +// +// len(mockedDevice.RegisterEventsCalls()) +func (mock *Device) RegisterEventsCalls() []struct { + V uint64 + EventSet nvml.EventSet +} { + var calls []struct { + V uint64 + EventSet nvml.EventSet + } + mock.lockRegisterEvents.RLock() + calls = mock.calls.RegisterEvents + mock.lockRegisterEvents.RUnlock() + return calls +} + +// ResetApplicationsClocks calls ResetApplicationsClocksFunc. +func (mock *Device) ResetApplicationsClocks() nvml.Return { + if mock.ResetApplicationsClocksFunc == nil { + panic("Device.ResetApplicationsClocksFunc: method is nil but Device.ResetApplicationsClocks was just called") + } + callInfo := struct { + }{} + mock.lockResetApplicationsClocks.Lock() + mock.calls.ResetApplicationsClocks = append(mock.calls.ResetApplicationsClocks, callInfo) + mock.lockResetApplicationsClocks.Unlock() + return mock.ResetApplicationsClocksFunc() +} + +// ResetApplicationsClocksCalls gets all the calls that were made to ResetApplicationsClocks. +// Check the length with: +// +// len(mockedDevice.ResetApplicationsClocksCalls()) +func (mock *Device) ResetApplicationsClocksCalls() []struct { +} { + var calls []struct { + } + mock.lockResetApplicationsClocks.RLock() + calls = mock.calls.ResetApplicationsClocks + mock.lockResetApplicationsClocks.RUnlock() + return calls +} + +// ResetGpuLockedClocks calls ResetGpuLockedClocksFunc. +func (mock *Device) ResetGpuLockedClocks() nvml.Return { + if mock.ResetGpuLockedClocksFunc == nil { + panic("Device.ResetGpuLockedClocksFunc: method is nil but Device.ResetGpuLockedClocks was just called") + } + callInfo := struct { + }{} + mock.lockResetGpuLockedClocks.Lock() + mock.calls.ResetGpuLockedClocks = append(mock.calls.ResetGpuLockedClocks, callInfo) + mock.lockResetGpuLockedClocks.Unlock() + return mock.ResetGpuLockedClocksFunc() +} + +// ResetGpuLockedClocksCalls gets all the calls that were made to ResetGpuLockedClocks. +// Check the length with: +// +// len(mockedDevice.ResetGpuLockedClocksCalls()) +func (mock *Device) ResetGpuLockedClocksCalls() []struct { +} { + var calls []struct { + } + mock.lockResetGpuLockedClocks.RLock() + calls = mock.calls.ResetGpuLockedClocks + mock.lockResetGpuLockedClocks.RUnlock() + return calls +} + +// ResetMemoryLockedClocks calls ResetMemoryLockedClocksFunc. +func (mock *Device) ResetMemoryLockedClocks() nvml.Return { + if mock.ResetMemoryLockedClocksFunc == nil { + panic("Device.ResetMemoryLockedClocksFunc: method is nil but Device.ResetMemoryLockedClocks was just called") + } + callInfo := struct { + }{} + mock.lockResetMemoryLockedClocks.Lock() + mock.calls.ResetMemoryLockedClocks = append(mock.calls.ResetMemoryLockedClocks, callInfo) + mock.lockResetMemoryLockedClocks.Unlock() + return mock.ResetMemoryLockedClocksFunc() +} + +// ResetMemoryLockedClocksCalls gets all the calls that were made to ResetMemoryLockedClocks. +// Check the length with: +// +// len(mockedDevice.ResetMemoryLockedClocksCalls()) +func (mock *Device) ResetMemoryLockedClocksCalls() []struct { +} { + var calls []struct { + } + mock.lockResetMemoryLockedClocks.RLock() + calls = mock.calls.ResetMemoryLockedClocks + mock.lockResetMemoryLockedClocks.RUnlock() + return calls +} + +// ResetNvLinkErrorCounters calls ResetNvLinkErrorCountersFunc. +func (mock *Device) ResetNvLinkErrorCounters(n int) nvml.Return { + if mock.ResetNvLinkErrorCountersFunc == nil { + panic("Device.ResetNvLinkErrorCountersFunc: method is nil but Device.ResetNvLinkErrorCounters was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockResetNvLinkErrorCounters.Lock() + mock.calls.ResetNvLinkErrorCounters = append(mock.calls.ResetNvLinkErrorCounters, callInfo) + mock.lockResetNvLinkErrorCounters.Unlock() + return mock.ResetNvLinkErrorCountersFunc(n) +} + +// ResetNvLinkErrorCountersCalls gets all the calls that were made to ResetNvLinkErrorCounters. +// Check the length with: +// +// len(mockedDevice.ResetNvLinkErrorCountersCalls()) +func (mock *Device) ResetNvLinkErrorCountersCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockResetNvLinkErrorCounters.RLock() + calls = mock.calls.ResetNvLinkErrorCounters + mock.lockResetNvLinkErrorCounters.RUnlock() + return calls +} + +// ResetNvLinkUtilizationCounter calls ResetNvLinkUtilizationCounterFunc. +func (mock *Device) ResetNvLinkUtilizationCounter(n1 int, n2 int) nvml.Return { + if mock.ResetNvLinkUtilizationCounterFunc == nil { + panic("Device.ResetNvLinkUtilizationCounterFunc: method is nil but Device.ResetNvLinkUtilizationCounter was just called") + } + callInfo := struct { + N1 int + N2 int + }{ + N1: n1, + N2: n2, + } + mock.lockResetNvLinkUtilizationCounter.Lock() + mock.calls.ResetNvLinkUtilizationCounter = append(mock.calls.ResetNvLinkUtilizationCounter, callInfo) + mock.lockResetNvLinkUtilizationCounter.Unlock() + return mock.ResetNvLinkUtilizationCounterFunc(n1, n2) +} + +// ResetNvLinkUtilizationCounterCalls gets all the calls that were made to ResetNvLinkUtilizationCounter. +// Check the length with: +// +// len(mockedDevice.ResetNvLinkUtilizationCounterCalls()) +func (mock *Device) ResetNvLinkUtilizationCounterCalls() []struct { + N1 int + N2 int +} { + var calls []struct { + N1 int + N2 int + } + mock.lockResetNvLinkUtilizationCounter.RLock() + calls = mock.calls.ResetNvLinkUtilizationCounter + mock.lockResetNvLinkUtilizationCounter.RUnlock() + return calls +} + +// SetAPIRestriction calls SetAPIRestrictionFunc. +func (mock *Device) SetAPIRestriction(restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return { + if mock.SetAPIRestrictionFunc == nil { + panic("Device.SetAPIRestrictionFunc: method is nil but Device.SetAPIRestriction was just called") + } + callInfo := struct { + RestrictedAPI nvml.RestrictedAPI + EnableState nvml.EnableState + }{ + RestrictedAPI: restrictedAPI, + EnableState: enableState, + } + mock.lockSetAPIRestriction.Lock() + mock.calls.SetAPIRestriction = append(mock.calls.SetAPIRestriction, callInfo) + mock.lockSetAPIRestriction.Unlock() + return mock.SetAPIRestrictionFunc(restrictedAPI, enableState) +} + +// SetAPIRestrictionCalls gets all the calls that were made to SetAPIRestriction. +// Check the length with: +// +// len(mockedDevice.SetAPIRestrictionCalls()) +func (mock *Device) SetAPIRestrictionCalls() []struct { + RestrictedAPI nvml.RestrictedAPI + EnableState nvml.EnableState +} { + var calls []struct { + RestrictedAPI nvml.RestrictedAPI + EnableState nvml.EnableState + } + mock.lockSetAPIRestriction.RLock() + calls = mock.calls.SetAPIRestriction + mock.lockSetAPIRestriction.RUnlock() + return calls +} + +// SetAccountingMode calls SetAccountingModeFunc. +func (mock *Device) SetAccountingMode(enableState nvml.EnableState) nvml.Return { + if mock.SetAccountingModeFunc == nil { + panic("Device.SetAccountingModeFunc: method is nil but Device.SetAccountingMode was just called") + } + callInfo := struct { + EnableState nvml.EnableState + }{ + EnableState: enableState, + } + mock.lockSetAccountingMode.Lock() + mock.calls.SetAccountingMode = append(mock.calls.SetAccountingMode, callInfo) + mock.lockSetAccountingMode.Unlock() + return mock.SetAccountingModeFunc(enableState) +} + +// SetAccountingModeCalls gets all the calls that were made to SetAccountingMode. +// Check the length with: +// +// len(mockedDevice.SetAccountingModeCalls()) +func (mock *Device) SetAccountingModeCalls() []struct { + EnableState nvml.EnableState +} { + var calls []struct { + EnableState nvml.EnableState + } + mock.lockSetAccountingMode.RLock() + calls = mock.calls.SetAccountingMode + mock.lockSetAccountingMode.RUnlock() + return calls +} + +// SetApplicationsClocks calls SetApplicationsClocksFunc. +func (mock *Device) SetApplicationsClocks(v1 uint32, v2 uint32) nvml.Return { + if mock.SetApplicationsClocksFunc == nil { + panic("Device.SetApplicationsClocksFunc: method is nil but Device.SetApplicationsClocks was just called") + } + callInfo := struct { + V1 uint32 + V2 uint32 + }{ + V1: v1, + V2: v2, + } + mock.lockSetApplicationsClocks.Lock() + mock.calls.SetApplicationsClocks = append(mock.calls.SetApplicationsClocks, callInfo) + mock.lockSetApplicationsClocks.Unlock() + return mock.SetApplicationsClocksFunc(v1, v2) +} + +// SetApplicationsClocksCalls gets all the calls that were made to SetApplicationsClocks. +// Check the length with: +// +// len(mockedDevice.SetApplicationsClocksCalls()) +func (mock *Device) SetApplicationsClocksCalls() []struct { + V1 uint32 + V2 uint32 +} { + var calls []struct { + V1 uint32 + V2 uint32 + } + mock.lockSetApplicationsClocks.RLock() + calls = mock.calls.SetApplicationsClocks + mock.lockSetApplicationsClocks.RUnlock() + return calls +} + +// SetAutoBoostedClocksEnabled calls SetAutoBoostedClocksEnabledFunc. +func (mock *Device) SetAutoBoostedClocksEnabled(enableState nvml.EnableState) nvml.Return { + if mock.SetAutoBoostedClocksEnabledFunc == nil { + panic("Device.SetAutoBoostedClocksEnabledFunc: method is nil but Device.SetAutoBoostedClocksEnabled was just called") + } + callInfo := struct { + EnableState nvml.EnableState + }{ + EnableState: enableState, + } + mock.lockSetAutoBoostedClocksEnabled.Lock() + mock.calls.SetAutoBoostedClocksEnabled = append(mock.calls.SetAutoBoostedClocksEnabled, callInfo) + mock.lockSetAutoBoostedClocksEnabled.Unlock() + return mock.SetAutoBoostedClocksEnabledFunc(enableState) +} + +// SetAutoBoostedClocksEnabledCalls gets all the calls that were made to SetAutoBoostedClocksEnabled. +// Check the length with: +// +// len(mockedDevice.SetAutoBoostedClocksEnabledCalls()) +func (mock *Device) SetAutoBoostedClocksEnabledCalls() []struct { + EnableState nvml.EnableState +} { + var calls []struct { + EnableState nvml.EnableState + } + mock.lockSetAutoBoostedClocksEnabled.RLock() + calls = mock.calls.SetAutoBoostedClocksEnabled + mock.lockSetAutoBoostedClocksEnabled.RUnlock() + return calls +} + +// SetClockOffsets calls SetClockOffsetsFunc. +func (mock *Device) SetClockOffsets(clockOffset nvml.ClockOffset) nvml.Return { + if mock.SetClockOffsetsFunc == nil { + panic("Device.SetClockOffsetsFunc: method is nil but Device.SetClockOffsets was just called") + } + callInfo := struct { + ClockOffset nvml.ClockOffset + }{ + ClockOffset: clockOffset, + } + mock.lockSetClockOffsets.Lock() + mock.calls.SetClockOffsets = append(mock.calls.SetClockOffsets, callInfo) + mock.lockSetClockOffsets.Unlock() + return mock.SetClockOffsetsFunc(clockOffset) +} + +// SetClockOffsetsCalls gets all the calls that were made to SetClockOffsets. +// Check the length with: +// +// len(mockedDevice.SetClockOffsetsCalls()) +func (mock *Device) SetClockOffsetsCalls() []struct { + ClockOffset nvml.ClockOffset +} { + var calls []struct { + ClockOffset nvml.ClockOffset + } + mock.lockSetClockOffsets.RLock() + calls = mock.calls.SetClockOffsets + mock.lockSetClockOffsets.RUnlock() + return calls +} + +// SetComputeMode calls SetComputeModeFunc. +func (mock *Device) SetComputeMode(computeMode nvml.ComputeMode) nvml.Return { + if mock.SetComputeModeFunc == nil { + panic("Device.SetComputeModeFunc: method is nil but Device.SetComputeMode was just called") + } + callInfo := struct { + ComputeMode nvml.ComputeMode + }{ + ComputeMode: computeMode, + } + mock.lockSetComputeMode.Lock() + mock.calls.SetComputeMode = append(mock.calls.SetComputeMode, callInfo) + mock.lockSetComputeMode.Unlock() + return mock.SetComputeModeFunc(computeMode) +} + +// SetComputeModeCalls gets all the calls that were made to SetComputeMode. +// Check the length with: +// +// len(mockedDevice.SetComputeModeCalls()) +func (mock *Device) SetComputeModeCalls() []struct { + ComputeMode nvml.ComputeMode +} { + var calls []struct { + ComputeMode nvml.ComputeMode + } + mock.lockSetComputeMode.RLock() + calls = mock.calls.SetComputeMode + mock.lockSetComputeMode.RUnlock() + return calls +} + +// SetConfComputeUnprotectedMemSize calls SetConfComputeUnprotectedMemSizeFunc. +func (mock *Device) SetConfComputeUnprotectedMemSize(v uint64) nvml.Return { + if mock.SetConfComputeUnprotectedMemSizeFunc == nil { + panic("Device.SetConfComputeUnprotectedMemSizeFunc: method is nil but Device.SetConfComputeUnprotectedMemSize was just called") + } + callInfo := struct { + V uint64 + }{ + V: v, + } + mock.lockSetConfComputeUnprotectedMemSize.Lock() + mock.calls.SetConfComputeUnprotectedMemSize = append(mock.calls.SetConfComputeUnprotectedMemSize, callInfo) + mock.lockSetConfComputeUnprotectedMemSize.Unlock() + return mock.SetConfComputeUnprotectedMemSizeFunc(v) +} + +// SetConfComputeUnprotectedMemSizeCalls gets all the calls that were made to SetConfComputeUnprotectedMemSize. +// Check the length with: +// +// len(mockedDevice.SetConfComputeUnprotectedMemSizeCalls()) +func (mock *Device) SetConfComputeUnprotectedMemSizeCalls() []struct { + V uint64 +} { + var calls []struct { + V uint64 + } + mock.lockSetConfComputeUnprotectedMemSize.RLock() + calls = mock.calls.SetConfComputeUnprotectedMemSize + mock.lockSetConfComputeUnprotectedMemSize.RUnlock() + return calls +} + +// SetCpuAffinity calls SetCpuAffinityFunc. +func (mock *Device) SetCpuAffinity() nvml.Return { + if mock.SetCpuAffinityFunc == nil { + panic("Device.SetCpuAffinityFunc: method is nil but Device.SetCpuAffinity was just called") + } + callInfo := struct { + }{} + mock.lockSetCpuAffinity.Lock() + mock.calls.SetCpuAffinity = append(mock.calls.SetCpuAffinity, callInfo) + mock.lockSetCpuAffinity.Unlock() + return mock.SetCpuAffinityFunc() +} + +// SetCpuAffinityCalls gets all the calls that were made to SetCpuAffinity. +// Check the length with: +// +// len(mockedDevice.SetCpuAffinityCalls()) +func (mock *Device) SetCpuAffinityCalls() []struct { +} { + var calls []struct { + } + mock.lockSetCpuAffinity.RLock() + calls = mock.calls.SetCpuAffinity + mock.lockSetCpuAffinity.RUnlock() + return calls +} + +// SetDefaultAutoBoostedClocksEnabled calls SetDefaultAutoBoostedClocksEnabledFunc. +func (mock *Device) SetDefaultAutoBoostedClocksEnabled(enableState nvml.EnableState, v uint32) nvml.Return { + if mock.SetDefaultAutoBoostedClocksEnabledFunc == nil { + panic("Device.SetDefaultAutoBoostedClocksEnabledFunc: method is nil but Device.SetDefaultAutoBoostedClocksEnabled was just called") + } + callInfo := struct { + EnableState nvml.EnableState + V uint32 + }{ + EnableState: enableState, + V: v, + } + mock.lockSetDefaultAutoBoostedClocksEnabled.Lock() + mock.calls.SetDefaultAutoBoostedClocksEnabled = append(mock.calls.SetDefaultAutoBoostedClocksEnabled, callInfo) + mock.lockSetDefaultAutoBoostedClocksEnabled.Unlock() + return mock.SetDefaultAutoBoostedClocksEnabledFunc(enableState, v) +} + +// SetDefaultAutoBoostedClocksEnabledCalls gets all the calls that were made to SetDefaultAutoBoostedClocksEnabled. +// Check the length with: +// +// len(mockedDevice.SetDefaultAutoBoostedClocksEnabledCalls()) +func (mock *Device) SetDefaultAutoBoostedClocksEnabledCalls() []struct { + EnableState nvml.EnableState + V uint32 +} { + var calls []struct { + EnableState nvml.EnableState + V uint32 + } + mock.lockSetDefaultAutoBoostedClocksEnabled.RLock() + calls = mock.calls.SetDefaultAutoBoostedClocksEnabled + mock.lockSetDefaultAutoBoostedClocksEnabled.RUnlock() + return calls +} + +// SetDefaultFanSpeed_v2 calls SetDefaultFanSpeed_v2Func. +func (mock *Device) SetDefaultFanSpeed_v2(n int) nvml.Return { + if mock.SetDefaultFanSpeed_v2Func == nil { + panic("Device.SetDefaultFanSpeed_v2Func: method is nil but Device.SetDefaultFanSpeed_v2 was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockSetDefaultFanSpeed_v2.Lock() + mock.calls.SetDefaultFanSpeed_v2 = append(mock.calls.SetDefaultFanSpeed_v2, callInfo) + mock.lockSetDefaultFanSpeed_v2.Unlock() + return mock.SetDefaultFanSpeed_v2Func(n) +} + +// SetDefaultFanSpeed_v2Calls gets all the calls that were made to SetDefaultFanSpeed_v2. +// Check the length with: +// +// len(mockedDevice.SetDefaultFanSpeed_v2Calls()) +func (mock *Device) SetDefaultFanSpeed_v2Calls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockSetDefaultFanSpeed_v2.RLock() + calls = mock.calls.SetDefaultFanSpeed_v2 + mock.lockSetDefaultFanSpeed_v2.RUnlock() + return calls +} + +// SetDramEncryptionMode calls SetDramEncryptionModeFunc. +func (mock *Device) SetDramEncryptionMode(dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return { + if mock.SetDramEncryptionModeFunc == nil { + panic("Device.SetDramEncryptionModeFunc: method is nil but Device.SetDramEncryptionMode was just called") + } + callInfo := struct { + DramEncryptionInfo *nvml.DramEncryptionInfo + }{ + DramEncryptionInfo: dramEncryptionInfo, + } + mock.lockSetDramEncryptionMode.Lock() + mock.calls.SetDramEncryptionMode = append(mock.calls.SetDramEncryptionMode, callInfo) + mock.lockSetDramEncryptionMode.Unlock() + return mock.SetDramEncryptionModeFunc(dramEncryptionInfo) +} + +// SetDramEncryptionModeCalls gets all the calls that were made to SetDramEncryptionMode. +// Check the length with: +// +// len(mockedDevice.SetDramEncryptionModeCalls()) +func (mock *Device) SetDramEncryptionModeCalls() []struct { + DramEncryptionInfo *nvml.DramEncryptionInfo +} { + var calls []struct { + DramEncryptionInfo *nvml.DramEncryptionInfo + } + mock.lockSetDramEncryptionMode.RLock() + calls = mock.calls.SetDramEncryptionMode + mock.lockSetDramEncryptionMode.RUnlock() + return calls +} + +// SetDriverModel calls SetDriverModelFunc. +func (mock *Device) SetDriverModel(driverModel nvml.DriverModel, v uint32) nvml.Return { + if mock.SetDriverModelFunc == nil { + panic("Device.SetDriverModelFunc: method is nil but Device.SetDriverModel was just called") + } + callInfo := struct { + DriverModel nvml.DriverModel + V uint32 + }{ + DriverModel: driverModel, + V: v, + } + mock.lockSetDriverModel.Lock() + mock.calls.SetDriverModel = append(mock.calls.SetDriverModel, callInfo) + mock.lockSetDriverModel.Unlock() + return mock.SetDriverModelFunc(driverModel, v) +} + +// SetDriverModelCalls gets all the calls that were made to SetDriverModel. +// Check the length with: +// +// len(mockedDevice.SetDriverModelCalls()) +func (mock *Device) SetDriverModelCalls() []struct { + DriverModel nvml.DriverModel + V uint32 +} { + var calls []struct { + DriverModel nvml.DriverModel + V uint32 + } + mock.lockSetDriverModel.RLock() + calls = mock.calls.SetDriverModel + mock.lockSetDriverModel.RUnlock() + return calls +} + +// SetEccMode calls SetEccModeFunc. +func (mock *Device) SetEccMode(enableState nvml.EnableState) nvml.Return { + if mock.SetEccModeFunc == nil { + panic("Device.SetEccModeFunc: method is nil but Device.SetEccMode was just called") + } + callInfo := struct { + EnableState nvml.EnableState + }{ + EnableState: enableState, + } + mock.lockSetEccMode.Lock() + mock.calls.SetEccMode = append(mock.calls.SetEccMode, callInfo) + mock.lockSetEccMode.Unlock() + return mock.SetEccModeFunc(enableState) +} + +// SetEccModeCalls gets all the calls that were made to SetEccMode. +// Check the length with: +// +// len(mockedDevice.SetEccModeCalls()) +func (mock *Device) SetEccModeCalls() []struct { + EnableState nvml.EnableState +} { + var calls []struct { + EnableState nvml.EnableState + } + mock.lockSetEccMode.RLock() + calls = mock.calls.SetEccMode + mock.lockSetEccMode.RUnlock() + return calls +} + +// SetFanControlPolicy calls SetFanControlPolicyFunc. +func (mock *Device) SetFanControlPolicy(n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return { + if mock.SetFanControlPolicyFunc == nil { + panic("Device.SetFanControlPolicyFunc: method is nil but Device.SetFanControlPolicy was just called") + } + callInfo := struct { + N int + FanControlPolicy nvml.FanControlPolicy + }{ + N: n, + FanControlPolicy: fanControlPolicy, + } + mock.lockSetFanControlPolicy.Lock() + mock.calls.SetFanControlPolicy = append(mock.calls.SetFanControlPolicy, callInfo) + mock.lockSetFanControlPolicy.Unlock() + return mock.SetFanControlPolicyFunc(n, fanControlPolicy) +} + +// SetFanControlPolicyCalls gets all the calls that were made to SetFanControlPolicy. +// Check the length with: +// +// len(mockedDevice.SetFanControlPolicyCalls()) +func (mock *Device) SetFanControlPolicyCalls() []struct { + N int + FanControlPolicy nvml.FanControlPolicy +} { + var calls []struct { + N int + FanControlPolicy nvml.FanControlPolicy + } + mock.lockSetFanControlPolicy.RLock() + calls = mock.calls.SetFanControlPolicy + mock.lockSetFanControlPolicy.RUnlock() + return calls +} + +// SetFanSpeed_v2 calls SetFanSpeed_v2Func. +func (mock *Device) SetFanSpeed_v2(n1 int, n2 int) nvml.Return { + if mock.SetFanSpeed_v2Func == nil { + panic("Device.SetFanSpeed_v2Func: method is nil but Device.SetFanSpeed_v2 was just called") + } + callInfo := struct { + N1 int + N2 int + }{ + N1: n1, + N2: n2, + } + mock.lockSetFanSpeed_v2.Lock() + mock.calls.SetFanSpeed_v2 = append(mock.calls.SetFanSpeed_v2, callInfo) + mock.lockSetFanSpeed_v2.Unlock() + return mock.SetFanSpeed_v2Func(n1, n2) +} + +// SetFanSpeed_v2Calls gets all the calls that were made to SetFanSpeed_v2. +// Check the length with: +// +// len(mockedDevice.SetFanSpeed_v2Calls()) +func (mock *Device) SetFanSpeed_v2Calls() []struct { + N1 int + N2 int +} { + var calls []struct { + N1 int + N2 int + } + mock.lockSetFanSpeed_v2.RLock() + calls = mock.calls.SetFanSpeed_v2 + mock.lockSetFanSpeed_v2.RUnlock() + return calls +} + +// SetGpcClkVfOffset calls SetGpcClkVfOffsetFunc. +func (mock *Device) SetGpcClkVfOffset(n int) nvml.Return { + if mock.SetGpcClkVfOffsetFunc == nil { + panic("Device.SetGpcClkVfOffsetFunc: method is nil but Device.SetGpcClkVfOffset was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockSetGpcClkVfOffset.Lock() + mock.calls.SetGpcClkVfOffset = append(mock.calls.SetGpcClkVfOffset, callInfo) + mock.lockSetGpcClkVfOffset.Unlock() + return mock.SetGpcClkVfOffsetFunc(n) +} + +// SetGpcClkVfOffsetCalls gets all the calls that were made to SetGpcClkVfOffset. +// Check the length with: +// +// len(mockedDevice.SetGpcClkVfOffsetCalls()) +func (mock *Device) SetGpcClkVfOffsetCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockSetGpcClkVfOffset.RLock() + calls = mock.calls.SetGpcClkVfOffset + mock.lockSetGpcClkVfOffset.RUnlock() + return calls +} + +// SetGpuLockedClocks calls SetGpuLockedClocksFunc. +func (mock *Device) SetGpuLockedClocks(v1 uint32, v2 uint32) nvml.Return { + if mock.SetGpuLockedClocksFunc == nil { + panic("Device.SetGpuLockedClocksFunc: method is nil but Device.SetGpuLockedClocks was just called") + } + callInfo := struct { + V1 uint32 + V2 uint32 + }{ + V1: v1, + V2: v2, + } + mock.lockSetGpuLockedClocks.Lock() + mock.calls.SetGpuLockedClocks = append(mock.calls.SetGpuLockedClocks, callInfo) + mock.lockSetGpuLockedClocks.Unlock() + return mock.SetGpuLockedClocksFunc(v1, v2) +} + +// SetGpuLockedClocksCalls gets all the calls that were made to SetGpuLockedClocks. +// Check the length with: +// +// len(mockedDevice.SetGpuLockedClocksCalls()) +func (mock *Device) SetGpuLockedClocksCalls() []struct { + V1 uint32 + V2 uint32 +} { + var calls []struct { + V1 uint32 + V2 uint32 + } + mock.lockSetGpuLockedClocks.RLock() + calls = mock.calls.SetGpuLockedClocks + mock.lockSetGpuLockedClocks.RUnlock() + return calls +} + +// SetGpuOperationMode calls SetGpuOperationModeFunc. +func (mock *Device) SetGpuOperationMode(gpuOperationMode nvml.GpuOperationMode) nvml.Return { + if mock.SetGpuOperationModeFunc == nil { + panic("Device.SetGpuOperationModeFunc: method is nil but Device.SetGpuOperationMode was just called") + } + callInfo := struct { + GpuOperationMode nvml.GpuOperationMode + }{ + GpuOperationMode: gpuOperationMode, + } + mock.lockSetGpuOperationMode.Lock() + mock.calls.SetGpuOperationMode = append(mock.calls.SetGpuOperationMode, callInfo) + mock.lockSetGpuOperationMode.Unlock() + return mock.SetGpuOperationModeFunc(gpuOperationMode) +} + +// SetGpuOperationModeCalls gets all the calls that were made to SetGpuOperationMode. +// Check the length with: +// +// len(mockedDevice.SetGpuOperationModeCalls()) +func (mock *Device) SetGpuOperationModeCalls() []struct { + GpuOperationMode nvml.GpuOperationMode +} { + var calls []struct { + GpuOperationMode nvml.GpuOperationMode + } + mock.lockSetGpuOperationMode.RLock() + calls = mock.calls.SetGpuOperationMode + mock.lockSetGpuOperationMode.RUnlock() + return calls +} + +// SetMemClkVfOffset calls SetMemClkVfOffsetFunc. +func (mock *Device) SetMemClkVfOffset(n int) nvml.Return { + if mock.SetMemClkVfOffsetFunc == nil { + panic("Device.SetMemClkVfOffsetFunc: method is nil but Device.SetMemClkVfOffset was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockSetMemClkVfOffset.Lock() + mock.calls.SetMemClkVfOffset = append(mock.calls.SetMemClkVfOffset, callInfo) + mock.lockSetMemClkVfOffset.Unlock() + return mock.SetMemClkVfOffsetFunc(n) +} + +// SetMemClkVfOffsetCalls gets all the calls that were made to SetMemClkVfOffset. +// Check the length with: +// +// len(mockedDevice.SetMemClkVfOffsetCalls()) +func (mock *Device) SetMemClkVfOffsetCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockSetMemClkVfOffset.RLock() + calls = mock.calls.SetMemClkVfOffset + mock.lockSetMemClkVfOffset.RUnlock() + return calls +} + +// SetMemoryLockedClocks calls SetMemoryLockedClocksFunc. +func (mock *Device) SetMemoryLockedClocks(v1 uint32, v2 uint32) nvml.Return { + if mock.SetMemoryLockedClocksFunc == nil { + panic("Device.SetMemoryLockedClocksFunc: method is nil but Device.SetMemoryLockedClocks was just called") + } + callInfo := struct { + V1 uint32 + V2 uint32 + }{ + V1: v1, + V2: v2, + } + mock.lockSetMemoryLockedClocks.Lock() + mock.calls.SetMemoryLockedClocks = append(mock.calls.SetMemoryLockedClocks, callInfo) + mock.lockSetMemoryLockedClocks.Unlock() + return mock.SetMemoryLockedClocksFunc(v1, v2) +} + +// SetMemoryLockedClocksCalls gets all the calls that were made to SetMemoryLockedClocks. +// Check the length with: +// +// len(mockedDevice.SetMemoryLockedClocksCalls()) +func (mock *Device) SetMemoryLockedClocksCalls() []struct { + V1 uint32 + V2 uint32 +} { + var calls []struct { + V1 uint32 + V2 uint32 + } + mock.lockSetMemoryLockedClocks.RLock() + calls = mock.calls.SetMemoryLockedClocks + mock.lockSetMemoryLockedClocks.RUnlock() + return calls +} + +// SetMigMode calls SetMigModeFunc. +func (mock *Device) SetMigMode(n int) (nvml.Return, nvml.Return) { + if mock.SetMigModeFunc == nil { + panic("Device.SetMigModeFunc: method is nil but Device.SetMigMode was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockSetMigMode.Lock() + mock.calls.SetMigMode = append(mock.calls.SetMigMode, callInfo) + mock.lockSetMigMode.Unlock() + return mock.SetMigModeFunc(n) +} + +// SetMigModeCalls gets all the calls that were made to SetMigMode. +// Check the length with: +// +// len(mockedDevice.SetMigModeCalls()) +func (mock *Device) SetMigModeCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockSetMigMode.RLock() + calls = mock.calls.SetMigMode + mock.lockSetMigMode.RUnlock() + return calls +} + +// SetNvLinkDeviceLowPowerThreshold calls SetNvLinkDeviceLowPowerThresholdFunc. +func (mock *Device) SetNvLinkDeviceLowPowerThreshold(nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return { + if mock.SetNvLinkDeviceLowPowerThresholdFunc == nil { + panic("Device.SetNvLinkDeviceLowPowerThresholdFunc: method is nil but Device.SetNvLinkDeviceLowPowerThreshold was just called") + } + callInfo := struct { + NvLinkPowerThres *nvml.NvLinkPowerThres + }{ + NvLinkPowerThres: nvLinkPowerThres, + } + mock.lockSetNvLinkDeviceLowPowerThreshold.Lock() + mock.calls.SetNvLinkDeviceLowPowerThreshold = append(mock.calls.SetNvLinkDeviceLowPowerThreshold, callInfo) + mock.lockSetNvLinkDeviceLowPowerThreshold.Unlock() + return mock.SetNvLinkDeviceLowPowerThresholdFunc(nvLinkPowerThres) +} + +// SetNvLinkDeviceLowPowerThresholdCalls gets all the calls that were made to SetNvLinkDeviceLowPowerThreshold. +// Check the length with: +// +// len(mockedDevice.SetNvLinkDeviceLowPowerThresholdCalls()) +func (mock *Device) SetNvLinkDeviceLowPowerThresholdCalls() []struct { + NvLinkPowerThres *nvml.NvLinkPowerThres +} { + var calls []struct { + NvLinkPowerThres *nvml.NvLinkPowerThres + } + mock.lockSetNvLinkDeviceLowPowerThreshold.RLock() + calls = mock.calls.SetNvLinkDeviceLowPowerThreshold + mock.lockSetNvLinkDeviceLowPowerThreshold.RUnlock() + return calls +} + +// SetNvLinkUtilizationControl calls SetNvLinkUtilizationControlFunc. +func (mock *Device) SetNvLinkUtilizationControl(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { + if mock.SetNvLinkUtilizationControlFunc == nil { + panic("Device.SetNvLinkUtilizationControlFunc: method is nil but Device.SetNvLinkUtilizationControl was just called") + } + callInfo := struct { + N1 int + N2 int + NvLinkUtilizationControl *nvml.NvLinkUtilizationControl + B bool + }{ + N1: n1, + N2: n2, + NvLinkUtilizationControl: nvLinkUtilizationControl, + B: b, + } + mock.lockSetNvLinkUtilizationControl.Lock() + mock.calls.SetNvLinkUtilizationControl = append(mock.calls.SetNvLinkUtilizationControl, callInfo) + mock.lockSetNvLinkUtilizationControl.Unlock() + return mock.SetNvLinkUtilizationControlFunc(n1, n2, nvLinkUtilizationControl, b) +} + +// SetNvLinkUtilizationControlCalls gets all the calls that were made to SetNvLinkUtilizationControl. +// Check the length with: +// +// len(mockedDevice.SetNvLinkUtilizationControlCalls()) +func (mock *Device) SetNvLinkUtilizationControlCalls() []struct { + N1 int + N2 int + NvLinkUtilizationControl *nvml.NvLinkUtilizationControl + B bool +} { + var calls []struct { + N1 int + N2 int + NvLinkUtilizationControl *nvml.NvLinkUtilizationControl + B bool + } + mock.lockSetNvLinkUtilizationControl.RLock() + calls = mock.calls.SetNvLinkUtilizationControl + mock.lockSetNvLinkUtilizationControl.RUnlock() + return calls +} + +// SetNvlinkBwMode calls SetNvlinkBwModeFunc. +func (mock *Device) SetNvlinkBwMode(nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { + if mock.SetNvlinkBwModeFunc == nil { + panic("Device.SetNvlinkBwModeFunc: method is nil but Device.SetNvlinkBwMode was just called") + } + callInfo := struct { + NvlinkSetBwMode *nvml.NvlinkSetBwMode + }{ + NvlinkSetBwMode: nvlinkSetBwMode, + } + mock.lockSetNvlinkBwMode.Lock() + mock.calls.SetNvlinkBwMode = append(mock.calls.SetNvlinkBwMode, callInfo) + mock.lockSetNvlinkBwMode.Unlock() + return mock.SetNvlinkBwModeFunc(nvlinkSetBwMode) +} + +// SetNvlinkBwModeCalls gets all the calls that were made to SetNvlinkBwMode. +// Check the length with: +// +// len(mockedDevice.SetNvlinkBwModeCalls()) +func (mock *Device) SetNvlinkBwModeCalls() []struct { + NvlinkSetBwMode *nvml.NvlinkSetBwMode +} { + var calls []struct { + NvlinkSetBwMode *nvml.NvlinkSetBwMode + } + mock.lockSetNvlinkBwMode.RLock() + calls = mock.calls.SetNvlinkBwMode + mock.lockSetNvlinkBwMode.RUnlock() + return calls +} + +// SetPersistenceMode calls SetPersistenceModeFunc. +func (mock *Device) SetPersistenceMode(enableState nvml.EnableState) nvml.Return { + if mock.SetPersistenceModeFunc == nil { + panic("Device.SetPersistenceModeFunc: method is nil but Device.SetPersistenceMode was just called") + } + callInfo := struct { + EnableState nvml.EnableState + }{ + EnableState: enableState, + } + mock.lockSetPersistenceMode.Lock() + mock.calls.SetPersistenceMode = append(mock.calls.SetPersistenceMode, callInfo) + mock.lockSetPersistenceMode.Unlock() + return mock.SetPersistenceModeFunc(enableState) +} + +// SetPersistenceModeCalls gets all the calls that were made to SetPersistenceMode. +// Check the length with: +// +// len(mockedDevice.SetPersistenceModeCalls()) +func (mock *Device) SetPersistenceModeCalls() []struct { + EnableState nvml.EnableState +} { + var calls []struct { + EnableState nvml.EnableState + } + mock.lockSetPersistenceMode.RLock() + calls = mock.calls.SetPersistenceMode + mock.lockSetPersistenceMode.RUnlock() + return calls +} + +// SetPowerManagementLimit calls SetPowerManagementLimitFunc. +func (mock *Device) SetPowerManagementLimit(v uint32) nvml.Return { + if mock.SetPowerManagementLimitFunc == nil { + panic("Device.SetPowerManagementLimitFunc: method is nil but Device.SetPowerManagementLimit was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockSetPowerManagementLimit.Lock() + mock.calls.SetPowerManagementLimit = append(mock.calls.SetPowerManagementLimit, callInfo) + mock.lockSetPowerManagementLimit.Unlock() + return mock.SetPowerManagementLimitFunc(v) +} + +// SetPowerManagementLimitCalls gets all the calls that were made to SetPowerManagementLimit. +// Check the length with: +// +// len(mockedDevice.SetPowerManagementLimitCalls()) +func (mock *Device) SetPowerManagementLimitCalls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockSetPowerManagementLimit.RLock() + calls = mock.calls.SetPowerManagementLimit + mock.lockSetPowerManagementLimit.RUnlock() + return calls +} + +// SetPowerManagementLimit_v2 calls SetPowerManagementLimit_v2Func. +func (mock *Device) SetPowerManagementLimit_v2(powerValue_v2 *nvml.PowerValue_v2) nvml.Return { + if mock.SetPowerManagementLimit_v2Func == nil { + panic("Device.SetPowerManagementLimit_v2Func: method is nil but Device.SetPowerManagementLimit_v2 was just called") + } + callInfo := struct { + PowerValue_v2 *nvml.PowerValue_v2 + }{ + PowerValue_v2: powerValue_v2, + } + mock.lockSetPowerManagementLimit_v2.Lock() + mock.calls.SetPowerManagementLimit_v2 = append(mock.calls.SetPowerManagementLimit_v2, callInfo) + mock.lockSetPowerManagementLimit_v2.Unlock() + return mock.SetPowerManagementLimit_v2Func(powerValue_v2) +} + +// SetPowerManagementLimit_v2Calls gets all the calls that were made to SetPowerManagementLimit_v2. +// Check the length with: +// +// len(mockedDevice.SetPowerManagementLimit_v2Calls()) +func (mock *Device) SetPowerManagementLimit_v2Calls() []struct { + PowerValue_v2 *nvml.PowerValue_v2 +} { + var calls []struct { + PowerValue_v2 *nvml.PowerValue_v2 + } + mock.lockSetPowerManagementLimit_v2.RLock() + calls = mock.calls.SetPowerManagementLimit_v2 + mock.lockSetPowerManagementLimit_v2.RUnlock() + return calls +} + +// SetTemperatureThreshold calls SetTemperatureThresholdFunc. +func (mock *Device) SetTemperatureThreshold(temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return { + if mock.SetTemperatureThresholdFunc == nil { + panic("Device.SetTemperatureThresholdFunc: method is nil but Device.SetTemperatureThreshold was just called") + } + callInfo := struct { + TemperatureThresholds nvml.TemperatureThresholds + N int + }{ + TemperatureThresholds: temperatureThresholds, + N: n, + } + mock.lockSetTemperatureThreshold.Lock() + mock.calls.SetTemperatureThreshold = append(mock.calls.SetTemperatureThreshold, callInfo) + mock.lockSetTemperatureThreshold.Unlock() + return mock.SetTemperatureThresholdFunc(temperatureThresholds, n) +} + +// SetTemperatureThresholdCalls gets all the calls that were made to SetTemperatureThreshold. +// Check the length with: +// +// len(mockedDevice.SetTemperatureThresholdCalls()) +func (mock *Device) SetTemperatureThresholdCalls() []struct { + TemperatureThresholds nvml.TemperatureThresholds + N int +} { + var calls []struct { + TemperatureThresholds nvml.TemperatureThresholds + N int + } + mock.lockSetTemperatureThreshold.RLock() + calls = mock.calls.SetTemperatureThreshold + mock.lockSetTemperatureThreshold.RUnlock() + return calls +} + +// SetVgpuCapabilities calls SetVgpuCapabilitiesFunc. +func (mock *Device) SetVgpuCapabilities(deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return { + if mock.SetVgpuCapabilitiesFunc == nil { + panic("Device.SetVgpuCapabilitiesFunc: method is nil but Device.SetVgpuCapabilities was just called") + } + callInfo := struct { + DeviceVgpuCapability nvml.DeviceVgpuCapability + EnableState nvml.EnableState + }{ + DeviceVgpuCapability: deviceVgpuCapability, + EnableState: enableState, + } + mock.lockSetVgpuCapabilities.Lock() + mock.calls.SetVgpuCapabilities = append(mock.calls.SetVgpuCapabilities, callInfo) + mock.lockSetVgpuCapabilities.Unlock() + return mock.SetVgpuCapabilitiesFunc(deviceVgpuCapability, enableState) +} + +// SetVgpuCapabilitiesCalls gets all the calls that were made to SetVgpuCapabilities. +// Check the length with: +// +// len(mockedDevice.SetVgpuCapabilitiesCalls()) +func (mock *Device) SetVgpuCapabilitiesCalls() []struct { + DeviceVgpuCapability nvml.DeviceVgpuCapability + EnableState nvml.EnableState +} { + var calls []struct { + DeviceVgpuCapability nvml.DeviceVgpuCapability + EnableState nvml.EnableState + } + mock.lockSetVgpuCapabilities.RLock() + calls = mock.calls.SetVgpuCapabilities + mock.lockSetVgpuCapabilities.RUnlock() + return calls +} + +// SetVgpuHeterogeneousMode calls SetVgpuHeterogeneousModeFunc. +func (mock *Device) SetVgpuHeterogeneousMode(vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return { + if mock.SetVgpuHeterogeneousModeFunc == nil { + panic("Device.SetVgpuHeterogeneousModeFunc: method is nil but Device.SetVgpuHeterogeneousMode was just called") + } + callInfo := struct { + VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode + }{ + VgpuHeterogeneousMode: vgpuHeterogeneousMode, + } + mock.lockSetVgpuHeterogeneousMode.Lock() + mock.calls.SetVgpuHeterogeneousMode = append(mock.calls.SetVgpuHeterogeneousMode, callInfo) + mock.lockSetVgpuHeterogeneousMode.Unlock() + return mock.SetVgpuHeterogeneousModeFunc(vgpuHeterogeneousMode) +} + +// SetVgpuHeterogeneousModeCalls gets all the calls that were made to SetVgpuHeterogeneousMode. +// Check the length with: +// +// len(mockedDevice.SetVgpuHeterogeneousModeCalls()) +func (mock *Device) SetVgpuHeterogeneousModeCalls() []struct { + VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode +} { + var calls []struct { + VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode + } + mock.lockSetVgpuHeterogeneousMode.RLock() + calls = mock.calls.SetVgpuHeterogeneousMode + mock.lockSetVgpuHeterogeneousMode.RUnlock() + return calls +} + +// SetVgpuSchedulerState calls SetVgpuSchedulerStateFunc. +func (mock *Device) SetVgpuSchedulerState(vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return { + if mock.SetVgpuSchedulerStateFunc == nil { + panic("Device.SetVgpuSchedulerStateFunc: method is nil but Device.SetVgpuSchedulerState was just called") + } + callInfo := struct { + VgpuSchedulerSetState *nvml.VgpuSchedulerSetState + }{ + VgpuSchedulerSetState: vgpuSchedulerSetState, + } + mock.lockSetVgpuSchedulerState.Lock() + mock.calls.SetVgpuSchedulerState = append(mock.calls.SetVgpuSchedulerState, callInfo) + mock.lockSetVgpuSchedulerState.Unlock() + return mock.SetVgpuSchedulerStateFunc(vgpuSchedulerSetState) +} + +// SetVgpuSchedulerStateCalls gets all the calls that were made to SetVgpuSchedulerState. +// Check the length with: +// +// len(mockedDevice.SetVgpuSchedulerStateCalls()) +func (mock *Device) SetVgpuSchedulerStateCalls() []struct { + VgpuSchedulerSetState *nvml.VgpuSchedulerSetState +} { + var calls []struct { + VgpuSchedulerSetState *nvml.VgpuSchedulerSetState + } + mock.lockSetVgpuSchedulerState.RLock() + calls = mock.calls.SetVgpuSchedulerState + mock.lockSetVgpuSchedulerState.RUnlock() + return calls +} + +// SetVirtualizationMode calls SetVirtualizationModeFunc. +func (mock *Device) SetVirtualizationMode(gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { + if mock.SetVirtualizationModeFunc == nil { + panic("Device.SetVirtualizationModeFunc: method is nil but Device.SetVirtualizationMode was just called") + } + callInfo := struct { + GpuVirtualizationMode nvml.GpuVirtualizationMode + }{ + GpuVirtualizationMode: gpuVirtualizationMode, + } + mock.lockSetVirtualizationMode.Lock() + mock.calls.SetVirtualizationMode = append(mock.calls.SetVirtualizationMode, callInfo) + mock.lockSetVirtualizationMode.Unlock() + return mock.SetVirtualizationModeFunc(gpuVirtualizationMode) +} + +// SetVirtualizationModeCalls gets all the calls that were made to SetVirtualizationMode. +// Check the length with: +// +// len(mockedDevice.SetVirtualizationModeCalls()) +func (mock *Device) SetVirtualizationModeCalls() []struct { + GpuVirtualizationMode nvml.GpuVirtualizationMode +} { + var calls []struct { + GpuVirtualizationMode nvml.GpuVirtualizationMode + } + mock.lockSetVirtualizationMode.RLock() + calls = mock.calls.SetVirtualizationMode + mock.lockSetVirtualizationMode.RUnlock() + return calls +} + +// ValidateInforom calls ValidateInforomFunc. +func (mock *Device) ValidateInforom() nvml.Return { + if mock.ValidateInforomFunc == nil { + panic("Device.ValidateInforomFunc: method is nil but Device.ValidateInforom was just called") + } + callInfo := struct { + }{} + mock.lockValidateInforom.Lock() + mock.calls.ValidateInforom = append(mock.calls.ValidateInforom, callInfo) + mock.lockValidateInforom.Unlock() + return mock.ValidateInforomFunc() +} + +// ValidateInforomCalls gets all the calls that were made to ValidateInforom. +// Check the length with: +// +// len(mockedDevice.ValidateInforomCalls()) +func (mock *Device) ValidateInforomCalls() []struct { +} { + var calls []struct { + } + mock.lockValidateInforom.RLock() + calls = mock.calls.ValidateInforom + mock.lockValidateInforom.RUnlock() + return calls +} + +// VgpuTypeGetMaxInstances calls VgpuTypeGetMaxInstancesFunc. +func (mock *Device) VgpuTypeGetMaxInstances(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { + if mock.VgpuTypeGetMaxInstancesFunc == nil { + panic("Device.VgpuTypeGetMaxInstancesFunc: method is nil but Device.VgpuTypeGetMaxInstances was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetMaxInstances.Lock() + mock.calls.VgpuTypeGetMaxInstances = append(mock.calls.VgpuTypeGetMaxInstances, callInfo) + mock.lockVgpuTypeGetMaxInstances.Unlock() + return mock.VgpuTypeGetMaxInstancesFunc(vgpuTypeId) +} + +// VgpuTypeGetMaxInstancesCalls gets all the calls that were made to VgpuTypeGetMaxInstances. +// Check the length with: +// +// len(mockedDevice.VgpuTypeGetMaxInstancesCalls()) +func (mock *Device) VgpuTypeGetMaxInstancesCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetMaxInstances.RLock() + calls = mock.calls.VgpuTypeGetMaxInstances + mock.lockVgpuTypeGetMaxInstances.RUnlock() + return calls +} + +// WorkloadPowerProfileClearRequestedProfiles calls WorkloadPowerProfileClearRequestedProfilesFunc. +func (mock *Device) WorkloadPowerProfileClearRequestedProfiles(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { + if mock.WorkloadPowerProfileClearRequestedProfilesFunc == nil { + panic("Device.WorkloadPowerProfileClearRequestedProfilesFunc: method is nil but Device.WorkloadPowerProfileClearRequestedProfiles was just called") + } + callInfo := struct { + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + }{ + WorkloadPowerProfileRequestedProfiles: workloadPowerProfileRequestedProfiles, + } + mock.lockWorkloadPowerProfileClearRequestedProfiles.Lock() + mock.calls.WorkloadPowerProfileClearRequestedProfiles = append(mock.calls.WorkloadPowerProfileClearRequestedProfiles, callInfo) + mock.lockWorkloadPowerProfileClearRequestedProfiles.Unlock() + return mock.WorkloadPowerProfileClearRequestedProfilesFunc(workloadPowerProfileRequestedProfiles) +} + +// WorkloadPowerProfileClearRequestedProfilesCalls gets all the calls that were made to WorkloadPowerProfileClearRequestedProfiles. +// Check the length with: +// +// len(mockedDevice.WorkloadPowerProfileClearRequestedProfilesCalls()) +func (mock *Device) WorkloadPowerProfileClearRequestedProfilesCalls() []struct { + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles +} { + var calls []struct { + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + mock.lockWorkloadPowerProfileClearRequestedProfiles.RLock() + calls = mock.calls.WorkloadPowerProfileClearRequestedProfiles + mock.lockWorkloadPowerProfileClearRequestedProfiles.RUnlock() + return calls +} + +// WorkloadPowerProfileGetCurrentProfiles calls WorkloadPowerProfileGetCurrentProfilesFunc. +func (mock *Device) WorkloadPowerProfileGetCurrentProfiles() (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) { + if mock.WorkloadPowerProfileGetCurrentProfilesFunc == nil { + panic("Device.WorkloadPowerProfileGetCurrentProfilesFunc: method is nil but Device.WorkloadPowerProfileGetCurrentProfiles was just called") + } + callInfo := struct { + }{} + mock.lockWorkloadPowerProfileGetCurrentProfiles.Lock() + mock.calls.WorkloadPowerProfileGetCurrentProfiles = append(mock.calls.WorkloadPowerProfileGetCurrentProfiles, callInfo) + mock.lockWorkloadPowerProfileGetCurrentProfiles.Unlock() + return mock.WorkloadPowerProfileGetCurrentProfilesFunc() +} + +// WorkloadPowerProfileGetCurrentProfilesCalls gets all the calls that were made to WorkloadPowerProfileGetCurrentProfiles. +// Check the length with: +// +// len(mockedDevice.WorkloadPowerProfileGetCurrentProfilesCalls()) +func (mock *Device) WorkloadPowerProfileGetCurrentProfilesCalls() []struct { +} { + var calls []struct { + } + mock.lockWorkloadPowerProfileGetCurrentProfiles.RLock() + calls = mock.calls.WorkloadPowerProfileGetCurrentProfiles + mock.lockWorkloadPowerProfileGetCurrentProfiles.RUnlock() + return calls +} + +// WorkloadPowerProfileGetProfilesInfo calls WorkloadPowerProfileGetProfilesInfoFunc. +func (mock *Device) WorkloadPowerProfileGetProfilesInfo() (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) { + if mock.WorkloadPowerProfileGetProfilesInfoFunc == nil { + panic("Device.WorkloadPowerProfileGetProfilesInfoFunc: method is nil but Device.WorkloadPowerProfileGetProfilesInfo was just called") + } + callInfo := struct { + }{} + mock.lockWorkloadPowerProfileGetProfilesInfo.Lock() + mock.calls.WorkloadPowerProfileGetProfilesInfo = append(mock.calls.WorkloadPowerProfileGetProfilesInfo, callInfo) + mock.lockWorkloadPowerProfileGetProfilesInfo.Unlock() + return mock.WorkloadPowerProfileGetProfilesInfoFunc() +} + +// WorkloadPowerProfileGetProfilesInfoCalls gets all the calls that were made to WorkloadPowerProfileGetProfilesInfo. +// Check the length with: +// +// len(mockedDevice.WorkloadPowerProfileGetProfilesInfoCalls()) +func (mock *Device) WorkloadPowerProfileGetProfilesInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockWorkloadPowerProfileGetProfilesInfo.RLock() + calls = mock.calls.WorkloadPowerProfileGetProfilesInfo + mock.lockWorkloadPowerProfileGetProfilesInfo.RUnlock() + return calls +} + +// WorkloadPowerProfileSetRequestedProfiles calls WorkloadPowerProfileSetRequestedProfilesFunc. +func (mock *Device) WorkloadPowerProfileSetRequestedProfiles(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { + if mock.WorkloadPowerProfileSetRequestedProfilesFunc == nil { + panic("Device.WorkloadPowerProfileSetRequestedProfilesFunc: method is nil but Device.WorkloadPowerProfileSetRequestedProfiles was just called") + } + callInfo := struct { + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + }{ + WorkloadPowerProfileRequestedProfiles: workloadPowerProfileRequestedProfiles, + } + mock.lockWorkloadPowerProfileSetRequestedProfiles.Lock() + mock.calls.WorkloadPowerProfileSetRequestedProfiles = append(mock.calls.WorkloadPowerProfileSetRequestedProfiles, callInfo) + mock.lockWorkloadPowerProfileSetRequestedProfiles.Unlock() + return mock.WorkloadPowerProfileSetRequestedProfilesFunc(workloadPowerProfileRequestedProfiles) +} + +// WorkloadPowerProfileSetRequestedProfilesCalls gets all the calls that were made to WorkloadPowerProfileSetRequestedProfiles. +// Check the length with: +// +// len(mockedDevice.WorkloadPowerProfileSetRequestedProfilesCalls()) +func (mock *Device) WorkloadPowerProfileSetRequestedProfilesCalls() []struct { + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles +} { + var calls []struct { + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + mock.lockWorkloadPowerProfileSetRequestedProfiles.RLock() + calls = mock.calls.WorkloadPowerProfileSetRequestedProfiles + mock.lockWorkloadPowerProfileSetRequestedProfiles.RUnlock() + return calls +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/dgxa100.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/dgxa100.go new file mode 100644 index 000000000..af6503702 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/dgxa100.go @@ -0,0 +1,381 @@ +/* + * Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. + * + * 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 dgxa100 + +import ( + "fmt" + "sync" + + "github.com/google/uuid" + + "github.com/NVIDIA/go-nvml/pkg/nvml" + "github.com/NVIDIA/go-nvml/pkg/nvml/mock" +) + +type Server struct { + mock.Interface + mock.ExtendedInterface + Devices [8]nvml.Device + DriverVersion string + NvmlVersion string + CudaDriverVersion int +} +type Device struct { + mock.Device + sync.RWMutex + UUID string + Name string + Brand nvml.BrandType + Architecture nvml.DeviceArchitecture + PciBusID string + Minor int + Index int + CudaComputeCapability CudaComputeCapability + MigMode int + GpuInstances map[*GpuInstance]struct{} + GpuInstanceCounter uint32 + MemoryInfo nvml.Memory +} + +type GpuInstance struct { + mock.GpuInstance + sync.RWMutex + Info nvml.GpuInstanceInfo + ComputeInstances map[*ComputeInstance]struct{} + ComputeInstanceCounter uint32 +} + +type ComputeInstance struct { + mock.ComputeInstance + Info nvml.ComputeInstanceInfo +} + +type CudaComputeCapability struct { + Major int + Minor int +} + +var _ nvml.Interface = (*Server)(nil) +var _ nvml.Device = (*Device)(nil) +var _ nvml.GpuInstance = (*GpuInstance)(nil) +var _ nvml.ComputeInstance = (*ComputeInstance)(nil) + +func New() *Server { + server := &Server{ + Devices: [8]nvml.Device{ + NewDevice(0), + NewDevice(1), + NewDevice(2), + NewDevice(3), + NewDevice(4), + NewDevice(5), + NewDevice(6), + NewDevice(7), + }, + DriverVersion: "550.54.15", + NvmlVersion: "12.550.54.15", + CudaDriverVersion: 12040, + } + server.setMockFuncs() + return server +} + +func NewDevice(index int) *Device { + device := &Device{ + UUID: "GPU-" + uuid.New().String(), + Name: "Mock NVIDIA A100-SXM4-40GB", + Brand: nvml.BRAND_NVIDIA, + Architecture: nvml.DEVICE_ARCH_AMPERE, + PciBusID: fmt.Sprintf("0000:%02x:00.0", index), + Minor: index, + Index: index, + CudaComputeCapability: CudaComputeCapability{ + Major: 8, + Minor: 0, + }, + GpuInstances: make(map[*GpuInstance]struct{}), + GpuInstanceCounter: 0, + MemoryInfo: nvml.Memory{Total: 42949672960, Free: 0, Used: 0}, + } + device.setMockFuncs() + return device +} + +func NewGpuInstance(info nvml.GpuInstanceInfo) *GpuInstance { + gi := &GpuInstance{ + Info: info, + ComputeInstances: make(map[*ComputeInstance]struct{}), + ComputeInstanceCounter: 0, + } + gi.setMockFuncs() + return gi +} + +func NewComputeInstance(info nvml.ComputeInstanceInfo) *ComputeInstance { + ci := &ComputeInstance{ + Info: info, + } + ci.setMockFuncs() + return ci +} + +func (s *Server) setMockFuncs() { + s.ExtensionsFunc = func() nvml.ExtendedInterface { + return s + } + + s.LookupSymbolFunc = func(symbol string) error { + return nil + } + + s.InitFunc = func() nvml.Return { + return nvml.SUCCESS + } + + s.ShutdownFunc = func() nvml.Return { + return nvml.SUCCESS + } + + s.SystemGetDriverVersionFunc = func() (string, nvml.Return) { + return s.DriverVersion, nvml.SUCCESS + } + + s.SystemGetNVMLVersionFunc = func() (string, nvml.Return) { + return s.NvmlVersion, nvml.SUCCESS + } + + s.SystemGetCudaDriverVersionFunc = func() (int, nvml.Return) { + return s.CudaDriverVersion, nvml.SUCCESS + } + + s.DeviceGetCountFunc = func() (int, nvml.Return) { + return len(s.Devices), nvml.SUCCESS + } + + s.DeviceGetHandleByIndexFunc = func(index int) (nvml.Device, nvml.Return) { + 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) { + for _, d := range s.Devices { + if uuid == d.(*Device).UUID { + return d, nvml.SUCCESS + } + } + return nil, nvml.ERROR_INVALID_ARGUMENT + } + + s.DeviceGetHandleByPciBusIdFunc = func(busID string) (nvml.Device, nvml.Return) { + for _, d := range s.Devices { + if busID == d.(*Device).PciBusID { + return d, nvml.SUCCESS + } + } + return nil, nvml.ERROR_INVALID_ARGUMENT + } +} + +func (d *Device) setMockFuncs() { + d.GetMinorNumberFunc = func() (int, nvml.Return) { + return d.Minor, nvml.SUCCESS + } + + d.GetIndexFunc = func() (int, nvml.Return) { + return d.Index, nvml.SUCCESS + } + + d.GetCudaComputeCapabilityFunc = func() (int, int, nvml.Return) { + return d.CudaComputeCapability.Major, d.CudaComputeCapability.Minor, nvml.SUCCESS + } + + d.GetUUIDFunc = func() (string, nvml.Return) { + return d.UUID, nvml.SUCCESS + } + + d.GetNameFunc = func() (string, nvml.Return) { + return d.Name, nvml.SUCCESS + } + + d.GetBrandFunc = func() (nvml.BrandType, nvml.Return) { + return d.Brand, nvml.SUCCESS + } + + d.GetArchitectureFunc = func() (nvml.DeviceArchitecture, nvml.Return) { + return d.Architecture, nvml.SUCCESS + } + + d.GetMemoryInfoFunc = func() (nvml.Memory, nvml.Return) { + return d.MemoryInfo, nvml.SUCCESS + } + + d.GetPciInfoFunc = func() (nvml.PciInfo, nvml.Return) { + p := nvml.PciInfo{ + PciDeviceId: 0x20B010DE, + } + return p, nvml.SUCCESS + } + + d.SetMigModeFunc = func(mode int) (nvml.Return, nvml.Return) { + d.MigMode = mode + return nvml.SUCCESS, nvml.SUCCESS + } + + d.GetMigModeFunc = func() (int, int, nvml.Return) { + return d.MigMode, d.MigMode, nvml.SUCCESS + } + + d.GetGpuInstanceProfileInfoFunc = func(giProfileId int) (nvml.GpuInstanceProfileInfo, nvml.Return) { + if giProfileId < 0 || giProfileId >= nvml.GPU_INSTANCE_PROFILE_COUNT { + return nvml.GpuInstanceProfileInfo{}, nvml.ERROR_INVALID_ARGUMENT + } + + if _, exists := MIGProfiles.GpuInstanceProfiles[giProfileId]; !exists { + return nvml.GpuInstanceProfileInfo{}, nvml.ERROR_NOT_SUPPORTED + } + + return MIGProfiles.GpuInstanceProfiles[giProfileId], nvml.SUCCESS + } + + d.GetGpuInstancePossiblePlacementsFunc = func(info *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { + return MIGPlacements.GpuInstancePossiblePlacements[int(info.Id)], nvml.SUCCESS + } + + d.CreateGpuInstanceFunc = func(info *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { + d.Lock() + defer d.Unlock() + giInfo := nvml.GpuInstanceInfo{ + Device: d, + Id: d.GpuInstanceCounter, + ProfileId: info.Id, + } + d.GpuInstanceCounter++ + gi := NewGpuInstance(giInfo) + d.GpuInstances[gi] = struct{}{} + return gi, nvml.SUCCESS + } + + d.CreateGpuInstanceWithPlacementFunc = func(info *nvml.GpuInstanceProfileInfo, placement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { + d.Lock() + defer d.Unlock() + giInfo := nvml.GpuInstanceInfo{ + Device: d, + Id: d.GpuInstanceCounter, + ProfileId: info.Id, + Placement: *placement, + } + d.GpuInstanceCounter++ + gi := NewGpuInstance(giInfo) + d.GpuInstances[gi] = struct{}{} + return gi, nvml.SUCCESS + } + + d.GetGpuInstancesFunc = func(info *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { + d.RLock() + defer d.RUnlock() + var gis []nvml.GpuInstance + for gi := range d.GpuInstances { + if gi.Info.ProfileId == info.Id { + gis = append(gis, gi) + } + } + return gis, nvml.SUCCESS + } +} + +func (gi *GpuInstance) setMockFuncs() { + gi.GetInfoFunc = func() (nvml.GpuInstanceInfo, nvml.Return) { + return gi.Info, nvml.SUCCESS + } + + gi.GetComputeInstanceProfileInfoFunc = func(ciProfileId int, ciEngProfileId int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { + if ciProfileId < 0 || ciProfileId >= nvml.COMPUTE_INSTANCE_PROFILE_COUNT { + return nvml.ComputeInstanceProfileInfo{}, nvml.ERROR_INVALID_ARGUMENT + } + + if ciEngProfileId != nvml.COMPUTE_INSTANCE_ENGINE_PROFILE_SHARED { + return nvml.ComputeInstanceProfileInfo{}, nvml.ERROR_NOT_SUPPORTED + } + + giProfileId := int(gi.Info.ProfileId) + + if _, exists := MIGProfiles.ComputeInstanceProfiles[giProfileId]; !exists { + return nvml.ComputeInstanceProfileInfo{}, nvml.ERROR_NOT_SUPPORTED + } + + if _, exists := MIGProfiles.ComputeInstanceProfiles[giProfileId][ciProfileId]; !exists { + return nvml.ComputeInstanceProfileInfo{}, nvml.ERROR_NOT_SUPPORTED + } + + return MIGProfiles.ComputeInstanceProfiles[giProfileId][ciProfileId], nvml.SUCCESS + } + + gi.GetComputeInstancePossiblePlacementsFunc = func(info *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { + return MIGPlacements.ComputeInstancePossiblePlacements[int(gi.Info.Id)][int(info.Id)], nvml.SUCCESS + } + + gi.CreateComputeInstanceFunc = func(info *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { + gi.Lock() + defer gi.Unlock() + ciInfo := nvml.ComputeInstanceInfo{ + Device: gi.Info.Device, + GpuInstance: gi, + Id: gi.ComputeInstanceCounter, + ProfileId: info.Id, + } + gi.ComputeInstanceCounter++ + ci := NewComputeInstance(ciInfo) + gi.ComputeInstances[ci] = struct{}{} + return ci, nvml.SUCCESS + } + + gi.GetComputeInstancesFunc = func(info *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { + gi.RLock() + defer gi.RUnlock() + var cis []nvml.ComputeInstance + for ci := range gi.ComputeInstances { + if ci.Info.ProfileId == info.Id { + cis = append(cis, ci) + } + } + return cis, nvml.SUCCESS + } + + gi.DestroyFunc = func() nvml.Return { + d := gi.Info.Device.(*Device) + d.Lock() + defer d.Unlock() + delete(d.GpuInstances, gi) + return nvml.SUCCESS + } +} + +func (ci *ComputeInstance) setMockFuncs() { + ci.GetInfoFunc = func() (nvml.ComputeInstanceInfo, nvml.Return) { + return ci.Info, nvml.SUCCESS + } + + ci.DestroyFunc = func() nvml.Return { + gi := ci.Info.GpuInstance.(*GpuInstance) + gi.Lock() + defer gi.Unlock() + delete(gi.ComputeInstances, ci) + return nvml.SUCCESS + } +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/mig-profile.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/mig-profile.go new file mode 100644 index 000000000..c4df4c833 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/mig-profile.go @@ -0,0 +1,471 @@ +/* + * Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. + * + * 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 dgxa100 + +import ( + "github.com/NVIDIA/go-nvml/pkg/nvml" +) + +// MIGProfiles holds the profile information for GIs and CIs in this mock server. +// We should consider auto-generating this object in the future. +var MIGProfiles = struct { + GpuInstanceProfiles map[int]nvml.GpuInstanceProfileInfo + ComputeInstanceProfiles map[int]map[int]nvml.ComputeInstanceProfileInfo +}{ + GpuInstanceProfiles: map[int]nvml.GpuInstanceProfileInfo{ + nvml.GPU_INSTANCE_PROFILE_1_SLICE: { + Id: nvml.GPU_INSTANCE_PROFILE_1_SLICE, + IsP2pSupported: 0, + SliceCount: 1, + InstanceCount: 7, + MultiprocessorCount: 14, + CopyEngineCount: 1, + DecoderCount: 0, + EncoderCount: 0, + JpegCount: 0, + OfaCount: 0, + MemorySizeMB: 4864, + }, + nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV1: { + Id: nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV1, + IsP2pSupported: 0, + SliceCount: 1, + InstanceCount: 1, + MultiprocessorCount: 14, + CopyEngineCount: 1, + DecoderCount: 1, + EncoderCount: 0, + JpegCount: 1, + OfaCount: 1, + MemorySizeMB: 4864, + }, + nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV2: { + Id: nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV2, + IsP2pSupported: 0, + SliceCount: 1, + InstanceCount: 4, + MultiprocessorCount: 14, + CopyEngineCount: 1, + DecoderCount: 1, + EncoderCount: 0, + JpegCount: 0, + OfaCount: 0, + MemorySizeMB: 9856, + }, + nvml.GPU_INSTANCE_PROFILE_2_SLICE: { + Id: nvml.GPU_INSTANCE_PROFILE_2_SLICE, + IsP2pSupported: 0, + SliceCount: 2, + InstanceCount: 3, + MultiprocessorCount: 28, + CopyEngineCount: 2, + DecoderCount: 1, + EncoderCount: 0, + JpegCount: 0, + OfaCount: 0, + MemorySizeMB: 9856, + }, + nvml.GPU_INSTANCE_PROFILE_3_SLICE: { + Id: nvml.GPU_INSTANCE_PROFILE_3_SLICE, + IsP2pSupported: 0, + SliceCount: 3, + InstanceCount: 2, + MultiprocessorCount: 42, + CopyEngineCount: 3, + DecoderCount: 2, + EncoderCount: 0, + JpegCount: 0, + OfaCount: 0, + MemorySizeMB: 19968, + }, + nvml.GPU_INSTANCE_PROFILE_4_SLICE: { + Id: nvml.GPU_INSTANCE_PROFILE_4_SLICE, + IsP2pSupported: 0, + SliceCount: 4, + InstanceCount: 1, + MultiprocessorCount: 56, + CopyEngineCount: 4, + DecoderCount: 2, + EncoderCount: 0, + JpegCount: 0, + OfaCount: 0, + MemorySizeMB: 19968, + }, + nvml.GPU_INSTANCE_PROFILE_7_SLICE: { + Id: nvml.GPU_INSTANCE_PROFILE_7_SLICE, + IsP2pSupported: 0, + SliceCount: 7, + InstanceCount: 1, + MultiprocessorCount: 98, + CopyEngineCount: 7, + DecoderCount: 5, + EncoderCount: 0, + JpegCount: 1, + OfaCount: 1, + MemorySizeMB: 40192, + }, + }, + ComputeInstanceProfiles: map[int]map[int]nvml.ComputeInstanceProfileInfo{ + nvml.GPU_INSTANCE_PROFILE_1_SLICE: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, + SliceCount: 1, + InstanceCount: 1, + MultiprocessorCount: 14, + SharedCopyEngineCount: 1, + SharedDecoderCount: 0, + SharedEncoderCount: 0, + SharedJpegCount: 0, + SharedOfaCount: 0, + }, + }, + nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV1: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, + SliceCount: 1, + InstanceCount: 1, + MultiprocessorCount: 14, + SharedCopyEngineCount: 1, + SharedDecoderCount: 1, + SharedEncoderCount: 0, + SharedJpegCount: 1, + SharedOfaCount: 1, + }, + }, + nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV2: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, + SliceCount: 1, + InstanceCount: 1, + MultiprocessorCount: 14, + SharedCopyEngineCount: 1, + SharedDecoderCount: 1, + SharedEncoderCount: 0, + SharedJpegCount: 0, + SharedOfaCount: 0, + }, + }, + nvml.GPU_INSTANCE_PROFILE_2_SLICE: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, + SliceCount: 1, + InstanceCount: 2, + MultiprocessorCount: 14, + SharedCopyEngineCount: 2, + SharedDecoderCount: 1, + SharedEncoderCount: 0, + SharedJpegCount: 0, + SharedOfaCount: 0, + }, + nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE, + SliceCount: 2, + InstanceCount: 1, + MultiprocessorCount: 28, + SharedCopyEngineCount: 2, + SharedDecoderCount: 1, + SharedEncoderCount: 0, + SharedJpegCount: 0, + SharedOfaCount: 0, + }, + }, + nvml.GPU_INSTANCE_PROFILE_3_SLICE: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, + SliceCount: 1, + InstanceCount: 3, + MultiprocessorCount: 14, + SharedCopyEngineCount: 3, + SharedDecoderCount: 2, + SharedEncoderCount: 0, + SharedJpegCount: 0, + SharedOfaCount: 0, + }, + nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE, + SliceCount: 2, + InstanceCount: 1, + MultiprocessorCount: 28, + SharedCopyEngineCount: 3, + SharedDecoderCount: 2, + SharedEncoderCount: 0, + SharedJpegCount: 0, + SharedOfaCount: 0, + }, + nvml.COMPUTE_INSTANCE_PROFILE_3_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_3_SLICE, + SliceCount: 3, + InstanceCount: 1, + MultiprocessorCount: 42, + SharedCopyEngineCount: 3, + SharedDecoderCount: 2, + SharedEncoderCount: 0, + SharedJpegCount: 0, + SharedOfaCount: 0, + }, + }, + nvml.GPU_INSTANCE_PROFILE_4_SLICE: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, + SliceCount: 1, + InstanceCount: 4, + MultiprocessorCount: 14, + SharedCopyEngineCount: 4, + SharedDecoderCount: 2, + SharedEncoderCount: 0, + SharedJpegCount: 0, + SharedOfaCount: 0, + }, + nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE, + SliceCount: 2, + InstanceCount: 2, + MultiprocessorCount: 28, + SharedCopyEngineCount: 4, + SharedDecoderCount: 2, + SharedEncoderCount: 0, + SharedJpegCount: 0, + SharedOfaCount: 0, + }, + nvml.COMPUTE_INSTANCE_PROFILE_4_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_4_SLICE, + SliceCount: 4, + InstanceCount: 1, + MultiprocessorCount: 56, + SharedCopyEngineCount: 4, + SharedDecoderCount: 2, + SharedEncoderCount: 0, + SharedJpegCount: 0, + SharedOfaCount: 0, + }, + }, + nvml.GPU_INSTANCE_PROFILE_7_SLICE: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, + SliceCount: 1, + InstanceCount: 7, + MultiprocessorCount: 14, + SharedCopyEngineCount: 7, + SharedDecoderCount: 5, + SharedEncoderCount: 0, + SharedJpegCount: 1, + SharedOfaCount: 1, + }, + nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE, + SliceCount: 2, + InstanceCount: 3, + MultiprocessorCount: 28, + SharedCopyEngineCount: 7, + SharedDecoderCount: 5, + SharedEncoderCount: 0, + SharedJpegCount: 1, + SharedOfaCount: 1, + }, + nvml.COMPUTE_INSTANCE_PROFILE_3_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_3_SLICE, + SliceCount: 3, + InstanceCount: 2, + MultiprocessorCount: 42, + SharedCopyEngineCount: 7, + SharedDecoderCount: 5, + SharedEncoderCount: 0, + SharedJpegCount: 1, + SharedOfaCount: 1, + }, + nvml.COMPUTE_INSTANCE_PROFILE_4_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_4_SLICE, + SliceCount: 4, + InstanceCount: 1, + MultiprocessorCount: 56, + SharedCopyEngineCount: 7, + SharedDecoderCount: 5, + SharedEncoderCount: 0, + SharedJpegCount: 1, + SharedOfaCount: 1, + }, + nvml.COMPUTE_INSTANCE_PROFILE_7_SLICE: { + Id: nvml.COMPUTE_INSTANCE_PROFILE_7_SLICE, + SliceCount: 7, + InstanceCount: 1, + MultiprocessorCount: 98, + SharedCopyEngineCount: 7, + SharedDecoderCount: 5, + SharedEncoderCount: 0, + SharedJpegCount: 1, + SharedOfaCount: 1, + }, + }, + }, +} + +// MIGPlacements holds the placement information for GIs and CIs in this mock server. +// We should consider auto-generating this object in the future. +var MIGPlacements = struct { + GpuInstancePossiblePlacements map[int][]nvml.GpuInstancePlacement + ComputeInstancePossiblePlacements map[int]map[int][]nvml.ComputeInstancePlacement +}{ + GpuInstancePossiblePlacements: map[int][]nvml.GpuInstancePlacement{ + nvml.GPU_INSTANCE_PROFILE_1_SLICE: { + { + Start: 0, + Size: 1, + }, + { + Start: 1, + Size: 1, + }, + { + Start: 2, + Size: 1, + }, + { + Start: 3, + Size: 1, + }, + { + Start: 4, + Size: 1, + }, + { + Start: 5, + Size: 1, + }, + { + Start: 6, + Size: 1, + }, + }, + nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV1: { + { + Start: 0, + Size: 1, + }, + { + Start: 1, + Size: 1, + }, + { + Start: 2, + Size: 1, + }, + { + Start: 3, + Size: 1, + }, + { + Start: 4, + Size: 1, + }, + { + Start: 5, + Size: 1, + }, + { + Start: 6, + Size: 1, + }, + }, + nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV2: { + { + Start: 0, + Size: 2, + }, + { + Start: 2, + Size: 2, + }, + { + Start: 4, + Size: 2, + }, + { + Start: 6, + Size: 2, + }, + }, + nvml.GPU_INSTANCE_PROFILE_2_SLICE: { + { + Start: 0, + Size: 2, + }, + { + Start: 2, + Size: 2, + }, + { + Start: 4, + Size: 2, + }, + }, + nvml.GPU_INSTANCE_PROFILE_3_SLICE: { + { + Start: 0, + Size: 4, + }, + { + Start: 4, + Size: 4, + }, + }, + nvml.GPU_INSTANCE_PROFILE_4_SLICE: { + { + Start: 0, + Size: 4, + }, + }, + nvml.GPU_INSTANCE_PROFILE_7_SLICE: { + { + Start: 0, + Size: 8, + }, + }, + }, + // TODO: Fill out ComputeInstancePossiblePlacements + ComputeInstancePossiblePlacements: map[int]map[int][]nvml.ComputeInstancePlacement{ + nvml.GPU_INSTANCE_PROFILE_1_SLICE: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, + }, + nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV1: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, + }, + nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV2: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, + }, + nvml.GPU_INSTANCE_PROFILE_2_SLICE: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, + nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: {}, + }, + nvml.GPU_INSTANCE_PROFILE_3_SLICE: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, + nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: {}, + nvml.COMPUTE_INSTANCE_PROFILE_3_SLICE: {}, + }, + nvml.GPU_INSTANCE_PROFILE_4_SLICE: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, + nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: {}, + nvml.COMPUTE_INSTANCE_PROFILE_4_SLICE: {}, + }, + nvml.GPU_INSTANCE_PROFILE_7_SLICE: { + nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, + nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: {}, + nvml.COMPUTE_INSTANCE_PROFILE_3_SLICE: {}, + nvml.COMPUTE_INSTANCE_PROFILE_4_SLICE: {}, + nvml.COMPUTE_INSTANCE_PROFILE_7_SLICE: {}, + }, + }, +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/eventset.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/eventset.go new file mode 100644 index 000000000..d452c4d42 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/eventset.go @@ -0,0 +1,112 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package mock + +import ( + "github.com/NVIDIA/go-nvml/pkg/nvml" + "sync" +) + +// Ensure, that EventSet does implement nvml.EventSet. +// If this is not the case, regenerate this file with moq. +var _ nvml.EventSet = &EventSet{} + +// EventSet is a mock implementation of nvml.EventSet. +// +// func TestSomethingThatUsesEventSet(t *testing.T) { +// +// // make and configure a mocked nvml.EventSet +// mockedEventSet := &EventSet{ +// FreeFunc: func() nvml.Return { +// panic("mock out the Free method") +// }, +// WaitFunc: func(v uint32) (nvml.EventData, nvml.Return) { +// panic("mock out the Wait method") +// }, +// } +// +// // use mockedEventSet in code that requires nvml.EventSet +// // and then make assertions. +// +// } +type EventSet struct { + // FreeFunc mocks the Free method. + FreeFunc func() nvml.Return + + // WaitFunc mocks the Wait method. + WaitFunc func(v uint32) (nvml.EventData, nvml.Return) + + // calls tracks calls to the methods. + calls struct { + // Free holds details about calls to the Free method. + Free []struct { + } + // Wait holds details about calls to the Wait method. + Wait []struct { + // V is the v argument value. + V uint32 + } + } + lockFree sync.RWMutex + lockWait sync.RWMutex +} + +// Free calls FreeFunc. +func (mock *EventSet) Free() nvml.Return { + if mock.FreeFunc == nil { + panic("EventSet.FreeFunc: method is nil but EventSet.Free was just called") + } + callInfo := struct { + }{} + mock.lockFree.Lock() + mock.calls.Free = append(mock.calls.Free, callInfo) + mock.lockFree.Unlock() + return mock.FreeFunc() +} + +// FreeCalls gets all the calls that were made to Free. +// Check the length with: +// +// len(mockedEventSet.FreeCalls()) +func (mock *EventSet) FreeCalls() []struct { +} { + var calls []struct { + } + mock.lockFree.RLock() + calls = mock.calls.Free + mock.lockFree.RUnlock() + return calls +} + +// Wait calls WaitFunc. +func (mock *EventSet) Wait(v uint32) (nvml.EventData, nvml.Return) { + if mock.WaitFunc == nil { + panic("EventSet.WaitFunc: method is nil but EventSet.Wait was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockWait.Lock() + mock.calls.Wait = append(mock.calls.Wait, callInfo) + mock.lockWait.Unlock() + return mock.WaitFunc(v) +} + +// WaitCalls gets all the calls that were made to Wait. +// Check the length with: +// +// len(mockedEventSet.WaitCalls()) +func (mock *EventSet) WaitCalls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockWait.RLock() + calls = mock.calls.Wait + mock.lockWait.RUnlock() + return calls +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/extendedinterface.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/extendedinterface.go new file mode 100644 index 000000000..71634bfd0 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/extendedinterface.go @@ -0,0 +1,75 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package mock + +import ( + "github.com/NVIDIA/go-nvml/pkg/nvml" + "sync" +) + +// Ensure, that ExtendedInterface does implement nvml.ExtendedInterface. +// If this is not the case, regenerate this file with moq. +var _ nvml.ExtendedInterface = &ExtendedInterface{} + +// ExtendedInterface is a mock implementation of nvml.ExtendedInterface. +// +// func TestSomethingThatUsesExtendedInterface(t *testing.T) { +// +// // make and configure a mocked nvml.ExtendedInterface +// mockedExtendedInterface := &ExtendedInterface{ +// LookupSymbolFunc: func(s string) error { +// panic("mock out the LookupSymbol method") +// }, +// } +// +// // use mockedExtendedInterface in code that requires nvml.ExtendedInterface +// // and then make assertions. +// +// } +type ExtendedInterface struct { + // LookupSymbolFunc mocks the LookupSymbol method. + LookupSymbolFunc func(s string) error + + // calls tracks calls to the methods. + calls struct { + // LookupSymbol holds details about calls to the LookupSymbol method. + LookupSymbol []struct { + // S is the s argument value. + S string + } + } + lockLookupSymbol sync.RWMutex +} + +// LookupSymbol calls LookupSymbolFunc. +func (mock *ExtendedInterface) LookupSymbol(s string) error { + if mock.LookupSymbolFunc == nil { + panic("ExtendedInterface.LookupSymbolFunc: method is nil but ExtendedInterface.LookupSymbol was just called") + } + callInfo := struct { + S string + }{ + S: s, + } + mock.lockLookupSymbol.Lock() + mock.calls.LookupSymbol = append(mock.calls.LookupSymbol, callInfo) + mock.lockLookupSymbol.Unlock() + return mock.LookupSymbolFunc(s) +} + +// LookupSymbolCalls gets all the calls that were made to LookupSymbol. +// Check the length with: +// +// len(mockedExtendedInterface.LookupSymbolCalls()) +func (mock *ExtendedInterface) LookupSymbolCalls() []struct { + S string +} { + var calls []struct { + S string + } + mock.lockLookupSymbol.RLock() + calls = mock.calls.LookupSymbol + mock.lockLookupSymbol.RUnlock() + return calls +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpmsample.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpmsample.go new file mode 100644 index 000000000..1023c3443 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpmsample.go @@ -0,0 +1,162 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package mock + +import ( + "github.com/NVIDIA/go-nvml/pkg/nvml" + "sync" +) + +// Ensure, that GpmSample does implement nvml.GpmSample. +// If this is not the case, regenerate this file with moq. +var _ nvml.GpmSample = &GpmSample{} + +// GpmSample is a mock implementation of nvml.GpmSample. +// +// func TestSomethingThatUsesGpmSample(t *testing.T) { +// +// // make and configure a mocked nvml.GpmSample +// mockedGpmSample := &GpmSample{ +// FreeFunc: func() nvml.Return { +// panic("mock out the Free method") +// }, +// GetFunc: func(device nvml.Device) nvml.Return { +// panic("mock out the Get method") +// }, +// MigGetFunc: func(device nvml.Device, n int) nvml.Return { +// panic("mock out the MigGet method") +// }, +// } +// +// // use mockedGpmSample in code that requires nvml.GpmSample +// // and then make assertions. +// +// } +type GpmSample struct { + // FreeFunc mocks the Free method. + FreeFunc func() nvml.Return + + // GetFunc mocks the Get method. + GetFunc func(device nvml.Device) nvml.Return + + // MigGetFunc mocks the MigGet method. + MigGetFunc func(device nvml.Device, n int) nvml.Return + + // calls tracks calls to the methods. + calls struct { + // Free holds details about calls to the Free method. + Free []struct { + } + // Get holds details about calls to the Get method. + Get []struct { + // Device is the device argument value. + Device nvml.Device + } + // MigGet holds details about calls to the MigGet method. + MigGet []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + } + lockFree sync.RWMutex + lockGet sync.RWMutex + lockMigGet sync.RWMutex +} + +// Free calls FreeFunc. +func (mock *GpmSample) Free() nvml.Return { + if mock.FreeFunc == nil { + panic("GpmSample.FreeFunc: method is nil but GpmSample.Free was just called") + } + callInfo := struct { + }{} + mock.lockFree.Lock() + mock.calls.Free = append(mock.calls.Free, callInfo) + mock.lockFree.Unlock() + return mock.FreeFunc() +} + +// FreeCalls gets all the calls that were made to Free. +// Check the length with: +// +// len(mockedGpmSample.FreeCalls()) +func (mock *GpmSample) FreeCalls() []struct { +} { + var calls []struct { + } + mock.lockFree.RLock() + calls = mock.calls.Free + mock.lockFree.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *GpmSample) Get(device nvml.Device) nvml.Return { + if mock.GetFunc == nil { + panic("GpmSample.GetFunc: method is nil but GpmSample.Get was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + mock.lockGet.Unlock() + return mock.GetFunc(device) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// +// len(mockedGpmSample.GetCalls()) +func (mock *GpmSample) GetCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockGet.RLock() + calls = mock.calls.Get + mock.lockGet.RUnlock() + return calls +} + +// MigGet calls MigGetFunc. +func (mock *GpmSample) MigGet(device nvml.Device, n int) nvml.Return { + if mock.MigGetFunc == nil { + panic("GpmSample.MigGetFunc: method is nil but GpmSample.MigGet was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockMigGet.Lock() + mock.calls.MigGet = append(mock.calls.MigGet, callInfo) + mock.lockMigGet.Unlock() + return mock.MigGetFunc(device, n) +} + +// MigGetCalls gets all the calls that were made to MigGet. +// Check the length with: +// +// len(mockedGpmSample.MigGetCalls()) +func (mock *GpmSample) MigGetCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockMigGet.RLock() + calls = mock.calls.MigGet + mock.lockMigGet.RUnlock() + return calls +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpuinstance.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpuinstance.go new file mode 100644 index 000000000..d05bc3487 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpuinstance.go @@ -0,0 +1,785 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package mock + +import ( + "github.com/NVIDIA/go-nvml/pkg/nvml" + "sync" +) + +// Ensure, that GpuInstance does implement nvml.GpuInstance. +// If this is not the case, regenerate this file with moq. +var _ nvml.GpuInstance = &GpuInstance{} + +// GpuInstance is a mock implementation of nvml.GpuInstance. +// +// func TestSomethingThatUsesGpuInstance(t *testing.T) { +// +// // make and configure a mocked nvml.GpuInstance +// mockedGpuInstance := &GpuInstance{ +// CreateComputeInstanceFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { +// panic("mock out the CreateComputeInstance method") +// }, +// CreateComputeInstanceWithPlacementFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) { +// panic("mock out the CreateComputeInstanceWithPlacement method") +// }, +// DestroyFunc: func() nvml.Return { +// panic("mock out the Destroy method") +// }, +// GetActiveVgpusFunc: func() (nvml.ActiveVgpuInstanceInfo, nvml.Return) { +// panic("mock out the GetActiveVgpus method") +// }, +// GetComputeInstanceByIdFunc: func(n int) (nvml.ComputeInstance, nvml.Return) { +// panic("mock out the GetComputeInstanceById method") +// }, +// GetComputeInstancePossiblePlacementsFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { +// panic("mock out the GetComputeInstancePossiblePlacements method") +// }, +// GetComputeInstanceProfileInfoFunc: func(n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { +// 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) { +// panic("mock out the GetComputeInstanceRemainingCapacity method") +// }, +// GetComputeInstancesFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { +// panic("mock out the GetComputeInstances method") +// }, +// GetCreatableVgpusFunc: func() (nvml.VgpuTypeIdInfo, nvml.Return) { +// panic("mock out the GetCreatableVgpus method") +// }, +// GetInfoFunc: func() (nvml.GpuInstanceInfo, nvml.Return) { +// panic("mock out the GetInfo method") +// }, +// GetVgpuHeterogeneousModeFunc: func() (nvml.VgpuHeterogeneousMode, nvml.Return) { +// panic("mock out the GetVgpuHeterogeneousMode method") +// }, +// GetVgpuSchedulerLogFunc: func() (nvml.VgpuSchedulerLogInfo, nvml.Return) { +// panic("mock out the GetVgpuSchedulerLog method") +// }, +// GetVgpuSchedulerStateFunc: func() (nvml.VgpuSchedulerStateInfo, nvml.Return) { +// panic("mock out the GetVgpuSchedulerState method") +// }, +// GetVgpuTypeCreatablePlacementsFunc: func() (nvml.VgpuCreatablePlacementInfo, nvml.Return) { +// panic("mock out the GetVgpuTypeCreatablePlacements method") +// }, +// SetVgpuHeterogeneousModeFunc: func(vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return { +// panic("mock out the SetVgpuHeterogeneousMode method") +// }, +// SetVgpuSchedulerStateFunc: func(vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return { +// panic("mock out the SetVgpuSchedulerState method") +// }, +// } +// +// // use mockedGpuInstance in code that requires nvml.GpuInstance +// // and then make assertions. +// +// } +type GpuInstance struct { + // CreateComputeInstanceFunc mocks the CreateComputeInstance method. + CreateComputeInstanceFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) + + // CreateComputeInstanceWithPlacementFunc mocks the CreateComputeInstanceWithPlacement method. + CreateComputeInstanceWithPlacementFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) + + // DestroyFunc mocks the Destroy method. + DestroyFunc func() nvml.Return + + // GetActiveVgpusFunc mocks the GetActiveVgpus method. + GetActiveVgpusFunc func() (nvml.ActiveVgpuInstanceInfo, nvml.Return) + + // GetComputeInstanceByIdFunc mocks the GetComputeInstanceById method. + GetComputeInstanceByIdFunc func(n int) (nvml.ComputeInstance, nvml.Return) + + // GetComputeInstancePossiblePlacementsFunc mocks the GetComputeInstancePossiblePlacements method. + GetComputeInstancePossiblePlacementsFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) + + // GetComputeInstanceProfileInfoFunc mocks the GetComputeInstanceProfileInfo method. + GetComputeInstanceProfileInfoFunc func(n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) + + // 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) + + // GetComputeInstancesFunc mocks the GetComputeInstances method. + GetComputeInstancesFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) + + // GetCreatableVgpusFunc mocks the GetCreatableVgpus method. + GetCreatableVgpusFunc func() (nvml.VgpuTypeIdInfo, nvml.Return) + + // GetInfoFunc mocks the GetInfo method. + GetInfoFunc func() (nvml.GpuInstanceInfo, nvml.Return) + + // GetVgpuHeterogeneousModeFunc mocks the GetVgpuHeterogeneousMode method. + GetVgpuHeterogeneousModeFunc func() (nvml.VgpuHeterogeneousMode, nvml.Return) + + // GetVgpuSchedulerLogFunc mocks the GetVgpuSchedulerLog method. + GetVgpuSchedulerLogFunc func() (nvml.VgpuSchedulerLogInfo, nvml.Return) + + // GetVgpuSchedulerStateFunc mocks the GetVgpuSchedulerState method. + GetVgpuSchedulerStateFunc func() (nvml.VgpuSchedulerStateInfo, nvml.Return) + + // GetVgpuTypeCreatablePlacementsFunc mocks the GetVgpuTypeCreatablePlacements method. + GetVgpuTypeCreatablePlacementsFunc func() (nvml.VgpuCreatablePlacementInfo, nvml.Return) + + // SetVgpuHeterogeneousModeFunc mocks the SetVgpuHeterogeneousMode method. + SetVgpuHeterogeneousModeFunc func(vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return + + // SetVgpuSchedulerStateFunc mocks the SetVgpuSchedulerState method. + SetVgpuSchedulerStateFunc func(vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return + + // calls tracks calls to the methods. + calls struct { + // CreateComputeInstance holds details about calls to the CreateComputeInstance method. + CreateComputeInstance []struct { + // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + // CreateComputeInstanceWithPlacement holds details about calls to the CreateComputeInstanceWithPlacement method. + CreateComputeInstanceWithPlacement []struct { + // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + // ComputeInstancePlacement is the computeInstancePlacement argument value. + ComputeInstancePlacement *nvml.ComputeInstancePlacement + } + // Destroy holds details about calls to the Destroy method. + Destroy []struct { + } + // GetActiveVgpus holds details about calls to the GetActiveVgpus method. + GetActiveVgpus []struct { + } + // GetComputeInstanceById holds details about calls to the GetComputeInstanceById method. + GetComputeInstanceById []struct { + // N is the n argument value. + N int + } + // GetComputeInstancePossiblePlacements holds details about calls to the GetComputeInstancePossiblePlacements method. + GetComputeInstancePossiblePlacements []struct { + // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + // GetComputeInstanceProfileInfo holds details about calls to the GetComputeInstanceProfileInfo method. + GetComputeInstanceProfileInfo []struct { + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } + // GetComputeInstanceProfileInfoV holds details about calls to the GetComputeInstanceProfileInfoV method. + GetComputeInstanceProfileInfoV []struct { + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } + // GetComputeInstanceRemainingCapacity holds details about calls to the GetComputeInstanceRemainingCapacity method. + GetComputeInstanceRemainingCapacity []struct { + // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + // GetComputeInstances holds details about calls to the GetComputeInstances method. + GetComputeInstances []struct { + // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + // GetCreatableVgpus holds details about calls to the GetCreatableVgpus method. + GetCreatableVgpus []struct { + } + // GetInfo holds details about calls to the GetInfo method. + GetInfo []struct { + } + // GetVgpuHeterogeneousMode holds details about calls to the GetVgpuHeterogeneousMode method. + GetVgpuHeterogeneousMode []struct { + } + // GetVgpuSchedulerLog holds details about calls to the GetVgpuSchedulerLog method. + GetVgpuSchedulerLog []struct { + } + // GetVgpuSchedulerState holds details about calls to the GetVgpuSchedulerState method. + GetVgpuSchedulerState []struct { + } + // GetVgpuTypeCreatablePlacements holds details about calls to the GetVgpuTypeCreatablePlacements method. + GetVgpuTypeCreatablePlacements []struct { + } + // SetVgpuHeterogeneousMode holds details about calls to the SetVgpuHeterogeneousMode method. + SetVgpuHeterogeneousMode []struct { + // VgpuHeterogeneousMode is the vgpuHeterogeneousMode argument value. + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode + } + // SetVgpuSchedulerState holds details about calls to the SetVgpuSchedulerState method. + SetVgpuSchedulerState []struct { + // VgpuSchedulerState is the vgpuSchedulerState argument value. + VgpuSchedulerState *nvml.VgpuSchedulerState + } + } + lockCreateComputeInstance sync.RWMutex + lockCreateComputeInstanceWithPlacement sync.RWMutex + lockDestroy sync.RWMutex + lockGetActiveVgpus sync.RWMutex + lockGetComputeInstanceById sync.RWMutex + lockGetComputeInstancePossiblePlacements sync.RWMutex + lockGetComputeInstanceProfileInfo sync.RWMutex + lockGetComputeInstanceProfileInfoV sync.RWMutex + lockGetComputeInstanceRemainingCapacity sync.RWMutex + lockGetComputeInstances sync.RWMutex + lockGetCreatableVgpus sync.RWMutex + lockGetInfo sync.RWMutex + lockGetVgpuHeterogeneousMode sync.RWMutex + lockGetVgpuSchedulerLog sync.RWMutex + lockGetVgpuSchedulerState sync.RWMutex + lockGetVgpuTypeCreatablePlacements sync.RWMutex + lockSetVgpuHeterogeneousMode sync.RWMutex + lockSetVgpuSchedulerState sync.RWMutex +} + +// CreateComputeInstance calls CreateComputeInstanceFunc. +func (mock *GpuInstance) CreateComputeInstance(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { + if mock.CreateComputeInstanceFunc == nil { + panic("GpuInstance.CreateComputeInstanceFunc: method is nil but GpuInstance.CreateComputeInstance was just called") + } + callInfo := struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + }{ + ComputeInstanceProfileInfo: computeInstanceProfileInfo, + } + mock.lockCreateComputeInstance.Lock() + mock.calls.CreateComputeInstance = append(mock.calls.CreateComputeInstance, callInfo) + mock.lockCreateComputeInstance.Unlock() + return mock.CreateComputeInstanceFunc(computeInstanceProfileInfo) +} + +// CreateComputeInstanceCalls gets all the calls that were made to CreateComputeInstance. +// Check the length with: +// +// len(mockedGpuInstance.CreateComputeInstanceCalls()) +func (mock *GpuInstance) CreateComputeInstanceCalls() []struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo +} { + var calls []struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + mock.lockCreateComputeInstance.RLock() + calls = mock.calls.CreateComputeInstance + mock.lockCreateComputeInstance.RUnlock() + return calls +} + +// CreateComputeInstanceWithPlacement calls CreateComputeInstanceWithPlacementFunc. +func (mock *GpuInstance) CreateComputeInstanceWithPlacement(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) { + if mock.CreateComputeInstanceWithPlacementFunc == nil { + panic("GpuInstance.CreateComputeInstanceWithPlacementFunc: method is nil but GpuInstance.CreateComputeInstanceWithPlacement was just called") + } + callInfo := struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + ComputeInstancePlacement *nvml.ComputeInstancePlacement + }{ + ComputeInstanceProfileInfo: computeInstanceProfileInfo, + ComputeInstancePlacement: computeInstancePlacement, + } + mock.lockCreateComputeInstanceWithPlacement.Lock() + mock.calls.CreateComputeInstanceWithPlacement = append(mock.calls.CreateComputeInstanceWithPlacement, callInfo) + mock.lockCreateComputeInstanceWithPlacement.Unlock() + return mock.CreateComputeInstanceWithPlacementFunc(computeInstanceProfileInfo, computeInstancePlacement) +} + +// CreateComputeInstanceWithPlacementCalls gets all the calls that were made to CreateComputeInstanceWithPlacement. +// Check the length with: +// +// len(mockedGpuInstance.CreateComputeInstanceWithPlacementCalls()) +func (mock *GpuInstance) CreateComputeInstanceWithPlacementCalls() []struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + ComputeInstancePlacement *nvml.ComputeInstancePlacement +} { + var calls []struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + ComputeInstancePlacement *nvml.ComputeInstancePlacement + } + mock.lockCreateComputeInstanceWithPlacement.RLock() + calls = mock.calls.CreateComputeInstanceWithPlacement + mock.lockCreateComputeInstanceWithPlacement.RUnlock() + return calls +} + +// Destroy calls DestroyFunc. +func (mock *GpuInstance) Destroy() nvml.Return { + if mock.DestroyFunc == nil { + panic("GpuInstance.DestroyFunc: method is nil but GpuInstance.Destroy was just called") + } + callInfo := struct { + }{} + mock.lockDestroy.Lock() + mock.calls.Destroy = append(mock.calls.Destroy, callInfo) + mock.lockDestroy.Unlock() + return mock.DestroyFunc() +} + +// DestroyCalls gets all the calls that were made to Destroy. +// Check the length with: +// +// len(mockedGpuInstance.DestroyCalls()) +func (mock *GpuInstance) DestroyCalls() []struct { +} { + var calls []struct { + } + mock.lockDestroy.RLock() + calls = mock.calls.Destroy + mock.lockDestroy.RUnlock() + return calls +} + +// GetActiveVgpus calls GetActiveVgpusFunc. +func (mock *GpuInstance) GetActiveVgpus() (nvml.ActiveVgpuInstanceInfo, nvml.Return) { + if mock.GetActiveVgpusFunc == nil { + panic("GpuInstance.GetActiveVgpusFunc: method is nil but GpuInstance.GetActiveVgpus was just called") + } + callInfo := struct { + }{} + mock.lockGetActiveVgpus.Lock() + mock.calls.GetActiveVgpus = append(mock.calls.GetActiveVgpus, callInfo) + mock.lockGetActiveVgpus.Unlock() + return mock.GetActiveVgpusFunc() +} + +// GetActiveVgpusCalls gets all the calls that were made to GetActiveVgpus. +// Check the length with: +// +// len(mockedGpuInstance.GetActiveVgpusCalls()) +func (mock *GpuInstance) GetActiveVgpusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetActiveVgpus.RLock() + calls = mock.calls.GetActiveVgpus + mock.lockGetActiveVgpus.RUnlock() + return calls +} + +// GetComputeInstanceById calls GetComputeInstanceByIdFunc. +func (mock *GpuInstance) GetComputeInstanceById(n int) (nvml.ComputeInstance, nvml.Return) { + if mock.GetComputeInstanceByIdFunc == nil { + panic("GpuInstance.GetComputeInstanceByIdFunc: method is nil but GpuInstance.GetComputeInstanceById was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetComputeInstanceById.Lock() + mock.calls.GetComputeInstanceById = append(mock.calls.GetComputeInstanceById, callInfo) + mock.lockGetComputeInstanceById.Unlock() + return mock.GetComputeInstanceByIdFunc(n) +} + +// GetComputeInstanceByIdCalls gets all the calls that were made to GetComputeInstanceById. +// Check the length with: +// +// len(mockedGpuInstance.GetComputeInstanceByIdCalls()) +func (mock *GpuInstance) GetComputeInstanceByIdCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetComputeInstanceById.RLock() + calls = mock.calls.GetComputeInstanceById + mock.lockGetComputeInstanceById.RUnlock() + return calls +} + +// GetComputeInstancePossiblePlacements calls GetComputeInstancePossiblePlacementsFunc. +func (mock *GpuInstance) GetComputeInstancePossiblePlacements(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { + if mock.GetComputeInstancePossiblePlacementsFunc == nil { + panic("GpuInstance.GetComputeInstancePossiblePlacementsFunc: method is nil but GpuInstance.GetComputeInstancePossiblePlacements was just called") + } + callInfo := struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + }{ + ComputeInstanceProfileInfo: computeInstanceProfileInfo, + } + mock.lockGetComputeInstancePossiblePlacements.Lock() + mock.calls.GetComputeInstancePossiblePlacements = append(mock.calls.GetComputeInstancePossiblePlacements, callInfo) + mock.lockGetComputeInstancePossiblePlacements.Unlock() + return mock.GetComputeInstancePossiblePlacementsFunc(computeInstanceProfileInfo) +} + +// GetComputeInstancePossiblePlacementsCalls gets all the calls that were made to GetComputeInstancePossiblePlacements. +// Check the length with: +// +// len(mockedGpuInstance.GetComputeInstancePossiblePlacementsCalls()) +func (mock *GpuInstance) GetComputeInstancePossiblePlacementsCalls() []struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo +} { + var calls []struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + mock.lockGetComputeInstancePossiblePlacements.RLock() + calls = mock.calls.GetComputeInstancePossiblePlacements + mock.lockGetComputeInstancePossiblePlacements.RUnlock() + return calls +} + +// GetComputeInstanceProfileInfo calls GetComputeInstanceProfileInfoFunc. +func (mock *GpuInstance) GetComputeInstanceProfileInfo(n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { + if mock.GetComputeInstanceProfileInfoFunc == nil { + panic("GpuInstance.GetComputeInstanceProfileInfoFunc: method is nil but GpuInstance.GetComputeInstanceProfileInfo was just called") + } + callInfo := struct { + N1 int + N2 int + }{ + N1: n1, + N2: n2, + } + mock.lockGetComputeInstanceProfileInfo.Lock() + mock.calls.GetComputeInstanceProfileInfo = append(mock.calls.GetComputeInstanceProfileInfo, callInfo) + mock.lockGetComputeInstanceProfileInfo.Unlock() + return mock.GetComputeInstanceProfileInfoFunc(n1, n2) +} + +// GetComputeInstanceProfileInfoCalls gets all the calls that were made to GetComputeInstanceProfileInfo. +// Check the length with: +// +// len(mockedGpuInstance.GetComputeInstanceProfileInfoCalls()) +func (mock *GpuInstance) GetComputeInstanceProfileInfoCalls() []struct { + N1 int + N2 int +} { + var calls []struct { + N1 int + N2 int + } + mock.lockGetComputeInstanceProfileInfo.RLock() + calls = mock.calls.GetComputeInstanceProfileInfo + mock.lockGetComputeInstanceProfileInfo.RUnlock() + return calls +} + +// GetComputeInstanceProfileInfoV calls GetComputeInstanceProfileInfoVFunc. +func (mock *GpuInstance) GetComputeInstanceProfileInfoV(n1 int, n2 int) nvml.ComputeInstanceProfileInfoHandler { + if mock.GetComputeInstanceProfileInfoVFunc == nil { + panic("GpuInstance.GetComputeInstanceProfileInfoVFunc: method is nil but GpuInstance.GetComputeInstanceProfileInfoV was just called") + } + callInfo := struct { + N1 int + N2 int + }{ + N1: n1, + N2: n2, + } + mock.lockGetComputeInstanceProfileInfoV.Lock() + mock.calls.GetComputeInstanceProfileInfoV = append(mock.calls.GetComputeInstanceProfileInfoV, callInfo) + mock.lockGetComputeInstanceProfileInfoV.Unlock() + return mock.GetComputeInstanceProfileInfoVFunc(n1, n2) +} + +// GetComputeInstanceProfileInfoVCalls gets all the calls that were made to GetComputeInstanceProfileInfoV. +// Check the length with: +// +// len(mockedGpuInstance.GetComputeInstanceProfileInfoVCalls()) +func (mock *GpuInstance) GetComputeInstanceProfileInfoVCalls() []struct { + N1 int + N2 int +} { + var calls []struct { + N1 int + N2 int + } + mock.lockGetComputeInstanceProfileInfoV.RLock() + calls = mock.calls.GetComputeInstanceProfileInfoV + mock.lockGetComputeInstanceProfileInfoV.RUnlock() + return calls +} + +// GetComputeInstanceRemainingCapacity calls GetComputeInstanceRemainingCapacityFunc. +func (mock *GpuInstance) GetComputeInstanceRemainingCapacity(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, nvml.Return) { + if mock.GetComputeInstanceRemainingCapacityFunc == nil { + panic("GpuInstance.GetComputeInstanceRemainingCapacityFunc: method is nil but GpuInstance.GetComputeInstanceRemainingCapacity was just called") + } + callInfo := struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + }{ + ComputeInstanceProfileInfo: computeInstanceProfileInfo, + } + mock.lockGetComputeInstanceRemainingCapacity.Lock() + mock.calls.GetComputeInstanceRemainingCapacity = append(mock.calls.GetComputeInstanceRemainingCapacity, callInfo) + mock.lockGetComputeInstanceRemainingCapacity.Unlock() + return mock.GetComputeInstanceRemainingCapacityFunc(computeInstanceProfileInfo) +} + +// GetComputeInstanceRemainingCapacityCalls gets all the calls that were made to GetComputeInstanceRemainingCapacity. +// Check the length with: +// +// len(mockedGpuInstance.GetComputeInstanceRemainingCapacityCalls()) +func (mock *GpuInstance) GetComputeInstanceRemainingCapacityCalls() []struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo +} { + var calls []struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + mock.lockGetComputeInstanceRemainingCapacity.RLock() + calls = mock.calls.GetComputeInstanceRemainingCapacity + mock.lockGetComputeInstanceRemainingCapacity.RUnlock() + return calls +} + +// GetComputeInstances calls GetComputeInstancesFunc. +func (mock *GpuInstance) GetComputeInstances(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { + if mock.GetComputeInstancesFunc == nil { + panic("GpuInstance.GetComputeInstancesFunc: method is nil but GpuInstance.GetComputeInstances was just called") + } + callInfo := struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + }{ + ComputeInstanceProfileInfo: computeInstanceProfileInfo, + } + mock.lockGetComputeInstances.Lock() + mock.calls.GetComputeInstances = append(mock.calls.GetComputeInstances, callInfo) + mock.lockGetComputeInstances.Unlock() + return mock.GetComputeInstancesFunc(computeInstanceProfileInfo) +} + +// GetComputeInstancesCalls gets all the calls that were made to GetComputeInstances. +// Check the length with: +// +// len(mockedGpuInstance.GetComputeInstancesCalls()) +func (mock *GpuInstance) GetComputeInstancesCalls() []struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo +} { + var calls []struct { + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + mock.lockGetComputeInstances.RLock() + calls = mock.calls.GetComputeInstances + mock.lockGetComputeInstances.RUnlock() + return calls +} + +// GetCreatableVgpus calls GetCreatableVgpusFunc. +func (mock *GpuInstance) GetCreatableVgpus() (nvml.VgpuTypeIdInfo, nvml.Return) { + if mock.GetCreatableVgpusFunc == nil { + panic("GpuInstance.GetCreatableVgpusFunc: method is nil but GpuInstance.GetCreatableVgpus was just called") + } + callInfo := struct { + }{} + mock.lockGetCreatableVgpus.Lock() + mock.calls.GetCreatableVgpus = append(mock.calls.GetCreatableVgpus, callInfo) + mock.lockGetCreatableVgpus.Unlock() + return mock.GetCreatableVgpusFunc() +} + +// GetCreatableVgpusCalls gets all the calls that were made to GetCreatableVgpus. +// Check the length with: +// +// len(mockedGpuInstance.GetCreatableVgpusCalls()) +func (mock *GpuInstance) GetCreatableVgpusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetCreatableVgpus.RLock() + calls = mock.calls.GetCreatableVgpus + mock.lockGetCreatableVgpus.RUnlock() + return calls +} + +// GetInfo calls GetInfoFunc. +func (mock *GpuInstance) GetInfo() (nvml.GpuInstanceInfo, nvml.Return) { + if mock.GetInfoFunc == nil { + panic("GpuInstance.GetInfoFunc: method is nil but GpuInstance.GetInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetInfo.Lock() + mock.calls.GetInfo = append(mock.calls.GetInfo, callInfo) + mock.lockGetInfo.Unlock() + return mock.GetInfoFunc() +} + +// GetInfoCalls gets all the calls that were made to GetInfo. +// Check the length with: +// +// len(mockedGpuInstance.GetInfoCalls()) +func (mock *GpuInstance) GetInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetInfo.RLock() + calls = mock.calls.GetInfo + mock.lockGetInfo.RUnlock() + return calls +} + +// GetVgpuHeterogeneousMode calls GetVgpuHeterogeneousModeFunc. +func (mock *GpuInstance) GetVgpuHeterogeneousMode() (nvml.VgpuHeterogeneousMode, nvml.Return) { + if mock.GetVgpuHeterogeneousModeFunc == nil { + panic("GpuInstance.GetVgpuHeterogeneousModeFunc: method is nil but GpuInstance.GetVgpuHeterogeneousMode was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuHeterogeneousMode.Lock() + mock.calls.GetVgpuHeterogeneousMode = append(mock.calls.GetVgpuHeterogeneousMode, callInfo) + mock.lockGetVgpuHeterogeneousMode.Unlock() + return mock.GetVgpuHeterogeneousModeFunc() +} + +// GetVgpuHeterogeneousModeCalls gets all the calls that were made to GetVgpuHeterogeneousMode. +// Check the length with: +// +// len(mockedGpuInstance.GetVgpuHeterogeneousModeCalls()) +func (mock *GpuInstance) GetVgpuHeterogeneousModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuHeterogeneousMode.RLock() + calls = mock.calls.GetVgpuHeterogeneousMode + mock.lockGetVgpuHeterogeneousMode.RUnlock() + return calls +} + +// GetVgpuSchedulerLog calls GetVgpuSchedulerLogFunc. +func (mock *GpuInstance) GetVgpuSchedulerLog() (nvml.VgpuSchedulerLogInfo, nvml.Return) { + if mock.GetVgpuSchedulerLogFunc == nil { + panic("GpuInstance.GetVgpuSchedulerLogFunc: method is nil but GpuInstance.GetVgpuSchedulerLog was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuSchedulerLog.Lock() + mock.calls.GetVgpuSchedulerLog = append(mock.calls.GetVgpuSchedulerLog, callInfo) + mock.lockGetVgpuSchedulerLog.Unlock() + return mock.GetVgpuSchedulerLogFunc() +} + +// GetVgpuSchedulerLogCalls gets all the calls that were made to GetVgpuSchedulerLog. +// Check the length with: +// +// len(mockedGpuInstance.GetVgpuSchedulerLogCalls()) +func (mock *GpuInstance) GetVgpuSchedulerLogCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuSchedulerLog.RLock() + calls = mock.calls.GetVgpuSchedulerLog + mock.lockGetVgpuSchedulerLog.RUnlock() + return calls +} + +// GetVgpuSchedulerState calls GetVgpuSchedulerStateFunc. +func (mock *GpuInstance) GetVgpuSchedulerState() (nvml.VgpuSchedulerStateInfo, nvml.Return) { + if mock.GetVgpuSchedulerStateFunc == nil { + panic("GpuInstance.GetVgpuSchedulerStateFunc: method is nil but GpuInstance.GetVgpuSchedulerState was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuSchedulerState.Lock() + mock.calls.GetVgpuSchedulerState = append(mock.calls.GetVgpuSchedulerState, callInfo) + mock.lockGetVgpuSchedulerState.Unlock() + return mock.GetVgpuSchedulerStateFunc() +} + +// GetVgpuSchedulerStateCalls gets all the calls that were made to GetVgpuSchedulerState. +// Check the length with: +// +// len(mockedGpuInstance.GetVgpuSchedulerStateCalls()) +func (mock *GpuInstance) GetVgpuSchedulerStateCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuSchedulerState.RLock() + calls = mock.calls.GetVgpuSchedulerState + mock.lockGetVgpuSchedulerState.RUnlock() + return calls +} + +// GetVgpuTypeCreatablePlacements calls GetVgpuTypeCreatablePlacementsFunc. +func (mock *GpuInstance) GetVgpuTypeCreatablePlacements() (nvml.VgpuCreatablePlacementInfo, nvml.Return) { + if mock.GetVgpuTypeCreatablePlacementsFunc == nil { + panic("GpuInstance.GetVgpuTypeCreatablePlacementsFunc: method is nil but GpuInstance.GetVgpuTypeCreatablePlacements was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuTypeCreatablePlacements.Lock() + mock.calls.GetVgpuTypeCreatablePlacements = append(mock.calls.GetVgpuTypeCreatablePlacements, callInfo) + mock.lockGetVgpuTypeCreatablePlacements.Unlock() + return mock.GetVgpuTypeCreatablePlacementsFunc() +} + +// GetVgpuTypeCreatablePlacementsCalls gets all the calls that were made to GetVgpuTypeCreatablePlacements. +// Check the length with: +// +// len(mockedGpuInstance.GetVgpuTypeCreatablePlacementsCalls()) +func (mock *GpuInstance) GetVgpuTypeCreatablePlacementsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuTypeCreatablePlacements.RLock() + calls = mock.calls.GetVgpuTypeCreatablePlacements + mock.lockGetVgpuTypeCreatablePlacements.RUnlock() + return calls +} + +// SetVgpuHeterogeneousMode calls SetVgpuHeterogeneousModeFunc. +func (mock *GpuInstance) SetVgpuHeterogeneousMode(vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return { + if mock.SetVgpuHeterogeneousModeFunc == nil { + panic("GpuInstance.SetVgpuHeterogeneousModeFunc: method is nil but GpuInstance.SetVgpuHeterogeneousMode was just called") + } + callInfo := struct { + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode + }{ + VgpuHeterogeneousMode: vgpuHeterogeneousMode, + } + mock.lockSetVgpuHeterogeneousMode.Lock() + mock.calls.SetVgpuHeterogeneousMode = append(mock.calls.SetVgpuHeterogeneousMode, callInfo) + mock.lockSetVgpuHeterogeneousMode.Unlock() + return mock.SetVgpuHeterogeneousModeFunc(vgpuHeterogeneousMode) +} + +// SetVgpuHeterogeneousModeCalls gets all the calls that were made to SetVgpuHeterogeneousMode. +// Check the length with: +// +// len(mockedGpuInstance.SetVgpuHeterogeneousModeCalls()) +func (mock *GpuInstance) SetVgpuHeterogeneousModeCalls() []struct { + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode +} { + var calls []struct { + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode + } + mock.lockSetVgpuHeterogeneousMode.RLock() + calls = mock.calls.SetVgpuHeterogeneousMode + mock.lockSetVgpuHeterogeneousMode.RUnlock() + return calls +} + +// SetVgpuSchedulerState calls SetVgpuSchedulerStateFunc. +func (mock *GpuInstance) SetVgpuSchedulerState(vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return { + if mock.SetVgpuSchedulerStateFunc == nil { + panic("GpuInstance.SetVgpuSchedulerStateFunc: method is nil but GpuInstance.SetVgpuSchedulerState was just called") + } + callInfo := struct { + VgpuSchedulerState *nvml.VgpuSchedulerState + }{ + VgpuSchedulerState: vgpuSchedulerState, + } + mock.lockSetVgpuSchedulerState.Lock() + mock.calls.SetVgpuSchedulerState = append(mock.calls.SetVgpuSchedulerState, callInfo) + mock.lockSetVgpuSchedulerState.Unlock() + return mock.SetVgpuSchedulerStateFunc(vgpuSchedulerState) +} + +// SetVgpuSchedulerStateCalls gets all the calls that were made to SetVgpuSchedulerState. +// Check the length with: +// +// len(mockedGpuInstance.SetVgpuSchedulerStateCalls()) +func (mock *GpuInstance) SetVgpuSchedulerStateCalls() []struct { + VgpuSchedulerState *nvml.VgpuSchedulerState +} { + var calls []struct { + VgpuSchedulerState *nvml.VgpuSchedulerState + } + mock.lockSetVgpuSchedulerState.RLock() + calls = mock.calls.SetVgpuSchedulerState + mock.lockSetVgpuSchedulerState.RUnlock() + return calls +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go new file mode 100644 index 000000000..dc25ce219 --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go @@ -0,0 +1,17317 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package mock + +import ( + "github.com/NVIDIA/go-nvml/pkg/nvml" + "sync" +) + +// Ensure, that Interface does implement nvml.Interface. +// If this is not the case, regenerate this file with moq. +var _ nvml.Interface = &Interface{} + +// Interface is a mock implementation of nvml.Interface. +// +// func TestSomethingThatUsesInterface(t *testing.T) { +// +// // make and configure a mocked nvml.Interface +// mockedInterface := &Interface{ +// ComputeInstanceDestroyFunc: func(computeInstance nvml.ComputeInstance) nvml.Return { +// panic("mock out the ComputeInstanceDestroy method") +// }, +// ComputeInstanceGetInfoFunc: func(computeInstance nvml.ComputeInstance) (nvml.ComputeInstanceInfo, nvml.Return) { +// panic("mock out the ComputeInstanceGetInfo method") +// }, +// DeviceClearAccountingPidsFunc: func(device nvml.Device) nvml.Return { +// panic("mock out the DeviceClearAccountingPids method") +// }, +// DeviceClearCpuAffinityFunc: func(device nvml.Device) nvml.Return { +// panic("mock out the DeviceClearCpuAffinity method") +// }, +// DeviceClearEccErrorCountsFunc: func(device nvml.Device, eccCounterType nvml.EccCounterType) nvml.Return { +// panic("mock out the DeviceClearEccErrorCounts method") +// }, +// DeviceClearFieldValuesFunc: func(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return { +// panic("mock out the DeviceClearFieldValues method") +// }, +// DeviceCreateGpuInstanceFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { +// panic("mock out the DeviceCreateGpuInstance method") +// }, +// DeviceCreateGpuInstanceWithPlacementFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { +// panic("mock out the DeviceCreateGpuInstanceWithPlacement method") +// }, +// DeviceDiscoverGpusFunc: func() (nvml.PciInfo, nvml.Return) { +// panic("mock out the DeviceDiscoverGpus method") +// }, +// DeviceFreezeNvLinkUtilizationCounterFunc: func(device nvml.Device, n1 int, n2 int, enableState nvml.EnableState) nvml.Return { +// panic("mock out the DeviceFreezeNvLinkUtilizationCounter method") +// }, +// DeviceGetAPIRestrictionFunc: func(device nvml.Device, restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) { +// panic("mock out the DeviceGetAPIRestriction method") +// }, +// DeviceGetAccountingBufferSizeFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetAccountingBufferSize method") +// }, +// DeviceGetAccountingModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// panic("mock out the DeviceGetAccountingMode method") +// }, +// DeviceGetAccountingPidsFunc: func(device nvml.Device) ([]int, nvml.Return) { +// panic("mock out the DeviceGetAccountingPids method") +// }, +// DeviceGetAccountingStatsFunc: func(device nvml.Device, v uint32) (nvml.AccountingStats, nvml.Return) { +// panic("mock out the DeviceGetAccountingStats method") +// }, +// DeviceGetActiveVgpusFunc: func(device nvml.Device) ([]nvml.VgpuInstance, nvml.Return) { +// panic("mock out the DeviceGetActiveVgpus method") +// }, +// DeviceGetAdaptiveClockInfoStatusFunc: func(device nvml.Device) (uint32, nvml.Return) { +// panic("mock out the DeviceGetAdaptiveClockInfoStatus method") +// }, +// DeviceGetAddressingModeFunc: func(device nvml.Device) (nvml.DeviceAddressingMode, nvml.Return) { +// panic("mock out the DeviceGetAddressingMode method") +// }, +// DeviceGetApplicationsClockFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +// panic("mock out the DeviceGetApplicationsClock method") +// }, +// DeviceGetArchitectureFunc: func(device nvml.Device) (nvml.DeviceArchitecture, nvml.Return) { +// panic("mock out the DeviceGetArchitecture method") +// }, +// DeviceGetAttributesFunc: func(device nvml.Device) (nvml.DeviceAttributes, nvml.Return) { +// panic("mock out the DeviceGetAttributes method") +// }, +// DeviceGetAutoBoostedClocksEnabledFunc: func(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) { +// panic("mock out the DeviceGetAutoBoostedClocksEnabled method") +// }, +// DeviceGetBAR1MemoryInfoFunc: func(device nvml.Device) (nvml.BAR1Memory, nvml.Return) { +// panic("mock out the DeviceGetBAR1MemoryInfo method") +// }, +// DeviceGetBoardIdFunc: func(device nvml.Device) (uint32, nvml.Return) { +// panic("mock out the DeviceGetBoardId method") +// }, +// DeviceGetBoardPartNumberFunc: func(device nvml.Device) (string, nvml.Return) { +// panic("mock out the DeviceGetBoardPartNumber method") +// }, +// DeviceGetBrandFunc: func(device nvml.Device) (nvml.BrandType, nvml.Return) { +// panic("mock out the DeviceGetBrand method") +// }, +// DeviceGetBridgeChipInfoFunc: func(device nvml.Device) (nvml.BridgeChipHierarchy, nvml.Return) { +// panic("mock out the DeviceGetBridgeChipInfo method") +// }, +// DeviceGetBusTypeFunc: func(device nvml.Device) (nvml.BusType, nvml.Return) { +// panic("mock out the DeviceGetBusType method") +// }, +// DeviceGetC2cModeInfoVFunc: func(device nvml.Device) nvml.C2cModeInfoHandler { +// panic("mock out the DeviceGetC2cModeInfoV method") +// }, +// DeviceGetCapabilitiesFunc: func(device nvml.Device) (nvml.DeviceCapabilities, nvml.Return) { +// panic("mock out the DeviceGetCapabilities method") +// }, +// DeviceGetClkMonStatusFunc: func(device nvml.Device) (nvml.ClkMonStatus, nvml.Return) { +// panic("mock out the DeviceGetClkMonStatus method") +// }, +// DeviceGetClockFunc: func(device nvml.Device, clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) { +// panic("mock out the DeviceGetClock method") +// }, +// DeviceGetClockInfoFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +// panic("mock out the DeviceGetClockInfo method") +// }, +// DeviceGetClockOffsetsFunc: func(device nvml.Device) (nvml.ClockOffset, nvml.Return) { +// panic("mock out the DeviceGetClockOffsets method") +// }, +// DeviceGetComputeInstanceIdFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetComputeInstanceId method") +// }, +// DeviceGetComputeModeFunc: func(device nvml.Device) (nvml.ComputeMode, nvml.Return) { +// panic("mock out the DeviceGetComputeMode method") +// }, +// DeviceGetComputeRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { +// panic("mock out the DeviceGetComputeRunningProcesses method") +// }, +// DeviceGetConfComputeGpuAttestationReportFunc: func(device nvml.Device, confComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport) nvml.Return { +// panic("mock out the DeviceGetConfComputeGpuAttestationReport method") +// }, +// DeviceGetConfComputeGpuCertificateFunc: func(device nvml.Device) (nvml.ConfComputeGpuCertificate, nvml.Return) { +// panic("mock out the DeviceGetConfComputeGpuCertificate method") +// }, +// DeviceGetConfComputeMemSizeInfoFunc: func(device nvml.Device) (nvml.ConfComputeMemSizeInfo, nvml.Return) { +// panic("mock out the DeviceGetConfComputeMemSizeInfo method") +// }, +// DeviceGetConfComputeProtectedMemoryUsageFunc: func(device nvml.Device) (nvml.Memory, nvml.Return) { +// panic("mock out the DeviceGetConfComputeProtectedMemoryUsage method") +// }, +// DeviceGetCoolerInfoFunc: func(device nvml.Device) (nvml.CoolerInfo, nvml.Return) { +// panic("mock out the DeviceGetCoolerInfo method") +// }, +// DeviceGetCountFunc: func() (int, nvml.Return) { +// panic("mock out the DeviceGetCount method") +// }, +// DeviceGetCpuAffinityFunc: func(device nvml.Device, n int) ([]uint, nvml.Return) { +// panic("mock out the DeviceGetCpuAffinity method") +// }, +// DeviceGetCpuAffinityWithinScopeFunc: func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { +// panic("mock out the DeviceGetCpuAffinityWithinScope method") +// }, +// DeviceGetCreatableVgpusFunc: func(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) { +// panic("mock out the DeviceGetCreatableVgpus method") +// }, +// DeviceGetCudaComputeCapabilityFunc: func(device nvml.Device) (int, int, nvml.Return) { +// panic("mock out the DeviceGetCudaComputeCapability method") +// }, +// DeviceGetCurrPcieLinkGenerationFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetCurrPcieLinkGeneration method") +// }, +// DeviceGetCurrPcieLinkWidthFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetCurrPcieLinkWidth method") +// }, +// DeviceGetCurrentClockFreqsFunc: func(device nvml.Device) (nvml.DeviceCurrentClockFreqs, nvml.Return) { +// panic("mock out the DeviceGetCurrentClockFreqs method") +// }, +// DeviceGetCurrentClocksEventReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { +// panic("mock out the DeviceGetCurrentClocksEventReasons method") +// }, +// DeviceGetCurrentClocksThrottleReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { +// panic("mock out the DeviceGetCurrentClocksThrottleReasons method") +// }, +// DeviceGetDecoderUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { +// panic("mock out the DeviceGetDecoderUtilization method") +// }, +// DeviceGetDefaultApplicationsClockFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +// panic("mock out the DeviceGetDefaultApplicationsClock method") +// }, +// DeviceGetDefaultEccModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// panic("mock out the DeviceGetDefaultEccMode method") +// }, +// DeviceGetDetailedEccErrorsFunc: func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) { +// panic("mock out the DeviceGetDetailedEccErrors method") +// }, +// DeviceGetDeviceHandleFromMigDeviceHandleFunc: func(device nvml.Device) (nvml.Device, nvml.Return) { +// panic("mock out the DeviceGetDeviceHandleFromMigDeviceHandle method") +// }, +// DeviceGetDisplayActiveFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// panic("mock out the DeviceGetDisplayActive method") +// }, +// DeviceGetDisplayModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// panic("mock out the DeviceGetDisplayMode method") +// }, +// DeviceGetDramEncryptionModeFunc: func(device nvml.Device) (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) { +// panic("mock out the DeviceGetDramEncryptionMode method") +// }, +// DeviceGetDriverModelFunc: func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { +// panic("mock out the DeviceGetDriverModel method") +// }, +// DeviceGetDriverModel_v2Func: func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { +// panic("mock out the DeviceGetDriverModel_v2 method") +// }, +// DeviceGetDynamicPstatesInfoFunc: func(device nvml.Device) (nvml.GpuDynamicPstatesInfo, nvml.Return) { +// panic("mock out the DeviceGetDynamicPstatesInfo method") +// }, +// DeviceGetEccModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) { +// panic("mock out the DeviceGetEccMode method") +// }, +// DeviceGetEncoderCapacityFunc: func(device nvml.Device, encoderType nvml.EncoderType) (int, nvml.Return) { +// panic("mock out the DeviceGetEncoderCapacity method") +// }, +// DeviceGetEncoderSessionsFunc: func(device nvml.Device) ([]nvml.EncoderSessionInfo, nvml.Return) { +// panic("mock out the DeviceGetEncoderSessions method") +// }, +// DeviceGetEncoderStatsFunc: func(device nvml.Device) (int, uint32, uint32, nvml.Return) { +// panic("mock out the DeviceGetEncoderStats method") +// }, +// DeviceGetEncoderUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { +// panic("mock out the DeviceGetEncoderUtilization method") +// }, +// DeviceGetEnforcedPowerLimitFunc: func(device nvml.Device) (uint32, nvml.Return) { +// panic("mock out the DeviceGetEnforcedPowerLimit method") +// }, +// DeviceGetFBCSessionsFunc: func(device nvml.Device) ([]nvml.FBCSessionInfo, nvml.Return) { +// panic("mock out the DeviceGetFBCSessions method") +// }, +// DeviceGetFBCStatsFunc: func(device nvml.Device) (nvml.FBCStats, nvml.Return) { +// panic("mock out the DeviceGetFBCStats method") +// }, +// DeviceGetFanControlPolicy_v2Func: func(device nvml.Device, n int) (nvml.FanControlPolicy, nvml.Return) { +// panic("mock out the DeviceGetFanControlPolicy_v2 method") +// }, +// DeviceGetFanSpeedFunc: func(device nvml.Device) (uint32, nvml.Return) { +// panic("mock out the DeviceGetFanSpeed method") +// }, +// DeviceGetFanSpeedRPMFunc: func(device nvml.Device) (nvml.FanSpeedInfo, nvml.Return) { +// panic("mock out the DeviceGetFanSpeedRPM method") +// }, +// DeviceGetFanSpeed_v2Func: func(device nvml.Device, n int) (uint32, nvml.Return) { +// panic("mock out the DeviceGetFanSpeed_v2 method") +// }, +// DeviceGetFieldValuesFunc: func(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return { +// panic("mock out the DeviceGetFieldValues method") +// }, +// DeviceGetGpcClkMinMaxVfOffsetFunc: func(device nvml.Device) (int, int, nvml.Return) { +// panic("mock out the DeviceGetGpcClkMinMaxVfOffset method") +// }, +// DeviceGetGpcClkVfOffsetFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetGpcClkVfOffset method") +// }, +// DeviceGetGpuFabricInfoFunc: func(device nvml.Device) (nvml.GpuFabricInfo, nvml.Return) { +// 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) { +// panic("mock out the DeviceGetGpuInstanceById method") +// }, +// DeviceGetGpuInstanceIdFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetGpuInstanceId method") +// }, +// DeviceGetGpuInstancePossiblePlacementsFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { +// panic("mock out the DeviceGetGpuInstancePossiblePlacements method") +// }, +// DeviceGetGpuInstanceProfileInfoFunc: func(device nvml.Device, n int) (nvml.GpuInstanceProfileInfo, nvml.Return) { +// panic("mock out the DeviceGetGpuInstanceProfileInfo method") +// }, +// DeviceGetGpuInstanceProfileInfoByIdVFunc: func(device nvml.Device, n int) nvml.GpuInstanceProfileInfoByIdHandler { +// panic("mock out the DeviceGetGpuInstanceProfileInfoByIdV 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) { +// panic("mock out the DeviceGetGpuInstanceRemainingCapacity method") +// }, +// DeviceGetGpuInstancesFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { +// panic("mock out the DeviceGetGpuInstances method") +// }, +// DeviceGetGpuMaxPcieLinkGenerationFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetGpuMaxPcieLinkGeneration method") +// }, +// DeviceGetGpuOperationModeFunc: func(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { +// panic("mock out the DeviceGetGpuOperationMode method") +// }, +// DeviceGetGraphicsRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { +// panic("mock out the DeviceGetGraphicsRunningProcesses method") +// }, +// DeviceGetGridLicensableFeaturesFunc: func(device nvml.Device) (nvml.GridLicensableFeatures, nvml.Return) { +// panic("mock out the DeviceGetGridLicensableFeatures method") +// }, +// DeviceGetGspFirmwareModeFunc: func(device nvml.Device) (bool, bool, nvml.Return) { +// panic("mock out the DeviceGetGspFirmwareMode method") +// }, +// DeviceGetGspFirmwareVersionFunc: func(device nvml.Device) (string, nvml.Return) { +// panic("mock out the DeviceGetGspFirmwareVersion method") +// }, +// DeviceGetHandleByIndexFunc: func(n int) (nvml.Device, nvml.Return) { +// panic("mock out the DeviceGetHandleByIndex method") +// }, +// DeviceGetHandleByPciBusIdFunc: func(s string) (nvml.Device, nvml.Return) { +// panic("mock out the DeviceGetHandleByPciBusId method") +// }, +// DeviceGetHandleBySerialFunc: func(s string) (nvml.Device, nvml.Return) { +// panic("mock out the DeviceGetHandleBySerial method") +// }, +// DeviceGetHandleByUUIDFunc: func(s string) (nvml.Device, nvml.Return) { +// panic("mock out the DeviceGetHandleByUUID method") +// }, +// DeviceGetHandleByUUIDVFunc: func(uUID *nvml.UUID) (nvml.Device, nvml.Return) { +// panic("mock out the DeviceGetHandleByUUIDV method") +// }, +// DeviceGetHostVgpuModeFunc: func(device nvml.Device) (nvml.HostVgpuMode, nvml.Return) { +// panic("mock out the DeviceGetHostVgpuMode method") +// }, +// DeviceGetIndexFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetIndex method") +// }, +// DeviceGetInforomConfigurationChecksumFunc: func(device nvml.Device) (uint32, nvml.Return) { +// panic("mock out the DeviceGetInforomConfigurationChecksum method") +// }, +// DeviceGetInforomImageVersionFunc: func(device nvml.Device) (string, nvml.Return) { +// panic("mock out the DeviceGetInforomImageVersion method") +// }, +// DeviceGetInforomVersionFunc: func(device nvml.Device, inforomObject nvml.InforomObject) (string, nvml.Return) { +// panic("mock out the DeviceGetInforomVersion method") +// }, +// DeviceGetIrqNumFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetIrqNum method") +// }, +// DeviceGetJpgUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { +// panic("mock out the DeviceGetJpgUtilization method") +// }, +// DeviceGetLastBBXFlushTimeFunc: func(device nvml.Device) (uint64, uint, nvml.Return) { +// panic("mock out the DeviceGetLastBBXFlushTime method") +// }, +// DeviceGetMPSComputeRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { +// panic("mock out the DeviceGetMPSComputeRunningProcesses method") +// }, +// DeviceGetMarginTemperatureFunc: func(device nvml.Device) (nvml.MarginTemperature, nvml.Return) { +// panic("mock out the DeviceGetMarginTemperature method") +// }, +// DeviceGetMaxClockInfoFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +// panic("mock out the DeviceGetMaxClockInfo method") +// }, +// DeviceGetMaxCustomerBoostClockFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { +// panic("mock out the DeviceGetMaxCustomerBoostClock method") +// }, +// DeviceGetMaxMigDeviceCountFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetMaxMigDeviceCount method") +// }, +// DeviceGetMaxPcieLinkGenerationFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetMaxPcieLinkGeneration method") +// }, +// DeviceGetMaxPcieLinkWidthFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetMaxPcieLinkWidth method") +// }, +// DeviceGetMemClkMinMaxVfOffsetFunc: func(device nvml.Device) (int, int, nvml.Return) { +// panic("mock out the DeviceGetMemClkMinMaxVfOffset method") +// }, +// DeviceGetMemClkVfOffsetFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetMemClkVfOffset method") +// }, +// DeviceGetMemoryAffinityFunc: func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { +// panic("mock out the DeviceGetMemoryAffinity method") +// }, +// DeviceGetMemoryBusWidthFunc: func(device nvml.Device) (uint32, nvml.Return) { +// panic("mock out the DeviceGetMemoryBusWidth method") +// }, +// DeviceGetMemoryErrorCounterFunc: func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) { +// panic("mock out the DeviceGetMemoryErrorCounter method") +// }, +// DeviceGetMemoryInfoFunc: func(device nvml.Device) (nvml.Memory, nvml.Return) { +// panic("mock out the DeviceGetMemoryInfo method") +// }, +// DeviceGetMemoryInfo_v2Func: func(device nvml.Device) (nvml.Memory_v2, nvml.Return) { +// panic("mock out the DeviceGetMemoryInfo_v2 method") +// }, +// DeviceGetMigDeviceHandleByIndexFunc: func(device nvml.Device, n int) (nvml.Device, nvml.Return) { +// panic("mock out the DeviceGetMigDeviceHandleByIndex method") +// }, +// DeviceGetMigModeFunc: func(device nvml.Device) (int, int, nvml.Return) { +// panic("mock out the DeviceGetMigMode method") +// }, +// DeviceGetMinMaxClockOfPStateFunc: func(device nvml.Device, clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) { +// panic("mock out the DeviceGetMinMaxClockOfPState method") +// }, +// DeviceGetMinMaxFanSpeedFunc: func(device nvml.Device) (int, int, nvml.Return) { +// panic("mock out the DeviceGetMinMaxFanSpeed method") +// }, +// DeviceGetMinorNumberFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetMinorNumber method") +// }, +// DeviceGetModuleIdFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetModuleId method") +// }, +// DeviceGetMultiGpuBoardFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetMultiGpuBoard method") +// }, +// DeviceGetNameFunc: func(device nvml.Device) (string, nvml.Return) { +// panic("mock out the DeviceGetName method") +// }, +// DeviceGetNumFansFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetNumFans method") +// }, +// DeviceGetNumGpuCoresFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetNumGpuCores method") +// }, +// DeviceGetNumaNodeIdFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetNumaNodeId method") +// }, +// DeviceGetNvLinkCapabilityFunc: func(device nvml.Device, n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) { +// panic("mock out the DeviceGetNvLinkCapability method") +// }, +// DeviceGetNvLinkErrorCounterFunc: func(device nvml.Device, n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) { +// panic("mock out the DeviceGetNvLinkErrorCounter method") +// }, +// DeviceGetNvLinkInfoFunc: func(device nvml.Device) nvml.NvLinkInfoHandler { +// panic("mock out the DeviceGetNvLinkInfo method") +// }, +// DeviceGetNvLinkRemoteDeviceTypeFunc: func(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, nvml.Return) { +// panic("mock out the DeviceGetNvLinkRemoteDeviceType method") +// }, +// DeviceGetNvLinkRemotePciInfoFunc: func(device nvml.Device, n int) (nvml.PciInfo, nvml.Return) { +// panic("mock out the DeviceGetNvLinkRemotePciInfo method") +// }, +// DeviceGetNvLinkStateFunc: func(device nvml.Device, n int) (nvml.EnableState, nvml.Return) { +// panic("mock out the DeviceGetNvLinkState method") +// }, +// DeviceGetNvLinkUtilizationControlFunc: func(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { +// panic("mock out the DeviceGetNvLinkUtilizationControl method") +// }, +// DeviceGetNvLinkUtilizationCounterFunc: func(device nvml.Device, n1 int, n2 int) (uint64, uint64, nvml.Return) { +// panic("mock out the DeviceGetNvLinkUtilizationCounter method") +// }, +// DeviceGetNvLinkVersionFunc: func(device nvml.Device, n int) (uint32, nvml.Return) { +// panic("mock out the DeviceGetNvLinkVersion method") +// }, +// DeviceGetNvlinkBwModeFunc: func(device nvml.Device) (nvml.NvlinkGetBwMode, nvml.Return) { +// panic("mock out the DeviceGetNvlinkBwMode method") +// }, +// DeviceGetNvlinkSupportedBwModesFunc: func(device nvml.Device) (nvml.NvlinkSupportedBwModes, nvml.Return) { +// panic("mock out the DeviceGetNvlinkSupportedBwModes method") +// }, +// DeviceGetOfaUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { +// panic("mock out the DeviceGetOfaUtilization method") +// }, +// DeviceGetP2PStatusFunc: func(device1 nvml.Device, device2 nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) { +// panic("mock out the DeviceGetP2PStatus method") +// }, +// DeviceGetPciInfoFunc: func(device nvml.Device) (nvml.PciInfo, nvml.Return) { +// panic("mock out the DeviceGetPciInfo method") +// }, +// DeviceGetPciInfoExtFunc: func(device nvml.Device) (nvml.PciInfoExt, nvml.Return) { +// panic("mock out the DeviceGetPciInfoExt method") +// }, +// DeviceGetPcieLinkMaxSpeedFunc: func(device nvml.Device) (uint32, nvml.Return) { +// panic("mock out the DeviceGetPcieLinkMaxSpeed method") +// }, +// DeviceGetPcieReplayCounterFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetPcieReplayCounter method") +// }, +// DeviceGetPcieSpeedFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceGetPcieSpeed method") +// }, +// DeviceGetPcieThroughputFunc: func(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { +// panic("mock out the DeviceGetPcieThroughput method") +// }, +// DeviceGetPdiFunc: func(device nvml.Device) (nvml.Pdi, nvml.Return) { +// panic("mock out the DeviceGetPdi method") +// }, +// DeviceGetPerformanceModesFunc: func(device nvml.Device) (nvml.DevicePerfModes, nvml.Return) { +// panic("mock out the DeviceGetPerformanceModes method") +// }, +// DeviceGetPerformanceStateFunc: func(device nvml.Device) (nvml.Pstates, nvml.Return) { +// panic("mock out the DeviceGetPerformanceState method") +// }, +// DeviceGetPersistenceModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// panic("mock out the DeviceGetPersistenceMode method") +// }, +// DeviceGetPgpuMetadataStringFunc: func(device nvml.Device) (string, nvml.Return) { +// panic("mock out the DeviceGetPgpuMetadataString method") +// }, +// DeviceGetPlatformInfoFunc: func(device nvml.Device) (nvml.PlatformInfo, nvml.Return) { +// panic("mock out the DeviceGetPlatformInfo method") +// }, +// DeviceGetPowerManagementDefaultLimitFunc: func(device nvml.Device) (uint32, nvml.Return) { +// panic("mock out the DeviceGetPowerManagementDefaultLimit method") +// }, +// DeviceGetPowerManagementLimitFunc: func(device nvml.Device) (uint32, nvml.Return) { +// panic("mock out the DeviceGetPowerManagementLimit method") +// }, +// DeviceGetPowerManagementLimitConstraintsFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { +// panic("mock out the DeviceGetPowerManagementLimitConstraints method") +// }, +// DeviceGetPowerManagementModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// panic("mock out the DeviceGetPowerManagementMode method") +// }, +// DeviceGetPowerMizerMode_v1Func: func(device nvml.Device) (nvml.DevicePowerMizerModes_v1, nvml.Return) { +// panic("mock out the DeviceGetPowerMizerMode_v1 method") +// }, +// DeviceGetPowerSourceFunc: func(device nvml.Device) (nvml.PowerSource, nvml.Return) { +// panic("mock out the DeviceGetPowerSource method") +// }, +// DeviceGetPowerStateFunc: func(device nvml.Device) (nvml.Pstates, nvml.Return) { +// panic("mock out the DeviceGetPowerState method") +// }, +// DeviceGetPowerUsageFunc: func(device nvml.Device) (uint32, nvml.Return) { +// panic("mock out the DeviceGetPowerUsage method") +// }, +// DeviceGetProcessUtilizationFunc: func(device nvml.Device, v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) { +// panic("mock out the DeviceGetProcessUtilization method") +// }, +// DeviceGetProcessesUtilizationInfoFunc: func(device nvml.Device) (nvml.ProcessesUtilizationInfo, nvml.Return) { +// panic("mock out the DeviceGetProcessesUtilizationInfo method") +// }, +// DeviceGetRemappedRowsFunc: func(device nvml.Device) (int, int, bool, bool, nvml.Return) { +// panic("mock out the DeviceGetRemappedRows method") +// }, +// DeviceGetRepairStatusFunc: func(device nvml.Device) (nvml.RepairStatus, nvml.Return) { +// panic("mock out the DeviceGetRepairStatus method") +// }, +// DeviceGetRetiredPagesFunc: func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) { +// panic("mock out the DeviceGetRetiredPages method") +// }, +// DeviceGetRetiredPagesPendingStatusFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { +// panic("mock out the DeviceGetRetiredPagesPendingStatus method") +// }, +// DeviceGetRetiredPages_v2Func: func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) { +// panic("mock out the DeviceGetRetiredPages_v2 method") +// }, +// DeviceGetRowRemapperHistogramFunc: func(device nvml.Device) (nvml.RowRemapperHistogramValues, nvml.Return) { +// panic("mock out the DeviceGetRowRemapperHistogram method") +// }, +// DeviceGetRunningProcessDetailListFunc: func(device nvml.Device) (nvml.ProcessDetailList, nvml.Return) { +// panic("mock out the DeviceGetRunningProcessDetailList method") +// }, +// DeviceGetSamplesFunc: func(device nvml.Device, samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) { +// panic("mock out the DeviceGetSamples method") +// }, +// DeviceGetSerialFunc: func(device nvml.Device) (string, nvml.Return) { +// panic("mock out the DeviceGetSerial method") +// }, +// DeviceGetSramEccErrorStatusFunc: func(device nvml.Device) (nvml.EccSramErrorStatus, nvml.Return) { +// panic("mock out the DeviceGetSramEccErrorStatus method") +// }, +// DeviceGetSramUniqueUncorrectedEccErrorCountsFunc: func(device nvml.Device, eccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts) nvml.Return { +// panic("mock out the DeviceGetSramUniqueUncorrectedEccErrorCounts method") +// }, +// DeviceGetSupportedClocksEventReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { +// panic("mock out the DeviceGetSupportedClocksEventReasons method") +// }, +// DeviceGetSupportedClocksThrottleReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { +// panic("mock out the DeviceGetSupportedClocksThrottleReasons method") +// }, +// DeviceGetSupportedEventTypesFunc: func(device nvml.Device) (uint64, nvml.Return) { +// panic("mock out the DeviceGetSupportedEventTypes method") +// }, +// DeviceGetSupportedGraphicsClocksFunc: func(device nvml.Device, n int) (int, uint32, nvml.Return) { +// panic("mock out the DeviceGetSupportedGraphicsClocks method") +// }, +// DeviceGetSupportedMemoryClocksFunc: func(device nvml.Device) (int, uint32, nvml.Return) { +// panic("mock out the DeviceGetSupportedMemoryClocks method") +// }, +// DeviceGetSupportedPerformanceStatesFunc: func(device nvml.Device) ([]nvml.Pstates, nvml.Return) { +// panic("mock out the DeviceGetSupportedPerformanceStates method") +// }, +// DeviceGetSupportedVgpusFunc: func(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) { +// panic("mock out the DeviceGetSupportedVgpus method") +// }, +// DeviceGetTargetFanSpeedFunc: func(device nvml.Device, n int) (int, nvml.Return) { +// panic("mock out the DeviceGetTargetFanSpeed method") +// }, +// DeviceGetTemperatureFunc: func(device nvml.Device, temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) { +// panic("mock out the DeviceGetTemperature method") +// }, +// DeviceGetTemperatureThresholdFunc: func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { +// panic("mock out the DeviceGetTemperatureThreshold method") +// }, +// DeviceGetTemperatureVFunc: func(device nvml.Device) nvml.TemperatureHandler { +// panic("mock out the DeviceGetTemperatureV method") +// }, +// DeviceGetThermalSettingsFunc: func(device nvml.Device, v uint32) (nvml.GpuThermalSettings, nvml.Return) { +// panic("mock out the DeviceGetThermalSettings method") +// }, +// DeviceGetTopologyCommonAncestorFunc: func(device1 nvml.Device, device2 nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) { +// panic("mock out the DeviceGetTopologyCommonAncestor method") +// }, +// DeviceGetTopologyNearestGpusFunc: func(device nvml.Device, gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) { +// panic("mock out the DeviceGetTopologyNearestGpus method") +// }, +// DeviceGetTotalEccErrorsFunc: func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) { +// panic("mock out the DeviceGetTotalEccErrors method") +// }, +// DeviceGetTotalEnergyConsumptionFunc: func(device nvml.Device) (uint64, nvml.Return) { +// panic("mock out the DeviceGetTotalEnergyConsumption method") +// }, +// DeviceGetUUIDFunc: func(device nvml.Device) (string, nvml.Return) { +// panic("mock out the DeviceGetUUID method") +// }, +// DeviceGetUtilizationRatesFunc: func(device nvml.Device) (nvml.Utilization, nvml.Return) { +// panic("mock out the DeviceGetUtilizationRates method") +// }, +// DeviceGetVbiosVersionFunc: func(device nvml.Device) (string, nvml.Return) { +// panic("mock out the DeviceGetVbiosVersion method") +// }, +// DeviceGetVgpuCapabilitiesFunc: func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) { +// panic("mock out the DeviceGetVgpuCapabilities method") +// }, +// DeviceGetVgpuHeterogeneousModeFunc: func(device nvml.Device) (nvml.VgpuHeterogeneousMode, nvml.Return) { +// panic("mock out the DeviceGetVgpuHeterogeneousMode method") +// }, +// DeviceGetVgpuInstancesUtilizationInfoFunc: func(device nvml.Device) (nvml.VgpuInstancesUtilizationInfo, nvml.Return) { +// panic("mock out the DeviceGetVgpuInstancesUtilizationInfo method") +// }, +// DeviceGetVgpuMetadataFunc: func(device nvml.Device) (nvml.VgpuPgpuMetadata, nvml.Return) { +// panic("mock out the DeviceGetVgpuMetadata method") +// }, +// DeviceGetVgpuProcessUtilizationFunc: func(device nvml.Device, v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) { +// panic("mock out the DeviceGetVgpuProcessUtilization method") +// }, +// DeviceGetVgpuProcessesUtilizationInfoFunc: func(device nvml.Device) (nvml.VgpuProcessesUtilizationInfo, nvml.Return) { +// panic("mock out the DeviceGetVgpuProcessesUtilizationInfo method") +// }, +// DeviceGetVgpuSchedulerCapabilitiesFunc: func(device nvml.Device) (nvml.VgpuSchedulerCapabilities, nvml.Return) { +// panic("mock out the DeviceGetVgpuSchedulerCapabilities method") +// }, +// DeviceGetVgpuSchedulerLogFunc: func(device nvml.Device) (nvml.VgpuSchedulerLog, nvml.Return) { +// panic("mock out the DeviceGetVgpuSchedulerLog method") +// }, +// DeviceGetVgpuSchedulerStateFunc: func(device nvml.Device) (nvml.VgpuSchedulerGetState, nvml.Return) { +// panic("mock out the DeviceGetVgpuSchedulerState method") +// }, +// DeviceGetVgpuTypeCreatablePlacementsFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { +// panic("mock out the DeviceGetVgpuTypeCreatablePlacements method") +// }, +// DeviceGetVgpuTypeSupportedPlacementsFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { +// panic("mock out the DeviceGetVgpuTypeSupportedPlacements method") +// }, +// DeviceGetVgpuUtilizationFunc: func(device nvml.Device, v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) { +// panic("mock out the DeviceGetVgpuUtilization method") +// }, +// DeviceGetViolationStatusFunc: func(device nvml.Device, perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) { +// panic("mock out the DeviceGetViolationStatus method") +// }, +// DeviceGetVirtualizationModeFunc: func(device nvml.Device) (nvml.GpuVirtualizationMode, nvml.Return) { +// panic("mock out the DeviceGetVirtualizationMode method") +// }, +// DeviceIsMigDeviceHandleFunc: func(device nvml.Device) (bool, nvml.Return) { +// panic("mock out the DeviceIsMigDeviceHandle method") +// }, +// DeviceModifyDrainStateFunc: func(pciInfo *nvml.PciInfo, enableState nvml.EnableState) nvml.Return { +// panic("mock out the DeviceModifyDrainState method") +// }, +// DeviceOnSameBoardFunc: func(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) { +// panic("mock out the DeviceOnSameBoard method") +// }, +// DevicePowerSmoothingActivatePresetProfileFunc: func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { +// panic("mock out the DevicePowerSmoothingActivatePresetProfile method") +// }, +// DevicePowerSmoothingSetStateFunc: func(device nvml.Device, powerSmoothingState *nvml.PowerSmoothingState) nvml.Return { +// panic("mock out the DevicePowerSmoothingSetState method") +// }, +// DevicePowerSmoothingUpdatePresetProfileParamFunc: func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { +// panic("mock out the DevicePowerSmoothingUpdatePresetProfileParam method") +// }, +// DeviceQueryDrainStateFunc: func(pciInfo *nvml.PciInfo) (nvml.EnableState, nvml.Return) { +// panic("mock out the DeviceQueryDrainState method") +// }, +// DeviceReadWritePRM_v1Func: func(device nvml.Device, pRMTLV_v1 *nvml.PRMTLV_v1) nvml.Return { +// panic("mock out the DeviceReadWritePRM_v1 method") +// }, +// DeviceRegisterEventsFunc: func(device nvml.Device, v uint64, eventSet nvml.EventSet) nvml.Return { +// panic("mock out the DeviceRegisterEvents method") +// }, +// DeviceRemoveGpuFunc: func(pciInfo *nvml.PciInfo) nvml.Return { +// panic("mock out the DeviceRemoveGpu method") +// }, +// DeviceRemoveGpu_v2Func: func(pciInfo *nvml.PciInfo, detachGpuState nvml.DetachGpuState, pcieLinkState nvml.PcieLinkState) nvml.Return { +// panic("mock out the DeviceRemoveGpu_v2 method") +// }, +// DeviceResetApplicationsClocksFunc: func(device nvml.Device) nvml.Return { +// panic("mock out the DeviceResetApplicationsClocks method") +// }, +// DeviceResetGpuLockedClocksFunc: func(device nvml.Device) nvml.Return { +// panic("mock out the DeviceResetGpuLockedClocks method") +// }, +// DeviceResetMemoryLockedClocksFunc: func(device nvml.Device) nvml.Return { +// panic("mock out the DeviceResetMemoryLockedClocks method") +// }, +// DeviceResetNvLinkErrorCountersFunc: func(device nvml.Device, n int) nvml.Return { +// panic("mock out the DeviceResetNvLinkErrorCounters method") +// }, +// DeviceResetNvLinkUtilizationCounterFunc: func(device nvml.Device, n1 int, n2 int) nvml.Return { +// panic("mock out the DeviceResetNvLinkUtilizationCounter method") +// }, +// DeviceSetAPIRestrictionFunc: func(device nvml.Device, restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return { +// panic("mock out the DeviceSetAPIRestriction method") +// }, +// DeviceSetAccountingModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { +// panic("mock out the DeviceSetAccountingMode method") +// }, +// DeviceSetApplicationsClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { +// panic("mock out the DeviceSetApplicationsClocks method") +// }, +// DeviceSetAutoBoostedClocksEnabledFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { +// panic("mock out the DeviceSetAutoBoostedClocksEnabled method") +// }, +// DeviceSetClockOffsetsFunc: func(device nvml.Device, clockOffset nvml.ClockOffset) nvml.Return { +// panic("mock out the DeviceSetClockOffsets method") +// }, +// DeviceSetComputeModeFunc: func(device nvml.Device, computeMode nvml.ComputeMode) nvml.Return { +// panic("mock out the DeviceSetComputeMode method") +// }, +// DeviceSetConfComputeUnprotectedMemSizeFunc: func(device nvml.Device, v uint64) nvml.Return { +// panic("mock out the DeviceSetConfComputeUnprotectedMemSize method") +// }, +// DeviceSetCpuAffinityFunc: func(device nvml.Device) nvml.Return { +// panic("mock out the DeviceSetCpuAffinity method") +// }, +// DeviceSetDefaultAutoBoostedClocksEnabledFunc: func(device nvml.Device, enableState nvml.EnableState, v uint32) nvml.Return { +// panic("mock out the DeviceSetDefaultAutoBoostedClocksEnabled method") +// }, +// DeviceSetDefaultFanSpeed_v2Func: func(device nvml.Device, n int) nvml.Return { +// panic("mock out the DeviceSetDefaultFanSpeed_v2 method") +// }, +// DeviceSetDramEncryptionModeFunc: func(device nvml.Device, dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return { +// panic("mock out the DeviceSetDramEncryptionMode method") +// }, +// DeviceSetDriverModelFunc: func(device nvml.Device, driverModel nvml.DriverModel, v uint32) nvml.Return { +// panic("mock out the DeviceSetDriverModel method") +// }, +// DeviceSetEccModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { +// panic("mock out the DeviceSetEccMode method") +// }, +// DeviceSetFanControlPolicyFunc: func(device nvml.Device, n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return { +// panic("mock out the DeviceSetFanControlPolicy method") +// }, +// DeviceSetFanSpeed_v2Func: func(device nvml.Device, n1 int, n2 int) nvml.Return { +// panic("mock out the DeviceSetFanSpeed_v2 method") +// }, +// DeviceSetGpcClkVfOffsetFunc: func(device nvml.Device, n int) nvml.Return { +// panic("mock out the DeviceSetGpcClkVfOffset method") +// }, +// DeviceSetGpuLockedClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { +// panic("mock out the DeviceSetGpuLockedClocks method") +// }, +// DeviceSetGpuOperationModeFunc: func(device nvml.Device, gpuOperationMode nvml.GpuOperationMode) nvml.Return { +// panic("mock out the DeviceSetGpuOperationMode method") +// }, +// DeviceSetMemClkVfOffsetFunc: func(device nvml.Device, n int) nvml.Return { +// panic("mock out the DeviceSetMemClkVfOffset method") +// }, +// DeviceSetMemoryLockedClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { +// panic("mock out the DeviceSetMemoryLockedClocks method") +// }, +// DeviceSetMigModeFunc: func(device nvml.Device, n int) (nvml.Return, nvml.Return) { +// panic("mock out the DeviceSetMigMode method") +// }, +// DeviceSetNvLinkDeviceLowPowerThresholdFunc: func(device nvml.Device, nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return { +// panic("mock out the DeviceSetNvLinkDeviceLowPowerThreshold method") +// }, +// DeviceSetNvLinkUtilizationControlFunc: func(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { +// panic("mock out the DeviceSetNvLinkUtilizationControl method") +// }, +// DeviceSetNvlinkBwModeFunc: func(device nvml.Device, nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { +// panic("mock out the DeviceSetNvlinkBwMode method") +// }, +// DeviceSetPersistenceModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { +// panic("mock out the DeviceSetPersistenceMode method") +// }, +// DeviceSetPowerManagementLimitFunc: func(device nvml.Device, v uint32) nvml.Return { +// panic("mock out the DeviceSetPowerManagementLimit method") +// }, +// DeviceSetPowerManagementLimit_v2Func: func(device nvml.Device, powerValue_v2 *nvml.PowerValue_v2) nvml.Return { +// panic("mock out the DeviceSetPowerManagementLimit_v2 method") +// }, +// DeviceSetTemperatureThresholdFunc: func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return { +// panic("mock out the DeviceSetTemperatureThreshold method") +// }, +// DeviceSetVgpuCapabilitiesFunc: func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return { +// panic("mock out the DeviceSetVgpuCapabilities method") +// }, +// DeviceSetVgpuHeterogeneousModeFunc: func(device nvml.Device, vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return { +// panic("mock out the DeviceSetVgpuHeterogeneousMode method") +// }, +// DeviceSetVgpuSchedulerStateFunc: func(device nvml.Device, vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return { +// panic("mock out the DeviceSetVgpuSchedulerState method") +// }, +// DeviceSetVirtualizationModeFunc: func(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { +// panic("mock out the DeviceSetVirtualizationMode method") +// }, +// DeviceValidateInforomFunc: func(device nvml.Device) nvml.Return { +// panic("mock out the DeviceValidateInforom method") +// }, +// DeviceWorkloadPowerProfileClearRequestedProfilesFunc: func(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { +// panic("mock out the DeviceWorkloadPowerProfileClearRequestedProfiles method") +// }, +// DeviceWorkloadPowerProfileGetCurrentProfilesFunc: func(device nvml.Device) (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) { +// panic("mock out the DeviceWorkloadPowerProfileGetCurrentProfiles method") +// }, +// DeviceWorkloadPowerProfileGetProfilesInfoFunc: func(device nvml.Device) (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) { +// panic("mock out the DeviceWorkloadPowerProfileGetProfilesInfo method") +// }, +// DeviceWorkloadPowerProfileSetRequestedProfilesFunc: func(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { +// panic("mock out the DeviceWorkloadPowerProfileSetRequestedProfiles method") +// }, +// ErrorStringFunc: func(returnMoqParam nvml.Return) string { +// panic("mock out the ErrorString method") +// }, +// EventSetCreateFunc: func() (nvml.EventSet, nvml.Return) { +// panic("mock out the EventSetCreate method") +// }, +// EventSetFreeFunc: func(eventSet nvml.EventSet) nvml.Return { +// panic("mock out the EventSetFree method") +// }, +// EventSetWaitFunc: func(eventSet nvml.EventSet, v uint32) (nvml.EventData, nvml.Return) { +// panic("mock out the EventSetWait method") +// }, +// ExtensionsFunc: func() nvml.ExtendedInterface { +// panic("mock out the Extensions method") +// }, +// GetExcludedDeviceCountFunc: func() (int, nvml.Return) { +// panic("mock out the GetExcludedDeviceCount method") +// }, +// GetExcludedDeviceInfoByIndexFunc: func(n int) (nvml.ExcludedDeviceInfo, nvml.Return) { +// panic("mock out the GetExcludedDeviceInfoByIndex method") +// }, +// GetVgpuCompatibilityFunc: func(vgpuMetadata *nvml.VgpuMetadata, vgpuPgpuMetadata *nvml.VgpuPgpuMetadata) (nvml.VgpuPgpuCompatibility, nvml.Return) { +// panic("mock out the GetVgpuCompatibility method") +// }, +// GetVgpuDriverCapabilitiesFunc: func(vgpuDriverCapability nvml.VgpuDriverCapability) (bool, nvml.Return) { +// panic("mock out the GetVgpuDriverCapabilities method") +// }, +// GetVgpuVersionFunc: func() (nvml.VgpuVersion, nvml.VgpuVersion, nvml.Return) { +// panic("mock out the GetVgpuVersion method") +// }, +// GpmMetricsGetFunc: func(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.Return { +// 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 { +// panic("mock out the GpmMigSampleGet method") +// }, +// GpmQueryDeviceSupportFunc: func(device nvml.Device) (nvml.GpmSupport, nvml.Return) { +// 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) { +// panic("mock out the GpmQueryIfStreamingEnabled method") +// }, +// GpmSampleAllocFunc: func() (nvml.GpmSample, nvml.Return) { +// panic("mock out the GpmSampleAlloc method") +// }, +// GpmSampleFreeFunc: func(gpmSample nvml.GpmSample) nvml.Return { +// panic("mock out the GpmSampleFree method") +// }, +// GpmSampleGetFunc: func(device nvml.Device, gpmSample nvml.GpmSample) nvml.Return { +// panic("mock out the GpmSampleGet method") +// }, +// GpmSetStreamingEnabledFunc: func(device nvml.Device, v uint32) nvml.Return { +// panic("mock out the GpmSetStreamingEnabled method") +// }, +// GpuInstanceCreateComputeInstanceFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { +// panic("mock out the GpuInstanceCreateComputeInstance method") +// }, +// GpuInstanceCreateComputeInstanceWithPlacementFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) { +// panic("mock out the GpuInstanceCreateComputeInstanceWithPlacement method") +// }, +// GpuInstanceDestroyFunc: func(gpuInstance nvml.GpuInstance) nvml.Return { +// panic("mock out the GpuInstanceDestroy method") +// }, +// GpuInstanceGetActiveVgpusFunc: func(gpuInstance nvml.GpuInstance) (nvml.ActiveVgpuInstanceInfo, nvml.Return) { +// panic("mock out the GpuInstanceGetActiveVgpus method") +// }, +// GpuInstanceGetComputeInstanceByIdFunc: func(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, nvml.Return) { +// panic("mock out the GpuInstanceGetComputeInstanceById method") +// }, +// GpuInstanceGetComputeInstancePossiblePlacementsFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { +// panic("mock out the GpuInstanceGetComputeInstancePossiblePlacements method") +// }, +// GpuInstanceGetComputeInstanceProfileInfoFunc: func(gpuInstance nvml.GpuInstance, n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { +// 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) { +// panic("mock out the GpuInstanceGetComputeInstanceRemainingCapacity method") +// }, +// GpuInstanceGetComputeInstancesFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { +// panic("mock out the GpuInstanceGetComputeInstances method") +// }, +// GpuInstanceGetCreatableVgpusFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuTypeIdInfo, nvml.Return) { +// panic("mock out the GpuInstanceGetCreatableVgpus method") +// }, +// GpuInstanceGetInfoFunc: func(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, nvml.Return) { +// panic("mock out the GpuInstanceGetInfo method") +// }, +// GpuInstanceGetVgpuHeterogeneousModeFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuHeterogeneousMode, nvml.Return) { +// panic("mock out the GpuInstanceGetVgpuHeterogeneousMode method") +// }, +// GpuInstanceGetVgpuSchedulerLogFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerLogInfo, nvml.Return) { +// panic("mock out the GpuInstanceGetVgpuSchedulerLog method") +// }, +// GpuInstanceGetVgpuSchedulerStateFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerStateInfo, nvml.Return) { +// panic("mock out the GpuInstanceGetVgpuSchedulerState method") +// }, +// GpuInstanceGetVgpuTypeCreatablePlacementsFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuCreatablePlacementInfo, nvml.Return) { +// panic("mock out the GpuInstanceGetVgpuTypeCreatablePlacements method") +// }, +// GpuInstanceSetVgpuHeterogeneousModeFunc: func(gpuInstance nvml.GpuInstance, vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return { +// panic("mock out the GpuInstanceSetVgpuHeterogeneousMode method") +// }, +// GpuInstanceSetVgpuSchedulerStateFunc: func(gpuInstance nvml.GpuInstance, vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return { +// panic("mock out the GpuInstanceSetVgpuSchedulerState method") +// }, +// InitFunc: func() nvml.Return { +// panic("mock out the Init method") +// }, +// InitWithFlagsFunc: func(v uint32) nvml.Return { +// panic("mock out the InitWithFlags method") +// }, +// SetVgpuVersionFunc: func(vgpuVersion *nvml.VgpuVersion) nvml.Return { +// panic("mock out the SetVgpuVersion method") +// }, +// ShutdownFunc: func() nvml.Return { +// panic("mock out the Shutdown method") +// }, +// SystemEventSetCreateFunc: func(systemEventSetCreateRequest *nvml.SystemEventSetCreateRequest) nvml.Return { +// panic("mock out the SystemEventSetCreate method") +// }, +// SystemEventSetFreeFunc: func(systemEventSetFreeRequest *nvml.SystemEventSetFreeRequest) nvml.Return { +// panic("mock out the SystemEventSetFree method") +// }, +// SystemEventSetWaitFunc: func(systemEventSetWaitRequest *nvml.SystemEventSetWaitRequest) nvml.Return { +// panic("mock out the SystemEventSetWait method") +// }, +// SystemGetConfComputeCapabilitiesFunc: func() (nvml.ConfComputeSystemCaps, nvml.Return) { +// panic("mock out the SystemGetConfComputeCapabilities method") +// }, +// SystemGetConfComputeGpusReadyStateFunc: func() (uint32, nvml.Return) { +// panic("mock out the SystemGetConfComputeGpusReadyState method") +// }, +// SystemGetConfComputeKeyRotationThresholdInfoFunc: func() (nvml.ConfComputeGetKeyRotationThresholdInfo, nvml.Return) { +// panic("mock out the SystemGetConfComputeKeyRotationThresholdInfo method") +// }, +// SystemGetConfComputeSettingsFunc: func() (nvml.SystemConfComputeSettings, nvml.Return) { +// panic("mock out the SystemGetConfComputeSettings method") +// }, +// SystemGetConfComputeStateFunc: func() (nvml.ConfComputeSystemState, nvml.Return) { +// panic("mock out the SystemGetConfComputeState method") +// }, +// SystemGetCudaDriverVersionFunc: func() (int, nvml.Return) { +// panic("mock out the SystemGetCudaDriverVersion method") +// }, +// SystemGetCudaDriverVersion_v2Func: func() (int, nvml.Return) { +// panic("mock out the SystemGetCudaDriverVersion_v2 method") +// }, +// SystemGetDriverBranchFunc: func() (nvml.SystemDriverBranchInfo, nvml.Return) { +// panic("mock out the SystemGetDriverBranch method") +// }, +// SystemGetDriverVersionFunc: func() (string, nvml.Return) { +// panic("mock out the SystemGetDriverVersion method") +// }, +// SystemGetHicVersionFunc: func() ([]nvml.HwbcEntry, nvml.Return) { +// panic("mock out the SystemGetHicVersion method") +// }, +// SystemGetNVMLVersionFunc: func() (string, nvml.Return) { +// panic("mock out the SystemGetNVMLVersion method") +// }, +// SystemGetNvlinkBwModeFunc: func() (uint32, nvml.Return) { +// panic("mock out the SystemGetNvlinkBwMode method") +// }, +// SystemGetProcessNameFunc: func(n int) (string, nvml.Return) { +// panic("mock out the SystemGetProcessName method") +// }, +// SystemGetTopologyGpuSetFunc: func(n int) ([]nvml.Device, nvml.Return) { +// panic("mock out the SystemGetTopologyGpuSet method") +// }, +// SystemRegisterEventsFunc: func(systemRegisterEventRequest *nvml.SystemRegisterEventRequest) nvml.Return { +// panic("mock out the SystemRegisterEvents method") +// }, +// SystemSetConfComputeGpusReadyStateFunc: func(v uint32) nvml.Return { +// panic("mock out the SystemSetConfComputeGpusReadyState method") +// }, +// SystemSetConfComputeKeyRotationThresholdInfoFunc: func(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) nvml.Return { +// panic("mock out the SystemSetConfComputeKeyRotationThresholdInfo method") +// }, +// SystemSetNvlinkBwModeFunc: func(v uint32) nvml.Return { +// panic("mock out the SystemSetNvlinkBwMode method") +// }, +// UnitGetCountFunc: func() (int, nvml.Return) { +// panic("mock out the UnitGetCount method") +// }, +// UnitGetDevicesFunc: func(unit nvml.Unit) ([]nvml.Device, nvml.Return) { +// panic("mock out the UnitGetDevices method") +// }, +// UnitGetFanSpeedInfoFunc: func(unit nvml.Unit) (nvml.UnitFanSpeeds, nvml.Return) { +// panic("mock out the UnitGetFanSpeedInfo method") +// }, +// UnitGetHandleByIndexFunc: func(n int) (nvml.Unit, nvml.Return) { +// panic("mock out the UnitGetHandleByIndex method") +// }, +// UnitGetLedStateFunc: func(unit nvml.Unit) (nvml.LedState, nvml.Return) { +// panic("mock out the UnitGetLedState method") +// }, +// UnitGetPsuInfoFunc: func(unit nvml.Unit) (nvml.PSUInfo, nvml.Return) { +// panic("mock out the UnitGetPsuInfo method") +// }, +// UnitGetTemperatureFunc: func(unit nvml.Unit, n int) (uint32, nvml.Return) { +// panic("mock out the UnitGetTemperature method") +// }, +// UnitGetUnitInfoFunc: func(unit nvml.Unit) (nvml.UnitInfo, nvml.Return) { +// panic("mock out the UnitGetUnitInfo method") +// }, +// UnitSetLedStateFunc: func(unit nvml.Unit, ledColor nvml.LedColor) nvml.Return { +// panic("mock out the UnitSetLedState method") +// }, +// VgpuInstanceClearAccountingPidsFunc: func(vgpuInstance nvml.VgpuInstance) nvml.Return { +// panic("mock out the VgpuInstanceClearAccountingPids method") +// }, +// VgpuInstanceGetAccountingModeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) { +// panic("mock out the VgpuInstanceGetAccountingMode method") +// }, +// VgpuInstanceGetAccountingPidsFunc: func(vgpuInstance nvml.VgpuInstance) ([]int, nvml.Return) { +// panic("mock out the VgpuInstanceGetAccountingPids method") +// }, +// VgpuInstanceGetAccountingStatsFunc: func(vgpuInstance nvml.VgpuInstance, n int) (nvml.AccountingStats, nvml.Return) { +// panic("mock out the VgpuInstanceGetAccountingStats method") +// }, +// VgpuInstanceGetEccModeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) { +// panic("mock out the VgpuInstanceGetEccMode method") +// }, +// VgpuInstanceGetEncoderCapacityFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { +// panic("mock out the VgpuInstanceGetEncoderCapacity method") +// }, +// VgpuInstanceGetEncoderSessionsFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.EncoderSessionInfo, nvml.Return) { +// panic("mock out the VgpuInstanceGetEncoderSessions method") +// }, +// VgpuInstanceGetEncoderStatsFunc: func(vgpuInstance nvml.VgpuInstance) (int, uint32, uint32, nvml.Return) { +// panic("mock out the VgpuInstanceGetEncoderStats method") +// }, +// VgpuInstanceGetFBCSessionsFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.FBCSessionInfo, nvml.Return) { +// panic("mock out the VgpuInstanceGetFBCSessions method") +// }, +// VgpuInstanceGetFBCStatsFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.FBCStats, nvml.Return) { +// panic("mock out the VgpuInstanceGetFBCStats method") +// }, +// VgpuInstanceGetFbUsageFunc: func(vgpuInstance nvml.VgpuInstance) (uint64, nvml.Return) { +// panic("mock out the VgpuInstanceGetFbUsage method") +// }, +// VgpuInstanceGetFrameRateLimitFunc: func(vgpuInstance nvml.VgpuInstance) (uint32, nvml.Return) { +// panic("mock out the VgpuInstanceGetFrameRateLimit method") +// }, +// VgpuInstanceGetGpuInstanceIdFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { +// panic("mock out the VgpuInstanceGetGpuInstanceId method") +// }, +// VgpuInstanceGetGpuPciIdFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { +// panic("mock out the VgpuInstanceGetGpuPciId method") +// }, +// VgpuInstanceGetLicenseInfoFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuLicenseInfo, nvml.Return) { +// panic("mock out the VgpuInstanceGetLicenseInfo method") +// }, +// VgpuInstanceGetLicenseStatusFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { +// panic("mock out the VgpuInstanceGetLicenseStatus method") +// }, +// VgpuInstanceGetMdevUUIDFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { +// panic("mock out the VgpuInstanceGetMdevUUID method") +// }, +// VgpuInstanceGetMetadataFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, nvml.Return) { +// panic("mock out the VgpuInstanceGetMetadata method") +// }, +// VgpuInstanceGetRuntimeStateSizeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuRuntimeState, nvml.Return) { +// panic("mock out the VgpuInstanceGetRuntimeStateSize method") +// }, +// VgpuInstanceGetTypeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, nvml.Return) { +// panic("mock out the VgpuInstanceGetType method") +// }, +// VgpuInstanceGetUUIDFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { +// panic("mock out the VgpuInstanceGetUUID method") +// }, +// VgpuInstanceGetVmDriverVersionFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { +// panic("mock out the VgpuInstanceGetVmDriverVersion method") +// }, +// VgpuInstanceGetVmIDFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.VgpuVmIdType, nvml.Return) { +// panic("mock out the VgpuInstanceGetVmID method") +// }, +// VgpuInstanceSetEncoderCapacityFunc: func(vgpuInstance nvml.VgpuInstance, n int) nvml.Return { +// panic("mock out the VgpuInstanceSetEncoderCapacity method") +// }, +// VgpuTypeGetBAR1InfoFunc: func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuTypeBar1Info, nvml.Return) { +// panic("mock out the VgpuTypeGetBAR1Info method") +// }, +// VgpuTypeGetCapabilitiesFunc: func(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { +// panic("mock out the VgpuTypeGetCapabilities method") +// }, +// VgpuTypeGetClassFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { +// panic("mock out the VgpuTypeGetClass method") +// }, +// VgpuTypeGetDeviceIDFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint64, uint64, nvml.Return) { +// panic("mock out the VgpuTypeGetDeviceID method") +// }, +// VgpuTypeGetFrameRateLimitFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { +// panic("mock out the VgpuTypeGetFrameRateLimit method") +// }, +// VgpuTypeGetFramebufferSizeFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint64, nvml.Return) { +// panic("mock out the VgpuTypeGetFramebufferSize method") +// }, +// VgpuTypeGetGpuInstanceProfileIdFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { +// panic("mock out the VgpuTypeGetGpuInstanceProfileId method") +// }, +// VgpuTypeGetLicenseFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { +// panic("mock out the VgpuTypeGetLicense method") +// }, +// VgpuTypeGetMaxInstancesFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { +// panic("mock out the VgpuTypeGetMaxInstances method") +// }, +// VgpuTypeGetMaxInstancesPerGpuInstanceFunc: func(vgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance) nvml.Return { +// panic("mock out the VgpuTypeGetMaxInstancesPerGpuInstance method") +// }, +// VgpuTypeGetMaxInstancesPerVmFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { +// panic("mock out the VgpuTypeGetMaxInstancesPerVm method") +// }, +// VgpuTypeGetNameFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { +// panic("mock out the VgpuTypeGetName method") +// }, +// VgpuTypeGetNumDisplayHeadsFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { +// panic("mock out the VgpuTypeGetNumDisplayHeads method") +// }, +// VgpuTypeGetResolutionFunc: func(vgpuTypeId nvml.VgpuTypeId, n int) (uint32, uint32, nvml.Return) { +// panic("mock out the VgpuTypeGetResolution method") +// }, +// } +// +// // use mockedInterface in code that requires nvml.Interface +// // and then make assertions. +// +// } +type Interface struct { + // ComputeInstanceDestroyFunc mocks the ComputeInstanceDestroy method. + ComputeInstanceDestroyFunc func(computeInstance nvml.ComputeInstance) nvml.Return + + // ComputeInstanceGetInfoFunc mocks the ComputeInstanceGetInfo method. + ComputeInstanceGetInfoFunc func(computeInstance nvml.ComputeInstance) (nvml.ComputeInstanceInfo, nvml.Return) + + // DeviceClearAccountingPidsFunc mocks the DeviceClearAccountingPids method. + DeviceClearAccountingPidsFunc func(device nvml.Device) nvml.Return + + // DeviceClearCpuAffinityFunc mocks the DeviceClearCpuAffinity method. + DeviceClearCpuAffinityFunc func(device nvml.Device) nvml.Return + + // DeviceClearEccErrorCountsFunc mocks the DeviceClearEccErrorCounts method. + DeviceClearEccErrorCountsFunc func(device nvml.Device, eccCounterType nvml.EccCounterType) nvml.Return + + // DeviceClearFieldValuesFunc mocks the DeviceClearFieldValues method. + DeviceClearFieldValuesFunc func(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return + + // DeviceCreateGpuInstanceFunc mocks the DeviceCreateGpuInstance method. + DeviceCreateGpuInstanceFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) + + // DeviceCreateGpuInstanceWithPlacementFunc mocks the DeviceCreateGpuInstanceWithPlacement method. + DeviceCreateGpuInstanceWithPlacementFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) + + // DeviceDiscoverGpusFunc mocks the DeviceDiscoverGpus method. + DeviceDiscoverGpusFunc func() (nvml.PciInfo, nvml.Return) + + // DeviceFreezeNvLinkUtilizationCounterFunc mocks the DeviceFreezeNvLinkUtilizationCounter method. + DeviceFreezeNvLinkUtilizationCounterFunc func(device nvml.Device, n1 int, n2 int, enableState nvml.EnableState) nvml.Return + + // DeviceGetAPIRestrictionFunc mocks the DeviceGetAPIRestriction method. + DeviceGetAPIRestrictionFunc func(device nvml.Device, restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) + + // DeviceGetAccountingBufferSizeFunc mocks the DeviceGetAccountingBufferSize method. + DeviceGetAccountingBufferSizeFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetAccountingModeFunc mocks the DeviceGetAccountingMode method. + DeviceGetAccountingModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + + // DeviceGetAccountingPidsFunc mocks the DeviceGetAccountingPids method. + DeviceGetAccountingPidsFunc func(device nvml.Device) ([]int, nvml.Return) + + // DeviceGetAccountingStatsFunc mocks the DeviceGetAccountingStats method. + DeviceGetAccountingStatsFunc func(device nvml.Device, v uint32) (nvml.AccountingStats, nvml.Return) + + // DeviceGetActiveVgpusFunc mocks the DeviceGetActiveVgpus method. + DeviceGetActiveVgpusFunc func(device nvml.Device) ([]nvml.VgpuInstance, nvml.Return) + + // DeviceGetAdaptiveClockInfoStatusFunc mocks the DeviceGetAdaptiveClockInfoStatus method. + DeviceGetAdaptiveClockInfoStatusFunc func(device nvml.Device) (uint32, nvml.Return) + + // DeviceGetAddressingModeFunc mocks the DeviceGetAddressingMode method. + DeviceGetAddressingModeFunc func(device nvml.Device) (nvml.DeviceAddressingMode, nvml.Return) + + // DeviceGetApplicationsClockFunc mocks the DeviceGetApplicationsClock method. + DeviceGetApplicationsClockFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) + + // DeviceGetArchitectureFunc mocks the DeviceGetArchitecture method. + DeviceGetArchitectureFunc func(device nvml.Device) (nvml.DeviceArchitecture, nvml.Return) + + // DeviceGetAttributesFunc mocks the DeviceGetAttributes method. + DeviceGetAttributesFunc func(device nvml.Device) (nvml.DeviceAttributes, nvml.Return) + + // DeviceGetAutoBoostedClocksEnabledFunc mocks the DeviceGetAutoBoostedClocksEnabled method. + DeviceGetAutoBoostedClocksEnabledFunc func(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) + + // DeviceGetBAR1MemoryInfoFunc mocks the DeviceGetBAR1MemoryInfo method. + DeviceGetBAR1MemoryInfoFunc func(device nvml.Device) (nvml.BAR1Memory, nvml.Return) + + // DeviceGetBoardIdFunc mocks the DeviceGetBoardId method. + DeviceGetBoardIdFunc func(device nvml.Device) (uint32, nvml.Return) + + // DeviceGetBoardPartNumberFunc mocks the DeviceGetBoardPartNumber method. + DeviceGetBoardPartNumberFunc func(device nvml.Device) (string, nvml.Return) + + // DeviceGetBrandFunc mocks the DeviceGetBrand method. + DeviceGetBrandFunc func(device nvml.Device) (nvml.BrandType, nvml.Return) + + // DeviceGetBridgeChipInfoFunc mocks the DeviceGetBridgeChipInfo method. + DeviceGetBridgeChipInfoFunc func(device nvml.Device) (nvml.BridgeChipHierarchy, nvml.Return) + + // DeviceGetBusTypeFunc mocks the DeviceGetBusType method. + DeviceGetBusTypeFunc func(device nvml.Device) (nvml.BusType, nvml.Return) + + // DeviceGetC2cModeInfoVFunc mocks the DeviceGetC2cModeInfoV method. + DeviceGetC2cModeInfoVFunc func(device nvml.Device) nvml.C2cModeInfoHandler + + // DeviceGetCapabilitiesFunc mocks the DeviceGetCapabilities method. + DeviceGetCapabilitiesFunc func(device nvml.Device) (nvml.DeviceCapabilities, nvml.Return) + + // DeviceGetClkMonStatusFunc mocks the DeviceGetClkMonStatus method. + DeviceGetClkMonStatusFunc func(device nvml.Device) (nvml.ClkMonStatus, nvml.Return) + + // DeviceGetClockFunc mocks the DeviceGetClock method. + DeviceGetClockFunc func(device nvml.Device, clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) + + // DeviceGetClockInfoFunc mocks the DeviceGetClockInfo method. + DeviceGetClockInfoFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) + + // DeviceGetClockOffsetsFunc mocks the DeviceGetClockOffsets method. + DeviceGetClockOffsetsFunc func(device nvml.Device) (nvml.ClockOffset, nvml.Return) + + // DeviceGetComputeInstanceIdFunc mocks the DeviceGetComputeInstanceId method. + DeviceGetComputeInstanceIdFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetComputeModeFunc mocks the DeviceGetComputeMode method. + DeviceGetComputeModeFunc func(device nvml.Device) (nvml.ComputeMode, nvml.Return) + + // DeviceGetComputeRunningProcessesFunc mocks the DeviceGetComputeRunningProcesses method. + DeviceGetComputeRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) + + // DeviceGetConfComputeGpuAttestationReportFunc mocks the DeviceGetConfComputeGpuAttestationReport method. + DeviceGetConfComputeGpuAttestationReportFunc func(device nvml.Device, confComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport) nvml.Return + + // DeviceGetConfComputeGpuCertificateFunc mocks the DeviceGetConfComputeGpuCertificate method. + DeviceGetConfComputeGpuCertificateFunc func(device nvml.Device) (nvml.ConfComputeGpuCertificate, nvml.Return) + + // DeviceGetConfComputeMemSizeInfoFunc mocks the DeviceGetConfComputeMemSizeInfo method. + DeviceGetConfComputeMemSizeInfoFunc func(device nvml.Device) (nvml.ConfComputeMemSizeInfo, nvml.Return) + + // DeviceGetConfComputeProtectedMemoryUsageFunc mocks the DeviceGetConfComputeProtectedMemoryUsage method. + DeviceGetConfComputeProtectedMemoryUsageFunc func(device nvml.Device) (nvml.Memory, nvml.Return) + + // DeviceGetCoolerInfoFunc mocks the DeviceGetCoolerInfo method. + DeviceGetCoolerInfoFunc func(device nvml.Device) (nvml.CoolerInfo, nvml.Return) + + // DeviceGetCountFunc mocks the DeviceGetCount method. + DeviceGetCountFunc func() (int, nvml.Return) + + // DeviceGetCpuAffinityFunc mocks the DeviceGetCpuAffinity method. + DeviceGetCpuAffinityFunc func(device nvml.Device, n int) ([]uint, nvml.Return) + + // DeviceGetCpuAffinityWithinScopeFunc mocks the DeviceGetCpuAffinityWithinScope method. + DeviceGetCpuAffinityWithinScopeFunc func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) + + // DeviceGetCreatableVgpusFunc mocks the DeviceGetCreatableVgpus method. + DeviceGetCreatableVgpusFunc func(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) + + // DeviceGetCudaComputeCapabilityFunc mocks the DeviceGetCudaComputeCapability method. + DeviceGetCudaComputeCapabilityFunc func(device nvml.Device) (int, int, nvml.Return) + + // DeviceGetCurrPcieLinkGenerationFunc mocks the DeviceGetCurrPcieLinkGeneration method. + DeviceGetCurrPcieLinkGenerationFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetCurrPcieLinkWidthFunc mocks the DeviceGetCurrPcieLinkWidth method. + DeviceGetCurrPcieLinkWidthFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetCurrentClockFreqsFunc mocks the DeviceGetCurrentClockFreqs method. + DeviceGetCurrentClockFreqsFunc func(device nvml.Device) (nvml.DeviceCurrentClockFreqs, nvml.Return) + + // DeviceGetCurrentClocksEventReasonsFunc mocks the DeviceGetCurrentClocksEventReasons method. + DeviceGetCurrentClocksEventReasonsFunc func(device nvml.Device) (uint64, nvml.Return) + + // DeviceGetCurrentClocksThrottleReasonsFunc mocks the DeviceGetCurrentClocksThrottleReasons method. + DeviceGetCurrentClocksThrottleReasonsFunc func(device nvml.Device) (uint64, nvml.Return) + + // DeviceGetDecoderUtilizationFunc mocks the DeviceGetDecoderUtilization method. + DeviceGetDecoderUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) + + // DeviceGetDefaultApplicationsClockFunc mocks the DeviceGetDefaultApplicationsClock method. + DeviceGetDefaultApplicationsClockFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) + + // DeviceGetDefaultEccModeFunc mocks the DeviceGetDefaultEccMode method. + DeviceGetDefaultEccModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + + // DeviceGetDetailedEccErrorsFunc mocks the DeviceGetDetailedEccErrors method. + DeviceGetDetailedEccErrorsFunc func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) + + // DeviceGetDeviceHandleFromMigDeviceHandleFunc mocks the DeviceGetDeviceHandleFromMigDeviceHandle method. + DeviceGetDeviceHandleFromMigDeviceHandleFunc func(device nvml.Device) (nvml.Device, nvml.Return) + + // DeviceGetDisplayActiveFunc mocks the DeviceGetDisplayActive method. + DeviceGetDisplayActiveFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + + // DeviceGetDisplayModeFunc mocks the DeviceGetDisplayMode method. + DeviceGetDisplayModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + + // DeviceGetDramEncryptionModeFunc mocks the DeviceGetDramEncryptionMode method. + DeviceGetDramEncryptionModeFunc func(device nvml.Device) (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) + + // DeviceGetDriverModelFunc mocks the DeviceGetDriverModel method. + DeviceGetDriverModelFunc func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) + + // DeviceGetDriverModel_v2Func mocks the DeviceGetDriverModel_v2 method. + DeviceGetDriverModel_v2Func func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) + + // DeviceGetDynamicPstatesInfoFunc mocks the DeviceGetDynamicPstatesInfo method. + DeviceGetDynamicPstatesInfoFunc func(device nvml.Device) (nvml.GpuDynamicPstatesInfo, nvml.Return) + + // DeviceGetEccModeFunc mocks the DeviceGetEccMode method. + DeviceGetEccModeFunc func(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) + + // DeviceGetEncoderCapacityFunc mocks the DeviceGetEncoderCapacity method. + DeviceGetEncoderCapacityFunc func(device nvml.Device, encoderType nvml.EncoderType) (int, nvml.Return) + + // DeviceGetEncoderSessionsFunc mocks the DeviceGetEncoderSessions method. + DeviceGetEncoderSessionsFunc func(device nvml.Device) ([]nvml.EncoderSessionInfo, nvml.Return) + + // DeviceGetEncoderStatsFunc mocks the DeviceGetEncoderStats method. + DeviceGetEncoderStatsFunc func(device nvml.Device) (int, uint32, uint32, nvml.Return) + + // DeviceGetEncoderUtilizationFunc mocks the DeviceGetEncoderUtilization method. + DeviceGetEncoderUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) + + // DeviceGetEnforcedPowerLimitFunc mocks the DeviceGetEnforcedPowerLimit method. + DeviceGetEnforcedPowerLimitFunc func(device nvml.Device) (uint32, nvml.Return) + + // DeviceGetFBCSessionsFunc mocks the DeviceGetFBCSessions method. + DeviceGetFBCSessionsFunc func(device nvml.Device) ([]nvml.FBCSessionInfo, nvml.Return) + + // DeviceGetFBCStatsFunc mocks the DeviceGetFBCStats method. + DeviceGetFBCStatsFunc func(device nvml.Device) (nvml.FBCStats, nvml.Return) + + // DeviceGetFanControlPolicy_v2Func mocks the DeviceGetFanControlPolicy_v2 method. + DeviceGetFanControlPolicy_v2Func func(device nvml.Device, n int) (nvml.FanControlPolicy, nvml.Return) + + // DeviceGetFanSpeedFunc mocks the DeviceGetFanSpeed method. + DeviceGetFanSpeedFunc func(device nvml.Device) (uint32, nvml.Return) + + // DeviceGetFanSpeedRPMFunc mocks the DeviceGetFanSpeedRPM method. + DeviceGetFanSpeedRPMFunc func(device nvml.Device) (nvml.FanSpeedInfo, nvml.Return) + + // DeviceGetFanSpeed_v2Func mocks the DeviceGetFanSpeed_v2 method. + DeviceGetFanSpeed_v2Func func(device nvml.Device, n int) (uint32, nvml.Return) + + // DeviceGetFieldValuesFunc mocks the DeviceGetFieldValues method. + DeviceGetFieldValuesFunc func(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return + + // DeviceGetGpcClkMinMaxVfOffsetFunc mocks the DeviceGetGpcClkMinMaxVfOffset method. + DeviceGetGpcClkMinMaxVfOffsetFunc func(device nvml.Device) (int, int, nvml.Return) + + // DeviceGetGpcClkVfOffsetFunc mocks the DeviceGetGpcClkVfOffset method. + DeviceGetGpcClkVfOffsetFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetGpuFabricInfoFunc mocks the DeviceGetGpuFabricInfo method. + DeviceGetGpuFabricInfoFunc func(device nvml.Device) (nvml.GpuFabricInfo, nvml.Return) + + // 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) + + // DeviceGetGpuInstanceIdFunc mocks the DeviceGetGpuInstanceId method. + DeviceGetGpuInstanceIdFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetGpuInstancePossiblePlacementsFunc mocks the DeviceGetGpuInstancePossiblePlacements method. + DeviceGetGpuInstancePossiblePlacementsFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) + + // DeviceGetGpuInstanceProfileInfoFunc mocks the DeviceGetGpuInstanceProfileInfo method. + DeviceGetGpuInstanceProfileInfoFunc func(device nvml.Device, n int) (nvml.GpuInstanceProfileInfo, nvml.Return) + + // DeviceGetGpuInstanceProfileInfoByIdVFunc mocks the DeviceGetGpuInstanceProfileInfoByIdV method. + DeviceGetGpuInstanceProfileInfoByIdVFunc func(device nvml.Device, n int) nvml.GpuInstanceProfileInfoByIdHandler + + // 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) + + // DeviceGetGpuInstancesFunc mocks the DeviceGetGpuInstances method. + DeviceGetGpuInstancesFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) + + // DeviceGetGpuMaxPcieLinkGenerationFunc mocks the DeviceGetGpuMaxPcieLinkGeneration method. + DeviceGetGpuMaxPcieLinkGenerationFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetGpuOperationModeFunc mocks the DeviceGetGpuOperationMode method. + DeviceGetGpuOperationModeFunc func(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) + + // DeviceGetGraphicsRunningProcessesFunc mocks the DeviceGetGraphicsRunningProcesses method. + DeviceGetGraphicsRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) + + // DeviceGetGridLicensableFeaturesFunc mocks the DeviceGetGridLicensableFeatures method. + DeviceGetGridLicensableFeaturesFunc func(device nvml.Device) (nvml.GridLicensableFeatures, nvml.Return) + + // DeviceGetGspFirmwareModeFunc mocks the DeviceGetGspFirmwareMode method. + DeviceGetGspFirmwareModeFunc func(device nvml.Device) (bool, bool, nvml.Return) + + // DeviceGetGspFirmwareVersionFunc mocks the DeviceGetGspFirmwareVersion method. + DeviceGetGspFirmwareVersionFunc func(device nvml.Device) (string, nvml.Return) + + // DeviceGetHandleByIndexFunc mocks the DeviceGetHandleByIndex method. + DeviceGetHandleByIndexFunc func(n int) (nvml.Device, nvml.Return) + + // DeviceGetHandleByPciBusIdFunc mocks the DeviceGetHandleByPciBusId method. + DeviceGetHandleByPciBusIdFunc func(s string) (nvml.Device, nvml.Return) + + // DeviceGetHandleBySerialFunc mocks the DeviceGetHandleBySerial method. + DeviceGetHandleBySerialFunc func(s string) (nvml.Device, nvml.Return) + + // DeviceGetHandleByUUIDFunc mocks the DeviceGetHandleByUUID method. + DeviceGetHandleByUUIDFunc func(s string) (nvml.Device, nvml.Return) + + // DeviceGetHandleByUUIDVFunc mocks the DeviceGetHandleByUUIDV method. + DeviceGetHandleByUUIDVFunc func(uUID *nvml.UUID) (nvml.Device, nvml.Return) + + // DeviceGetHostVgpuModeFunc mocks the DeviceGetHostVgpuMode method. + DeviceGetHostVgpuModeFunc func(device nvml.Device) (nvml.HostVgpuMode, nvml.Return) + + // DeviceGetIndexFunc mocks the DeviceGetIndex method. + DeviceGetIndexFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetInforomConfigurationChecksumFunc mocks the DeviceGetInforomConfigurationChecksum method. + DeviceGetInforomConfigurationChecksumFunc func(device nvml.Device) (uint32, nvml.Return) + + // DeviceGetInforomImageVersionFunc mocks the DeviceGetInforomImageVersion method. + DeviceGetInforomImageVersionFunc func(device nvml.Device) (string, nvml.Return) + + // DeviceGetInforomVersionFunc mocks the DeviceGetInforomVersion method. + DeviceGetInforomVersionFunc func(device nvml.Device, inforomObject nvml.InforomObject) (string, nvml.Return) + + // DeviceGetIrqNumFunc mocks the DeviceGetIrqNum method. + DeviceGetIrqNumFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetJpgUtilizationFunc mocks the DeviceGetJpgUtilization method. + DeviceGetJpgUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) + + // DeviceGetLastBBXFlushTimeFunc mocks the DeviceGetLastBBXFlushTime method. + DeviceGetLastBBXFlushTimeFunc func(device nvml.Device) (uint64, uint, nvml.Return) + + // DeviceGetMPSComputeRunningProcessesFunc mocks the DeviceGetMPSComputeRunningProcesses method. + DeviceGetMPSComputeRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) + + // DeviceGetMarginTemperatureFunc mocks the DeviceGetMarginTemperature method. + DeviceGetMarginTemperatureFunc func(device nvml.Device) (nvml.MarginTemperature, nvml.Return) + + // DeviceGetMaxClockInfoFunc mocks the DeviceGetMaxClockInfo method. + DeviceGetMaxClockInfoFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) + + // DeviceGetMaxCustomerBoostClockFunc mocks the DeviceGetMaxCustomerBoostClock method. + DeviceGetMaxCustomerBoostClockFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) + + // DeviceGetMaxMigDeviceCountFunc mocks the DeviceGetMaxMigDeviceCount method. + DeviceGetMaxMigDeviceCountFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetMaxPcieLinkGenerationFunc mocks the DeviceGetMaxPcieLinkGeneration method. + DeviceGetMaxPcieLinkGenerationFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetMaxPcieLinkWidthFunc mocks the DeviceGetMaxPcieLinkWidth method. + DeviceGetMaxPcieLinkWidthFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetMemClkMinMaxVfOffsetFunc mocks the DeviceGetMemClkMinMaxVfOffset method. + DeviceGetMemClkMinMaxVfOffsetFunc func(device nvml.Device) (int, int, nvml.Return) + + // DeviceGetMemClkVfOffsetFunc mocks the DeviceGetMemClkVfOffset method. + DeviceGetMemClkVfOffsetFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetMemoryAffinityFunc mocks the DeviceGetMemoryAffinity method. + DeviceGetMemoryAffinityFunc func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) + + // DeviceGetMemoryBusWidthFunc mocks the DeviceGetMemoryBusWidth method. + DeviceGetMemoryBusWidthFunc func(device nvml.Device) (uint32, nvml.Return) + + // DeviceGetMemoryErrorCounterFunc mocks the DeviceGetMemoryErrorCounter method. + DeviceGetMemoryErrorCounterFunc func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) + + // DeviceGetMemoryInfoFunc mocks the DeviceGetMemoryInfo method. + DeviceGetMemoryInfoFunc func(device nvml.Device) (nvml.Memory, nvml.Return) + + // DeviceGetMemoryInfo_v2Func mocks the DeviceGetMemoryInfo_v2 method. + DeviceGetMemoryInfo_v2Func func(device nvml.Device) (nvml.Memory_v2, nvml.Return) + + // DeviceGetMigDeviceHandleByIndexFunc mocks the DeviceGetMigDeviceHandleByIndex method. + DeviceGetMigDeviceHandleByIndexFunc func(device nvml.Device, n int) (nvml.Device, nvml.Return) + + // DeviceGetMigModeFunc mocks the DeviceGetMigMode method. + DeviceGetMigModeFunc func(device nvml.Device) (int, int, nvml.Return) + + // DeviceGetMinMaxClockOfPStateFunc mocks the DeviceGetMinMaxClockOfPState method. + DeviceGetMinMaxClockOfPStateFunc func(device nvml.Device, clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) + + // DeviceGetMinMaxFanSpeedFunc mocks the DeviceGetMinMaxFanSpeed method. + DeviceGetMinMaxFanSpeedFunc func(device nvml.Device) (int, int, nvml.Return) + + // DeviceGetMinorNumberFunc mocks the DeviceGetMinorNumber method. + DeviceGetMinorNumberFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetModuleIdFunc mocks the DeviceGetModuleId method. + DeviceGetModuleIdFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetMultiGpuBoardFunc mocks the DeviceGetMultiGpuBoard method. + DeviceGetMultiGpuBoardFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetNameFunc mocks the DeviceGetName method. + DeviceGetNameFunc func(device nvml.Device) (string, nvml.Return) + + // DeviceGetNumFansFunc mocks the DeviceGetNumFans method. + DeviceGetNumFansFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetNumGpuCoresFunc mocks the DeviceGetNumGpuCores method. + DeviceGetNumGpuCoresFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetNumaNodeIdFunc mocks the DeviceGetNumaNodeId method. + DeviceGetNumaNodeIdFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetNvLinkCapabilityFunc mocks the DeviceGetNvLinkCapability method. + DeviceGetNvLinkCapabilityFunc func(device nvml.Device, n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) + + // DeviceGetNvLinkErrorCounterFunc mocks the DeviceGetNvLinkErrorCounter method. + DeviceGetNvLinkErrorCounterFunc func(device nvml.Device, n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) + + // DeviceGetNvLinkInfoFunc mocks the DeviceGetNvLinkInfo method. + DeviceGetNvLinkInfoFunc func(device nvml.Device) nvml.NvLinkInfoHandler + + // DeviceGetNvLinkRemoteDeviceTypeFunc mocks the DeviceGetNvLinkRemoteDeviceType method. + DeviceGetNvLinkRemoteDeviceTypeFunc func(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, nvml.Return) + + // DeviceGetNvLinkRemotePciInfoFunc mocks the DeviceGetNvLinkRemotePciInfo method. + DeviceGetNvLinkRemotePciInfoFunc func(device nvml.Device, n int) (nvml.PciInfo, nvml.Return) + + // DeviceGetNvLinkStateFunc mocks the DeviceGetNvLinkState method. + DeviceGetNvLinkStateFunc func(device nvml.Device, n int) (nvml.EnableState, nvml.Return) + + // DeviceGetNvLinkUtilizationControlFunc mocks the DeviceGetNvLinkUtilizationControl method. + DeviceGetNvLinkUtilizationControlFunc func(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) + + // DeviceGetNvLinkUtilizationCounterFunc mocks the DeviceGetNvLinkUtilizationCounter method. + DeviceGetNvLinkUtilizationCounterFunc func(device nvml.Device, n1 int, n2 int) (uint64, uint64, nvml.Return) + + // DeviceGetNvLinkVersionFunc mocks the DeviceGetNvLinkVersion method. + DeviceGetNvLinkVersionFunc func(device nvml.Device, n int) (uint32, nvml.Return) + + // DeviceGetNvlinkBwModeFunc mocks the DeviceGetNvlinkBwMode method. + DeviceGetNvlinkBwModeFunc func(device nvml.Device) (nvml.NvlinkGetBwMode, nvml.Return) + + // DeviceGetNvlinkSupportedBwModesFunc mocks the DeviceGetNvlinkSupportedBwModes method. + DeviceGetNvlinkSupportedBwModesFunc func(device nvml.Device) (nvml.NvlinkSupportedBwModes, nvml.Return) + + // DeviceGetOfaUtilizationFunc mocks the DeviceGetOfaUtilization method. + DeviceGetOfaUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) + + // DeviceGetP2PStatusFunc mocks the DeviceGetP2PStatus method. + DeviceGetP2PStatusFunc func(device1 nvml.Device, device2 nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) + + // DeviceGetPciInfoFunc mocks the DeviceGetPciInfo method. + DeviceGetPciInfoFunc func(device nvml.Device) (nvml.PciInfo, nvml.Return) + + // DeviceGetPciInfoExtFunc mocks the DeviceGetPciInfoExt method. + DeviceGetPciInfoExtFunc func(device nvml.Device) (nvml.PciInfoExt, nvml.Return) + + // DeviceGetPcieLinkMaxSpeedFunc mocks the DeviceGetPcieLinkMaxSpeed method. + DeviceGetPcieLinkMaxSpeedFunc func(device nvml.Device) (uint32, nvml.Return) + + // DeviceGetPcieReplayCounterFunc mocks the DeviceGetPcieReplayCounter method. + DeviceGetPcieReplayCounterFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetPcieSpeedFunc mocks the DeviceGetPcieSpeed method. + DeviceGetPcieSpeedFunc func(device nvml.Device) (int, nvml.Return) + + // DeviceGetPcieThroughputFunc mocks the DeviceGetPcieThroughput method. + DeviceGetPcieThroughputFunc func(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) + + // DeviceGetPdiFunc mocks the DeviceGetPdi method. + DeviceGetPdiFunc func(device nvml.Device) (nvml.Pdi, nvml.Return) + + // DeviceGetPerformanceModesFunc mocks the DeviceGetPerformanceModes method. + DeviceGetPerformanceModesFunc func(device nvml.Device) (nvml.DevicePerfModes, nvml.Return) + + // DeviceGetPerformanceStateFunc mocks the DeviceGetPerformanceState method. + DeviceGetPerformanceStateFunc func(device nvml.Device) (nvml.Pstates, nvml.Return) + + // DeviceGetPersistenceModeFunc mocks the DeviceGetPersistenceMode method. + DeviceGetPersistenceModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + + // DeviceGetPgpuMetadataStringFunc mocks the DeviceGetPgpuMetadataString method. + DeviceGetPgpuMetadataStringFunc func(device nvml.Device) (string, nvml.Return) + + // DeviceGetPlatformInfoFunc mocks the DeviceGetPlatformInfo method. + DeviceGetPlatformInfoFunc func(device nvml.Device) (nvml.PlatformInfo, nvml.Return) + + // DeviceGetPowerManagementDefaultLimitFunc mocks the DeviceGetPowerManagementDefaultLimit method. + DeviceGetPowerManagementDefaultLimitFunc func(device nvml.Device) (uint32, nvml.Return) + + // DeviceGetPowerManagementLimitFunc mocks the DeviceGetPowerManagementLimit method. + DeviceGetPowerManagementLimitFunc func(device nvml.Device) (uint32, nvml.Return) + + // DeviceGetPowerManagementLimitConstraintsFunc mocks the DeviceGetPowerManagementLimitConstraints method. + DeviceGetPowerManagementLimitConstraintsFunc func(device nvml.Device) (uint32, uint32, nvml.Return) + + // DeviceGetPowerManagementModeFunc mocks the DeviceGetPowerManagementMode method. + DeviceGetPowerManagementModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + + // DeviceGetPowerMizerMode_v1Func mocks the DeviceGetPowerMizerMode_v1 method. + DeviceGetPowerMizerMode_v1Func func(device nvml.Device) (nvml.DevicePowerMizerModes_v1, nvml.Return) + + // DeviceGetPowerSourceFunc mocks the DeviceGetPowerSource method. + DeviceGetPowerSourceFunc func(device nvml.Device) (nvml.PowerSource, nvml.Return) + + // DeviceGetPowerStateFunc mocks the DeviceGetPowerState method. + DeviceGetPowerStateFunc func(device nvml.Device) (nvml.Pstates, nvml.Return) + + // DeviceGetPowerUsageFunc mocks the DeviceGetPowerUsage method. + DeviceGetPowerUsageFunc func(device nvml.Device) (uint32, nvml.Return) + + // DeviceGetProcessUtilizationFunc mocks the DeviceGetProcessUtilization method. + DeviceGetProcessUtilizationFunc func(device nvml.Device, v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) + + // DeviceGetProcessesUtilizationInfoFunc mocks the DeviceGetProcessesUtilizationInfo method. + DeviceGetProcessesUtilizationInfoFunc func(device nvml.Device) (nvml.ProcessesUtilizationInfo, nvml.Return) + + // DeviceGetRemappedRowsFunc mocks the DeviceGetRemappedRows method. + DeviceGetRemappedRowsFunc func(device nvml.Device) (int, int, bool, bool, nvml.Return) + + // DeviceGetRepairStatusFunc mocks the DeviceGetRepairStatus method. + DeviceGetRepairStatusFunc func(device nvml.Device) (nvml.RepairStatus, nvml.Return) + + // DeviceGetRetiredPagesFunc mocks the DeviceGetRetiredPages method. + DeviceGetRetiredPagesFunc func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) + + // DeviceGetRetiredPagesPendingStatusFunc mocks the DeviceGetRetiredPagesPendingStatus method. + DeviceGetRetiredPagesPendingStatusFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) + + // DeviceGetRetiredPages_v2Func mocks the DeviceGetRetiredPages_v2 method. + DeviceGetRetiredPages_v2Func func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) + + // DeviceGetRowRemapperHistogramFunc mocks the DeviceGetRowRemapperHistogram method. + DeviceGetRowRemapperHistogramFunc func(device nvml.Device) (nvml.RowRemapperHistogramValues, nvml.Return) + + // DeviceGetRunningProcessDetailListFunc mocks the DeviceGetRunningProcessDetailList method. + DeviceGetRunningProcessDetailListFunc func(device nvml.Device) (nvml.ProcessDetailList, nvml.Return) + + // DeviceGetSamplesFunc mocks the DeviceGetSamples method. + DeviceGetSamplesFunc func(device nvml.Device, samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) + + // DeviceGetSerialFunc mocks the DeviceGetSerial method. + DeviceGetSerialFunc func(device nvml.Device) (string, nvml.Return) + + // DeviceGetSramEccErrorStatusFunc mocks the DeviceGetSramEccErrorStatus method. + DeviceGetSramEccErrorStatusFunc func(device nvml.Device) (nvml.EccSramErrorStatus, nvml.Return) + + // DeviceGetSramUniqueUncorrectedEccErrorCountsFunc mocks the DeviceGetSramUniqueUncorrectedEccErrorCounts method. + DeviceGetSramUniqueUncorrectedEccErrorCountsFunc func(device nvml.Device, eccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts) nvml.Return + + // DeviceGetSupportedClocksEventReasonsFunc mocks the DeviceGetSupportedClocksEventReasons method. + DeviceGetSupportedClocksEventReasonsFunc func(device nvml.Device) (uint64, nvml.Return) + + // DeviceGetSupportedClocksThrottleReasonsFunc mocks the DeviceGetSupportedClocksThrottleReasons method. + DeviceGetSupportedClocksThrottleReasonsFunc func(device nvml.Device) (uint64, nvml.Return) + + // DeviceGetSupportedEventTypesFunc mocks the DeviceGetSupportedEventTypes method. + DeviceGetSupportedEventTypesFunc func(device nvml.Device) (uint64, nvml.Return) + + // DeviceGetSupportedGraphicsClocksFunc mocks the DeviceGetSupportedGraphicsClocks method. + DeviceGetSupportedGraphicsClocksFunc func(device nvml.Device, n int) (int, uint32, nvml.Return) + + // DeviceGetSupportedMemoryClocksFunc mocks the DeviceGetSupportedMemoryClocks method. + DeviceGetSupportedMemoryClocksFunc func(device nvml.Device) (int, uint32, nvml.Return) + + // DeviceGetSupportedPerformanceStatesFunc mocks the DeviceGetSupportedPerformanceStates method. + DeviceGetSupportedPerformanceStatesFunc func(device nvml.Device) ([]nvml.Pstates, nvml.Return) + + // DeviceGetSupportedVgpusFunc mocks the DeviceGetSupportedVgpus method. + DeviceGetSupportedVgpusFunc func(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) + + // DeviceGetTargetFanSpeedFunc mocks the DeviceGetTargetFanSpeed method. + DeviceGetTargetFanSpeedFunc func(device nvml.Device, n int) (int, nvml.Return) + + // DeviceGetTemperatureFunc mocks the DeviceGetTemperature method. + DeviceGetTemperatureFunc func(device nvml.Device, temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) + + // DeviceGetTemperatureThresholdFunc mocks the DeviceGetTemperatureThreshold method. + DeviceGetTemperatureThresholdFunc func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) + + // DeviceGetTemperatureVFunc mocks the DeviceGetTemperatureV method. + DeviceGetTemperatureVFunc func(device nvml.Device) nvml.TemperatureHandler + + // DeviceGetThermalSettingsFunc mocks the DeviceGetThermalSettings method. + DeviceGetThermalSettingsFunc func(device nvml.Device, v uint32) (nvml.GpuThermalSettings, nvml.Return) + + // DeviceGetTopologyCommonAncestorFunc mocks the DeviceGetTopologyCommonAncestor method. + DeviceGetTopologyCommonAncestorFunc func(device1 nvml.Device, device2 nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) + + // DeviceGetTopologyNearestGpusFunc mocks the DeviceGetTopologyNearestGpus method. + DeviceGetTopologyNearestGpusFunc func(device nvml.Device, gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) + + // DeviceGetTotalEccErrorsFunc mocks the DeviceGetTotalEccErrors method. + DeviceGetTotalEccErrorsFunc func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) + + // DeviceGetTotalEnergyConsumptionFunc mocks the DeviceGetTotalEnergyConsumption method. + DeviceGetTotalEnergyConsumptionFunc func(device nvml.Device) (uint64, nvml.Return) + + // DeviceGetUUIDFunc mocks the DeviceGetUUID method. + DeviceGetUUIDFunc func(device nvml.Device) (string, nvml.Return) + + // DeviceGetUtilizationRatesFunc mocks the DeviceGetUtilizationRates method. + DeviceGetUtilizationRatesFunc func(device nvml.Device) (nvml.Utilization, nvml.Return) + + // DeviceGetVbiosVersionFunc mocks the DeviceGetVbiosVersion method. + DeviceGetVbiosVersionFunc func(device nvml.Device) (string, nvml.Return) + + // DeviceGetVgpuCapabilitiesFunc mocks the DeviceGetVgpuCapabilities method. + DeviceGetVgpuCapabilitiesFunc func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) + + // DeviceGetVgpuHeterogeneousModeFunc mocks the DeviceGetVgpuHeterogeneousMode method. + DeviceGetVgpuHeterogeneousModeFunc func(device nvml.Device) (nvml.VgpuHeterogeneousMode, nvml.Return) + + // DeviceGetVgpuInstancesUtilizationInfoFunc mocks the DeviceGetVgpuInstancesUtilizationInfo method. + DeviceGetVgpuInstancesUtilizationInfoFunc func(device nvml.Device) (nvml.VgpuInstancesUtilizationInfo, nvml.Return) + + // DeviceGetVgpuMetadataFunc mocks the DeviceGetVgpuMetadata method. + DeviceGetVgpuMetadataFunc func(device nvml.Device) (nvml.VgpuPgpuMetadata, nvml.Return) + + // DeviceGetVgpuProcessUtilizationFunc mocks the DeviceGetVgpuProcessUtilization method. + DeviceGetVgpuProcessUtilizationFunc func(device nvml.Device, v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) + + // DeviceGetVgpuProcessesUtilizationInfoFunc mocks the DeviceGetVgpuProcessesUtilizationInfo method. + DeviceGetVgpuProcessesUtilizationInfoFunc func(device nvml.Device) (nvml.VgpuProcessesUtilizationInfo, nvml.Return) + + // DeviceGetVgpuSchedulerCapabilitiesFunc mocks the DeviceGetVgpuSchedulerCapabilities method. + DeviceGetVgpuSchedulerCapabilitiesFunc func(device nvml.Device) (nvml.VgpuSchedulerCapabilities, nvml.Return) + + // DeviceGetVgpuSchedulerLogFunc mocks the DeviceGetVgpuSchedulerLog method. + DeviceGetVgpuSchedulerLogFunc func(device nvml.Device) (nvml.VgpuSchedulerLog, nvml.Return) + + // DeviceGetVgpuSchedulerStateFunc mocks the DeviceGetVgpuSchedulerState method. + DeviceGetVgpuSchedulerStateFunc func(device nvml.Device) (nvml.VgpuSchedulerGetState, nvml.Return) + + // DeviceGetVgpuTypeCreatablePlacementsFunc mocks the DeviceGetVgpuTypeCreatablePlacements method. + DeviceGetVgpuTypeCreatablePlacementsFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) + + // DeviceGetVgpuTypeSupportedPlacementsFunc mocks the DeviceGetVgpuTypeSupportedPlacements method. + DeviceGetVgpuTypeSupportedPlacementsFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) + + // DeviceGetVgpuUtilizationFunc mocks the DeviceGetVgpuUtilization method. + DeviceGetVgpuUtilizationFunc func(device nvml.Device, v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) + + // DeviceGetViolationStatusFunc mocks the DeviceGetViolationStatus method. + DeviceGetViolationStatusFunc func(device nvml.Device, perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) + + // DeviceGetVirtualizationModeFunc mocks the DeviceGetVirtualizationMode method. + DeviceGetVirtualizationModeFunc func(device nvml.Device) (nvml.GpuVirtualizationMode, nvml.Return) + + // DeviceIsMigDeviceHandleFunc mocks the DeviceIsMigDeviceHandle method. + DeviceIsMigDeviceHandleFunc func(device nvml.Device) (bool, nvml.Return) + + // DeviceModifyDrainStateFunc mocks the DeviceModifyDrainState method. + DeviceModifyDrainStateFunc func(pciInfo *nvml.PciInfo, enableState nvml.EnableState) nvml.Return + + // DeviceOnSameBoardFunc mocks the DeviceOnSameBoard method. + DeviceOnSameBoardFunc func(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) + + // DevicePowerSmoothingActivatePresetProfileFunc mocks the DevicePowerSmoothingActivatePresetProfile method. + DevicePowerSmoothingActivatePresetProfileFunc func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return + + // DevicePowerSmoothingSetStateFunc mocks the DevicePowerSmoothingSetState method. + DevicePowerSmoothingSetStateFunc func(device nvml.Device, powerSmoothingState *nvml.PowerSmoothingState) nvml.Return + + // DevicePowerSmoothingUpdatePresetProfileParamFunc mocks the DevicePowerSmoothingUpdatePresetProfileParam method. + DevicePowerSmoothingUpdatePresetProfileParamFunc func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return + + // DeviceQueryDrainStateFunc mocks the DeviceQueryDrainState method. + DeviceQueryDrainStateFunc func(pciInfo *nvml.PciInfo) (nvml.EnableState, nvml.Return) + + // DeviceReadWritePRM_v1Func mocks the DeviceReadWritePRM_v1 method. + DeviceReadWritePRM_v1Func func(device nvml.Device, pRMTLV_v1 *nvml.PRMTLV_v1) nvml.Return + + // DeviceRegisterEventsFunc mocks the DeviceRegisterEvents method. + DeviceRegisterEventsFunc func(device nvml.Device, v uint64, eventSet nvml.EventSet) nvml.Return + + // DeviceRemoveGpuFunc mocks the DeviceRemoveGpu method. + DeviceRemoveGpuFunc func(pciInfo *nvml.PciInfo) nvml.Return + + // DeviceRemoveGpu_v2Func mocks the DeviceRemoveGpu_v2 method. + DeviceRemoveGpu_v2Func func(pciInfo *nvml.PciInfo, detachGpuState nvml.DetachGpuState, pcieLinkState nvml.PcieLinkState) nvml.Return + + // DeviceResetApplicationsClocksFunc mocks the DeviceResetApplicationsClocks method. + DeviceResetApplicationsClocksFunc func(device nvml.Device) nvml.Return + + // DeviceResetGpuLockedClocksFunc mocks the DeviceResetGpuLockedClocks method. + DeviceResetGpuLockedClocksFunc func(device nvml.Device) nvml.Return + + // DeviceResetMemoryLockedClocksFunc mocks the DeviceResetMemoryLockedClocks method. + DeviceResetMemoryLockedClocksFunc func(device nvml.Device) nvml.Return + + // DeviceResetNvLinkErrorCountersFunc mocks the DeviceResetNvLinkErrorCounters method. + DeviceResetNvLinkErrorCountersFunc func(device nvml.Device, n int) nvml.Return + + // DeviceResetNvLinkUtilizationCounterFunc mocks the DeviceResetNvLinkUtilizationCounter method. + DeviceResetNvLinkUtilizationCounterFunc func(device nvml.Device, n1 int, n2 int) nvml.Return + + // DeviceSetAPIRestrictionFunc mocks the DeviceSetAPIRestriction method. + DeviceSetAPIRestrictionFunc func(device nvml.Device, restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return + + // DeviceSetAccountingModeFunc mocks the DeviceSetAccountingMode method. + DeviceSetAccountingModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return + + // DeviceSetApplicationsClocksFunc mocks the DeviceSetApplicationsClocks method. + DeviceSetApplicationsClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return + + // DeviceSetAutoBoostedClocksEnabledFunc mocks the DeviceSetAutoBoostedClocksEnabled method. + DeviceSetAutoBoostedClocksEnabledFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return + + // DeviceSetClockOffsetsFunc mocks the DeviceSetClockOffsets method. + DeviceSetClockOffsetsFunc func(device nvml.Device, clockOffset nvml.ClockOffset) nvml.Return + + // DeviceSetComputeModeFunc mocks the DeviceSetComputeMode method. + DeviceSetComputeModeFunc func(device nvml.Device, computeMode nvml.ComputeMode) nvml.Return + + // DeviceSetConfComputeUnprotectedMemSizeFunc mocks the DeviceSetConfComputeUnprotectedMemSize method. + DeviceSetConfComputeUnprotectedMemSizeFunc func(device nvml.Device, v uint64) nvml.Return + + // DeviceSetCpuAffinityFunc mocks the DeviceSetCpuAffinity method. + DeviceSetCpuAffinityFunc func(device nvml.Device) nvml.Return + + // DeviceSetDefaultAutoBoostedClocksEnabledFunc mocks the DeviceSetDefaultAutoBoostedClocksEnabled method. + DeviceSetDefaultAutoBoostedClocksEnabledFunc func(device nvml.Device, enableState nvml.EnableState, v uint32) nvml.Return + + // DeviceSetDefaultFanSpeed_v2Func mocks the DeviceSetDefaultFanSpeed_v2 method. + DeviceSetDefaultFanSpeed_v2Func func(device nvml.Device, n int) nvml.Return + + // DeviceSetDramEncryptionModeFunc mocks the DeviceSetDramEncryptionMode method. + DeviceSetDramEncryptionModeFunc func(device nvml.Device, dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return + + // DeviceSetDriverModelFunc mocks the DeviceSetDriverModel method. + DeviceSetDriverModelFunc func(device nvml.Device, driverModel nvml.DriverModel, v uint32) nvml.Return + + // DeviceSetEccModeFunc mocks the DeviceSetEccMode method. + DeviceSetEccModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return + + // DeviceSetFanControlPolicyFunc mocks the DeviceSetFanControlPolicy method. + DeviceSetFanControlPolicyFunc func(device nvml.Device, n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return + + // DeviceSetFanSpeed_v2Func mocks the DeviceSetFanSpeed_v2 method. + DeviceSetFanSpeed_v2Func func(device nvml.Device, n1 int, n2 int) nvml.Return + + // DeviceSetGpcClkVfOffsetFunc mocks the DeviceSetGpcClkVfOffset method. + DeviceSetGpcClkVfOffsetFunc func(device nvml.Device, n int) nvml.Return + + // DeviceSetGpuLockedClocksFunc mocks the DeviceSetGpuLockedClocks method. + DeviceSetGpuLockedClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return + + // DeviceSetGpuOperationModeFunc mocks the DeviceSetGpuOperationMode method. + DeviceSetGpuOperationModeFunc func(device nvml.Device, gpuOperationMode nvml.GpuOperationMode) nvml.Return + + // DeviceSetMemClkVfOffsetFunc mocks the DeviceSetMemClkVfOffset method. + DeviceSetMemClkVfOffsetFunc func(device nvml.Device, n int) nvml.Return + + // DeviceSetMemoryLockedClocksFunc mocks the DeviceSetMemoryLockedClocks method. + DeviceSetMemoryLockedClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return + + // DeviceSetMigModeFunc mocks the DeviceSetMigMode method. + DeviceSetMigModeFunc func(device nvml.Device, n int) (nvml.Return, nvml.Return) + + // DeviceSetNvLinkDeviceLowPowerThresholdFunc mocks the DeviceSetNvLinkDeviceLowPowerThreshold method. + DeviceSetNvLinkDeviceLowPowerThresholdFunc func(device nvml.Device, nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return + + // DeviceSetNvLinkUtilizationControlFunc mocks the DeviceSetNvLinkUtilizationControl method. + DeviceSetNvLinkUtilizationControlFunc func(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return + + // DeviceSetNvlinkBwModeFunc mocks the DeviceSetNvlinkBwMode method. + DeviceSetNvlinkBwModeFunc func(device nvml.Device, nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return + + // DeviceSetPersistenceModeFunc mocks the DeviceSetPersistenceMode method. + DeviceSetPersistenceModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return + + // DeviceSetPowerManagementLimitFunc mocks the DeviceSetPowerManagementLimit method. + DeviceSetPowerManagementLimitFunc func(device nvml.Device, v uint32) nvml.Return + + // DeviceSetPowerManagementLimit_v2Func mocks the DeviceSetPowerManagementLimit_v2 method. + DeviceSetPowerManagementLimit_v2Func func(device nvml.Device, powerValue_v2 *nvml.PowerValue_v2) nvml.Return + + // DeviceSetTemperatureThresholdFunc mocks the DeviceSetTemperatureThreshold method. + DeviceSetTemperatureThresholdFunc func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return + + // DeviceSetVgpuCapabilitiesFunc mocks the DeviceSetVgpuCapabilities method. + DeviceSetVgpuCapabilitiesFunc func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return + + // DeviceSetVgpuHeterogeneousModeFunc mocks the DeviceSetVgpuHeterogeneousMode method. + DeviceSetVgpuHeterogeneousModeFunc func(device nvml.Device, vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return + + // DeviceSetVgpuSchedulerStateFunc mocks the DeviceSetVgpuSchedulerState method. + DeviceSetVgpuSchedulerStateFunc func(device nvml.Device, vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return + + // DeviceSetVirtualizationModeFunc mocks the DeviceSetVirtualizationMode method. + DeviceSetVirtualizationModeFunc func(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return + + // DeviceValidateInforomFunc mocks the DeviceValidateInforom method. + DeviceValidateInforomFunc func(device nvml.Device) nvml.Return + + // DeviceWorkloadPowerProfileClearRequestedProfilesFunc mocks the DeviceWorkloadPowerProfileClearRequestedProfiles method. + DeviceWorkloadPowerProfileClearRequestedProfilesFunc func(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return + + // DeviceWorkloadPowerProfileGetCurrentProfilesFunc mocks the DeviceWorkloadPowerProfileGetCurrentProfiles method. + DeviceWorkloadPowerProfileGetCurrentProfilesFunc func(device nvml.Device) (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) + + // DeviceWorkloadPowerProfileGetProfilesInfoFunc mocks the DeviceWorkloadPowerProfileGetProfilesInfo method. + DeviceWorkloadPowerProfileGetProfilesInfoFunc func(device nvml.Device) (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) + + // DeviceWorkloadPowerProfileSetRequestedProfilesFunc mocks the DeviceWorkloadPowerProfileSetRequestedProfiles method. + DeviceWorkloadPowerProfileSetRequestedProfilesFunc func(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return + + // ErrorStringFunc mocks the ErrorString method. + ErrorStringFunc func(returnMoqParam nvml.Return) string + + // EventSetCreateFunc mocks the EventSetCreate method. + EventSetCreateFunc func() (nvml.EventSet, nvml.Return) + + // EventSetFreeFunc mocks the EventSetFree method. + EventSetFreeFunc func(eventSet nvml.EventSet) nvml.Return + + // EventSetWaitFunc mocks the EventSetWait method. + EventSetWaitFunc func(eventSet nvml.EventSet, v uint32) (nvml.EventData, nvml.Return) + + // ExtensionsFunc mocks the Extensions method. + ExtensionsFunc func() nvml.ExtendedInterface + + // GetExcludedDeviceCountFunc mocks the GetExcludedDeviceCount method. + GetExcludedDeviceCountFunc func() (int, nvml.Return) + + // GetExcludedDeviceInfoByIndexFunc mocks the GetExcludedDeviceInfoByIndex method. + GetExcludedDeviceInfoByIndexFunc func(n int) (nvml.ExcludedDeviceInfo, nvml.Return) + + // GetVgpuCompatibilityFunc mocks the GetVgpuCompatibility method. + GetVgpuCompatibilityFunc func(vgpuMetadata *nvml.VgpuMetadata, vgpuPgpuMetadata *nvml.VgpuPgpuMetadata) (nvml.VgpuPgpuCompatibility, nvml.Return) + + // GetVgpuDriverCapabilitiesFunc mocks the GetVgpuDriverCapabilities method. + GetVgpuDriverCapabilitiesFunc func(vgpuDriverCapability nvml.VgpuDriverCapability) (bool, nvml.Return) + + // GetVgpuVersionFunc mocks the GetVgpuVersion method. + GetVgpuVersionFunc func() (nvml.VgpuVersion, nvml.VgpuVersion, nvml.Return) + + // GpmMetricsGetFunc mocks the GpmMetricsGet method. + GpmMetricsGetFunc func(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.Return + + // 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 + + // GpmQueryDeviceSupportFunc mocks the GpmQueryDeviceSupport method. + GpmQueryDeviceSupportFunc func(device nvml.Device) (nvml.GpmSupport, nvml.Return) + + // 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) + + // GpmSampleAllocFunc mocks the GpmSampleAlloc method. + GpmSampleAllocFunc func() (nvml.GpmSample, nvml.Return) + + // GpmSampleFreeFunc mocks the GpmSampleFree method. + GpmSampleFreeFunc func(gpmSample nvml.GpmSample) nvml.Return + + // GpmSampleGetFunc mocks the GpmSampleGet method. + GpmSampleGetFunc func(device nvml.Device, gpmSample nvml.GpmSample) nvml.Return + + // GpmSetStreamingEnabledFunc mocks the GpmSetStreamingEnabled method. + GpmSetStreamingEnabledFunc func(device nvml.Device, v uint32) nvml.Return + + // GpuInstanceCreateComputeInstanceFunc mocks the GpuInstanceCreateComputeInstance method. + GpuInstanceCreateComputeInstanceFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) + + // GpuInstanceCreateComputeInstanceWithPlacementFunc mocks the GpuInstanceCreateComputeInstanceWithPlacement method. + GpuInstanceCreateComputeInstanceWithPlacementFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) + + // GpuInstanceDestroyFunc mocks the GpuInstanceDestroy method. + GpuInstanceDestroyFunc func(gpuInstance nvml.GpuInstance) nvml.Return + + // GpuInstanceGetActiveVgpusFunc mocks the GpuInstanceGetActiveVgpus method. + GpuInstanceGetActiveVgpusFunc func(gpuInstance nvml.GpuInstance) (nvml.ActiveVgpuInstanceInfo, nvml.Return) + + // GpuInstanceGetComputeInstanceByIdFunc mocks the GpuInstanceGetComputeInstanceById method. + GpuInstanceGetComputeInstanceByIdFunc func(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, nvml.Return) + + // GpuInstanceGetComputeInstancePossiblePlacementsFunc mocks the GpuInstanceGetComputeInstancePossiblePlacements method. + GpuInstanceGetComputeInstancePossiblePlacementsFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) + + // GpuInstanceGetComputeInstanceProfileInfoFunc mocks the GpuInstanceGetComputeInstanceProfileInfo method. + GpuInstanceGetComputeInstanceProfileInfoFunc func(gpuInstance nvml.GpuInstance, n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) + + // 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) + + // GpuInstanceGetComputeInstancesFunc mocks the GpuInstanceGetComputeInstances method. + GpuInstanceGetComputeInstancesFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) + + // GpuInstanceGetCreatableVgpusFunc mocks the GpuInstanceGetCreatableVgpus method. + GpuInstanceGetCreatableVgpusFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuTypeIdInfo, nvml.Return) + + // GpuInstanceGetInfoFunc mocks the GpuInstanceGetInfo method. + GpuInstanceGetInfoFunc func(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, nvml.Return) + + // GpuInstanceGetVgpuHeterogeneousModeFunc mocks the GpuInstanceGetVgpuHeterogeneousMode method. + GpuInstanceGetVgpuHeterogeneousModeFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuHeterogeneousMode, nvml.Return) + + // GpuInstanceGetVgpuSchedulerLogFunc mocks the GpuInstanceGetVgpuSchedulerLog method. + GpuInstanceGetVgpuSchedulerLogFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerLogInfo, nvml.Return) + + // GpuInstanceGetVgpuSchedulerStateFunc mocks the GpuInstanceGetVgpuSchedulerState method. + GpuInstanceGetVgpuSchedulerStateFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerStateInfo, nvml.Return) + + // GpuInstanceGetVgpuTypeCreatablePlacementsFunc mocks the GpuInstanceGetVgpuTypeCreatablePlacements method. + GpuInstanceGetVgpuTypeCreatablePlacementsFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuCreatablePlacementInfo, nvml.Return) + + // GpuInstanceSetVgpuHeterogeneousModeFunc mocks the GpuInstanceSetVgpuHeterogeneousMode method. + GpuInstanceSetVgpuHeterogeneousModeFunc func(gpuInstance nvml.GpuInstance, vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return + + // GpuInstanceSetVgpuSchedulerStateFunc mocks the GpuInstanceSetVgpuSchedulerState method. + GpuInstanceSetVgpuSchedulerStateFunc func(gpuInstance nvml.GpuInstance, vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return + + // InitFunc mocks the Init method. + InitFunc func() nvml.Return + + // InitWithFlagsFunc mocks the InitWithFlags method. + InitWithFlagsFunc func(v uint32) nvml.Return + + // SetVgpuVersionFunc mocks the SetVgpuVersion method. + SetVgpuVersionFunc func(vgpuVersion *nvml.VgpuVersion) nvml.Return + + // ShutdownFunc mocks the Shutdown method. + ShutdownFunc func() nvml.Return + + // SystemEventSetCreateFunc mocks the SystemEventSetCreate method. + SystemEventSetCreateFunc func(systemEventSetCreateRequest *nvml.SystemEventSetCreateRequest) nvml.Return + + // SystemEventSetFreeFunc mocks the SystemEventSetFree method. + SystemEventSetFreeFunc func(systemEventSetFreeRequest *nvml.SystemEventSetFreeRequest) nvml.Return + + // SystemEventSetWaitFunc mocks the SystemEventSetWait method. + SystemEventSetWaitFunc func(systemEventSetWaitRequest *nvml.SystemEventSetWaitRequest) nvml.Return + + // SystemGetConfComputeCapabilitiesFunc mocks the SystemGetConfComputeCapabilities method. + SystemGetConfComputeCapabilitiesFunc func() (nvml.ConfComputeSystemCaps, nvml.Return) + + // SystemGetConfComputeGpusReadyStateFunc mocks the SystemGetConfComputeGpusReadyState method. + SystemGetConfComputeGpusReadyStateFunc func() (uint32, nvml.Return) + + // SystemGetConfComputeKeyRotationThresholdInfoFunc mocks the SystemGetConfComputeKeyRotationThresholdInfo method. + SystemGetConfComputeKeyRotationThresholdInfoFunc func() (nvml.ConfComputeGetKeyRotationThresholdInfo, nvml.Return) + + // SystemGetConfComputeSettingsFunc mocks the SystemGetConfComputeSettings method. + SystemGetConfComputeSettingsFunc func() (nvml.SystemConfComputeSettings, nvml.Return) + + // SystemGetConfComputeStateFunc mocks the SystemGetConfComputeState method. + SystemGetConfComputeStateFunc func() (nvml.ConfComputeSystemState, nvml.Return) + + // SystemGetCudaDriverVersionFunc mocks the SystemGetCudaDriverVersion method. + SystemGetCudaDriverVersionFunc func() (int, nvml.Return) + + // SystemGetCudaDriverVersion_v2Func mocks the SystemGetCudaDriverVersion_v2 method. + SystemGetCudaDriverVersion_v2Func func() (int, nvml.Return) + + // SystemGetDriverBranchFunc mocks the SystemGetDriverBranch method. + SystemGetDriverBranchFunc func() (nvml.SystemDriverBranchInfo, nvml.Return) + + // SystemGetDriverVersionFunc mocks the SystemGetDriverVersion method. + SystemGetDriverVersionFunc func() (string, nvml.Return) + + // SystemGetHicVersionFunc mocks the SystemGetHicVersion method. + SystemGetHicVersionFunc func() ([]nvml.HwbcEntry, nvml.Return) + + // SystemGetNVMLVersionFunc mocks the SystemGetNVMLVersion method. + SystemGetNVMLVersionFunc func() (string, nvml.Return) + + // SystemGetNvlinkBwModeFunc mocks the SystemGetNvlinkBwMode method. + SystemGetNvlinkBwModeFunc func() (uint32, nvml.Return) + + // SystemGetProcessNameFunc mocks the SystemGetProcessName method. + SystemGetProcessNameFunc func(n int) (string, nvml.Return) + + // SystemGetTopologyGpuSetFunc mocks the SystemGetTopologyGpuSet method. + SystemGetTopologyGpuSetFunc func(n int) ([]nvml.Device, nvml.Return) + + // SystemRegisterEventsFunc mocks the SystemRegisterEvents method. + SystemRegisterEventsFunc func(systemRegisterEventRequest *nvml.SystemRegisterEventRequest) nvml.Return + + // SystemSetConfComputeGpusReadyStateFunc mocks the SystemSetConfComputeGpusReadyState method. + SystemSetConfComputeGpusReadyStateFunc func(v uint32) nvml.Return + + // SystemSetConfComputeKeyRotationThresholdInfoFunc mocks the SystemSetConfComputeKeyRotationThresholdInfo method. + SystemSetConfComputeKeyRotationThresholdInfoFunc func(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) nvml.Return + + // SystemSetNvlinkBwModeFunc mocks the SystemSetNvlinkBwMode method. + SystemSetNvlinkBwModeFunc func(v uint32) nvml.Return + + // UnitGetCountFunc mocks the UnitGetCount method. + UnitGetCountFunc func() (int, nvml.Return) + + // UnitGetDevicesFunc mocks the UnitGetDevices method. + UnitGetDevicesFunc func(unit nvml.Unit) ([]nvml.Device, nvml.Return) + + // UnitGetFanSpeedInfoFunc mocks the UnitGetFanSpeedInfo method. + UnitGetFanSpeedInfoFunc func(unit nvml.Unit) (nvml.UnitFanSpeeds, nvml.Return) + + // UnitGetHandleByIndexFunc mocks the UnitGetHandleByIndex method. + UnitGetHandleByIndexFunc func(n int) (nvml.Unit, nvml.Return) + + // UnitGetLedStateFunc mocks the UnitGetLedState method. + UnitGetLedStateFunc func(unit nvml.Unit) (nvml.LedState, nvml.Return) + + // UnitGetPsuInfoFunc mocks the UnitGetPsuInfo method. + UnitGetPsuInfoFunc func(unit nvml.Unit) (nvml.PSUInfo, nvml.Return) + + // UnitGetTemperatureFunc mocks the UnitGetTemperature method. + UnitGetTemperatureFunc func(unit nvml.Unit, n int) (uint32, nvml.Return) + + // UnitGetUnitInfoFunc mocks the UnitGetUnitInfo method. + UnitGetUnitInfoFunc func(unit nvml.Unit) (nvml.UnitInfo, nvml.Return) + + // UnitSetLedStateFunc mocks the UnitSetLedState method. + UnitSetLedStateFunc func(unit nvml.Unit, ledColor nvml.LedColor) nvml.Return + + // VgpuInstanceClearAccountingPidsFunc mocks the VgpuInstanceClearAccountingPids method. + VgpuInstanceClearAccountingPidsFunc func(vgpuInstance nvml.VgpuInstance) nvml.Return + + // VgpuInstanceGetAccountingModeFunc mocks the VgpuInstanceGetAccountingMode method. + VgpuInstanceGetAccountingModeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) + + // VgpuInstanceGetAccountingPidsFunc mocks the VgpuInstanceGetAccountingPids method. + VgpuInstanceGetAccountingPidsFunc func(vgpuInstance nvml.VgpuInstance) ([]int, nvml.Return) + + // VgpuInstanceGetAccountingStatsFunc mocks the VgpuInstanceGetAccountingStats method. + VgpuInstanceGetAccountingStatsFunc func(vgpuInstance nvml.VgpuInstance, n int) (nvml.AccountingStats, nvml.Return) + + // VgpuInstanceGetEccModeFunc mocks the VgpuInstanceGetEccMode method. + VgpuInstanceGetEccModeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) + + // VgpuInstanceGetEncoderCapacityFunc mocks the VgpuInstanceGetEncoderCapacity method. + VgpuInstanceGetEncoderCapacityFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) + + // VgpuInstanceGetEncoderSessionsFunc mocks the VgpuInstanceGetEncoderSessions method. + VgpuInstanceGetEncoderSessionsFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.EncoderSessionInfo, nvml.Return) + + // VgpuInstanceGetEncoderStatsFunc mocks the VgpuInstanceGetEncoderStats method. + VgpuInstanceGetEncoderStatsFunc func(vgpuInstance nvml.VgpuInstance) (int, uint32, uint32, nvml.Return) + + // VgpuInstanceGetFBCSessionsFunc mocks the VgpuInstanceGetFBCSessions method. + VgpuInstanceGetFBCSessionsFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.FBCSessionInfo, nvml.Return) + + // VgpuInstanceGetFBCStatsFunc mocks the VgpuInstanceGetFBCStats method. + VgpuInstanceGetFBCStatsFunc func(vgpuInstance nvml.VgpuInstance) (nvml.FBCStats, nvml.Return) + + // VgpuInstanceGetFbUsageFunc mocks the VgpuInstanceGetFbUsage method. + VgpuInstanceGetFbUsageFunc func(vgpuInstance nvml.VgpuInstance) (uint64, nvml.Return) + + // VgpuInstanceGetFrameRateLimitFunc mocks the VgpuInstanceGetFrameRateLimit method. + VgpuInstanceGetFrameRateLimitFunc func(vgpuInstance nvml.VgpuInstance) (uint32, nvml.Return) + + // VgpuInstanceGetGpuInstanceIdFunc mocks the VgpuInstanceGetGpuInstanceId method. + VgpuInstanceGetGpuInstanceIdFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) + + // VgpuInstanceGetGpuPciIdFunc mocks the VgpuInstanceGetGpuPciId method. + VgpuInstanceGetGpuPciIdFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) + + // VgpuInstanceGetLicenseInfoFunc mocks the VgpuInstanceGetLicenseInfo method. + VgpuInstanceGetLicenseInfoFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuLicenseInfo, nvml.Return) + + // VgpuInstanceGetLicenseStatusFunc mocks the VgpuInstanceGetLicenseStatus method. + VgpuInstanceGetLicenseStatusFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) + + // VgpuInstanceGetMdevUUIDFunc mocks the VgpuInstanceGetMdevUUID method. + VgpuInstanceGetMdevUUIDFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) + + // VgpuInstanceGetMetadataFunc mocks the VgpuInstanceGetMetadata method. + VgpuInstanceGetMetadataFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, nvml.Return) + + // VgpuInstanceGetRuntimeStateSizeFunc mocks the VgpuInstanceGetRuntimeStateSize method. + VgpuInstanceGetRuntimeStateSizeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuRuntimeState, nvml.Return) + + // VgpuInstanceGetTypeFunc mocks the VgpuInstanceGetType method. + VgpuInstanceGetTypeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, nvml.Return) + + // VgpuInstanceGetUUIDFunc mocks the VgpuInstanceGetUUID method. + VgpuInstanceGetUUIDFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) + + // VgpuInstanceGetVmDriverVersionFunc mocks the VgpuInstanceGetVmDriverVersion method. + VgpuInstanceGetVmDriverVersionFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) + + // VgpuInstanceGetVmIDFunc mocks the VgpuInstanceGetVmID method. + VgpuInstanceGetVmIDFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.VgpuVmIdType, nvml.Return) + + // VgpuInstanceSetEncoderCapacityFunc mocks the VgpuInstanceSetEncoderCapacity method. + VgpuInstanceSetEncoderCapacityFunc func(vgpuInstance nvml.VgpuInstance, n int) nvml.Return + + // VgpuTypeGetBAR1InfoFunc mocks the VgpuTypeGetBAR1Info method. + VgpuTypeGetBAR1InfoFunc func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuTypeBar1Info, nvml.Return) + + // VgpuTypeGetCapabilitiesFunc mocks the VgpuTypeGetCapabilities method. + VgpuTypeGetCapabilitiesFunc func(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) + + // VgpuTypeGetClassFunc mocks the VgpuTypeGetClass method. + VgpuTypeGetClassFunc func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) + + // VgpuTypeGetDeviceIDFunc mocks the VgpuTypeGetDeviceID method. + VgpuTypeGetDeviceIDFunc func(vgpuTypeId nvml.VgpuTypeId) (uint64, uint64, nvml.Return) + + // VgpuTypeGetFrameRateLimitFunc mocks the VgpuTypeGetFrameRateLimit method. + VgpuTypeGetFrameRateLimitFunc func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) + + // VgpuTypeGetFramebufferSizeFunc mocks the VgpuTypeGetFramebufferSize method. + VgpuTypeGetFramebufferSizeFunc func(vgpuTypeId nvml.VgpuTypeId) (uint64, nvml.Return) + + // VgpuTypeGetGpuInstanceProfileIdFunc mocks the VgpuTypeGetGpuInstanceProfileId method. + VgpuTypeGetGpuInstanceProfileIdFunc func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) + + // VgpuTypeGetLicenseFunc mocks the VgpuTypeGetLicense method. + VgpuTypeGetLicenseFunc func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) + + // VgpuTypeGetMaxInstancesFunc mocks the VgpuTypeGetMaxInstances method. + VgpuTypeGetMaxInstancesFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) + + // VgpuTypeGetMaxInstancesPerGpuInstanceFunc mocks the VgpuTypeGetMaxInstancesPerGpuInstance method. + VgpuTypeGetMaxInstancesPerGpuInstanceFunc func(vgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance) nvml.Return + + // VgpuTypeGetMaxInstancesPerVmFunc mocks the VgpuTypeGetMaxInstancesPerVm method. + VgpuTypeGetMaxInstancesPerVmFunc func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) + + // VgpuTypeGetNameFunc mocks the VgpuTypeGetName method. + VgpuTypeGetNameFunc func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) + + // VgpuTypeGetNumDisplayHeadsFunc mocks the VgpuTypeGetNumDisplayHeads method. + VgpuTypeGetNumDisplayHeadsFunc func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) + + // VgpuTypeGetResolutionFunc mocks the VgpuTypeGetResolution method. + VgpuTypeGetResolutionFunc func(vgpuTypeId nvml.VgpuTypeId, n int) (uint32, uint32, nvml.Return) + + // calls tracks calls to the methods. + calls struct { + // ComputeInstanceDestroy holds details about calls to the ComputeInstanceDestroy method. + ComputeInstanceDestroy []struct { + // ComputeInstance is the computeInstance argument value. + ComputeInstance nvml.ComputeInstance + } + // ComputeInstanceGetInfo holds details about calls to the ComputeInstanceGetInfo method. + ComputeInstanceGetInfo []struct { + // ComputeInstance is the computeInstance argument value. + ComputeInstance nvml.ComputeInstance + } + // DeviceClearAccountingPids holds details about calls to the DeviceClearAccountingPids method. + DeviceClearAccountingPids []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceClearCpuAffinity holds details about calls to the DeviceClearCpuAffinity method. + DeviceClearCpuAffinity []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceClearEccErrorCounts holds details about calls to the DeviceClearEccErrorCounts method. + DeviceClearEccErrorCounts []struct { + // Device is the device argument value. + Device nvml.Device + // EccCounterType is the eccCounterType argument value. + EccCounterType nvml.EccCounterType + } + // DeviceClearFieldValues holds details about calls to the DeviceClearFieldValues method. + DeviceClearFieldValues []struct { + // Device is the device argument value. + Device nvml.Device + // FieldValues is the fieldValues argument value. + FieldValues []nvml.FieldValue + } + // DeviceCreateGpuInstance holds details about calls to the DeviceCreateGpuInstance method. + DeviceCreateGpuInstance []struct { + // Device is the device argument value. + Device nvml.Device + // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + // DeviceCreateGpuInstanceWithPlacement holds details about calls to the DeviceCreateGpuInstanceWithPlacement method. + DeviceCreateGpuInstanceWithPlacement []struct { + // Device is the device argument value. + Device nvml.Device + // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + // GpuInstancePlacement is the gpuInstancePlacement argument value. + GpuInstancePlacement *nvml.GpuInstancePlacement + } + // DeviceDiscoverGpus holds details about calls to the DeviceDiscoverGpus method. + DeviceDiscoverGpus []struct { + } + // DeviceFreezeNvLinkUtilizationCounter holds details about calls to the DeviceFreezeNvLinkUtilizationCounter method. + DeviceFreezeNvLinkUtilizationCounter []struct { + // Device is the device argument value. + Device nvml.Device + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // DeviceGetAPIRestriction holds details about calls to the DeviceGetAPIRestriction method. + DeviceGetAPIRestriction []struct { + // Device is the device argument value. + Device nvml.Device + // RestrictedAPI is the restrictedAPI argument value. + RestrictedAPI nvml.RestrictedAPI + } + // DeviceGetAccountingBufferSize holds details about calls to the DeviceGetAccountingBufferSize method. + DeviceGetAccountingBufferSize []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetAccountingMode holds details about calls to the DeviceGetAccountingMode method. + DeviceGetAccountingMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetAccountingPids holds details about calls to the DeviceGetAccountingPids method. + DeviceGetAccountingPids []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetAccountingStats holds details about calls to the DeviceGetAccountingStats method. + DeviceGetAccountingStats []struct { + // Device is the device argument value. + Device nvml.Device + // V is the v argument value. + V uint32 + } + // DeviceGetActiveVgpus holds details about calls to the DeviceGetActiveVgpus method. + DeviceGetActiveVgpus []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetAdaptiveClockInfoStatus holds details about calls to the DeviceGetAdaptiveClockInfoStatus method. + DeviceGetAdaptiveClockInfoStatus []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetAddressingMode holds details about calls to the DeviceGetAddressingMode method. + DeviceGetAddressingMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetApplicationsClock holds details about calls to the DeviceGetApplicationsClock method. + DeviceGetApplicationsClock []struct { + // Device is the device argument value. + Device nvml.Device + // ClockType is the clockType argument value. + ClockType nvml.ClockType + } + // DeviceGetArchitecture holds details about calls to the DeviceGetArchitecture method. + DeviceGetArchitecture []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetAttributes holds details about calls to the DeviceGetAttributes method. + DeviceGetAttributes []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetAutoBoostedClocksEnabled holds details about calls to the DeviceGetAutoBoostedClocksEnabled method. + DeviceGetAutoBoostedClocksEnabled []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetBAR1MemoryInfo holds details about calls to the DeviceGetBAR1MemoryInfo method. + DeviceGetBAR1MemoryInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetBoardId holds details about calls to the DeviceGetBoardId method. + DeviceGetBoardId []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetBoardPartNumber holds details about calls to the DeviceGetBoardPartNumber method. + DeviceGetBoardPartNumber []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetBrand holds details about calls to the DeviceGetBrand method. + DeviceGetBrand []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetBridgeChipInfo holds details about calls to the DeviceGetBridgeChipInfo method. + DeviceGetBridgeChipInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetBusType holds details about calls to the DeviceGetBusType method. + DeviceGetBusType []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetC2cModeInfoV holds details about calls to the DeviceGetC2cModeInfoV method. + DeviceGetC2cModeInfoV []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetCapabilities holds details about calls to the DeviceGetCapabilities method. + DeviceGetCapabilities []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetClkMonStatus holds details about calls to the DeviceGetClkMonStatus method. + DeviceGetClkMonStatus []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetClock holds details about calls to the DeviceGetClock method. + DeviceGetClock []struct { + // Device is the device argument value. + Device nvml.Device + // ClockType is the clockType argument value. + ClockType nvml.ClockType + // ClockId is the clockId argument value. + ClockId nvml.ClockId + } + // DeviceGetClockInfo holds details about calls to the DeviceGetClockInfo method. + DeviceGetClockInfo []struct { + // Device is the device argument value. + Device nvml.Device + // ClockType is the clockType argument value. + ClockType nvml.ClockType + } + // DeviceGetClockOffsets holds details about calls to the DeviceGetClockOffsets method. + DeviceGetClockOffsets []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetComputeInstanceId holds details about calls to the DeviceGetComputeInstanceId method. + DeviceGetComputeInstanceId []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetComputeMode holds details about calls to the DeviceGetComputeMode method. + DeviceGetComputeMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetComputeRunningProcesses holds details about calls to the DeviceGetComputeRunningProcesses method. + DeviceGetComputeRunningProcesses []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetConfComputeGpuAttestationReport holds details about calls to the DeviceGetConfComputeGpuAttestationReport method. + DeviceGetConfComputeGpuAttestationReport []struct { + // Device is the device argument value. + Device nvml.Device + // ConfComputeGpuAttestationReport is the confComputeGpuAttestationReport argument value. + ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport + } + // DeviceGetConfComputeGpuCertificate holds details about calls to the DeviceGetConfComputeGpuCertificate method. + DeviceGetConfComputeGpuCertificate []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetConfComputeMemSizeInfo holds details about calls to the DeviceGetConfComputeMemSizeInfo method. + DeviceGetConfComputeMemSizeInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetConfComputeProtectedMemoryUsage holds details about calls to the DeviceGetConfComputeProtectedMemoryUsage method. + DeviceGetConfComputeProtectedMemoryUsage []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetCoolerInfo holds details about calls to the DeviceGetCoolerInfo method. + DeviceGetCoolerInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetCount holds details about calls to the DeviceGetCount method. + DeviceGetCount []struct { + } + // DeviceGetCpuAffinity holds details about calls to the DeviceGetCpuAffinity method. + DeviceGetCpuAffinity []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetCpuAffinityWithinScope holds details about calls to the DeviceGetCpuAffinityWithinScope method. + DeviceGetCpuAffinityWithinScope []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + // AffinityScope is the affinityScope argument value. + AffinityScope nvml.AffinityScope + } + // DeviceGetCreatableVgpus holds details about calls to the DeviceGetCreatableVgpus method. + DeviceGetCreatableVgpus []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetCudaComputeCapability holds details about calls to the DeviceGetCudaComputeCapability method. + DeviceGetCudaComputeCapability []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetCurrPcieLinkGeneration holds details about calls to the DeviceGetCurrPcieLinkGeneration method. + DeviceGetCurrPcieLinkGeneration []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetCurrPcieLinkWidth holds details about calls to the DeviceGetCurrPcieLinkWidth method. + DeviceGetCurrPcieLinkWidth []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetCurrentClockFreqs holds details about calls to the DeviceGetCurrentClockFreqs method. + DeviceGetCurrentClockFreqs []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetCurrentClocksEventReasons holds details about calls to the DeviceGetCurrentClocksEventReasons method. + DeviceGetCurrentClocksEventReasons []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetCurrentClocksThrottleReasons holds details about calls to the DeviceGetCurrentClocksThrottleReasons method. + DeviceGetCurrentClocksThrottleReasons []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetDecoderUtilization holds details about calls to the DeviceGetDecoderUtilization method. + DeviceGetDecoderUtilization []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetDefaultApplicationsClock holds details about calls to the DeviceGetDefaultApplicationsClock method. + DeviceGetDefaultApplicationsClock []struct { + // Device is the device argument value. + Device nvml.Device + // ClockType is the clockType argument value. + ClockType nvml.ClockType + } + // DeviceGetDefaultEccMode holds details about calls to the DeviceGetDefaultEccMode method. + DeviceGetDefaultEccMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetDetailedEccErrors holds details about calls to the DeviceGetDetailedEccErrors method. + DeviceGetDetailedEccErrors []struct { + // Device is the device argument value. + Device nvml.Device + // MemoryErrorType is the memoryErrorType argument value. + MemoryErrorType nvml.MemoryErrorType + // EccCounterType is the eccCounterType argument value. + EccCounterType nvml.EccCounterType + } + // DeviceGetDeviceHandleFromMigDeviceHandle holds details about calls to the DeviceGetDeviceHandleFromMigDeviceHandle method. + DeviceGetDeviceHandleFromMigDeviceHandle []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetDisplayActive holds details about calls to the DeviceGetDisplayActive method. + DeviceGetDisplayActive []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetDisplayMode holds details about calls to the DeviceGetDisplayMode method. + DeviceGetDisplayMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetDramEncryptionMode holds details about calls to the DeviceGetDramEncryptionMode method. + DeviceGetDramEncryptionMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetDriverModel holds details about calls to the DeviceGetDriverModel method. + DeviceGetDriverModel []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetDriverModel_v2 holds details about calls to the DeviceGetDriverModel_v2 method. + DeviceGetDriverModel_v2 []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetDynamicPstatesInfo holds details about calls to the DeviceGetDynamicPstatesInfo method. + DeviceGetDynamicPstatesInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetEccMode holds details about calls to the DeviceGetEccMode method. + DeviceGetEccMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetEncoderCapacity holds details about calls to the DeviceGetEncoderCapacity method. + DeviceGetEncoderCapacity []struct { + // Device is the device argument value. + Device nvml.Device + // EncoderType is the encoderType argument value. + EncoderType nvml.EncoderType + } + // DeviceGetEncoderSessions holds details about calls to the DeviceGetEncoderSessions method. + DeviceGetEncoderSessions []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetEncoderStats holds details about calls to the DeviceGetEncoderStats method. + DeviceGetEncoderStats []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetEncoderUtilization holds details about calls to the DeviceGetEncoderUtilization method. + DeviceGetEncoderUtilization []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetEnforcedPowerLimit holds details about calls to the DeviceGetEnforcedPowerLimit method. + DeviceGetEnforcedPowerLimit []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetFBCSessions holds details about calls to the DeviceGetFBCSessions method. + DeviceGetFBCSessions []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetFBCStats holds details about calls to the DeviceGetFBCStats method. + DeviceGetFBCStats []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetFanControlPolicy_v2 holds details about calls to the DeviceGetFanControlPolicy_v2 method. + DeviceGetFanControlPolicy_v2 []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetFanSpeed holds details about calls to the DeviceGetFanSpeed method. + DeviceGetFanSpeed []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetFanSpeedRPM holds details about calls to the DeviceGetFanSpeedRPM method. + DeviceGetFanSpeedRPM []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetFanSpeed_v2 holds details about calls to the DeviceGetFanSpeed_v2 method. + DeviceGetFanSpeed_v2 []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetFieldValues holds details about calls to the DeviceGetFieldValues method. + DeviceGetFieldValues []struct { + // Device is the device argument value. + Device nvml.Device + // FieldValues is the fieldValues argument value. + FieldValues []nvml.FieldValue + } + // DeviceGetGpcClkMinMaxVfOffset holds details about calls to the DeviceGetGpcClkMinMaxVfOffset method. + DeviceGetGpcClkMinMaxVfOffset []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetGpcClkVfOffset holds details about calls to the DeviceGetGpcClkVfOffset method. + DeviceGetGpcClkVfOffset []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetGpuFabricInfo holds details about calls to the DeviceGetGpuFabricInfo method. + DeviceGetGpuFabricInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetGpuFabricInfoV holds details about calls to the DeviceGetGpuFabricInfoV method. + DeviceGetGpuFabricInfoV []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetGpuInstanceById holds details about calls to the DeviceGetGpuInstanceById method. + DeviceGetGpuInstanceById []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetGpuInstanceId holds details about calls to the DeviceGetGpuInstanceId method. + DeviceGetGpuInstanceId []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetGpuInstancePossiblePlacements holds details about calls to the DeviceGetGpuInstancePossiblePlacements method. + DeviceGetGpuInstancePossiblePlacements []struct { + // Device is the device argument value. + Device nvml.Device + // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + // DeviceGetGpuInstanceProfileInfo holds details about calls to the DeviceGetGpuInstanceProfileInfo method. + DeviceGetGpuInstanceProfileInfo []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetGpuInstanceProfileInfoByIdV holds details about calls to the DeviceGetGpuInstanceProfileInfoByIdV method. + DeviceGetGpuInstanceProfileInfoByIdV []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetGpuInstanceProfileInfoV holds details about calls to the DeviceGetGpuInstanceProfileInfoV method. + DeviceGetGpuInstanceProfileInfoV []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetGpuInstanceRemainingCapacity holds details about calls to the DeviceGetGpuInstanceRemainingCapacity method. + DeviceGetGpuInstanceRemainingCapacity []struct { + // Device is the device argument value. + Device nvml.Device + // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + // DeviceGetGpuInstances holds details about calls to the DeviceGetGpuInstances method. + DeviceGetGpuInstances []struct { + // Device is the device argument value. + Device nvml.Device + // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + // DeviceGetGpuMaxPcieLinkGeneration holds details about calls to the DeviceGetGpuMaxPcieLinkGeneration method. + DeviceGetGpuMaxPcieLinkGeneration []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetGpuOperationMode holds details about calls to the DeviceGetGpuOperationMode method. + DeviceGetGpuOperationMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetGraphicsRunningProcesses holds details about calls to the DeviceGetGraphicsRunningProcesses method. + DeviceGetGraphicsRunningProcesses []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetGridLicensableFeatures holds details about calls to the DeviceGetGridLicensableFeatures method. + DeviceGetGridLicensableFeatures []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetGspFirmwareMode holds details about calls to the DeviceGetGspFirmwareMode method. + DeviceGetGspFirmwareMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetGspFirmwareVersion holds details about calls to the DeviceGetGspFirmwareVersion method. + DeviceGetGspFirmwareVersion []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetHandleByIndex holds details about calls to the DeviceGetHandleByIndex method. + DeviceGetHandleByIndex []struct { + // N is the n argument value. + N int + } + // DeviceGetHandleByPciBusId holds details about calls to the DeviceGetHandleByPciBusId method. + DeviceGetHandleByPciBusId []struct { + // S is the s argument value. + S string + } + // DeviceGetHandleBySerial holds details about calls to the DeviceGetHandleBySerial method. + DeviceGetHandleBySerial []struct { + // S is the s argument value. + S string + } + // DeviceGetHandleByUUID holds details about calls to the DeviceGetHandleByUUID method. + DeviceGetHandleByUUID []struct { + // S is the s argument value. + S string + } + // DeviceGetHandleByUUIDV holds details about calls to the DeviceGetHandleByUUIDV method. + DeviceGetHandleByUUIDV []struct { + // UUID is the uUID argument value. + UUID *nvml.UUID + } + // DeviceGetHostVgpuMode holds details about calls to the DeviceGetHostVgpuMode method. + DeviceGetHostVgpuMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetIndex holds details about calls to the DeviceGetIndex method. + DeviceGetIndex []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetInforomConfigurationChecksum holds details about calls to the DeviceGetInforomConfigurationChecksum method. + DeviceGetInforomConfigurationChecksum []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetInforomImageVersion holds details about calls to the DeviceGetInforomImageVersion method. + DeviceGetInforomImageVersion []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetInforomVersion holds details about calls to the DeviceGetInforomVersion method. + DeviceGetInforomVersion []struct { + // Device is the device argument value. + Device nvml.Device + // InforomObject is the inforomObject argument value. + InforomObject nvml.InforomObject + } + // DeviceGetIrqNum holds details about calls to the DeviceGetIrqNum method. + DeviceGetIrqNum []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetJpgUtilization holds details about calls to the DeviceGetJpgUtilization method. + DeviceGetJpgUtilization []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetLastBBXFlushTime holds details about calls to the DeviceGetLastBBXFlushTime method. + DeviceGetLastBBXFlushTime []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMPSComputeRunningProcesses holds details about calls to the DeviceGetMPSComputeRunningProcesses method. + DeviceGetMPSComputeRunningProcesses []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMarginTemperature holds details about calls to the DeviceGetMarginTemperature method. + DeviceGetMarginTemperature []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMaxClockInfo holds details about calls to the DeviceGetMaxClockInfo method. + DeviceGetMaxClockInfo []struct { + // Device is the device argument value. + Device nvml.Device + // ClockType is the clockType argument value. + ClockType nvml.ClockType + } + // DeviceGetMaxCustomerBoostClock holds details about calls to the DeviceGetMaxCustomerBoostClock method. + DeviceGetMaxCustomerBoostClock []struct { + // Device is the device argument value. + Device nvml.Device + // ClockType is the clockType argument value. + ClockType nvml.ClockType + } + // DeviceGetMaxMigDeviceCount holds details about calls to the DeviceGetMaxMigDeviceCount method. + DeviceGetMaxMigDeviceCount []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMaxPcieLinkGeneration holds details about calls to the DeviceGetMaxPcieLinkGeneration method. + DeviceGetMaxPcieLinkGeneration []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMaxPcieLinkWidth holds details about calls to the DeviceGetMaxPcieLinkWidth method. + DeviceGetMaxPcieLinkWidth []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMemClkMinMaxVfOffset holds details about calls to the DeviceGetMemClkMinMaxVfOffset method. + DeviceGetMemClkMinMaxVfOffset []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMemClkVfOffset holds details about calls to the DeviceGetMemClkVfOffset method. + DeviceGetMemClkVfOffset []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMemoryAffinity holds details about calls to the DeviceGetMemoryAffinity method. + DeviceGetMemoryAffinity []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + // AffinityScope is the affinityScope argument value. + AffinityScope nvml.AffinityScope + } + // DeviceGetMemoryBusWidth holds details about calls to the DeviceGetMemoryBusWidth method. + DeviceGetMemoryBusWidth []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMemoryErrorCounter holds details about calls to the DeviceGetMemoryErrorCounter method. + DeviceGetMemoryErrorCounter []struct { + // Device is the device argument value. + Device nvml.Device + // MemoryErrorType is the memoryErrorType argument value. + MemoryErrorType nvml.MemoryErrorType + // EccCounterType is the eccCounterType argument value. + EccCounterType nvml.EccCounterType + // MemoryLocation is the memoryLocation argument value. + MemoryLocation nvml.MemoryLocation + } + // DeviceGetMemoryInfo holds details about calls to the DeviceGetMemoryInfo method. + DeviceGetMemoryInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMemoryInfo_v2 holds details about calls to the DeviceGetMemoryInfo_v2 method. + DeviceGetMemoryInfo_v2 []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMigDeviceHandleByIndex holds details about calls to the DeviceGetMigDeviceHandleByIndex method. + DeviceGetMigDeviceHandleByIndex []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetMigMode holds details about calls to the DeviceGetMigMode method. + DeviceGetMigMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMinMaxClockOfPState holds details about calls to the DeviceGetMinMaxClockOfPState method. + DeviceGetMinMaxClockOfPState []struct { + // Device is the device argument value. + Device nvml.Device + // ClockType is the clockType argument value. + ClockType nvml.ClockType + // Pstates is the pstates argument value. + Pstates nvml.Pstates + } + // DeviceGetMinMaxFanSpeed holds details about calls to the DeviceGetMinMaxFanSpeed method. + DeviceGetMinMaxFanSpeed []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMinorNumber holds details about calls to the DeviceGetMinorNumber method. + DeviceGetMinorNumber []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetModuleId holds details about calls to the DeviceGetModuleId method. + DeviceGetModuleId []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetMultiGpuBoard holds details about calls to the DeviceGetMultiGpuBoard method. + DeviceGetMultiGpuBoard []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetName holds details about calls to the DeviceGetName method. + DeviceGetName []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetNumFans holds details about calls to the DeviceGetNumFans method. + DeviceGetNumFans []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetNumGpuCores holds details about calls to the DeviceGetNumGpuCores method. + DeviceGetNumGpuCores []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetNumaNodeId holds details about calls to the DeviceGetNumaNodeId method. + DeviceGetNumaNodeId []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetNvLinkCapability holds details about calls to the DeviceGetNvLinkCapability method. + DeviceGetNvLinkCapability []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + // NvLinkCapability is the nvLinkCapability argument value. + NvLinkCapability nvml.NvLinkCapability + } + // DeviceGetNvLinkErrorCounter holds details about calls to the DeviceGetNvLinkErrorCounter method. + DeviceGetNvLinkErrorCounter []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + // NvLinkErrorCounter is the nvLinkErrorCounter argument value. + NvLinkErrorCounter nvml.NvLinkErrorCounter + } + // DeviceGetNvLinkInfo holds details about calls to the DeviceGetNvLinkInfo method. + DeviceGetNvLinkInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetNvLinkRemoteDeviceType holds details about calls to the DeviceGetNvLinkRemoteDeviceType method. + DeviceGetNvLinkRemoteDeviceType []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetNvLinkRemotePciInfo holds details about calls to the DeviceGetNvLinkRemotePciInfo method. + DeviceGetNvLinkRemotePciInfo []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetNvLinkState holds details about calls to the DeviceGetNvLinkState method. + DeviceGetNvLinkState []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetNvLinkUtilizationControl holds details about calls to the DeviceGetNvLinkUtilizationControl method. + DeviceGetNvLinkUtilizationControl []struct { + // Device is the device argument value. + Device nvml.Device + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } + // DeviceGetNvLinkUtilizationCounter holds details about calls to the DeviceGetNvLinkUtilizationCounter method. + DeviceGetNvLinkUtilizationCounter []struct { + // Device is the device argument value. + Device nvml.Device + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } + // DeviceGetNvLinkVersion holds details about calls to the DeviceGetNvLinkVersion method. + DeviceGetNvLinkVersion []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetNvlinkBwMode holds details about calls to the DeviceGetNvlinkBwMode method. + DeviceGetNvlinkBwMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetNvlinkSupportedBwModes holds details about calls to the DeviceGetNvlinkSupportedBwModes method. + DeviceGetNvlinkSupportedBwModes []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetOfaUtilization holds details about calls to the DeviceGetOfaUtilization method. + DeviceGetOfaUtilization []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetP2PStatus holds details about calls to the DeviceGetP2PStatus method. + DeviceGetP2PStatus []struct { + // Device1 is the device1 argument value. + Device1 nvml.Device + // Device2 is the device2 argument value. + Device2 nvml.Device + // GpuP2PCapsIndex is the gpuP2PCapsIndex argument value. + GpuP2PCapsIndex nvml.GpuP2PCapsIndex + } + // DeviceGetPciInfo holds details about calls to the DeviceGetPciInfo method. + DeviceGetPciInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPciInfoExt holds details about calls to the DeviceGetPciInfoExt method. + DeviceGetPciInfoExt []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPcieLinkMaxSpeed holds details about calls to the DeviceGetPcieLinkMaxSpeed method. + DeviceGetPcieLinkMaxSpeed []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPcieReplayCounter holds details about calls to the DeviceGetPcieReplayCounter method. + DeviceGetPcieReplayCounter []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPcieSpeed holds details about calls to the DeviceGetPcieSpeed method. + DeviceGetPcieSpeed []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPcieThroughput holds details about calls to the DeviceGetPcieThroughput method. + DeviceGetPcieThroughput []struct { + // Device is the device argument value. + Device nvml.Device + // PcieUtilCounter is the pcieUtilCounter argument value. + PcieUtilCounter nvml.PcieUtilCounter + } + // DeviceGetPdi holds details about calls to the DeviceGetPdi method. + DeviceGetPdi []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPerformanceModes holds details about calls to the DeviceGetPerformanceModes method. + DeviceGetPerformanceModes []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPerformanceState holds details about calls to the DeviceGetPerformanceState method. + DeviceGetPerformanceState []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPersistenceMode holds details about calls to the DeviceGetPersistenceMode method. + DeviceGetPersistenceMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPgpuMetadataString holds details about calls to the DeviceGetPgpuMetadataString method. + DeviceGetPgpuMetadataString []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPlatformInfo holds details about calls to the DeviceGetPlatformInfo method. + DeviceGetPlatformInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPowerManagementDefaultLimit holds details about calls to the DeviceGetPowerManagementDefaultLimit method. + DeviceGetPowerManagementDefaultLimit []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPowerManagementLimit holds details about calls to the DeviceGetPowerManagementLimit method. + DeviceGetPowerManagementLimit []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPowerManagementLimitConstraints holds details about calls to the DeviceGetPowerManagementLimitConstraints method. + DeviceGetPowerManagementLimitConstraints []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPowerManagementMode holds details about calls to the DeviceGetPowerManagementMode method. + DeviceGetPowerManagementMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPowerMizerMode_v1 holds details about calls to the DeviceGetPowerMizerMode_v1 method. + DeviceGetPowerMizerMode_v1 []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPowerSource holds details about calls to the DeviceGetPowerSource method. + DeviceGetPowerSource []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPowerState holds details about calls to the DeviceGetPowerState method. + DeviceGetPowerState []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetPowerUsage holds details about calls to the DeviceGetPowerUsage method. + DeviceGetPowerUsage []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetProcessUtilization holds details about calls to the DeviceGetProcessUtilization method. + DeviceGetProcessUtilization []struct { + // Device is the device argument value. + Device nvml.Device + // V is the v argument value. + V uint64 + } + // DeviceGetProcessesUtilizationInfo holds details about calls to the DeviceGetProcessesUtilizationInfo method. + DeviceGetProcessesUtilizationInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetRemappedRows holds details about calls to the DeviceGetRemappedRows method. + DeviceGetRemappedRows []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetRepairStatus holds details about calls to the DeviceGetRepairStatus method. + DeviceGetRepairStatus []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetRetiredPages holds details about calls to the DeviceGetRetiredPages method. + DeviceGetRetiredPages []struct { + // Device is the device argument value. + Device nvml.Device + // PageRetirementCause is the pageRetirementCause argument value. + PageRetirementCause nvml.PageRetirementCause + } + // DeviceGetRetiredPagesPendingStatus holds details about calls to the DeviceGetRetiredPagesPendingStatus method. + DeviceGetRetiredPagesPendingStatus []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetRetiredPages_v2 holds details about calls to the DeviceGetRetiredPages_v2 method. + DeviceGetRetiredPages_v2 []struct { + // Device is the device argument value. + Device nvml.Device + // PageRetirementCause is the pageRetirementCause argument value. + PageRetirementCause nvml.PageRetirementCause + } + // DeviceGetRowRemapperHistogram holds details about calls to the DeviceGetRowRemapperHistogram method. + DeviceGetRowRemapperHistogram []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetRunningProcessDetailList holds details about calls to the DeviceGetRunningProcessDetailList method. + DeviceGetRunningProcessDetailList []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetSamples holds details about calls to the DeviceGetSamples method. + DeviceGetSamples []struct { + // Device is the device argument value. + Device nvml.Device + // SamplingType is the samplingType argument value. + SamplingType nvml.SamplingType + // V is the v argument value. + V uint64 + } + // DeviceGetSerial holds details about calls to the DeviceGetSerial method. + DeviceGetSerial []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetSramEccErrorStatus holds details about calls to the DeviceGetSramEccErrorStatus method. + DeviceGetSramEccErrorStatus []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetSramUniqueUncorrectedEccErrorCounts holds details about calls to the DeviceGetSramUniqueUncorrectedEccErrorCounts method. + DeviceGetSramUniqueUncorrectedEccErrorCounts []struct { + // Device is the device argument value. + Device nvml.Device + // EccSramUniqueUncorrectedErrorCounts is the eccSramUniqueUncorrectedErrorCounts argument value. + EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts + } + // DeviceGetSupportedClocksEventReasons holds details about calls to the DeviceGetSupportedClocksEventReasons method. + DeviceGetSupportedClocksEventReasons []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetSupportedClocksThrottleReasons holds details about calls to the DeviceGetSupportedClocksThrottleReasons method. + DeviceGetSupportedClocksThrottleReasons []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetSupportedEventTypes holds details about calls to the DeviceGetSupportedEventTypes method. + DeviceGetSupportedEventTypes []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetSupportedGraphicsClocks holds details about calls to the DeviceGetSupportedGraphicsClocks method. + DeviceGetSupportedGraphicsClocks []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetSupportedMemoryClocks holds details about calls to the DeviceGetSupportedMemoryClocks method. + DeviceGetSupportedMemoryClocks []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetSupportedPerformanceStates holds details about calls to the DeviceGetSupportedPerformanceStates method. + DeviceGetSupportedPerformanceStates []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetSupportedVgpus holds details about calls to the DeviceGetSupportedVgpus method. + DeviceGetSupportedVgpus []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetTargetFanSpeed holds details about calls to the DeviceGetTargetFanSpeed method. + DeviceGetTargetFanSpeed []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceGetTemperature holds details about calls to the DeviceGetTemperature method. + DeviceGetTemperature []struct { + // Device is the device argument value. + Device nvml.Device + // TemperatureSensors is the temperatureSensors argument value. + TemperatureSensors nvml.TemperatureSensors + } + // DeviceGetTemperatureThreshold holds details about calls to the DeviceGetTemperatureThreshold method. + DeviceGetTemperatureThreshold []struct { + // Device is the device argument value. + Device nvml.Device + // TemperatureThresholds is the temperatureThresholds argument value. + TemperatureThresholds nvml.TemperatureThresholds + } + // DeviceGetTemperatureV holds details about calls to the DeviceGetTemperatureV method. + DeviceGetTemperatureV []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetThermalSettings holds details about calls to the DeviceGetThermalSettings method. + DeviceGetThermalSettings []struct { + // Device is the device argument value. + Device nvml.Device + // V is the v argument value. + V uint32 + } + // DeviceGetTopologyCommonAncestor holds details about calls to the DeviceGetTopologyCommonAncestor method. + DeviceGetTopologyCommonAncestor []struct { + // Device1 is the device1 argument value. + Device1 nvml.Device + // Device2 is the device2 argument value. + Device2 nvml.Device + } + // DeviceGetTopologyNearestGpus holds details about calls to the DeviceGetTopologyNearestGpus method. + DeviceGetTopologyNearestGpus []struct { + // Device is the device argument value. + Device nvml.Device + // GpuTopologyLevel is the gpuTopologyLevel argument value. + GpuTopologyLevel nvml.GpuTopologyLevel + } + // DeviceGetTotalEccErrors holds details about calls to the DeviceGetTotalEccErrors method. + DeviceGetTotalEccErrors []struct { + // Device is the device argument value. + Device nvml.Device + // MemoryErrorType is the memoryErrorType argument value. + MemoryErrorType nvml.MemoryErrorType + // EccCounterType is the eccCounterType argument value. + EccCounterType nvml.EccCounterType + } + // DeviceGetTotalEnergyConsumption holds details about calls to the DeviceGetTotalEnergyConsumption method. + DeviceGetTotalEnergyConsumption []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetUUID holds details about calls to the DeviceGetUUID method. + DeviceGetUUID []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetUtilizationRates holds details about calls to the DeviceGetUtilizationRates method. + DeviceGetUtilizationRates []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetVbiosVersion holds details about calls to the DeviceGetVbiosVersion method. + DeviceGetVbiosVersion []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetVgpuCapabilities holds details about calls to the DeviceGetVgpuCapabilities method. + DeviceGetVgpuCapabilities []struct { + // Device is the device argument value. + Device nvml.Device + // DeviceVgpuCapability is the deviceVgpuCapability argument value. + DeviceVgpuCapability nvml.DeviceVgpuCapability + } + // DeviceGetVgpuHeterogeneousMode holds details about calls to the DeviceGetVgpuHeterogeneousMode method. + DeviceGetVgpuHeterogeneousMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetVgpuInstancesUtilizationInfo holds details about calls to the DeviceGetVgpuInstancesUtilizationInfo method. + DeviceGetVgpuInstancesUtilizationInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetVgpuMetadata holds details about calls to the DeviceGetVgpuMetadata method. + DeviceGetVgpuMetadata []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetVgpuProcessUtilization holds details about calls to the DeviceGetVgpuProcessUtilization method. + DeviceGetVgpuProcessUtilization []struct { + // Device is the device argument value. + Device nvml.Device + // V is the v argument value. + V uint64 + } + // DeviceGetVgpuProcessesUtilizationInfo holds details about calls to the DeviceGetVgpuProcessesUtilizationInfo method. + DeviceGetVgpuProcessesUtilizationInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetVgpuSchedulerCapabilities holds details about calls to the DeviceGetVgpuSchedulerCapabilities method. + DeviceGetVgpuSchedulerCapabilities []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetVgpuSchedulerLog holds details about calls to the DeviceGetVgpuSchedulerLog method. + DeviceGetVgpuSchedulerLog []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetVgpuSchedulerState holds details about calls to the DeviceGetVgpuSchedulerState method. + DeviceGetVgpuSchedulerState []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceGetVgpuTypeCreatablePlacements holds details about calls to the DeviceGetVgpuTypeCreatablePlacements method. + DeviceGetVgpuTypeCreatablePlacements []struct { + // Device is the device argument value. + Device nvml.Device + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // DeviceGetVgpuTypeSupportedPlacements holds details about calls to the DeviceGetVgpuTypeSupportedPlacements method. + DeviceGetVgpuTypeSupportedPlacements []struct { + // Device is the device argument value. + Device nvml.Device + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // DeviceGetVgpuUtilization holds details about calls to the DeviceGetVgpuUtilization method. + DeviceGetVgpuUtilization []struct { + // Device is the device argument value. + Device nvml.Device + // V is the v argument value. + V uint64 + } + // DeviceGetViolationStatus holds details about calls to the DeviceGetViolationStatus method. + DeviceGetViolationStatus []struct { + // Device is the device argument value. + Device nvml.Device + // PerfPolicyType is the perfPolicyType argument value. + PerfPolicyType nvml.PerfPolicyType + } + // DeviceGetVirtualizationMode holds details about calls to the DeviceGetVirtualizationMode method. + DeviceGetVirtualizationMode []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceIsMigDeviceHandle holds details about calls to the DeviceIsMigDeviceHandle method. + DeviceIsMigDeviceHandle []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceModifyDrainState holds details about calls to the DeviceModifyDrainState method. + DeviceModifyDrainState []struct { + // PciInfo is the pciInfo argument value. + PciInfo *nvml.PciInfo + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // DeviceOnSameBoard holds details about calls to the DeviceOnSameBoard method. + DeviceOnSameBoard []struct { + // Device1 is the device1 argument value. + Device1 nvml.Device + // Device2 is the device2 argument value. + Device2 nvml.Device + } + // DevicePowerSmoothingActivatePresetProfile holds details about calls to the DevicePowerSmoothingActivatePresetProfile method. + DevicePowerSmoothingActivatePresetProfile []struct { + // Device is the device argument value. + Device nvml.Device + // PowerSmoothingProfile is the powerSmoothingProfile argument value. + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + // DevicePowerSmoothingSetState holds details about calls to the DevicePowerSmoothingSetState method. + DevicePowerSmoothingSetState []struct { + // Device is the device argument value. + Device nvml.Device + // PowerSmoothingState is the powerSmoothingState argument value. + PowerSmoothingState *nvml.PowerSmoothingState + } + // DevicePowerSmoothingUpdatePresetProfileParam holds details about calls to the DevicePowerSmoothingUpdatePresetProfileParam method. + DevicePowerSmoothingUpdatePresetProfileParam []struct { + // Device is the device argument value. + Device nvml.Device + // PowerSmoothingProfile is the powerSmoothingProfile argument value. + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + // DeviceQueryDrainState holds details about calls to the DeviceQueryDrainState method. + DeviceQueryDrainState []struct { + // PciInfo is the pciInfo argument value. + PciInfo *nvml.PciInfo + } + // DeviceReadWritePRM_v1 holds details about calls to the DeviceReadWritePRM_v1 method. + DeviceReadWritePRM_v1 []struct { + // Device is the device argument value. + Device nvml.Device + // PRMTLV_v1 is the pRMTLV_v1 argument value. + PRMTLV_v1 *nvml.PRMTLV_v1 + } + // DeviceRegisterEvents holds details about calls to the DeviceRegisterEvents method. + DeviceRegisterEvents []struct { + // Device is the device argument value. + Device nvml.Device + // V is the v argument value. + V uint64 + // EventSet is the eventSet argument value. + EventSet nvml.EventSet + } + // DeviceRemoveGpu holds details about calls to the DeviceRemoveGpu method. + DeviceRemoveGpu []struct { + // PciInfo is the pciInfo argument value. + PciInfo *nvml.PciInfo + } + // DeviceRemoveGpu_v2 holds details about calls to the DeviceRemoveGpu_v2 method. + DeviceRemoveGpu_v2 []struct { + // PciInfo is the pciInfo argument value. + PciInfo *nvml.PciInfo + // DetachGpuState is the detachGpuState argument value. + DetachGpuState nvml.DetachGpuState + // PcieLinkState is the pcieLinkState argument value. + PcieLinkState nvml.PcieLinkState + } + // DeviceResetApplicationsClocks holds details about calls to the DeviceResetApplicationsClocks method. + DeviceResetApplicationsClocks []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceResetGpuLockedClocks holds details about calls to the DeviceResetGpuLockedClocks method. + DeviceResetGpuLockedClocks []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceResetMemoryLockedClocks holds details about calls to the DeviceResetMemoryLockedClocks method. + DeviceResetMemoryLockedClocks []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceResetNvLinkErrorCounters holds details about calls to the DeviceResetNvLinkErrorCounters method. + DeviceResetNvLinkErrorCounters []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceResetNvLinkUtilizationCounter holds details about calls to the DeviceResetNvLinkUtilizationCounter method. + DeviceResetNvLinkUtilizationCounter []struct { + // Device is the device argument value. + Device nvml.Device + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } + // DeviceSetAPIRestriction holds details about calls to the DeviceSetAPIRestriction method. + DeviceSetAPIRestriction []struct { + // Device is the device argument value. + Device nvml.Device + // RestrictedAPI is the restrictedAPI argument value. + RestrictedAPI nvml.RestrictedAPI + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // DeviceSetAccountingMode holds details about calls to the DeviceSetAccountingMode method. + DeviceSetAccountingMode []struct { + // Device is the device argument value. + Device nvml.Device + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // DeviceSetApplicationsClocks holds details about calls to the DeviceSetApplicationsClocks method. + DeviceSetApplicationsClocks []struct { + // Device is the device argument value. + Device nvml.Device + // V1 is the v1 argument value. + V1 uint32 + // V2 is the v2 argument value. + V2 uint32 + } + // DeviceSetAutoBoostedClocksEnabled holds details about calls to the DeviceSetAutoBoostedClocksEnabled method. + DeviceSetAutoBoostedClocksEnabled []struct { + // Device is the device argument value. + Device nvml.Device + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // DeviceSetClockOffsets holds details about calls to the DeviceSetClockOffsets method. + DeviceSetClockOffsets []struct { + // Device is the device argument value. + Device nvml.Device + // ClockOffset is the clockOffset argument value. + ClockOffset nvml.ClockOffset + } + // DeviceSetComputeMode holds details about calls to the DeviceSetComputeMode method. + DeviceSetComputeMode []struct { + // Device is the device argument value. + Device nvml.Device + // ComputeMode is the computeMode argument value. + ComputeMode nvml.ComputeMode + } + // DeviceSetConfComputeUnprotectedMemSize holds details about calls to the DeviceSetConfComputeUnprotectedMemSize method. + DeviceSetConfComputeUnprotectedMemSize []struct { + // Device is the device argument value. + Device nvml.Device + // V is the v argument value. + V uint64 + } + // DeviceSetCpuAffinity holds details about calls to the DeviceSetCpuAffinity method. + DeviceSetCpuAffinity []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceSetDefaultAutoBoostedClocksEnabled holds details about calls to the DeviceSetDefaultAutoBoostedClocksEnabled method. + DeviceSetDefaultAutoBoostedClocksEnabled []struct { + // Device is the device argument value. + Device nvml.Device + // EnableState is the enableState argument value. + EnableState nvml.EnableState + // V is the v argument value. + V uint32 + } + // DeviceSetDefaultFanSpeed_v2 holds details about calls to the DeviceSetDefaultFanSpeed_v2 method. + DeviceSetDefaultFanSpeed_v2 []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceSetDramEncryptionMode holds details about calls to the DeviceSetDramEncryptionMode method. + DeviceSetDramEncryptionMode []struct { + // Device is the device argument value. + Device nvml.Device + // DramEncryptionInfo is the dramEncryptionInfo argument value. + DramEncryptionInfo *nvml.DramEncryptionInfo + } + // DeviceSetDriverModel holds details about calls to the DeviceSetDriverModel method. + DeviceSetDriverModel []struct { + // Device is the device argument value. + Device nvml.Device + // DriverModel is the driverModel argument value. + DriverModel nvml.DriverModel + // V is the v argument value. + V uint32 + } + // DeviceSetEccMode holds details about calls to the DeviceSetEccMode method. + DeviceSetEccMode []struct { + // Device is the device argument value. + Device nvml.Device + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // DeviceSetFanControlPolicy holds details about calls to the DeviceSetFanControlPolicy method. + DeviceSetFanControlPolicy []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + // FanControlPolicy is the fanControlPolicy argument value. + FanControlPolicy nvml.FanControlPolicy + } + // DeviceSetFanSpeed_v2 holds details about calls to the DeviceSetFanSpeed_v2 method. + DeviceSetFanSpeed_v2 []struct { + // Device is the device argument value. + Device nvml.Device + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } + // DeviceSetGpcClkVfOffset holds details about calls to the DeviceSetGpcClkVfOffset method. + DeviceSetGpcClkVfOffset []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceSetGpuLockedClocks holds details about calls to the DeviceSetGpuLockedClocks method. + DeviceSetGpuLockedClocks []struct { + // Device is the device argument value. + Device nvml.Device + // V1 is the v1 argument value. + V1 uint32 + // V2 is the v2 argument value. + V2 uint32 + } + // DeviceSetGpuOperationMode holds details about calls to the DeviceSetGpuOperationMode method. + DeviceSetGpuOperationMode []struct { + // Device is the device argument value. + Device nvml.Device + // GpuOperationMode is the gpuOperationMode argument value. + GpuOperationMode nvml.GpuOperationMode + } + // DeviceSetMemClkVfOffset holds details about calls to the DeviceSetMemClkVfOffset method. + DeviceSetMemClkVfOffset []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceSetMemoryLockedClocks holds details about calls to the DeviceSetMemoryLockedClocks method. + DeviceSetMemoryLockedClocks []struct { + // Device is the device argument value. + Device nvml.Device + // V1 is the v1 argument value. + V1 uint32 + // V2 is the v2 argument value. + V2 uint32 + } + // DeviceSetMigMode holds details about calls to the DeviceSetMigMode method. + DeviceSetMigMode []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + } + // DeviceSetNvLinkDeviceLowPowerThreshold holds details about calls to the DeviceSetNvLinkDeviceLowPowerThreshold method. + DeviceSetNvLinkDeviceLowPowerThreshold []struct { + // Device is the device argument value. + Device nvml.Device + // NvLinkPowerThres is the nvLinkPowerThres argument value. + NvLinkPowerThres *nvml.NvLinkPowerThres + } + // DeviceSetNvLinkUtilizationControl holds details about calls to the DeviceSetNvLinkUtilizationControl method. + DeviceSetNvLinkUtilizationControl []struct { + // Device is the device argument value. + Device nvml.Device + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + // NvLinkUtilizationControl is the nvLinkUtilizationControl argument value. + NvLinkUtilizationControl *nvml.NvLinkUtilizationControl + // B is the b argument value. + B bool + } + // DeviceSetNvlinkBwMode holds details about calls to the DeviceSetNvlinkBwMode method. + DeviceSetNvlinkBwMode []struct { + // Device is the device argument value. + Device nvml.Device + // NvlinkSetBwMode is the nvlinkSetBwMode argument value. + NvlinkSetBwMode *nvml.NvlinkSetBwMode + } + // DeviceSetPersistenceMode holds details about calls to the DeviceSetPersistenceMode method. + DeviceSetPersistenceMode []struct { + // Device is the device argument value. + Device nvml.Device + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // DeviceSetPowerManagementLimit holds details about calls to the DeviceSetPowerManagementLimit method. + DeviceSetPowerManagementLimit []struct { + // Device is the device argument value. + Device nvml.Device + // V is the v argument value. + V uint32 + } + // DeviceSetPowerManagementLimit_v2 holds details about calls to the DeviceSetPowerManagementLimit_v2 method. + DeviceSetPowerManagementLimit_v2 []struct { + // Device is the device argument value. + Device nvml.Device + // PowerValue_v2 is the powerValue_v2 argument value. + PowerValue_v2 *nvml.PowerValue_v2 + } + // DeviceSetTemperatureThreshold holds details about calls to the DeviceSetTemperatureThreshold method. + DeviceSetTemperatureThreshold []struct { + // Device is the device argument value. + Device nvml.Device + // TemperatureThresholds is the temperatureThresholds argument value. + TemperatureThresholds nvml.TemperatureThresholds + // N is the n argument value. + N int + } + // DeviceSetVgpuCapabilities holds details about calls to the DeviceSetVgpuCapabilities method. + DeviceSetVgpuCapabilities []struct { + // Device is the device argument value. + Device nvml.Device + // DeviceVgpuCapability is the deviceVgpuCapability argument value. + DeviceVgpuCapability nvml.DeviceVgpuCapability + // EnableState is the enableState argument value. + EnableState nvml.EnableState + } + // DeviceSetVgpuHeterogeneousMode holds details about calls to the DeviceSetVgpuHeterogeneousMode method. + DeviceSetVgpuHeterogeneousMode []struct { + // Device is the device argument value. + Device nvml.Device + // VgpuHeterogeneousMode is the vgpuHeterogeneousMode argument value. + VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode + } + // DeviceSetVgpuSchedulerState holds details about calls to the DeviceSetVgpuSchedulerState method. + DeviceSetVgpuSchedulerState []struct { + // Device is the device argument value. + Device nvml.Device + // VgpuSchedulerSetState is the vgpuSchedulerSetState argument value. + VgpuSchedulerSetState *nvml.VgpuSchedulerSetState + } + // DeviceSetVirtualizationMode holds details about calls to the DeviceSetVirtualizationMode method. + DeviceSetVirtualizationMode []struct { + // Device is the device argument value. + Device nvml.Device + // GpuVirtualizationMode is the gpuVirtualizationMode argument value. + GpuVirtualizationMode nvml.GpuVirtualizationMode + } + // DeviceValidateInforom holds details about calls to the DeviceValidateInforom method. + DeviceValidateInforom []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceWorkloadPowerProfileClearRequestedProfiles holds details about calls to the DeviceWorkloadPowerProfileClearRequestedProfiles method. + DeviceWorkloadPowerProfileClearRequestedProfiles []struct { + // Device is the device argument value. + Device nvml.Device + // WorkloadPowerProfileRequestedProfiles is the workloadPowerProfileRequestedProfiles argument value. + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + // DeviceWorkloadPowerProfileGetCurrentProfiles holds details about calls to the DeviceWorkloadPowerProfileGetCurrentProfiles method. + DeviceWorkloadPowerProfileGetCurrentProfiles []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceWorkloadPowerProfileGetProfilesInfo holds details about calls to the DeviceWorkloadPowerProfileGetProfilesInfo method. + DeviceWorkloadPowerProfileGetProfilesInfo []struct { + // Device is the device argument value. + Device nvml.Device + } + // DeviceWorkloadPowerProfileSetRequestedProfiles holds details about calls to the DeviceWorkloadPowerProfileSetRequestedProfiles method. + DeviceWorkloadPowerProfileSetRequestedProfiles []struct { + // Device is the device argument value. + Device nvml.Device + // WorkloadPowerProfileRequestedProfiles is the workloadPowerProfileRequestedProfiles argument value. + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + // ErrorString holds details about calls to the ErrorString method. + ErrorString []struct { + // ReturnMoqParam is the returnMoqParam argument value. + ReturnMoqParam nvml.Return + } + // EventSetCreate holds details about calls to the EventSetCreate method. + EventSetCreate []struct { + } + // EventSetFree holds details about calls to the EventSetFree method. + EventSetFree []struct { + // EventSet is the eventSet argument value. + EventSet nvml.EventSet + } + // EventSetWait holds details about calls to the EventSetWait method. + EventSetWait []struct { + // EventSet is the eventSet argument value. + EventSet nvml.EventSet + // V is the v argument value. + V uint32 + } + // Extensions holds details about calls to the Extensions method. + Extensions []struct { + } + // GetExcludedDeviceCount holds details about calls to the GetExcludedDeviceCount method. + GetExcludedDeviceCount []struct { + } + // GetExcludedDeviceInfoByIndex holds details about calls to the GetExcludedDeviceInfoByIndex method. + GetExcludedDeviceInfoByIndex []struct { + // N is the n argument value. + N int + } + // GetVgpuCompatibility holds details about calls to the GetVgpuCompatibility method. + GetVgpuCompatibility []struct { + // VgpuMetadata is the vgpuMetadata argument value. + VgpuMetadata *nvml.VgpuMetadata + // VgpuPgpuMetadata is the vgpuPgpuMetadata argument value. + VgpuPgpuMetadata *nvml.VgpuPgpuMetadata + } + // GetVgpuDriverCapabilities holds details about calls to the GetVgpuDriverCapabilities method. + GetVgpuDriverCapabilities []struct { + // VgpuDriverCapability is the vgpuDriverCapability argument value. + VgpuDriverCapability nvml.VgpuDriverCapability + } + // GetVgpuVersion holds details about calls to the GetVgpuVersion method. + GetVgpuVersion []struct { + } + // GpmMetricsGet holds details about calls to the GpmMetricsGet method. + GpmMetricsGet []struct { + // GpmMetricsGetType is the gpmMetricsGetType argument value. + GpmMetricsGetType *nvml.GpmMetricsGetType + } + // GpmMetricsGetV holds details about calls to the GpmMetricsGetV method. + GpmMetricsGetV []struct { + // GpmMetricsGetType is the gpmMetricsGetType argument value. + GpmMetricsGetType *nvml.GpmMetricsGetType + } + // GpmMigSampleGet holds details about calls to the GpmMigSampleGet method. + GpmMigSampleGet []struct { + // Device is the device argument value. + Device nvml.Device + // N is the n argument value. + N int + // GpmSample is the gpmSample argument value. + GpmSample nvml.GpmSample + } + // GpmQueryDeviceSupport holds details about calls to the GpmQueryDeviceSupport method. + GpmQueryDeviceSupport []struct { + // Device is the device argument value. + Device nvml.Device + } + // GpmQueryDeviceSupportV holds details about calls to the GpmQueryDeviceSupportV method. + GpmQueryDeviceSupportV []struct { + // Device is the device argument value. + Device nvml.Device + } + // GpmQueryIfStreamingEnabled holds details about calls to the GpmQueryIfStreamingEnabled method. + GpmQueryIfStreamingEnabled []struct { + // Device is the device argument value. + Device nvml.Device + } + // GpmSampleAlloc holds details about calls to the GpmSampleAlloc method. + GpmSampleAlloc []struct { + } + // GpmSampleFree holds details about calls to the GpmSampleFree method. + GpmSampleFree []struct { + // GpmSample is the gpmSample argument value. + GpmSample nvml.GpmSample + } + // GpmSampleGet holds details about calls to the GpmSampleGet method. + GpmSampleGet []struct { + // Device is the device argument value. + Device nvml.Device + // GpmSample is the gpmSample argument value. + GpmSample nvml.GpmSample + } + // GpmSetStreamingEnabled holds details about calls to the GpmSetStreamingEnabled method. + GpmSetStreamingEnabled []struct { + // Device is the device argument value. + Device nvml.Device + // V is the v argument value. + V uint32 + } + // GpuInstanceCreateComputeInstance holds details about calls to the GpuInstanceCreateComputeInstance method. + GpuInstanceCreateComputeInstance []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + // GpuInstanceCreateComputeInstanceWithPlacement holds details about calls to the GpuInstanceCreateComputeInstanceWithPlacement method. + GpuInstanceCreateComputeInstanceWithPlacement []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + // ComputeInstancePlacement is the computeInstancePlacement argument value. + ComputeInstancePlacement *nvml.ComputeInstancePlacement + } + // GpuInstanceDestroy holds details about calls to the GpuInstanceDestroy method. + GpuInstanceDestroy []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } + // GpuInstanceGetActiveVgpus holds details about calls to the GpuInstanceGetActiveVgpus method. + GpuInstanceGetActiveVgpus []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } + // GpuInstanceGetComputeInstanceById holds details about calls to the GpuInstanceGetComputeInstanceById method. + GpuInstanceGetComputeInstanceById []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + // N is the n argument value. + N int + } + // GpuInstanceGetComputeInstancePossiblePlacements holds details about calls to the GpuInstanceGetComputeInstancePossiblePlacements method. + GpuInstanceGetComputeInstancePossiblePlacements []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + // GpuInstanceGetComputeInstanceProfileInfo holds details about calls to the GpuInstanceGetComputeInstanceProfileInfo method. + GpuInstanceGetComputeInstanceProfileInfo []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } + // GpuInstanceGetComputeInstanceProfileInfoV holds details about calls to the GpuInstanceGetComputeInstanceProfileInfoV method. + GpuInstanceGetComputeInstanceProfileInfoV []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + // N1 is the n1 argument value. + N1 int + // N2 is the n2 argument value. + N2 int + } + // GpuInstanceGetComputeInstanceRemainingCapacity holds details about calls to the GpuInstanceGetComputeInstanceRemainingCapacity method. + GpuInstanceGetComputeInstanceRemainingCapacity []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + // GpuInstanceGetComputeInstances holds details about calls to the GpuInstanceGetComputeInstances method. + GpuInstanceGetComputeInstances []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + // GpuInstanceGetCreatableVgpus holds details about calls to the GpuInstanceGetCreatableVgpus method. + GpuInstanceGetCreatableVgpus []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } + // GpuInstanceGetInfo holds details about calls to the GpuInstanceGetInfo method. + GpuInstanceGetInfo []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } + // GpuInstanceGetVgpuHeterogeneousMode holds details about calls to the GpuInstanceGetVgpuHeterogeneousMode method. + GpuInstanceGetVgpuHeterogeneousMode []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } + // GpuInstanceGetVgpuSchedulerLog holds details about calls to the GpuInstanceGetVgpuSchedulerLog method. + GpuInstanceGetVgpuSchedulerLog []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } + // GpuInstanceGetVgpuSchedulerState holds details about calls to the GpuInstanceGetVgpuSchedulerState method. + GpuInstanceGetVgpuSchedulerState []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } + // GpuInstanceGetVgpuTypeCreatablePlacements holds details about calls to the GpuInstanceGetVgpuTypeCreatablePlacements method. + GpuInstanceGetVgpuTypeCreatablePlacements []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + } + // GpuInstanceSetVgpuHeterogeneousMode holds details about calls to the GpuInstanceSetVgpuHeterogeneousMode method. + GpuInstanceSetVgpuHeterogeneousMode []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + // VgpuHeterogeneousMode is the vgpuHeterogeneousMode argument value. + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode + } + // GpuInstanceSetVgpuSchedulerState holds details about calls to the GpuInstanceSetVgpuSchedulerState method. + GpuInstanceSetVgpuSchedulerState []struct { + // GpuInstance is the gpuInstance argument value. + GpuInstance nvml.GpuInstance + // VgpuSchedulerState is the vgpuSchedulerState argument value. + VgpuSchedulerState *nvml.VgpuSchedulerState + } + // Init holds details about calls to the Init method. + Init []struct { + } + // InitWithFlags holds details about calls to the InitWithFlags method. + InitWithFlags []struct { + // V is the v argument value. + V uint32 + } + // SetVgpuVersion holds details about calls to the SetVgpuVersion method. + SetVgpuVersion []struct { + // VgpuVersion is the vgpuVersion argument value. + VgpuVersion *nvml.VgpuVersion + } + // Shutdown holds details about calls to the Shutdown method. + Shutdown []struct { + } + // SystemEventSetCreate holds details about calls to the SystemEventSetCreate method. + SystemEventSetCreate []struct { + // SystemEventSetCreateRequest is the systemEventSetCreateRequest argument value. + SystemEventSetCreateRequest *nvml.SystemEventSetCreateRequest + } + // SystemEventSetFree holds details about calls to the SystemEventSetFree method. + SystemEventSetFree []struct { + // SystemEventSetFreeRequest is the systemEventSetFreeRequest argument value. + SystemEventSetFreeRequest *nvml.SystemEventSetFreeRequest + } + // SystemEventSetWait holds details about calls to the SystemEventSetWait method. + SystemEventSetWait []struct { + // SystemEventSetWaitRequest is the systemEventSetWaitRequest argument value. + SystemEventSetWaitRequest *nvml.SystemEventSetWaitRequest + } + // SystemGetConfComputeCapabilities holds details about calls to the SystemGetConfComputeCapabilities method. + SystemGetConfComputeCapabilities []struct { + } + // SystemGetConfComputeGpusReadyState holds details about calls to the SystemGetConfComputeGpusReadyState method. + SystemGetConfComputeGpusReadyState []struct { + } + // SystemGetConfComputeKeyRotationThresholdInfo holds details about calls to the SystemGetConfComputeKeyRotationThresholdInfo method. + SystemGetConfComputeKeyRotationThresholdInfo []struct { + } + // SystemGetConfComputeSettings holds details about calls to the SystemGetConfComputeSettings method. + SystemGetConfComputeSettings []struct { + } + // SystemGetConfComputeState holds details about calls to the SystemGetConfComputeState method. + SystemGetConfComputeState []struct { + } + // SystemGetCudaDriverVersion holds details about calls to the SystemGetCudaDriverVersion method. + SystemGetCudaDriverVersion []struct { + } + // SystemGetCudaDriverVersion_v2 holds details about calls to the SystemGetCudaDriverVersion_v2 method. + SystemGetCudaDriverVersion_v2 []struct { + } + // SystemGetDriverBranch holds details about calls to the SystemGetDriverBranch method. + SystemGetDriverBranch []struct { + } + // SystemGetDriverVersion holds details about calls to the SystemGetDriverVersion method. + SystemGetDriverVersion []struct { + } + // SystemGetHicVersion holds details about calls to the SystemGetHicVersion method. + SystemGetHicVersion []struct { + } + // SystemGetNVMLVersion holds details about calls to the SystemGetNVMLVersion method. + SystemGetNVMLVersion []struct { + } + // SystemGetNvlinkBwMode holds details about calls to the SystemGetNvlinkBwMode method. + SystemGetNvlinkBwMode []struct { + } + // SystemGetProcessName holds details about calls to the SystemGetProcessName method. + SystemGetProcessName []struct { + // N is the n argument value. + N int + } + // SystemGetTopologyGpuSet holds details about calls to the SystemGetTopologyGpuSet method. + SystemGetTopologyGpuSet []struct { + // N is the n argument value. + N int + } + // SystemRegisterEvents holds details about calls to the SystemRegisterEvents method. + SystemRegisterEvents []struct { + // SystemRegisterEventRequest is the systemRegisterEventRequest argument value. + SystemRegisterEventRequest *nvml.SystemRegisterEventRequest + } + // SystemSetConfComputeGpusReadyState holds details about calls to the SystemSetConfComputeGpusReadyState method. + SystemSetConfComputeGpusReadyState []struct { + // V is the v argument value. + V uint32 + } + // SystemSetConfComputeKeyRotationThresholdInfo holds details about calls to the SystemSetConfComputeKeyRotationThresholdInfo method. + SystemSetConfComputeKeyRotationThresholdInfo []struct { + // ConfComputeSetKeyRotationThresholdInfo is the confComputeSetKeyRotationThresholdInfo argument value. + ConfComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo + } + // SystemSetNvlinkBwMode holds details about calls to the SystemSetNvlinkBwMode method. + SystemSetNvlinkBwMode []struct { + // V is the v argument value. + V uint32 + } + // UnitGetCount holds details about calls to the UnitGetCount method. + UnitGetCount []struct { + } + // UnitGetDevices holds details about calls to the UnitGetDevices method. + UnitGetDevices []struct { + // Unit is the unit argument value. + Unit nvml.Unit + } + // UnitGetFanSpeedInfo holds details about calls to the UnitGetFanSpeedInfo method. + UnitGetFanSpeedInfo []struct { + // Unit is the unit argument value. + Unit nvml.Unit + } + // UnitGetHandleByIndex holds details about calls to the UnitGetHandleByIndex method. + UnitGetHandleByIndex []struct { + // N is the n argument value. + N int + } + // UnitGetLedState holds details about calls to the UnitGetLedState method. + UnitGetLedState []struct { + // Unit is the unit argument value. + Unit nvml.Unit + } + // UnitGetPsuInfo holds details about calls to the UnitGetPsuInfo method. + UnitGetPsuInfo []struct { + // Unit is the unit argument value. + Unit nvml.Unit + } + // UnitGetTemperature holds details about calls to the UnitGetTemperature method. + UnitGetTemperature []struct { + // Unit is the unit argument value. + Unit nvml.Unit + // N is the n argument value. + N int + } + // UnitGetUnitInfo holds details about calls to the UnitGetUnitInfo method. + UnitGetUnitInfo []struct { + // Unit is the unit argument value. + Unit nvml.Unit + } + // UnitSetLedState holds details about calls to the UnitSetLedState method. + UnitSetLedState []struct { + // Unit is the unit argument value. + Unit nvml.Unit + // LedColor is the ledColor argument value. + LedColor nvml.LedColor + } + // VgpuInstanceClearAccountingPids holds details about calls to the VgpuInstanceClearAccountingPids method. + VgpuInstanceClearAccountingPids []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetAccountingMode holds details about calls to the VgpuInstanceGetAccountingMode method. + VgpuInstanceGetAccountingMode []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetAccountingPids holds details about calls to the VgpuInstanceGetAccountingPids method. + VgpuInstanceGetAccountingPids []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetAccountingStats holds details about calls to the VgpuInstanceGetAccountingStats method. + VgpuInstanceGetAccountingStats []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + // N is the n argument value. + N int + } + // VgpuInstanceGetEccMode holds details about calls to the VgpuInstanceGetEccMode method. + VgpuInstanceGetEccMode []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetEncoderCapacity holds details about calls to the VgpuInstanceGetEncoderCapacity method. + VgpuInstanceGetEncoderCapacity []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetEncoderSessions holds details about calls to the VgpuInstanceGetEncoderSessions method. + VgpuInstanceGetEncoderSessions []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetEncoderStats holds details about calls to the VgpuInstanceGetEncoderStats method. + VgpuInstanceGetEncoderStats []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetFBCSessions holds details about calls to the VgpuInstanceGetFBCSessions method. + VgpuInstanceGetFBCSessions []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetFBCStats holds details about calls to the VgpuInstanceGetFBCStats method. + VgpuInstanceGetFBCStats []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetFbUsage holds details about calls to the VgpuInstanceGetFbUsage method. + VgpuInstanceGetFbUsage []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetFrameRateLimit holds details about calls to the VgpuInstanceGetFrameRateLimit method. + VgpuInstanceGetFrameRateLimit []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetGpuInstanceId holds details about calls to the VgpuInstanceGetGpuInstanceId method. + VgpuInstanceGetGpuInstanceId []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetGpuPciId holds details about calls to the VgpuInstanceGetGpuPciId method. + VgpuInstanceGetGpuPciId []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetLicenseInfo holds details about calls to the VgpuInstanceGetLicenseInfo method. + VgpuInstanceGetLicenseInfo []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetLicenseStatus holds details about calls to the VgpuInstanceGetLicenseStatus method. + VgpuInstanceGetLicenseStatus []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetMdevUUID holds details about calls to the VgpuInstanceGetMdevUUID method. + VgpuInstanceGetMdevUUID []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetMetadata holds details about calls to the VgpuInstanceGetMetadata method. + VgpuInstanceGetMetadata []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetRuntimeStateSize holds details about calls to the VgpuInstanceGetRuntimeStateSize method. + VgpuInstanceGetRuntimeStateSize []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetType holds details about calls to the VgpuInstanceGetType method. + VgpuInstanceGetType []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetUUID holds details about calls to the VgpuInstanceGetUUID method. + VgpuInstanceGetUUID []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetVmDriverVersion holds details about calls to the VgpuInstanceGetVmDriverVersion method. + VgpuInstanceGetVmDriverVersion []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceGetVmID holds details about calls to the VgpuInstanceGetVmID method. + VgpuInstanceGetVmID []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + } + // VgpuInstanceSetEncoderCapacity holds details about calls to the VgpuInstanceSetEncoderCapacity method. + VgpuInstanceSetEncoderCapacity []struct { + // VgpuInstance is the vgpuInstance argument value. + VgpuInstance nvml.VgpuInstance + // N is the n argument value. + N int + } + // VgpuTypeGetBAR1Info holds details about calls to the VgpuTypeGetBAR1Info method. + VgpuTypeGetBAR1Info []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // VgpuTypeGetCapabilities holds details about calls to the VgpuTypeGetCapabilities method. + VgpuTypeGetCapabilities []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + // VgpuCapability is the vgpuCapability argument value. + VgpuCapability nvml.VgpuCapability + } + // VgpuTypeGetClass holds details about calls to the VgpuTypeGetClass method. + VgpuTypeGetClass []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // VgpuTypeGetDeviceID holds details about calls to the VgpuTypeGetDeviceID method. + VgpuTypeGetDeviceID []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // VgpuTypeGetFrameRateLimit holds details about calls to the VgpuTypeGetFrameRateLimit method. + VgpuTypeGetFrameRateLimit []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // VgpuTypeGetFramebufferSize holds details about calls to the VgpuTypeGetFramebufferSize method. + VgpuTypeGetFramebufferSize []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // VgpuTypeGetGpuInstanceProfileId holds details about calls to the VgpuTypeGetGpuInstanceProfileId method. + VgpuTypeGetGpuInstanceProfileId []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // VgpuTypeGetLicense holds details about calls to the VgpuTypeGetLicense method. + VgpuTypeGetLicense []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // VgpuTypeGetMaxInstances holds details about calls to the VgpuTypeGetMaxInstances method. + VgpuTypeGetMaxInstances []struct { + // Device is the device argument value. + Device nvml.Device + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // VgpuTypeGetMaxInstancesPerGpuInstance holds details about calls to the VgpuTypeGetMaxInstancesPerGpuInstance method. + VgpuTypeGetMaxInstancesPerGpuInstance []struct { + // VgpuTypeMaxInstance is the vgpuTypeMaxInstance argument value. + VgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance + } + // VgpuTypeGetMaxInstancesPerVm holds details about calls to the VgpuTypeGetMaxInstancesPerVm method. + VgpuTypeGetMaxInstancesPerVm []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // VgpuTypeGetName holds details about calls to the VgpuTypeGetName method. + VgpuTypeGetName []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // VgpuTypeGetNumDisplayHeads holds details about calls to the VgpuTypeGetNumDisplayHeads method. + VgpuTypeGetNumDisplayHeads []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + } + // VgpuTypeGetResolution holds details about calls to the VgpuTypeGetResolution method. + VgpuTypeGetResolution []struct { + // VgpuTypeId is the vgpuTypeId argument value. + VgpuTypeId nvml.VgpuTypeId + // N is the n argument value. + N int + } + } + lockComputeInstanceDestroy sync.RWMutex + lockComputeInstanceGetInfo sync.RWMutex + lockDeviceClearAccountingPids sync.RWMutex + lockDeviceClearCpuAffinity sync.RWMutex + lockDeviceClearEccErrorCounts sync.RWMutex + lockDeviceClearFieldValues sync.RWMutex + lockDeviceCreateGpuInstance sync.RWMutex + lockDeviceCreateGpuInstanceWithPlacement sync.RWMutex + lockDeviceDiscoverGpus sync.RWMutex + lockDeviceFreezeNvLinkUtilizationCounter sync.RWMutex + lockDeviceGetAPIRestriction sync.RWMutex + lockDeviceGetAccountingBufferSize sync.RWMutex + lockDeviceGetAccountingMode sync.RWMutex + lockDeviceGetAccountingPids sync.RWMutex + lockDeviceGetAccountingStats sync.RWMutex + lockDeviceGetActiveVgpus sync.RWMutex + lockDeviceGetAdaptiveClockInfoStatus sync.RWMutex + lockDeviceGetAddressingMode sync.RWMutex + lockDeviceGetApplicationsClock sync.RWMutex + lockDeviceGetArchitecture sync.RWMutex + lockDeviceGetAttributes sync.RWMutex + lockDeviceGetAutoBoostedClocksEnabled sync.RWMutex + lockDeviceGetBAR1MemoryInfo sync.RWMutex + lockDeviceGetBoardId sync.RWMutex + lockDeviceGetBoardPartNumber sync.RWMutex + lockDeviceGetBrand sync.RWMutex + lockDeviceGetBridgeChipInfo sync.RWMutex + lockDeviceGetBusType sync.RWMutex + lockDeviceGetC2cModeInfoV sync.RWMutex + lockDeviceGetCapabilities sync.RWMutex + lockDeviceGetClkMonStatus sync.RWMutex + lockDeviceGetClock sync.RWMutex + lockDeviceGetClockInfo sync.RWMutex + lockDeviceGetClockOffsets sync.RWMutex + lockDeviceGetComputeInstanceId sync.RWMutex + lockDeviceGetComputeMode sync.RWMutex + lockDeviceGetComputeRunningProcesses sync.RWMutex + lockDeviceGetConfComputeGpuAttestationReport sync.RWMutex + lockDeviceGetConfComputeGpuCertificate sync.RWMutex + lockDeviceGetConfComputeMemSizeInfo sync.RWMutex + lockDeviceGetConfComputeProtectedMemoryUsage sync.RWMutex + lockDeviceGetCoolerInfo sync.RWMutex + lockDeviceGetCount sync.RWMutex + lockDeviceGetCpuAffinity sync.RWMutex + lockDeviceGetCpuAffinityWithinScope sync.RWMutex + lockDeviceGetCreatableVgpus sync.RWMutex + lockDeviceGetCudaComputeCapability sync.RWMutex + lockDeviceGetCurrPcieLinkGeneration sync.RWMutex + lockDeviceGetCurrPcieLinkWidth sync.RWMutex + lockDeviceGetCurrentClockFreqs sync.RWMutex + lockDeviceGetCurrentClocksEventReasons sync.RWMutex + lockDeviceGetCurrentClocksThrottleReasons sync.RWMutex + lockDeviceGetDecoderUtilization sync.RWMutex + lockDeviceGetDefaultApplicationsClock sync.RWMutex + lockDeviceGetDefaultEccMode sync.RWMutex + lockDeviceGetDetailedEccErrors sync.RWMutex + lockDeviceGetDeviceHandleFromMigDeviceHandle sync.RWMutex + lockDeviceGetDisplayActive sync.RWMutex + lockDeviceGetDisplayMode sync.RWMutex + lockDeviceGetDramEncryptionMode sync.RWMutex + lockDeviceGetDriverModel sync.RWMutex + lockDeviceGetDriverModel_v2 sync.RWMutex + lockDeviceGetDynamicPstatesInfo sync.RWMutex + lockDeviceGetEccMode sync.RWMutex + lockDeviceGetEncoderCapacity sync.RWMutex + lockDeviceGetEncoderSessions sync.RWMutex + lockDeviceGetEncoderStats sync.RWMutex + lockDeviceGetEncoderUtilization sync.RWMutex + lockDeviceGetEnforcedPowerLimit sync.RWMutex + lockDeviceGetFBCSessions sync.RWMutex + lockDeviceGetFBCStats sync.RWMutex + lockDeviceGetFanControlPolicy_v2 sync.RWMutex + lockDeviceGetFanSpeed sync.RWMutex + lockDeviceGetFanSpeedRPM sync.RWMutex + lockDeviceGetFanSpeed_v2 sync.RWMutex + lockDeviceGetFieldValues sync.RWMutex + lockDeviceGetGpcClkMinMaxVfOffset sync.RWMutex + lockDeviceGetGpcClkVfOffset sync.RWMutex + lockDeviceGetGpuFabricInfo sync.RWMutex + lockDeviceGetGpuFabricInfoV sync.RWMutex + lockDeviceGetGpuInstanceById sync.RWMutex + lockDeviceGetGpuInstanceId sync.RWMutex + lockDeviceGetGpuInstancePossiblePlacements sync.RWMutex + lockDeviceGetGpuInstanceProfileInfo sync.RWMutex + lockDeviceGetGpuInstanceProfileInfoByIdV sync.RWMutex + lockDeviceGetGpuInstanceProfileInfoV sync.RWMutex + lockDeviceGetGpuInstanceRemainingCapacity sync.RWMutex + lockDeviceGetGpuInstances sync.RWMutex + lockDeviceGetGpuMaxPcieLinkGeneration sync.RWMutex + lockDeviceGetGpuOperationMode sync.RWMutex + lockDeviceGetGraphicsRunningProcesses sync.RWMutex + lockDeviceGetGridLicensableFeatures sync.RWMutex + lockDeviceGetGspFirmwareMode sync.RWMutex + lockDeviceGetGspFirmwareVersion sync.RWMutex + lockDeviceGetHandleByIndex sync.RWMutex + lockDeviceGetHandleByPciBusId sync.RWMutex + lockDeviceGetHandleBySerial sync.RWMutex + lockDeviceGetHandleByUUID sync.RWMutex + lockDeviceGetHandleByUUIDV sync.RWMutex + lockDeviceGetHostVgpuMode sync.RWMutex + lockDeviceGetIndex sync.RWMutex + lockDeviceGetInforomConfigurationChecksum sync.RWMutex + lockDeviceGetInforomImageVersion sync.RWMutex + lockDeviceGetInforomVersion sync.RWMutex + lockDeviceGetIrqNum sync.RWMutex + lockDeviceGetJpgUtilization sync.RWMutex + lockDeviceGetLastBBXFlushTime sync.RWMutex + lockDeviceGetMPSComputeRunningProcesses sync.RWMutex + lockDeviceGetMarginTemperature sync.RWMutex + lockDeviceGetMaxClockInfo sync.RWMutex + lockDeviceGetMaxCustomerBoostClock sync.RWMutex + lockDeviceGetMaxMigDeviceCount sync.RWMutex + lockDeviceGetMaxPcieLinkGeneration sync.RWMutex + lockDeviceGetMaxPcieLinkWidth sync.RWMutex + lockDeviceGetMemClkMinMaxVfOffset sync.RWMutex + lockDeviceGetMemClkVfOffset sync.RWMutex + lockDeviceGetMemoryAffinity sync.RWMutex + lockDeviceGetMemoryBusWidth sync.RWMutex + lockDeviceGetMemoryErrorCounter sync.RWMutex + lockDeviceGetMemoryInfo sync.RWMutex + lockDeviceGetMemoryInfo_v2 sync.RWMutex + lockDeviceGetMigDeviceHandleByIndex sync.RWMutex + lockDeviceGetMigMode sync.RWMutex + lockDeviceGetMinMaxClockOfPState sync.RWMutex + lockDeviceGetMinMaxFanSpeed sync.RWMutex + lockDeviceGetMinorNumber sync.RWMutex + lockDeviceGetModuleId sync.RWMutex + lockDeviceGetMultiGpuBoard sync.RWMutex + lockDeviceGetName sync.RWMutex + lockDeviceGetNumFans sync.RWMutex + lockDeviceGetNumGpuCores sync.RWMutex + lockDeviceGetNumaNodeId sync.RWMutex + lockDeviceGetNvLinkCapability sync.RWMutex + lockDeviceGetNvLinkErrorCounter sync.RWMutex + lockDeviceGetNvLinkInfo sync.RWMutex + lockDeviceGetNvLinkRemoteDeviceType sync.RWMutex + lockDeviceGetNvLinkRemotePciInfo sync.RWMutex + lockDeviceGetNvLinkState sync.RWMutex + lockDeviceGetNvLinkUtilizationControl sync.RWMutex + lockDeviceGetNvLinkUtilizationCounter sync.RWMutex + lockDeviceGetNvLinkVersion sync.RWMutex + lockDeviceGetNvlinkBwMode sync.RWMutex + lockDeviceGetNvlinkSupportedBwModes sync.RWMutex + lockDeviceGetOfaUtilization sync.RWMutex + lockDeviceGetP2PStatus sync.RWMutex + lockDeviceGetPciInfo sync.RWMutex + lockDeviceGetPciInfoExt sync.RWMutex + lockDeviceGetPcieLinkMaxSpeed sync.RWMutex + lockDeviceGetPcieReplayCounter sync.RWMutex + lockDeviceGetPcieSpeed sync.RWMutex + lockDeviceGetPcieThroughput sync.RWMutex + lockDeviceGetPdi sync.RWMutex + lockDeviceGetPerformanceModes sync.RWMutex + lockDeviceGetPerformanceState sync.RWMutex + lockDeviceGetPersistenceMode sync.RWMutex + lockDeviceGetPgpuMetadataString sync.RWMutex + lockDeviceGetPlatformInfo sync.RWMutex + lockDeviceGetPowerManagementDefaultLimit sync.RWMutex + lockDeviceGetPowerManagementLimit sync.RWMutex + lockDeviceGetPowerManagementLimitConstraints sync.RWMutex + lockDeviceGetPowerManagementMode sync.RWMutex + lockDeviceGetPowerMizerMode_v1 sync.RWMutex + lockDeviceGetPowerSource sync.RWMutex + lockDeviceGetPowerState sync.RWMutex + lockDeviceGetPowerUsage sync.RWMutex + lockDeviceGetProcessUtilization sync.RWMutex + lockDeviceGetProcessesUtilizationInfo sync.RWMutex + lockDeviceGetRemappedRows sync.RWMutex + lockDeviceGetRepairStatus sync.RWMutex + lockDeviceGetRetiredPages sync.RWMutex + lockDeviceGetRetiredPagesPendingStatus sync.RWMutex + lockDeviceGetRetiredPages_v2 sync.RWMutex + lockDeviceGetRowRemapperHistogram sync.RWMutex + lockDeviceGetRunningProcessDetailList sync.RWMutex + lockDeviceGetSamples sync.RWMutex + lockDeviceGetSerial sync.RWMutex + lockDeviceGetSramEccErrorStatus sync.RWMutex + lockDeviceGetSramUniqueUncorrectedEccErrorCounts sync.RWMutex + lockDeviceGetSupportedClocksEventReasons sync.RWMutex + lockDeviceGetSupportedClocksThrottleReasons sync.RWMutex + lockDeviceGetSupportedEventTypes sync.RWMutex + lockDeviceGetSupportedGraphicsClocks sync.RWMutex + lockDeviceGetSupportedMemoryClocks sync.RWMutex + lockDeviceGetSupportedPerformanceStates sync.RWMutex + lockDeviceGetSupportedVgpus sync.RWMutex + lockDeviceGetTargetFanSpeed sync.RWMutex + lockDeviceGetTemperature sync.RWMutex + lockDeviceGetTemperatureThreshold sync.RWMutex + lockDeviceGetTemperatureV sync.RWMutex + lockDeviceGetThermalSettings sync.RWMutex + lockDeviceGetTopologyCommonAncestor sync.RWMutex + lockDeviceGetTopologyNearestGpus sync.RWMutex + lockDeviceGetTotalEccErrors sync.RWMutex + lockDeviceGetTotalEnergyConsumption sync.RWMutex + lockDeviceGetUUID sync.RWMutex + lockDeviceGetUtilizationRates sync.RWMutex + lockDeviceGetVbiosVersion sync.RWMutex + lockDeviceGetVgpuCapabilities sync.RWMutex + lockDeviceGetVgpuHeterogeneousMode sync.RWMutex + lockDeviceGetVgpuInstancesUtilizationInfo sync.RWMutex + lockDeviceGetVgpuMetadata sync.RWMutex + lockDeviceGetVgpuProcessUtilization sync.RWMutex + lockDeviceGetVgpuProcessesUtilizationInfo sync.RWMutex + lockDeviceGetVgpuSchedulerCapabilities sync.RWMutex + lockDeviceGetVgpuSchedulerLog sync.RWMutex + lockDeviceGetVgpuSchedulerState sync.RWMutex + lockDeviceGetVgpuTypeCreatablePlacements sync.RWMutex + lockDeviceGetVgpuTypeSupportedPlacements sync.RWMutex + lockDeviceGetVgpuUtilization sync.RWMutex + lockDeviceGetViolationStatus sync.RWMutex + lockDeviceGetVirtualizationMode sync.RWMutex + lockDeviceIsMigDeviceHandle sync.RWMutex + lockDeviceModifyDrainState sync.RWMutex + lockDeviceOnSameBoard sync.RWMutex + lockDevicePowerSmoothingActivatePresetProfile sync.RWMutex + lockDevicePowerSmoothingSetState sync.RWMutex + lockDevicePowerSmoothingUpdatePresetProfileParam sync.RWMutex + lockDeviceQueryDrainState sync.RWMutex + lockDeviceReadWritePRM_v1 sync.RWMutex + lockDeviceRegisterEvents sync.RWMutex + lockDeviceRemoveGpu sync.RWMutex + lockDeviceRemoveGpu_v2 sync.RWMutex + lockDeviceResetApplicationsClocks sync.RWMutex + lockDeviceResetGpuLockedClocks sync.RWMutex + lockDeviceResetMemoryLockedClocks sync.RWMutex + lockDeviceResetNvLinkErrorCounters sync.RWMutex + lockDeviceResetNvLinkUtilizationCounter sync.RWMutex + lockDeviceSetAPIRestriction sync.RWMutex + lockDeviceSetAccountingMode sync.RWMutex + lockDeviceSetApplicationsClocks sync.RWMutex + lockDeviceSetAutoBoostedClocksEnabled sync.RWMutex + lockDeviceSetClockOffsets sync.RWMutex + lockDeviceSetComputeMode sync.RWMutex + lockDeviceSetConfComputeUnprotectedMemSize sync.RWMutex + lockDeviceSetCpuAffinity sync.RWMutex + lockDeviceSetDefaultAutoBoostedClocksEnabled sync.RWMutex + lockDeviceSetDefaultFanSpeed_v2 sync.RWMutex + lockDeviceSetDramEncryptionMode sync.RWMutex + lockDeviceSetDriverModel sync.RWMutex + lockDeviceSetEccMode sync.RWMutex + lockDeviceSetFanControlPolicy sync.RWMutex + lockDeviceSetFanSpeed_v2 sync.RWMutex + lockDeviceSetGpcClkVfOffset sync.RWMutex + lockDeviceSetGpuLockedClocks sync.RWMutex + lockDeviceSetGpuOperationMode sync.RWMutex + lockDeviceSetMemClkVfOffset sync.RWMutex + lockDeviceSetMemoryLockedClocks sync.RWMutex + lockDeviceSetMigMode sync.RWMutex + lockDeviceSetNvLinkDeviceLowPowerThreshold sync.RWMutex + lockDeviceSetNvLinkUtilizationControl sync.RWMutex + lockDeviceSetNvlinkBwMode sync.RWMutex + lockDeviceSetPersistenceMode sync.RWMutex + lockDeviceSetPowerManagementLimit sync.RWMutex + lockDeviceSetPowerManagementLimit_v2 sync.RWMutex + lockDeviceSetTemperatureThreshold sync.RWMutex + lockDeviceSetVgpuCapabilities sync.RWMutex + lockDeviceSetVgpuHeterogeneousMode sync.RWMutex + lockDeviceSetVgpuSchedulerState sync.RWMutex + lockDeviceSetVirtualizationMode sync.RWMutex + lockDeviceValidateInforom sync.RWMutex + lockDeviceWorkloadPowerProfileClearRequestedProfiles sync.RWMutex + lockDeviceWorkloadPowerProfileGetCurrentProfiles sync.RWMutex + lockDeviceWorkloadPowerProfileGetProfilesInfo sync.RWMutex + lockDeviceWorkloadPowerProfileSetRequestedProfiles sync.RWMutex + lockErrorString sync.RWMutex + lockEventSetCreate sync.RWMutex + lockEventSetFree sync.RWMutex + lockEventSetWait sync.RWMutex + lockExtensions sync.RWMutex + lockGetExcludedDeviceCount sync.RWMutex + lockGetExcludedDeviceInfoByIndex sync.RWMutex + lockGetVgpuCompatibility sync.RWMutex + lockGetVgpuDriverCapabilities sync.RWMutex + lockGetVgpuVersion sync.RWMutex + lockGpmMetricsGet sync.RWMutex + lockGpmMetricsGetV sync.RWMutex + lockGpmMigSampleGet sync.RWMutex + lockGpmQueryDeviceSupport sync.RWMutex + lockGpmQueryDeviceSupportV sync.RWMutex + lockGpmQueryIfStreamingEnabled sync.RWMutex + lockGpmSampleAlloc sync.RWMutex + lockGpmSampleFree sync.RWMutex + lockGpmSampleGet sync.RWMutex + lockGpmSetStreamingEnabled sync.RWMutex + lockGpuInstanceCreateComputeInstance sync.RWMutex + lockGpuInstanceCreateComputeInstanceWithPlacement sync.RWMutex + lockGpuInstanceDestroy sync.RWMutex + lockGpuInstanceGetActiveVgpus sync.RWMutex + lockGpuInstanceGetComputeInstanceById sync.RWMutex + lockGpuInstanceGetComputeInstancePossiblePlacements sync.RWMutex + lockGpuInstanceGetComputeInstanceProfileInfo sync.RWMutex + lockGpuInstanceGetComputeInstanceProfileInfoV sync.RWMutex + lockGpuInstanceGetComputeInstanceRemainingCapacity sync.RWMutex + lockGpuInstanceGetComputeInstances sync.RWMutex + lockGpuInstanceGetCreatableVgpus sync.RWMutex + lockGpuInstanceGetInfo sync.RWMutex + lockGpuInstanceGetVgpuHeterogeneousMode sync.RWMutex + lockGpuInstanceGetVgpuSchedulerLog sync.RWMutex + lockGpuInstanceGetVgpuSchedulerState sync.RWMutex + lockGpuInstanceGetVgpuTypeCreatablePlacements sync.RWMutex + lockGpuInstanceSetVgpuHeterogeneousMode sync.RWMutex + lockGpuInstanceSetVgpuSchedulerState sync.RWMutex + lockInit sync.RWMutex + lockInitWithFlags sync.RWMutex + lockSetVgpuVersion sync.RWMutex + lockShutdown sync.RWMutex + lockSystemEventSetCreate sync.RWMutex + lockSystemEventSetFree sync.RWMutex + lockSystemEventSetWait sync.RWMutex + lockSystemGetConfComputeCapabilities sync.RWMutex + lockSystemGetConfComputeGpusReadyState sync.RWMutex + lockSystemGetConfComputeKeyRotationThresholdInfo sync.RWMutex + lockSystemGetConfComputeSettings sync.RWMutex + lockSystemGetConfComputeState sync.RWMutex + lockSystemGetCudaDriverVersion sync.RWMutex + lockSystemGetCudaDriverVersion_v2 sync.RWMutex + lockSystemGetDriverBranch sync.RWMutex + lockSystemGetDriverVersion sync.RWMutex + lockSystemGetHicVersion sync.RWMutex + lockSystemGetNVMLVersion sync.RWMutex + lockSystemGetNvlinkBwMode sync.RWMutex + lockSystemGetProcessName sync.RWMutex + lockSystemGetTopologyGpuSet sync.RWMutex + lockSystemRegisterEvents sync.RWMutex + lockSystemSetConfComputeGpusReadyState sync.RWMutex + lockSystemSetConfComputeKeyRotationThresholdInfo sync.RWMutex + lockSystemSetNvlinkBwMode sync.RWMutex + lockUnitGetCount sync.RWMutex + lockUnitGetDevices sync.RWMutex + lockUnitGetFanSpeedInfo sync.RWMutex + lockUnitGetHandleByIndex sync.RWMutex + lockUnitGetLedState sync.RWMutex + lockUnitGetPsuInfo sync.RWMutex + lockUnitGetTemperature sync.RWMutex + lockUnitGetUnitInfo sync.RWMutex + lockUnitSetLedState sync.RWMutex + lockVgpuInstanceClearAccountingPids sync.RWMutex + lockVgpuInstanceGetAccountingMode sync.RWMutex + lockVgpuInstanceGetAccountingPids sync.RWMutex + lockVgpuInstanceGetAccountingStats sync.RWMutex + lockVgpuInstanceGetEccMode sync.RWMutex + lockVgpuInstanceGetEncoderCapacity sync.RWMutex + lockVgpuInstanceGetEncoderSessions sync.RWMutex + lockVgpuInstanceGetEncoderStats sync.RWMutex + lockVgpuInstanceGetFBCSessions sync.RWMutex + lockVgpuInstanceGetFBCStats sync.RWMutex + lockVgpuInstanceGetFbUsage sync.RWMutex + lockVgpuInstanceGetFrameRateLimit sync.RWMutex + lockVgpuInstanceGetGpuInstanceId sync.RWMutex + lockVgpuInstanceGetGpuPciId sync.RWMutex + lockVgpuInstanceGetLicenseInfo sync.RWMutex + lockVgpuInstanceGetLicenseStatus sync.RWMutex + lockVgpuInstanceGetMdevUUID sync.RWMutex + lockVgpuInstanceGetMetadata sync.RWMutex + lockVgpuInstanceGetRuntimeStateSize sync.RWMutex + lockVgpuInstanceGetType sync.RWMutex + lockVgpuInstanceGetUUID sync.RWMutex + lockVgpuInstanceGetVmDriverVersion sync.RWMutex + lockVgpuInstanceGetVmID sync.RWMutex + lockVgpuInstanceSetEncoderCapacity sync.RWMutex + lockVgpuTypeGetBAR1Info sync.RWMutex + lockVgpuTypeGetCapabilities sync.RWMutex + lockVgpuTypeGetClass sync.RWMutex + lockVgpuTypeGetDeviceID sync.RWMutex + lockVgpuTypeGetFrameRateLimit sync.RWMutex + lockVgpuTypeGetFramebufferSize sync.RWMutex + lockVgpuTypeGetGpuInstanceProfileId sync.RWMutex + lockVgpuTypeGetLicense sync.RWMutex + lockVgpuTypeGetMaxInstances sync.RWMutex + lockVgpuTypeGetMaxInstancesPerGpuInstance sync.RWMutex + lockVgpuTypeGetMaxInstancesPerVm sync.RWMutex + lockVgpuTypeGetName sync.RWMutex + lockVgpuTypeGetNumDisplayHeads sync.RWMutex + lockVgpuTypeGetResolution sync.RWMutex +} + +// ComputeInstanceDestroy calls ComputeInstanceDestroyFunc. +func (mock *Interface) ComputeInstanceDestroy(computeInstance nvml.ComputeInstance) nvml.Return { + if mock.ComputeInstanceDestroyFunc == nil { + panic("Interface.ComputeInstanceDestroyFunc: method is nil but Interface.ComputeInstanceDestroy was just called") + } + callInfo := struct { + ComputeInstance nvml.ComputeInstance + }{ + ComputeInstance: computeInstance, + } + mock.lockComputeInstanceDestroy.Lock() + mock.calls.ComputeInstanceDestroy = append(mock.calls.ComputeInstanceDestroy, callInfo) + mock.lockComputeInstanceDestroy.Unlock() + return mock.ComputeInstanceDestroyFunc(computeInstance) +} + +// ComputeInstanceDestroyCalls gets all the calls that were made to ComputeInstanceDestroy. +// Check the length with: +// +// len(mockedInterface.ComputeInstanceDestroyCalls()) +func (mock *Interface) ComputeInstanceDestroyCalls() []struct { + ComputeInstance nvml.ComputeInstance +} { + var calls []struct { + ComputeInstance nvml.ComputeInstance + } + mock.lockComputeInstanceDestroy.RLock() + calls = mock.calls.ComputeInstanceDestroy + mock.lockComputeInstanceDestroy.RUnlock() + return calls +} + +// ComputeInstanceGetInfo calls ComputeInstanceGetInfoFunc. +func (mock *Interface) ComputeInstanceGetInfo(computeInstance nvml.ComputeInstance) (nvml.ComputeInstanceInfo, nvml.Return) { + if mock.ComputeInstanceGetInfoFunc == nil { + panic("Interface.ComputeInstanceGetInfoFunc: method is nil but Interface.ComputeInstanceGetInfo was just called") + } + callInfo := struct { + ComputeInstance nvml.ComputeInstance + }{ + ComputeInstance: computeInstance, + } + mock.lockComputeInstanceGetInfo.Lock() + mock.calls.ComputeInstanceGetInfo = append(mock.calls.ComputeInstanceGetInfo, callInfo) + mock.lockComputeInstanceGetInfo.Unlock() + return mock.ComputeInstanceGetInfoFunc(computeInstance) +} + +// ComputeInstanceGetInfoCalls gets all the calls that were made to ComputeInstanceGetInfo. +// Check the length with: +// +// len(mockedInterface.ComputeInstanceGetInfoCalls()) +func (mock *Interface) ComputeInstanceGetInfoCalls() []struct { + ComputeInstance nvml.ComputeInstance +} { + var calls []struct { + ComputeInstance nvml.ComputeInstance + } + mock.lockComputeInstanceGetInfo.RLock() + calls = mock.calls.ComputeInstanceGetInfo + mock.lockComputeInstanceGetInfo.RUnlock() + return calls +} + +// DeviceClearAccountingPids calls DeviceClearAccountingPidsFunc. +func (mock *Interface) DeviceClearAccountingPids(device nvml.Device) nvml.Return { + if mock.DeviceClearAccountingPidsFunc == nil { + panic("Interface.DeviceClearAccountingPidsFunc: method is nil but Interface.DeviceClearAccountingPids was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceClearAccountingPids.Lock() + mock.calls.DeviceClearAccountingPids = append(mock.calls.DeviceClearAccountingPids, callInfo) + mock.lockDeviceClearAccountingPids.Unlock() + return mock.DeviceClearAccountingPidsFunc(device) +} + +// DeviceClearAccountingPidsCalls gets all the calls that were made to DeviceClearAccountingPids. +// Check the length with: +// +// len(mockedInterface.DeviceClearAccountingPidsCalls()) +func (mock *Interface) DeviceClearAccountingPidsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceClearAccountingPids.RLock() + calls = mock.calls.DeviceClearAccountingPids + mock.lockDeviceClearAccountingPids.RUnlock() + return calls +} + +// DeviceClearCpuAffinity calls DeviceClearCpuAffinityFunc. +func (mock *Interface) DeviceClearCpuAffinity(device nvml.Device) nvml.Return { + if mock.DeviceClearCpuAffinityFunc == nil { + panic("Interface.DeviceClearCpuAffinityFunc: method is nil but Interface.DeviceClearCpuAffinity was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceClearCpuAffinity.Lock() + mock.calls.DeviceClearCpuAffinity = append(mock.calls.DeviceClearCpuAffinity, callInfo) + mock.lockDeviceClearCpuAffinity.Unlock() + return mock.DeviceClearCpuAffinityFunc(device) +} + +// DeviceClearCpuAffinityCalls gets all the calls that were made to DeviceClearCpuAffinity. +// Check the length with: +// +// len(mockedInterface.DeviceClearCpuAffinityCalls()) +func (mock *Interface) DeviceClearCpuAffinityCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceClearCpuAffinity.RLock() + calls = mock.calls.DeviceClearCpuAffinity + mock.lockDeviceClearCpuAffinity.RUnlock() + return calls +} + +// DeviceClearEccErrorCounts calls DeviceClearEccErrorCountsFunc. +func (mock *Interface) DeviceClearEccErrorCounts(device nvml.Device, eccCounterType nvml.EccCounterType) nvml.Return { + if mock.DeviceClearEccErrorCountsFunc == nil { + panic("Interface.DeviceClearEccErrorCountsFunc: method is nil but Interface.DeviceClearEccErrorCounts was just called") + } + callInfo := struct { + Device nvml.Device + EccCounterType nvml.EccCounterType + }{ + Device: device, + EccCounterType: eccCounterType, + } + mock.lockDeviceClearEccErrorCounts.Lock() + mock.calls.DeviceClearEccErrorCounts = append(mock.calls.DeviceClearEccErrorCounts, callInfo) + mock.lockDeviceClearEccErrorCounts.Unlock() + return mock.DeviceClearEccErrorCountsFunc(device, eccCounterType) +} + +// DeviceClearEccErrorCountsCalls gets all the calls that were made to DeviceClearEccErrorCounts. +// Check the length with: +// +// len(mockedInterface.DeviceClearEccErrorCountsCalls()) +func (mock *Interface) DeviceClearEccErrorCountsCalls() []struct { + Device nvml.Device + EccCounterType nvml.EccCounterType +} { + var calls []struct { + Device nvml.Device + EccCounterType nvml.EccCounterType + } + mock.lockDeviceClearEccErrorCounts.RLock() + calls = mock.calls.DeviceClearEccErrorCounts + mock.lockDeviceClearEccErrorCounts.RUnlock() + return calls +} + +// DeviceClearFieldValues calls DeviceClearFieldValuesFunc. +func (mock *Interface) DeviceClearFieldValues(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return { + if mock.DeviceClearFieldValuesFunc == nil { + panic("Interface.DeviceClearFieldValuesFunc: method is nil but Interface.DeviceClearFieldValues was just called") + } + callInfo := struct { + Device nvml.Device + FieldValues []nvml.FieldValue + }{ + Device: device, + FieldValues: fieldValues, + } + mock.lockDeviceClearFieldValues.Lock() + mock.calls.DeviceClearFieldValues = append(mock.calls.DeviceClearFieldValues, callInfo) + mock.lockDeviceClearFieldValues.Unlock() + return mock.DeviceClearFieldValuesFunc(device, fieldValues) +} + +// DeviceClearFieldValuesCalls gets all the calls that were made to DeviceClearFieldValues. +// Check the length with: +// +// len(mockedInterface.DeviceClearFieldValuesCalls()) +func (mock *Interface) DeviceClearFieldValuesCalls() []struct { + Device nvml.Device + FieldValues []nvml.FieldValue +} { + var calls []struct { + Device nvml.Device + FieldValues []nvml.FieldValue + } + mock.lockDeviceClearFieldValues.RLock() + calls = mock.calls.DeviceClearFieldValues + mock.lockDeviceClearFieldValues.RUnlock() + return calls +} + +// DeviceCreateGpuInstance calls DeviceCreateGpuInstanceFunc. +func (mock *Interface) DeviceCreateGpuInstance(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { + if mock.DeviceCreateGpuInstanceFunc == nil { + panic("Interface.DeviceCreateGpuInstanceFunc: method is nil but Interface.DeviceCreateGpuInstance was just called") + } + callInfo := struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + }{ + Device: device, + GpuInstanceProfileInfo: gpuInstanceProfileInfo, + } + mock.lockDeviceCreateGpuInstance.Lock() + mock.calls.DeviceCreateGpuInstance = append(mock.calls.DeviceCreateGpuInstance, callInfo) + mock.lockDeviceCreateGpuInstance.Unlock() + return mock.DeviceCreateGpuInstanceFunc(device, gpuInstanceProfileInfo) +} + +// DeviceCreateGpuInstanceCalls gets all the calls that were made to DeviceCreateGpuInstance. +// Check the length with: +// +// len(mockedInterface.DeviceCreateGpuInstanceCalls()) +func (mock *Interface) DeviceCreateGpuInstanceCalls() []struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo +} { + var calls []struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + mock.lockDeviceCreateGpuInstance.RLock() + calls = mock.calls.DeviceCreateGpuInstance + mock.lockDeviceCreateGpuInstance.RUnlock() + return calls +} + +// DeviceCreateGpuInstanceWithPlacement calls DeviceCreateGpuInstanceWithPlacementFunc. +func (mock *Interface) DeviceCreateGpuInstanceWithPlacement(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { + if mock.DeviceCreateGpuInstanceWithPlacementFunc == nil { + panic("Interface.DeviceCreateGpuInstanceWithPlacementFunc: method is nil but Interface.DeviceCreateGpuInstanceWithPlacement was just called") + } + callInfo := struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + GpuInstancePlacement *nvml.GpuInstancePlacement + }{ + Device: device, + GpuInstanceProfileInfo: gpuInstanceProfileInfo, + GpuInstancePlacement: gpuInstancePlacement, + } + mock.lockDeviceCreateGpuInstanceWithPlacement.Lock() + mock.calls.DeviceCreateGpuInstanceWithPlacement = append(mock.calls.DeviceCreateGpuInstanceWithPlacement, callInfo) + mock.lockDeviceCreateGpuInstanceWithPlacement.Unlock() + return mock.DeviceCreateGpuInstanceWithPlacementFunc(device, gpuInstanceProfileInfo, gpuInstancePlacement) +} + +// DeviceCreateGpuInstanceWithPlacementCalls gets all the calls that were made to DeviceCreateGpuInstanceWithPlacement. +// Check the length with: +// +// len(mockedInterface.DeviceCreateGpuInstanceWithPlacementCalls()) +func (mock *Interface) DeviceCreateGpuInstanceWithPlacementCalls() []struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + GpuInstancePlacement *nvml.GpuInstancePlacement +} { + var calls []struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + GpuInstancePlacement *nvml.GpuInstancePlacement + } + mock.lockDeviceCreateGpuInstanceWithPlacement.RLock() + calls = mock.calls.DeviceCreateGpuInstanceWithPlacement + mock.lockDeviceCreateGpuInstanceWithPlacement.RUnlock() + return calls +} + +// DeviceDiscoverGpus calls DeviceDiscoverGpusFunc. +func (mock *Interface) DeviceDiscoverGpus() (nvml.PciInfo, nvml.Return) { + if mock.DeviceDiscoverGpusFunc == nil { + panic("Interface.DeviceDiscoverGpusFunc: method is nil but Interface.DeviceDiscoverGpus was just called") + } + callInfo := struct { + }{} + mock.lockDeviceDiscoverGpus.Lock() + mock.calls.DeviceDiscoverGpus = append(mock.calls.DeviceDiscoverGpus, callInfo) + mock.lockDeviceDiscoverGpus.Unlock() + return mock.DeviceDiscoverGpusFunc() +} + +// DeviceDiscoverGpusCalls gets all the calls that were made to DeviceDiscoverGpus. +// Check the length with: +// +// len(mockedInterface.DeviceDiscoverGpusCalls()) +func (mock *Interface) DeviceDiscoverGpusCalls() []struct { +} { + var calls []struct { + } + mock.lockDeviceDiscoverGpus.RLock() + calls = mock.calls.DeviceDiscoverGpus + mock.lockDeviceDiscoverGpus.RUnlock() + return calls +} + +// DeviceFreezeNvLinkUtilizationCounter calls DeviceFreezeNvLinkUtilizationCounterFunc. +func (mock *Interface) DeviceFreezeNvLinkUtilizationCounter(device nvml.Device, n1 int, n2 int, enableState nvml.EnableState) nvml.Return { + if mock.DeviceFreezeNvLinkUtilizationCounterFunc == nil { + panic("Interface.DeviceFreezeNvLinkUtilizationCounterFunc: method is nil but Interface.DeviceFreezeNvLinkUtilizationCounter was just called") + } + callInfo := struct { + Device nvml.Device + N1 int + N2 int + EnableState nvml.EnableState + }{ + Device: device, + N1: n1, + N2: n2, + EnableState: enableState, + } + mock.lockDeviceFreezeNvLinkUtilizationCounter.Lock() + mock.calls.DeviceFreezeNvLinkUtilizationCounter = append(mock.calls.DeviceFreezeNvLinkUtilizationCounter, callInfo) + mock.lockDeviceFreezeNvLinkUtilizationCounter.Unlock() + return mock.DeviceFreezeNvLinkUtilizationCounterFunc(device, n1, n2, enableState) +} + +// DeviceFreezeNvLinkUtilizationCounterCalls gets all the calls that were made to DeviceFreezeNvLinkUtilizationCounter. +// Check the length with: +// +// len(mockedInterface.DeviceFreezeNvLinkUtilizationCounterCalls()) +func (mock *Interface) DeviceFreezeNvLinkUtilizationCounterCalls() []struct { + Device nvml.Device + N1 int + N2 int + EnableState nvml.EnableState +} { + var calls []struct { + Device nvml.Device + N1 int + N2 int + EnableState nvml.EnableState + } + mock.lockDeviceFreezeNvLinkUtilizationCounter.RLock() + calls = mock.calls.DeviceFreezeNvLinkUtilizationCounter + mock.lockDeviceFreezeNvLinkUtilizationCounter.RUnlock() + return calls +} + +// DeviceGetAPIRestriction calls DeviceGetAPIRestrictionFunc. +func (mock *Interface) DeviceGetAPIRestriction(device nvml.Device, restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) { + if mock.DeviceGetAPIRestrictionFunc == nil { + panic("Interface.DeviceGetAPIRestrictionFunc: method is nil but Interface.DeviceGetAPIRestriction was just called") + } + callInfo := struct { + Device nvml.Device + RestrictedAPI nvml.RestrictedAPI + }{ + Device: device, + RestrictedAPI: restrictedAPI, + } + mock.lockDeviceGetAPIRestriction.Lock() + mock.calls.DeviceGetAPIRestriction = append(mock.calls.DeviceGetAPIRestriction, callInfo) + mock.lockDeviceGetAPIRestriction.Unlock() + return mock.DeviceGetAPIRestrictionFunc(device, restrictedAPI) +} + +// DeviceGetAPIRestrictionCalls gets all the calls that were made to DeviceGetAPIRestriction. +// Check the length with: +// +// len(mockedInterface.DeviceGetAPIRestrictionCalls()) +func (mock *Interface) DeviceGetAPIRestrictionCalls() []struct { + Device nvml.Device + RestrictedAPI nvml.RestrictedAPI +} { + var calls []struct { + Device nvml.Device + RestrictedAPI nvml.RestrictedAPI + } + mock.lockDeviceGetAPIRestriction.RLock() + calls = mock.calls.DeviceGetAPIRestriction + mock.lockDeviceGetAPIRestriction.RUnlock() + return calls +} + +// DeviceGetAccountingBufferSize calls DeviceGetAccountingBufferSizeFunc. +func (mock *Interface) DeviceGetAccountingBufferSize(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetAccountingBufferSizeFunc == nil { + panic("Interface.DeviceGetAccountingBufferSizeFunc: method is nil but Interface.DeviceGetAccountingBufferSize was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetAccountingBufferSize.Lock() + mock.calls.DeviceGetAccountingBufferSize = append(mock.calls.DeviceGetAccountingBufferSize, callInfo) + mock.lockDeviceGetAccountingBufferSize.Unlock() + return mock.DeviceGetAccountingBufferSizeFunc(device) +} + +// DeviceGetAccountingBufferSizeCalls gets all the calls that were made to DeviceGetAccountingBufferSize. +// Check the length with: +// +// len(mockedInterface.DeviceGetAccountingBufferSizeCalls()) +func (mock *Interface) DeviceGetAccountingBufferSizeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetAccountingBufferSize.RLock() + calls = mock.calls.DeviceGetAccountingBufferSize + mock.lockDeviceGetAccountingBufferSize.RUnlock() + return calls +} + +// DeviceGetAccountingMode calls DeviceGetAccountingModeFunc. +func (mock *Interface) DeviceGetAccountingMode(device nvml.Device) (nvml.EnableState, nvml.Return) { + if mock.DeviceGetAccountingModeFunc == nil { + panic("Interface.DeviceGetAccountingModeFunc: method is nil but Interface.DeviceGetAccountingMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetAccountingMode.Lock() + mock.calls.DeviceGetAccountingMode = append(mock.calls.DeviceGetAccountingMode, callInfo) + mock.lockDeviceGetAccountingMode.Unlock() + return mock.DeviceGetAccountingModeFunc(device) +} + +// DeviceGetAccountingModeCalls gets all the calls that were made to DeviceGetAccountingMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetAccountingModeCalls()) +func (mock *Interface) DeviceGetAccountingModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetAccountingMode.RLock() + calls = mock.calls.DeviceGetAccountingMode + mock.lockDeviceGetAccountingMode.RUnlock() + return calls +} + +// DeviceGetAccountingPids calls DeviceGetAccountingPidsFunc. +func (mock *Interface) DeviceGetAccountingPids(device nvml.Device) ([]int, nvml.Return) { + if mock.DeviceGetAccountingPidsFunc == nil { + panic("Interface.DeviceGetAccountingPidsFunc: method is nil but Interface.DeviceGetAccountingPids was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetAccountingPids.Lock() + mock.calls.DeviceGetAccountingPids = append(mock.calls.DeviceGetAccountingPids, callInfo) + mock.lockDeviceGetAccountingPids.Unlock() + return mock.DeviceGetAccountingPidsFunc(device) +} + +// DeviceGetAccountingPidsCalls gets all the calls that were made to DeviceGetAccountingPids. +// Check the length with: +// +// len(mockedInterface.DeviceGetAccountingPidsCalls()) +func (mock *Interface) DeviceGetAccountingPidsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetAccountingPids.RLock() + calls = mock.calls.DeviceGetAccountingPids + mock.lockDeviceGetAccountingPids.RUnlock() + return calls +} + +// DeviceGetAccountingStats calls DeviceGetAccountingStatsFunc. +func (mock *Interface) DeviceGetAccountingStats(device nvml.Device, v uint32) (nvml.AccountingStats, nvml.Return) { + if mock.DeviceGetAccountingStatsFunc == nil { + panic("Interface.DeviceGetAccountingStatsFunc: method is nil but Interface.DeviceGetAccountingStats was just called") + } + callInfo := struct { + Device nvml.Device + V uint32 + }{ + Device: device, + V: v, + } + mock.lockDeviceGetAccountingStats.Lock() + mock.calls.DeviceGetAccountingStats = append(mock.calls.DeviceGetAccountingStats, callInfo) + mock.lockDeviceGetAccountingStats.Unlock() + return mock.DeviceGetAccountingStatsFunc(device, v) +} + +// DeviceGetAccountingStatsCalls gets all the calls that were made to DeviceGetAccountingStats. +// Check the length with: +// +// len(mockedInterface.DeviceGetAccountingStatsCalls()) +func (mock *Interface) DeviceGetAccountingStatsCalls() []struct { + Device nvml.Device + V uint32 +} { + var calls []struct { + Device nvml.Device + V uint32 + } + mock.lockDeviceGetAccountingStats.RLock() + calls = mock.calls.DeviceGetAccountingStats + mock.lockDeviceGetAccountingStats.RUnlock() + return calls +} + +// DeviceGetActiveVgpus calls DeviceGetActiveVgpusFunc. +func (mock *Interface) DeviceGetActiveVgpus(device nvml.Device) ([]nvml.VgpuInstance, nvml.Return) { + if mock.DeviceGetActiveVgpusFunc == nil { + panic("Interface.DeviceGetActiveVgpusFunc: method is nil but Interface.DeviceGetActiveVgpus was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetActiveVgpus.Lock() + mock.calls.DeviceGetActiveVgpus = append(mock.calls.DeviceGetActiveVgpus, callInfo) + mock.lockDeviceGetActiveVgpus.Unlock() + return mock.DeviceGetActiveVgpusFunc(device) +} + +// DeviceGetActiveVgpusCalls gets all the calls that were made to DeviceGetActiveVgpus. +// Check the length with: +// +// len(mockedInterface.DeviceGetActiveVgpusCalls()) +func (mock *Interface) DeviceGetActiveVgpusCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetActiveVgpus.RLock() + calls = mock.calls.DeviceGetActiveVgpus + mock.lockDeviceGetActiveVgpus.RUnlock() + return calls +} + +// DeviceGetAdaptiveClockInfoStatus calls DeviceGetAdaptiveClockInfoStatusFunc. +func (mock *Interface) DeviceGetAdaptiveClockInfoStatus(device nvml.Device) (uint32, nvml.Return) { + if mock.DeviceGetAdaptiveClockInfoStatusFunc == nil { + panic("Interface.DeviceGetAdaptiveClockInfoStatusFunc: method is nil but Interface.DeviceGetAdaptiveClockInfoStatus was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetAdaptiveClockInfoStatus.Lock() + mock.calls.DeviceGetAdaptiveClockInfoStatus = append(mock.calls.DeviceGetAdaptiveClockInfoStatus, callInfo) + mock.lockDeviceGetAdaptiveClockInfoStatus.Unlock() + return mock.DeviceGetAdaptiveClockInfoStatusFunc(device) +} + +// DeviceGetAdaptiveClockInfoStatusCalls gets all the calls that were made to DeviceGetAdaptiveClockInfoStatus. +// Check the length with: +// +// len(mockedInterface.DeviceGetAdaptiveClockInfoStatusCalls()) +func (mock *Interface) DeviceGetAdaptiveClockInfoStatusCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetAdaptiveClockInfoStatus.RLock() + calls = mock.calls.DeviceGetAdaptiveClockInfoStatus + mock.lockDeviceGetAdaptiveClockInfoStatus.RUnlock() + return calls +} + +// DeviceGetAddressingMode calls DeviceGetAddressingModeFunc. +func (mock *Interface) DeviceGetAddressingMode(device nvml.Device) (nvml.DeviceAddressingMode, nvml.Return) { + if mock.DeviceGetAddressingModeFunc == nil { + panic("Interface.DeviceGetAddressingModeFunc: method is nil but Interface.DeviceGetAddressingMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetAddressingMode.Lock() + mock.calls.DeviceGetAddressingMode = append(mock.calls.DeviceGetAddressingMode, callInfo) + mock.lockDeviceGetAddressingMode.Unlock() + return mock.DeviceGetAddressingModeFunc(device) +} + +// DeviceGetAddressingModeCalls gets all the calls that were made to DeviceGetAddressingMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetAddressingModeCalls()) +func (mock *Interface) DeviceGetAddressingModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetAddressingMode.RLock() + calls = mock.calls.DeviceGetAddressingMode + mock.lockDeviceGetAddressingMode.RUnlock() + return calls +} + +// DeviceGetApplicationsClock calls DeviceGetApplicationsClockFunc. +func (mock *Interface) DeviceGetApplicationsClock(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { + if mock.DeviceGetApplicationsClockFunc == nil { + panic("Interface.DeviceGetApplicationsClockFunc: method is nil but Interface.DeviceGetApplicationsClock was just called") + } + callInfo := struct { + Device nvml.Device + ClockType nvml.ClockType + }{ + Device: device, + ClockType: clockType, + } + mock.lockDeviceGetApplicationsClock.Lock() + mock.calls.DeviceGetApplicationsClock = append(mock.calls.DeviceGetApplicationsClock, callInfo) + mock.lockDeviceGetApplicationsClock.Unlock() + return mock.DeviceGetApplicationsClockFunc(device, clockType) +} + +// DeviceGetApplicationsClockCalls gets all the calls that were made to DeviceGetApplicationsClock. +// Check the length with: +// +// len(mockedInterface.DeviceGetApplicationsClockCalls()) +func (mock *Interface) DeviceGetApplicationsClockCalls() []struct { + Device nvml.Device + ClockType nvml.ClockType +} { + var calls []struct { + Device nvml.Device + ClockType nvml.ClockType + } + mock.lockDeviceGetApplicationsClock.RLock() + calls = mock.calls.DeviceGetApplicationsClock + mock.lockDeviceGetApplicationsClock.RUnlock() + return calls +} + +// DeviceGetArchitecture calls DeviceGetArchitectureFunc. +func (mock *Interface) DeviceGetArchitecture(device nvml.Device) (nvml.DeviceArchitecture, nvml.Return) { + if mock.DeviceGetArchitectureFunc == nil { + panic("Interface.DeviceGetArchitectureFunc: method is nil but Interface.DeviceGetArchitecture was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetArchitecture.Lock() + mock.calls.DeviceGetArchitecture = append(mock.calls.DeviceGetArchitecture, callInfo) + mock.lockDeviceGetArchitecture.Unlock() + return mock.DeviceGetArchitectureFunc(device) +} + +// DeviceGetArchitectureCalls gets all the calls that were made to DeviceGetArchitecture. +// Check the length with: +// +// len(mockedInterface.DeviceGetArchitectureCalls()) +func (mock *Interface) DeviceGetArchitectureCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetArchitecture.RLock() + calls = mock.calls.DeviceGetArchitecture + mock.lockDeviceGetArchitecture.RUnlock() + return calls +} + +// DeviceGetAttributes calls DeviceGetAttributesFunc. +func (mock *Interface) DeviceGetAttributes(device nvml.Device) (nvml.DeviceAttributes, nvml.Return) { + if mock.DeviceGetAttributesFunc == nil { + panic("Interface.DeviceGetAttributesFunc: method is nil but Interface.DeviceGetAttributes was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetAttributes.Lock() + mock.calls.DeviceGetAttributes = append(mock.calls.DeviceGetAttributes, callInfo) + mock.lockDeviceGetAttributes.Unlock() + return mock.DeviceGetAttributesFunc(device) +} + +// DeviceGetAttributesCalls gets all the calls that were made to DeviceGetAttributes. +// Check the length with: +// +// len(mockedInterface.DeviceGetAttributesCalls()) +func (mock *Interface) DeviceGetAttributesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetAttributes.RLock() + calls = mock.calls.DeviceGetAttributes + mock.lockDeviceGetAttributes.RUnlock() + return calls +} + +// DeviceGetAutoBoostedClocksEnabled calls DeviceGetAutoBoostedClocksEnabledFunc. +func (mock *Interface) DeviceGetAutoBoostedClocksEnabled(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) { + if mock.DeviceGetAutoBoostedClocksEnabledFunc == nil { + panic("Interface.DeviceGetAutoBoostedClocksEnabledFunc: method is nil but Interface.DeviceGetAutoBoostedClocksEnabled was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetAutoBoostedClocksEnabled.Lock() + mock.calls.DeviceGetAutoBoostedClocksEnabled = append(mock.calls.DeviceGetAutoBoostedClocksEnabled, callInfo) + mock.lockDeviceGetAutoBoostedClocksEnabled.Unlock() + return mock.DeviceGetAutoBoostedClocksEnabledFunc(device) +} + +// DeviceGetAutoBoostedClocksEnabledCalls gets all the calls that were made to DeviceGetAutoBoostedClocksEnabled. +// Check the length with: +// +// len(mockedInterface.DeviceGetAutoBoostedClocksEnabledCalls()) +func (mock *Interface) DeviceGetAutoBoostedClocksEnabledCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetAutoBoostedClocksEnabled.RLock() + calls = mock.calls.DeviceGetAutoBoostedClocksEnabled + mock.lockDeviceGetAutoBoostedClocksEnabled.RUnlock() + return calls +} + +// DeviceGetBAR1MemoryInfo calls DeviceGetBAR1MemoryInfoFunc. +func (mock *Interface) DeviceGetBAR1MemoryInfo(device nvml.Device) (nvml.BAR1Memory, nvml.Return) { + if mock.DeviceGetBAR1MemoryInfoFunc == nil { + panic("Interface.DeviceGetBAR1MemoryInfoFunc: method is nil but Interface.DeviceGetBAR1MemoryInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetBAR1MemoryInfo.Lock() + mock.calls.DeviceGetBAR1MemoryInfo = append(mock.calls.DeviceGetBAR1MemoryInfo, callInfo) + mock.lockDeviceGetBAR1MemoryInfo.Unlock() + return mock.DeviceGetBAR1MemoryInfoFunc(device) +} + +// DeviceGetBAR1MemoryInfoCalls gets all the calls that were made to DeviceGetBAR1MemoryInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetBAR1MemoryInfoCalls()) +func (mock *Interface) DeviceGetBAR1MemoryInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetBAR1MemoryInfo.RLock() + calls = mock.calls.DeviceGetBAR1MemoryInfo + mock.lockDeviceGetBAR1MemoryInfo.RUnlock() + return calls +} + +// DeviceGetBoardId calls DeviceGetBoardIdFunc. +func (mock *Interface) DeviceGetBoardId(device nvml.Device) (uint32, nvml.Return) { + if mock.DeviceGetBoardIdFunc == nil { + panic("Interface.DeviceGetBoardIdFunc: method is nil but Interface.DeviceGetBoardId was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetBoardId.Lock() + mock.calls.DeviceGetBoardId = append(mock.calls.DeviceGetBoardId, callInfo) + mock.lockDeviceGetBoardId.Unlock() + return mock.DeviceGetBoardIdFunc(device) +} + +// DeviceGetBoardIdCalls gets all the calls that were made to DeviceGetBoardId. +// Check the length with: +// +// len(mockedInterface.DeviceGetBoardIdCalls()) +func (mock *Interface) DeviceGetBoardIdCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetBoardId.RLock() + calls = mock.calls.DeviceGetBoardId + mock.lockDeviceGetBoardId.RUnlock() + return calls +} + +// DeviceGetBoardPartNumber calls DeviceGetBoardPartNumberFunc. +func (mock *Interface) DeviceGetBoardPartNumber(device nvml.Device) (string, nvml.Return) { + if mock.DeviceGetBoardPartNumberFunc == nil { + panic("Interface.DeviceGetBoardPartNumberFunc: method is nil but Interface.DeviceGetBoardPartNumber was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetBoardPartNumber.Lock() + mock.calls.DeviceGetBoardPartNumber = append(mock.calls.DeviceGetBoardPartNumber, callInfo) + mock.lockDeviceGetBoardPartNumber.Unlock() + return mock.DeviceGetBoardPartNumberFunc(device) +} + +// DeviceGetBoardPartNumberCalls gets all the calls that were made to DeviceGetBoardPartNumber. +// Check the length with: +// +// len(mockedInterface.DeviceGetBoardPartNumberCalls()) +func (mock *Interface) DeviceGetBoardPartNumberCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetBoardPartNumber.RLock() + calls = mock.calls.DeviceGetBoardPartNumber + mock.lockDeviceGetBoardPartNumber.RUnlock() + return calls +} + +// DeviceGetBrand calls DeviceGetBrandFunc. +func (mock *Interface) DeviceGetBrand(device nvml.Device) (nvml.BrandType, nvml.Return) { + if mock.DeviceGetBrandFunc == nil { + panic("Interface.DeviceGetBrandFunc: method is nil but Interface.DeviceGetBrand was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetBrand.Lock() + mock.calls.DeviceGetBrand = append(mock.calls.DeviceGetBrand, callInfo) + mock.lockDeviceGetBrand.Unlock() + return mock.DeviceGetBrandFunc(device) +} + +// DeviceGetBrandCalls gets all the calls that were made to DeviceGetBrand. +// Check the length with: +// +// len(mockedInterface.DeviceGetBrandCalls()) +func (mock *Interface) DeviceGetBrandCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetBrand.RLock() + calls = mock.calls.DeviceGetBrand + mock.lockDeviceGetBrand.RUnlock() + return calls +} + +// DeviceGetBridgeChipInfo calls DeviceGetBridgeChipInfoFunc. +func (mock *Interface) DeviceGetBridgeChipInfo(device nvml.Device) (nvml.BridgeChipHierarchy, nvml.Return) { + if mock.DeviceGetBridgeChipInfoFunc == nil { + panic("Interface.DeviceGetBridgeChipInfoFunc: method is nil but Interface.DeviceGetBridgeChipInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetBridgeChipInfo.Lock() + mock.calls.DeviceGetBridgeChipInfo = append(mock.calls.DeviceGetBridgeChipInfo, callInfo) + mock.lockDeviceGetBridgeChipInfo.Unlock() + return mock.DeviceGetBridgeChipInfoFunc(device) +} + +// DeviceGetBridgeChipInfoCalls gets all the calls that were made to DeviceGetBridgeChipInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetBridgeChipInfoCalls()) +func (mock *Interface) DeviceGetBridgeChipInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetBridgeChipInfo.RLock() + calls = mock.calls.DeviceGetBridgeChipInfo + mock.lockDeviceGetBridgeChipInfo.RUnlock() + return calls +} + +// DeviceGetBusType calls DeviceGetBusTypeFunc. +func (mock *Interface) DeviceGetBusType(device nvml.Device) (nvml.BusType, nvml.Return) { + if mock.DeviceGetBusTypeFunc == nil { + panic("Interface.DeviceGetBusTypeFunc: method is nil but Interface.DeviceGetBusType was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetBusType.Lock() + mock.calls.DeviceGetBusType = append(mock.calls.DeviceGetBusType, callInfo) + mock.lockDeviceGetBusType.Unlock() + return mock.DeviceGetBusTypeFunc(device) +} + +// DeviceGetBusTypeCalls gets all the calls that were made to DeviceGetBusType. +// Check the length with: +// +// len(mockedInterface.DeviceGetBusTypeCalls()) +func (mock *Interface) DeviceGetBusTypeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetBusType.RLock() + calls = mock.calls.DeviceGetBusType + mock.lockDeviceGetBusType.RUnlock() + return calls +} + +// DeviceGetC2cModeInfoV calls DeviceGetC2cModeInfoVFunc. +func (mock *Interface) DeviceGetC2cModeInfoV(device nvml.Device) nvml.C2cModeInfoHandler { + if mock.DeviceGetC2cModeInfoVFunc == nil { + panic("Interface.DeviceGetC2cModeInfoVFunc: method is nil but Interface.DeviceGetC2cModeInfoV was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetC2cModeInfoV.Lock() + mock.calls.DeviceGetC2cModeInfoV = append(mock.calls.DeviceGetC2cModeInfoV, callInfo) + mock.lockDeviceGetC2cModeInfoV.Unlock() + return mock.DeviceGetC2cModeInfoVFunc(device) +} + +// DeviceGetC2cModeInfoVCalls gets all the calls that were made to DeviceGetC2cModeInfoV. +// Check the length with: +// +// len(mockedInterface.DeviceGetC2cModeInfoVCalls()) +func (mock *Interface) DeviceGetC2cModeInfoVCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetC2cModeInfoV.RLock() + calls = mock.calls.DeviceGetC2cModeInfoV + mock.lockDeviceGetC2cModeInfoV.RUnlock() + return calls +} + +// DeviceGetCapabilities calls DeviceGetCapabilitiesFunc. +func (mock *Interface) DeviceGetCapabilities(device nvml.Device) (nvml.DeviceCapabilities, nvml.Return) { + if mock.DeviceGetCapabilitiesFunc == nil { + panic("Interface.DeviceGetCapabilitiesFunc: method is nil but Interface.DeviceGetCapabilities was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetCapabilities.Lock() + mock.calls.DeviceGetCapabilities = append(mock.calls.DeviceGetCapabilities, callInfo) + mock.lockDeviceGetCapabilities.Unlock() + return mock.DeviceGetCapabilitiesFunc(device) +} + +// DeviceGetCapabilitiesCalls gets all the calls that were made to DeviceGetCapabilities. +// Check the length with: +// +// len(mockedInterface.DeviceGetCapabilitiesCalls()) +func (mock *Interface) DeviceGetCapabilitiesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetCapabilities.RLock() + calls = mock.calls.DeviceGetCapabilities + mock.lockDeviceGetCapabilities.RUnlock() + return calls +} + +// DeviceGetClkMonStatus calls DeviceGetClkMonStatusFunc. +func (mock *Interface) DeviceGetClkMonStatus(device nvml.Device) (nvml.ClkMonStatus, nvml.Return) { + if mock.DeviceGetClkMonStatusFunc == nil { + panic("Interface.DeviceGetClkMonStatusFunc: method is nil but Interface.DeviceGetClkMonStatus was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetClkMonStatus.Lock() + mock.calls.DeviceGetClkMonStatus = append(mock.calls.DeviceGetClkMonStatus, callInfo) + mock.lockDeviceGetClkMonStatus.Unlock() + return mock.DeviceGetClkMonStatusFunc(device) +} + +// DeviceGetClkMonStatusCalls gets all the calls that were made to DeviceGetClkMonStatus. +// Check the length with: +// +// len(mockedInterface.DeviceGetClkMonStatusCalls()) +func (mock *Interface) DeviceGetClkMonStatusCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetClkMonStatus.RLock() + calls = mock.calls.DeviceGetClkMonStatus + mock.lockDeviceGetClkMonStatus.RUnlock() + return calls +} + +// DeviceGetClock calls DeviceGetClockFunc. +func (mock *Interface) DeviceGetClock(device nvml.Device, clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) { + if mock.DeviceGetClockFunc == nil { + panic("Interface.DeviceGetClockFunc: method is nil but Interface.DeviceGetClock was just called") + } + callInfo := struct { + Device nvml.Device + ClockType nvml.ClockType + ClockId nvml.ClockId + }{ + Device: device, + ClockType: clockType, + ClockId: clockId, + } + mock.lockDeviceGetClock.Lock() + mock.calls.DeviceGetClock = append(mock.calls.DeviceGetClock, callInfo) + mock.lockDeviceGetClock.Unlock() + return mock.DeviceGetClockFunc(device, clockType, clockId) +} + +// DeviceGetClockCalls gets all the calls that were made to DeviceGetClock. +// Check the length with: +// +// len(mockedInterface.DeviceGetClockCalls()) +func (mock *Interface) DeviceGetClockCalls() []struct { + Device nvml.Device + ClockType nvml.ClockType + ClockId nvml.ClockId +} { + var calls []struct { + Device nvml.Device + ClockType nvml.ClockType + ClockId nvml.ClockId + } + mock.lockDeviceGetClock.RLock() + calls = mock.calls.DeviceGetClock + mock.lockDeviceGetClock.RUnlock() + return calls +} + +// DeviceGetClockInfo calls DeviceGetClockInfoFunc. +func (mock *Interface) DeviceGetClockInfo(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { + if mock.DeviceGetClockInfoFunc == nil { + panic("Interface.DeviceGetClockInfoFunc: method is nil but Interface.DeviceGetClockInfo was just called") + } + callInfo := struct { + Device nvml.Device + ClockType nvml.ClockType + }{ + Device: device, + ClockType: clockType, + } + mock.lockDeviceGetClockInfo.Lock() + mock.calls.DeviceGetClockInfo = append(mock.calls.DeviceGetClockInfo, callInfo) + mock.lockDeviceGetClockInfo.Unlock() + return mock.DeviceGetClockInfoFunc(device, clockType) +} + +// DeviceGetClockInfoCalls gets all the calls that were made to DeviceGetClockInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetClockInfoCalls()) +func (mock *Interface) DeviceGetClockInfoCalls() []struct { + Device nvml.Device + ClockType nvml.ClockType +} { + var calls []struct { + Device nvml.Device + ClockType nvml.ClockType + } + mock.lockDeviceGetClockInfo.RLock() + calls = mock.calls.DeviceGetClockInfo + mock.lockDeviceGetClockInfo.RUnlock() + return calls +} + +// DeviceGetClockOffsets calls DeviceGetClockOffsetsFunc. +func (mock *Interface) DeviceGetClockOffsets(device nvml.Device) (nvml.ClockOffset, nvml.Return) { + if mock.DeviceGetClockOffsetsFunc == nil { + panic("Interface.DeviceGetClockOffsetsFunc: method is nil but Interface.DeviceGetClockOffsets was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetClockOffsets.Lock() + mock.calls.DeviceGetClockOffsets = append(mock.calls.DeviceGetClockOffsets, callInfo) + mock.lockDeviceGetClockOffsets.Unlock() + return mock.DeviceGetClockOffsetsFunc(device) +} + +// DeviceGetClockOffsetsCalls gets all the calls that were made to DeviceGetClockOffsets. +// Check the length with: +// +// len(mockedInterface.DeviceGetClockOffsetsCalls()) +func (mock *Interface) DeviceGetClockOffsetsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetClockOffsets.RLock() + calls = mock.calls.DeviceGetClockOffsets + mock.lockDeviceGetClockOffsets.RUnlock() + return calls +} + +// DeviceGetComputeInstanceId calls DeviceGetComputeInstanceIdFunc. +func (mock *Interface) DeviceGetComputeInstanceId(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetComputeInstanceIdFunc == nil { + panic("Interface.DeviceGetComputeInstanceIdFunc: method is nil but Interface.DeviceGetComputeInstanceId was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetComputeInstanceId.Lock() + mock.calls.DeviceGetComputeInstanceId = append(mock.calls.DeviceGetComputeInstanceId, callInfo) + mock.lockDeviceGetComputeInstanceId.Unlock() + return mock.DeviceGetComputeInstanceIdFunc(device) +} + +// DeviceGetComputeInstanceIdCalls gets all the calls that were made to DeviceGetComputeInstanceId. +// Check the length with: +// +// len(mockedInterface.DeviceGetComputeInstanceIdCalls()) +func (mock *Interface) DeviceGetComputeInstanceIdCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetComputeInstanceId.RLock() + calls = mock.calls.DeviceGetComputeInstanceId + mock.lockDeviceGetComputeInstanceId.RUnlock() + return calls +} + +// DeviceGetComputeMode calls DeviceGetComputeModeFunc. +func (mock *Interface) DeviceGetComputeMode(device nvml.Device) (nvml.ComputeMode, nvml.Return) { + if mock.DeviceGetComputeModeFunc == nil { + panic("Interface.DeviceGetComputeModeFunc: method is nil but Interface.DeviceGetComputeMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetComputeMode.Lock() + mock.calls.DeviceGetComputeMode = append(mock.calls.DeviceGetComputeMode, callInfo) + mock.lockDeviceGetComputeMode.Unlock() + return mock.DeviceGetComputeModeFunc(device) +} + +// DeviceGetComputeModeCalls gets all the calls that were made to DeviceGetComputeMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetComputeModeCalls()) +func (mock *Interface) DeviceGetComputeModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetComputeMode.RLock() + calls = mock.calls.DeviceGetComputeMode + mock.lockDeviceGetComputeMode.RUnlock() + return calls +} + +// DeviceGetComputeRunningProcesses calls DeviceGetComputeRunningProcessesFunc. +func (mock *Interface) DeviceGetComputeRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { + if mock.DeviceGetComputeRunningProcessesFunc == nil { + panic("Interface.DeviceGetComputeRunningProcessesFunc: method is nil but Interface.DeviceGetComputeRunningProcesses was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetComputeRunningProcesses.Lock() + mock.calls.DeviceGetComputeRunningProcesses = append(mock.calls.DeviceGetComputeRunningProcesses, callInfo) + mock.lockDeviceGetComputeRunningProcesses.Unlock() + return mock.DeviceGetComputeRunningProcessesFunc(device) +} + +// DeviceGetComputeRunningProcessesCalls gets all the calls that were made to DeviceGetComputeRunningProcesses. +// Check the length with: +// +// len(mockedInterface.DeviceGetComputeRunningProcessesCalls()) +func (mock *Interface) DeviceGetComputeRunningProcessesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetComputeRunningProcesses.RLock() + calls = mock.calls.DeviceGetComputeRunningProcesses + mock.lockDeviceGetComputeRunningProcesses.RUnlock() + return calls +} + +// DeviceGetConfComputeGpuAttestationReport calls DeviceGetConfComputeGpuAttestationReportFunc. +func (mock *Interface) DeviceGetConfComputeGpuAttestationReport(device nvml.Device, confComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport) nvml.Return { + if mock.DeviceGetConfComputeGpuAttestationReportFunc == nil { + panic("Interface.DeviceGetConfComputeGpuAttestationReportFunc: method is nil but Interface.DeviceGetConfComputeGpuAttestationReport was just called") + } + callInfo := struct { + Device nvml.Device + ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport + }{ + Device: device, + ConfComputeGpuAttestationReport: confComputeGpuAttestationReport, + } + mock.lockDeviceGetConfComputeGpuAttestationReport.Lock() + mock.calls.DeviceGetConfComputeGpuAttestationReport = append(mock.calls.DeviceGetConfComputeGpuAttestationReport, callInfo) + mock.lockDeviceGetConfComputeGpuAttestationReport.Unlock() + return mock.DeviceGetConfComputeGpuAttestationReportFunc(device, confComputeGpuAttestationReport) +} + +// DeviceGetConfComputeGpuAttestationReportCalls gets all the calls that were made to DeviceGetConfComputeGpuAttestationReport. +// Check the length with: +// +// len(mockedInterface.DeviceGetConfComputeGpuAttestationReportCalls()) +func (mock *Interface) DeviceGetConfComputeGpuAttestationReportCalls() []struct { + Device nvml.Device + ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport +} { + var calls []struct { + Device nvml.Device + ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport + } + mock.lockDeviceGetConfComputeGpuAttestationReport.RLock() + calls = mock.calls.DeviceGetConfComputeGpuAttestationReport + mock.lockDeviceGetConfComputeGpuAttestationReport.RUnlock() + return calls +} + +// DeviceGetConfComputeGpuCertificate calls DeviceGetConfComputeGpuCertificateFunc. +func (mock *Interface) DeviceGetConfComputeGpuCertificate(device nvml.Device) (nvml.ConfComputeGpuCertificate, nvml.Return) { + if mock.DeviceGetConfComputeGpuCertificateFunc == nil { + panic("Interface.DeviceGetConfComputeGpuCertificateFunc: method is nil but Interface.DeviceGetConfComputeGpuCertificate was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetConfComputeGpuCertificate.Lock() + mock.calls.DeviceGetConfComputeGpuCertificate = append(mock.calls.DeviceGetConfComputeGpuCertificate, callInfo) + mock.lockDeviceGetConfComputeGpuCertificate.Unlock() + return mock.DeviceGetConfComputeGpuCertificateFunc(device) +} + +// DeviceGetConfComputeGpuCertificateCalls gets all the calls that were made to DeviceGetConfComputeGpuCertificate. +// Check the length with: +// +// len(mockedInterface.DeviceGetConfComputeGpuCertificateCalls()) +func (mock *Interface) DeviceGetConfComputeGpuCertificateCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetConfComputeGpuCertificate.RLock() + calls = mock.calls.DeviceGetConfComputeGpuCertificate + mock.lockDeviceGetConfComputeGpuCertificate.RUnlock() + return calls +} + +// DeviceGetConfComputeMemSizeInfo calls DeviceGetConfComputeMemSizeInfoFunc. +func (mock *Interface) DeviceGetConfComputeMemSizeInfo(device nvml.Device) (nvml.ConfComputeMemSizeInfo, nvml.Return) { + if mock.DeviceGetConfComputeMemSizeInfoFunc == nil { + panic("Interface.DeviceGetConfComputeMemSizeInfoFunc: method is nil but Interface.DeviceGetConfComputeMemSizeInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetConfComputeMemSizeInfo.Lock() + mock.calls.DeviceGetConfComputeMemSizeInfo = append(mock.calls.DeviceGetConfComputeMemSizeInfo, callInfo) + mock.lockDeviceGetConfComputeMemSizeInfo.Unlock() + return mock.DeviceGetConfComputeMemSizeInfoFunc(device) +} + +// DeviceGetConfComputeMemSizeInfoCalls gets all the calls that were made to DeviceGetConfComputeMemSizeInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetConfComputeMemSizeInfoCalls()) +func (mock *Interface) DeviceGetConfComputeMemSizeInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetConfComputeMemSizeInfo.RLock() + calls = mock.calls.DeviceGetConfComputeMemSizeInfo + mock.lockDeviceGetConfComputeMemSizeInfo.RUnlock() + return calls +} + +// DeviceGetConfComputeProtectedMemoryUsage calls DeviceGetConfComputeProtectedMemoryUsageFunc. +func (mock *Interface) DeviceGetConfComputeProtectedMemoryUsage(device nvml.Device) (nvml.Memory, nvml.Return) { + if mock.DeviceGetConfComputeProtectedMemoryUsageFunc == nil { + panic("Interface.DeviceGetConfComputeProtectedMemoryUsageFunc: method is nil but Interface.DeviceGetConfComputeProtectedMemoryUsage was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetConfComputeProtectedMemoryUsage.Lock() + mock.calls.DeviceGetConfComputeProtectedMemoryUsage = append(mock.calls.DeviceGetConfComputeProtectedMemoryUsage, callInfo) + mock.lockDeviceGetConfComputeProtectedMemoryUsage.Unlock() + return mock.DeviceGetConfComputeProtectedMemoryUsageFunc(device) +} + +// DeviceGetConfComputeProtectedMemoryUsageCalls gets all the calls that were made to DeviceGetConfComputeProtectedMemoryUsage. +// Check the length with: +// +// len(mockedInterface.DeviceGetConfComputeProtectedMemoryUsageCalls()) +func (mock *Interface) DeviceGetConfComputeProtectedMemoryUsageCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetConfComputeProtectedMemoryUsage.RLock() + calls = mock.calls.DeviceGetConfComputeProtectedMemoryUsage + mock.lockDeviceGetConfComputeProtectedMemoryUsage.RUnlock() + return calls +} + +// DeviceGetCoolerInfo calls DeviceGetCoolerInfoFunc. +func (mock *Interface) DeviceGetCoolerInfo(device nvml.Device) (nvml.CoolerInfo, nvml.Return) { + if mock.DeviceGetCoolerInfoFunc == nil { + panic("Interface.DeviceGetCoolerInfoFunc: method is nil but Interface.DeviceGetCoolerInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetCoolerInfo.Lock() + mock.calls.DeviceGetCoolerInfo = append(mock.calls.DeviceGetCoolerInfo, callInfo) + mock.lockDeviceGetCoolerInfo.Unlock() + return mock.DeviceGetCoolerInfoFunc(device) +} + +// DeviceGetCoolerInfoCalls gets all the calls that were made to DeviceGetCoolerInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetCoolerInfoCalls()) +func (mock *Interface) DeviceGetCoolerInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetCoolerInfo.RLock() + calls = mock.calls.DeviceGetCoolerInfo + mock.lockDeviceGetCoolerInfo.RUnlock() + return calls +} + +// DeviceGetCount calls DeviceGetCountFunc. +func (mock *Interface) DeviceGetCount() (int, nvml.Return) { + if mock.DeviceGetCountFunc == nil { + panic("Interface.DeviceGetCountFunc: method is nil but Interface.DeviceGetCount was just called") + } + callInfo := struct { + }{} + mock.lockDeviceGetCount.Lock() + mock.calls.DeviceGetCount = append(mock.calls.DeviceGetCount, callInfo) + mock.lockDeviceGetCount.Unlock() + return mock.DeviceGetCountFunc() +} + +// DeviceGetCountCalls gets all the calls that were made to DeviceGetCount. +// Check the length with: +// +// len(mockedInterface.DeviceGetCountCalls()) +func (mock *Interface) DeviceGetCountCalls() []struct { +} { + var calls []struct { + } + mock.lockDeviceGetCount.RLock() + calls = mock.calls.DeviceGetCount + mock.lockDeviceGetCount.RUnlock() + return calls +} + +// DeviceGetCpuAffinity calls DeviceGetCpuAffinityFunc. +func (mock *Interface) DeviceGetCpuAffinity(device nvml.Device, n int) ([]uint, nvml.Return) { + if mock.DeviceGetCpuAffinityFunc == nil { + panic("Interface.DeviceGetCpuAffinityFunc: method is nil but Interface.DeviceGetCpuAffinity was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetCpuAffinity.Lock() + mock.calls.DeviceGetCpuAffinity = append(mock.calls.DeviceGetCpuAffinity, callInfo) + mock.lockDeviceGetCpuAffinity.Unlock() + return mock.DeviceGetCpuAffinityFunc(device, n) +} + +// DeviceGetCpuAffinityCalls gets all the calls that were made to DeviceGetCpuAffinity. +// Check the length with: +// +// len(mockedInterface.DeviceGetCpuAffinityCalls()) +func (mock *Interface) DeviceGetCpuAffinityCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetCpuAffinity.RLock() + calls = mock.calls.DeviceGetCpuAffinity + mock.lockDeviceGetCpuAffinity.RUnlock() + return calls +} + +// DeviceGetCpuAffinityWithinScope calls DeviceGetCpuAffinityWithinScopeFunc. +func (mock *Interface) DeviceGetCpuAffinityWithinScope(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { + if mock.DeviceGetCpuAffinityWithinScopeFunc == nil { + panic("Interface.DeviceGetCpuAffinityWithinScopeFunc: method is nil but Interface.DeviceGetCpuAffinityWithinScope was just called") + } + callInfo := struct { + Device nvml.Device + N int + AffinityScope nvml.AffinityScope + }{ + Device: device, + N: n, + AffinityScope: affinityScope, + } + mock.lockDeviceGetCpuAffinityWithinScope.Lock() + mock.calls.DeviceGetCpuAffinityWithinScope = append(mock.calls.DeviceGetCpuAffinityWithinScope, callInfo) + mock.lockDeviceGetCpuAffinityWithinScope.Unlock() + return mock.DeviceGetCpuAffinityWithinScopeFunc(device, n, affinityScope) +} + +// DeviceGetCpuAffinityWithinScopeCalls gets all the calls that were made to DeviceGetCpuAffinityWithinScope. +// Check the length with: +// +// len(mockedInterface.DeviceGetCpuAffinityWithinScopeCalls()) +func (mock *Interface) DeviceGetCpuAffinityWithinScopeCalls() []struct { + Device nvml.Device + N int + AffinityScope nvml.AffinityScope +} { + var calls []struct { + Device nvml.Device + N int + AffinityScope nvml.AffinityScope + } + mock.lockDeviceGetCpuAffinityWithinScope.RLock() + calls = mock.calls.DeviceGetCpuAffinityWithinScope + mock.lockDeviceGetCpuAffinityWithinScope.RUnlock() + return calls +} + +// DeviceGetCreatableVgpus calls DeviceGetCreatableVgpusFunc. +func (mock *Interface) DeviceGetCreatableVgpus(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) { + if mock.DeviceGetCreatableVgpusFunc == nil { + panic("Interface.DeviceGetCreatableVgpusFunc: method is nil but Interface.DeviceGetCreatableVgpus was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetCreatableVgpus.Lock() + mock.calls.DeviceGetCreatableVgpus = append(mock.calls.DeviceGetCreatableVgpus, callInfo) + mock.lockDeviceGetCreatableVgpus.Unlock() + return mock.DeviceGetCreatableVgpusFunc(device) +} + +// DeviceGetCreatableVgpusCalls gets all the calls that were made to DeviceGetCreatableVgpus. +// Check the length with: +// +// len(mockedInterface.DeviceGetCreatableVgpusCalls()) +func (mock *Interface) DeviceGetCreatableVgpusCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetCreatableVgpus.RLock() + calls = mock.calls.DeviceGetCreatableVgpus + mock.lockDeviceGetCreatableVgpus.RUnlock() + return calls +} + +// DeviceGetCudaComputeCapability calls DeviceGetCudaComputeCapabilityFunc. +func (mock *Interface) DeviceGetCudaComputeCapability(device nvml.Device) (int, int, nvml.Return) { + if mock.DeviceGetCudaComputeCapabilityFunc == nil { + panic("Interface.DeviceGetCudaComputeCapabilityFunc: method is nil but Interface.DeviceGetCudaComputeCapability was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetCudaComputeCapability.Lock() + mock.calls.DeviceGetCudaComputeCapability = append(mock.calls.DeviceGetCudaComputeCapability, callInfo) + mock.lockDeviceGetCudaComputeCapability.Unlock() + return mock.DeviceGetCudaComputeCapabilityFunc(device) +} + +// DeviceGetCudaComputeCapabilityCalls gets all the calls that were made to DeviceGetCudaComputeCapability. +// Check the length with: +// +// len(mockedInterface.DeviceGetCudaComputeCapabilityCalls()) +func (mock *Interface) DeviceGetCudaComputeCapabilityCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetCudaComputeCapability.RLock() + calls = mock.calls.DeviceGetCudaComputeCapability + mock.lockDeviceGetCudaComputeCapability.RUnlock() + return calls +} + +// DeviceGetCurrPcieLinkGeneration calls DeviceGetCurrPcieLinkGenerationFunc. +func (mock *Interface) DeviceGetCurrPcieLinkGeneration(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetCurrPcieLinkGenerationFunc == nil { + panic("Interface.DeviceGetCurrPcieLinkGenerationFunc: method is nil but Interface.DeviceGetCurrPcieLinkGeneration was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetCurrPcieLinkGeneration.Lock() + mock.calls.DeviceGetCurrPcieLinkGeneration = append(mock.calls.DeviceGetCurrPcieLinkGeneration, callInfo) + mock.lockDeviceGetCurrPcieLinkGeneration.Unlock() + return mock.DeviceGetCurrPcieLinkGenerationFunc(device) +} + +// DeviceGetCurrPcieLinkGenerationCalls gets all the calls that were made to DeviceGetCurrPcieLinkGeneration. +// Check the length with: +// +// len(mockedInterface.DeviceGetCurrPcieLinkGenerationCalls()) +func (mock *Interface) DeviceGetCurrPcieLinkGenerationCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetCurrPcieLinkGeneration.RLock() + calls = mock.calls.DeviceGetCurrPcieLinkGeneration + mock.lockDeviceGetCurrPcieLinkGeneration.RUnlock() + return calls +} + +// DeviceGetCurrPcieLinkWidth calls DeviceGetCurrPcieLinkWidthFunc. +func (mock *Interface) DeviceGetCurrPcieLinkWidth(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetCurrPcieLinkWidthFunc == nil { + panic("Interface.DeviceGetCurrPcieLinkWidthFunc: method is nil but Interface.DeviceGetCurrPcieLinkWidth was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetCurrPcieLinkWidth.Lock() + mock.calls.DeviceGetCurrPcieLinkWidth = append(mock.calls.DeviceGetCurrPcieLinkWidth, callInfo) + mock.lockDeviceGetCurrPcieLinkWidth.Unlock() + return mock.DeviceGetCurrPcieLinkWidthFunc(device) +} + +// DeviceGetCurrPcieLinkWidthCalls gets all the calls that were made to DeviceGetCurrPcieLinkWidth. +// Check the length with: +// +// len(mockedInterface.DeviceGetCurrPcieLinkWidthCalls()) +func (mock *Interface) DeviceGetCurrPcieLinkWidthCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetCurrPcieLinkWidth.RLock() + calls = mock.calls.DeviceGetCurrPcieLinkWidth + mock.lockDeviceGetCurrPcieLinkWidth.RUnlock() + return calls +} + +// DeviceGetCurrentClockFreqs calls DeviceGetCurrentClockFreqsFunc. +func (mock *Interface) DeviceGetCurrentClockFreqs(device nvml.Device) (nvml.DeviceCurrentClockFreqs, nvml.Return) { + if mock.DeviceGetCurrentClockFreqsFunc == nil { + panic("Interface.DeviceGetCurrentClockFreqsFunc: method is nil but Interface.DeviceGetCurrentClockFreqs was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetCurrentClockFreqs.Lock() + mock.calls.DeviceGetCurrentClockFreqs = append(mock.calls.DeviceGetCurrentClockFreqs, callInfo) + mock.lockDeviceGetCurrentClockFreqs.Unlock() + return mock.DeviceGetCurrentClockFreqsFunc(device) +} + +// DeviceGetCurrentClockFreqsCalls gets all the calls that were made to DeviceGetCurrentClockFreqs. +// Check the length with: +// +// len(mockedInterface.DeviceGetCurrentClockFreqsCalls()) +func (mock *Interface) DeviceGetCurrentClockFreqsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetCurrentClockFreqs.RLock() + calls = mock.calls.DeviceGetCurrentClockFreqs + mock.lockDeviceGetCurrentClockFreqs.RUnlock() + return calls +} + +// DeviceGetCurrentClocksEventReasons calls DeviceGetCurrentClocksEventReasonsFunc. +func (mock *Interface) DeviceGetCurrentClocksEventReasons(device nvml.Device) (uint64, nvml.Return) { + if mock.DeviceGetCurrentClocksEventReasonsFunc == nil { + panic("Interface.DeviceGetCurrentClocksEventReasonsFunc: method is nil but Interface.DeviceGetCurrentClocksEventReasons was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetCurrentClocksEventReasons.Lock() + mock.calls.DeviceGetCurrentClocksEventReasons = append(mock.calls.DeviceGetCurrentClocksEventReasons, callInfo) + mock.lockDeviceGetCurrentClocksEventReasons.Unlock() + return mock.DeviceGetCurrentClocksEventReasonsFunc(device) +} + +// DeviceGetCurrentClocksEventReasonsCalls gets all the calls that were made to DeviceGetCurrentClocksEventReasons. +// Check the length with: +// +// len(mockedInterface.DeviceGetCurrentClocksEventReasonsCalls()) +func (mock *Interface) DeviceGetCurrentClocksEventReasonsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetCurrentClocksEventReasons.RLock() + calls = mock.calls.DeviceGetCurrentClocksEventReasons + mock.lockDeviceGetCurrentClocksEventReasons.RUnlock() + return calls +} + +// DeviceGetCurrentClocksThrottleReasons calls DeviceGetCurrentClocksThrottleReasonsFunc. +func (mock *Interface) DeviceGetCurrentClocksThrottleReasons(device nvml.Device) (uint64, nvml.Return) { + if mock.DeviceGetCurrentClocksThrottleReasonsFunc == nil { + panic("Interface.DeviceGetCurrentClocksThrottleReasonsFunc: method is nil but Interface.DeviceGetCurrentClocksThrottleReasons was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetCurrentClocksThrottleReasons.Lock() + mock.calls.DeviceGetCurrentClocksThrottleReasons = append(mock.calls.DeviceGetCurrentClocksThrottleReasons, callInfo) + mock.lockDeviceGetCurrentClocksThrottleReasons.Unlock() + return mock.DeviceGetCurrentClocksThrottleReasonsFunc(device) +} + +// DeviceGetCurrentClocksThrottleReasonsCalls gets all the calls that were made to DeviceGetCurrentClocksThrottleReasons. +// Check the length with: +// +// len(mockedInterface.DeviceGetCurrentClocksThrottleReasonsCalls()) +func (mock *Interface) DeviceGetCurrentClocksThrottleReasonsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetCurrentClocksThrottleReasons.RLock() + calls = mock.calls.DeviceGetCurrentClocksThrottleReasons + mock.lockDeviceGetCurrentClocksThrottleReasons.RUnlock() + return calls +} + +// DeviceGetDecoderUtilization calls DeviceGetDecoderUtilizationFunc. +func (mock *Interface) DeviceGetDecoderUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { + if mock.DeviceGetDecoderUtilizationFunc == nil { + panic("Interface.DeviceGetDecoderUtilizationFunc: method is nil but Interface.DeviceGetDecoderUtilization was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetDecoderUtilization.Lock() + mock.calls.DeviceGetDecoderUtilization = append(mock.calls.DeviceGetDecoderUtilization, callInfo) + mock.lockDeviceGetDecoderUtilization.Unlock() + return mock.DeviceGetDecoderUtilizationFunc(device) +} + +// DeviceGetDecoderUtilizationCalls gets all the calls that were made to DeviceGetDecoderUtilization. +// Check the length with: +// +// len(mockedInterface.DeviceGetDecoderUtilizationCalls()) +func (mock *Interface) DeviceGetDecoderUtilizationCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetDecoderUtilization.RLock() + calls = mock.calls.DeviceGetDecoderUtilization + mock.lockDeviceGetDecoderUtilization.RUnlock() + return calls +} + +// DeviceGetDefaultApplicationsClock calls DeviceGetDefaultApplicationsClockFunc. +func (mock *Interface) DeviceGetDefaultApplicationsClock(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { + if mock.DeviceGetDefaultApplicationsClockFunc == nil { + panic("Interface.DeviceGetDefaultApplicationsClockFunc: method is nil but Interface.DeviceGetDefaultApplicationsClock was just called") + } + callInfo := struct { + Device nvml.Device + ClockType nvml.ClockType + }{ + Device: device, + ClockType: clockType, + } + mock.lockDeviceGetDefaultApplicationsClock.Lock() + mock.calls.DeviceGetDefaultApplicationsClock = append(mock.calls.DeviceGetDefaultApplicationsClock, callInfo) + mock.lockDeviceGetDefaultApplicationsClock.Unlock() + return mock.DeviceGetDefaultApplicationsClockFunc(device, clockType) +} + +// DeviceGetDefaultApplicationsClockCalls gets all the calls that were made to DeviceGetDefaultApplicationsClock. +// Check the length with: +// +// len(mockedInterface.DeviceGetDefaultApplicationsClockCalls()) +func (mock *Interface) DeviceGetDefaultApplicationsClockCalls() []struct { + Device nvml.Device + ClockType nvml.ClockType +} { + var calls []struct { + Device nvml.Device + ClockType nvml.ClockType + } + mock.lockDeviceGetDefaultApplicationsClock.RLock() + calls = mock.calls.DeviceGetDefaultApplicationsClock + mock.lockDeviceGetDefaultApplicationsClock.RUnlock() + return calls +} + +// DeviceGetDefaultEccMode calls DeviceGetDefaultEccModeFunc. +func (mock *Interface) DeviceGetDefaultEccMode(device nvml.Device) (nvml.EnableState, nvml.Return) { + if mock.DeviceGetDefaultEccModeFunc == nil { + panic("Interface.DeviceGetDefaultEccModeFunc: method is nil but Interface.DeviceGetDefaultEccMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetDefaultEccMode.Lock() + mock.calls.DeviceGetDefaultEccMode = append(mock.calls.DeviceGetDefaultEccMode, callInfo) + mock.lockDeviceGetDefaultEccMode.Unlock() + return mock.DeviceGetDefaultEccModeFunc(device) +} + +// DeviceGetDefaultEccModeCalls gets all the calls that were made to DeviceGetDefaultEccMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetDefaultEccModeCalls()) +func (mock *Interface) DeviceGetDefaultEccModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetDefaultEccMode.RLock() + calls = mock.calls.DeviceGetDefaultEccMode + mock.lockDeviceGetDefaultEccMode.RUnlock() + return calls +} + +// DeviceGetDetailedEccErrors calls DeviceGetDetailedEccErrorsFunc. +func (mock *Interface) DeviceGetDetailedEccErrors(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) { + if mock.DeviceGetDetailedEccErrorsFunc == nil { + panic("Interface.DeviceGetDetailedEccErrorsFunc: method is nil but Interface.DeviceGetDetailedEccErrors was just called") + } + callInfo := struct { + Device nvml.Device + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + }{ + Device: device, + MemoryErrorType: memoryErrorType, + EccCounterType: eccCounterType, + } + mock.lockDeviceGetDetailedEccErrors.Lock() + mock.calls.DeviceGetDetailedEccErrors = append(mock.calls.DeviceGetDetailedEccErrors, callInfo) + mock.lockDeviceGetDetailedEccErrors.Unlock() + return mock.DeviceGetDetailedEccErrorsFunc(device, memoryErrorType, eccCounterType) +} + +// DeviceGetDetailedEccErrorsCalls gets all the calls that were made to DeviceGetDetailedEccErrors. +// Check the length with: +// +// len(mockedInterface.DeviceGetDetailedEccErrorsCalls()) +func (mock *Interface) DeviceGetDetailedEccErrorsCalls() []struct { + Device nvml.Device + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType +} { + var calls []struct { + Device nvml.Device + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + } + mock.lockDeviceGetDetailedEccErrors.RLock() + calls = mock.calls.DeviceGetDetailedEccErrors + mock.lockDeviceGetDetailedEccErrors.RUnlock() + return calls +} + +// DeviceGetDeviceHandleFromMigDeviceHandle calls DeviceGetDeviceHandleFromMigDeviceHandleFunc. +func (mock *Interface) DeviceGetDeviceHandleFromMigDeviceHandle(device nvml.Device) (nvml.Device, nvml.Return) { + if mock.DeviceGetDeviceHandleFromMigDeviceHandleFunc == nil { + panic("Interface.DeviceGetDeviceHandleFromMigDeviceHandleFunc: method is nil but Interface.DeviceGetDeviceHandleFromMigDeviceHandle was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetDeviceHandleFromMigDeviceHandle.Lock() + mock.calls.DeviceGetDeviceHandleFromMigDeviceHandle = append(mock.calls.DeviceGetDeviceHandleFromMigDeviceHandle, callInfo) + mock.lockDeviceGetDeviceHandleFromMigDeviceHandle.Unlock() + return mock.DeviceGetDeviceHandleFromMigDeviceHandleFunc(device) +} + +// DeviceGetDeviceHandleFromMigDeviceHandleCalls gets all the calls that were made to DeviceGetDeviceHandleFromMigDeviceHandle. +// Check the length with: +// +// len(mockedInterface.DeviceGetDeviceHandleFromMigDeviceHandleCalls()) +func (mock *Interface) DeviceGetDeviceHandleFromMigDeviceHandleCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetDeviceHandleFromMigDeviceHandle.RLock() + calls = mock.calls.DeviceGetDeviceHandleFromMigDeviceHandle + mock.lockDeviceGetDeviceHandleFromMigDeviceHandle.RUnlock() + return calls +} + +// DeviceGetDisplayActive calls DeviceGetDisplayActiveFunc. +func (mock *Interface) DeviceGetDisplayActive(device nvml.Device) (nvml.EnableState, nvml.Return) { + if mock.DeviceGetDisplayActiveFunc == nil { + panic("Interface.DeviceGetDisplayActiveFunc: method is nil but Interface.DeviceGetDisplayActive was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetDisplayActive.Lock() + mock.calls.DeviceGetDisplayActive = append(mock.calls.DeviceGetDisplayActive, callInfo) + mock.lockDeviceGetDisplayActive.Unlock() + return mock.DeviceGetDisplayActiveFunc(device) +} + +// DeviceGetDisplayActiveCalls gets all the calls that were made to DeviceGetDisplayActive. +// Check the length with: +// +// len(mockedInterface.DeviceGetDisplayActiveCalls()) +func (mock *Interface) DeviceGetDisplayActiveCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetDisplayActive.RLock() + calls = mock.calls.DeviceGetDisplayActive + mock.lockDeviceGetDisplayActive.RUnlock() + return calls +} + +// DeviceGetDisplayMode calls DeviceGetDisplayModeFunc. +func (mock *Interface) DeviceGetDisplayMode(device nvml.Device) (nvml.EnableState, nvml.Return) { + if mock.DeviceGetDisplayModeFunc == nil { + panic("Interface.DeviceGetDisplayModeFunc: method is nil but Interface.DeviceGetDisplayMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetDisplayMode.Lock() + mock.calls.DeviceGetDisplayMode = append(mock.calls.DeviceGetDisplayMode, callInfo) + mock.lockDeviceGetDisplayMode.Unlock() + return mock.DeviceGetDisplayModeFunc(device) +} + +// DeviceGetDisplayModeCalls gets all the calls that were made to DeviceGetDisplayMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetDisplayModeCalls()) +func (mock *Interface) DeviceGetDisplayModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetDisplayMode.RLock() + calls = mock.calls.DeviceGetDisplayMode + mock.lockDeviceGetDisplayMode.RUnlock() + return calls +} + +// DeviceGetDramEncryptionMode calls DeviceGetDramEncryptionModeFunc. +func (mock *Interface) DeviceGetDramEncryptionMode(device nvml.Device) (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) { + if mock.DeviceGetDramEncryptionModeFunc == nil { + panic("Interface.DeviceGetDramEncryptionModeFunc: method is nil but Interface.DeviceGetDramEncryptionMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetDramEncryptionMode.Lock() + mock.calls.DeviceGetDramEncryptionMode = append(mock.calls.DeviceGetDramEncryptionMode, callInfo) + mock.lockDeviceGetDramEncryptionMode.Unlock() + return mock.DeviceGetDramEncryptionModeFunc(device) +} + +// DeviceGetDramEncryptionModeCalls gets all the calls that were made to DeviceGetDramEncryptionMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetDramEncryptionModeCalls()) +func (mock *Interface) DeviceGetDramEncryptionModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetDramEncryptionMode.RLock() + calls = mock.calls.DeviceGetDramEncryptionMode + mock.lockDeviceGetDramEncryptionMode.RUnlock() + return calls +} + +// DeviceGetDriverModel calls DeviceGetDriverModelFunc. +func (mock *Interface) DeviceGetDriverModel(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { + if mock.DeviceGetDriverModelFunc == nil { + panic("Interface.DeviceGetDriverModelFunc: method is nil but Interface.DeviceGetDriverModel was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetDriverModel.Lock() + mock.calls.DeviceGetDriverModel = append(mock.calls.DeviceGetDriverModel, callInfo) + mock.lockDeviceGetDriverModel.Unlock() + return mock.DeviceGetDriverModelFunc(device) +} + +// DeviceGetDriverModelCalls gets all the calls that were made to DeviceGetDriverModel. +// Check the length with: +// +// len(mockedInterface.DeviceGetDriverModelCalls()) +func (mock *Interface) DeviceGetDriverModelCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetDriverModel.RLock() + calls = mock.calls.DeviceGetDriverModel + mock.lockDeviceGetDriverModel.RUnlock() + return calls +} + +// DeviceGetDriverModel_v2 calls DeviceGetDriverModel_v2Func. +func (mock *Interface) DeviceGetDriverModel_v2(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { + if mock.DeviceGetDriverModel_v2Func == nil { + panic("Interface.DeviceGetDriverModel_v2Func: method is nil but Interface.DeviceGetDriverModel_v2 was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetDriverModel_v2.Lock() + mock.calls.DeviceGetDriverModel_v2 = append(mock.calls.DeviceGetDriverModel_v2, callInfo) + mock.lockDeviceGetDriverModel_v2.Unlock() + return mock.DeviceGetDriverModel_v2Func(device) +} + +// DeviceGetDriverModel_v2Calls gets all the calls that were made to DeviceGetDriverModel_v2. +// Check the length with: +// +// len(mockedInterface.DeviceGetDriverModel_v2Calls()) +func (mock *Interface) DeviceGetDriverModel_v2Calls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetDriverModel_v2.RLock() + calls = mock.calls.DeviceGetDriverModel_v2 + mock.lockDeviceGetDriverModel_v2.RUnlock() + return calls +} + +// DeviceGetDynamicPstatesInfo calls DeviceGetDynamicPstatesInfoFunc. +func (mock *Interface) DeviceGetDynamicPstatesInfo(device nvml.Device) (nvml.GpuDynamicPstatesInfo, nvml.Return) { + if mock.DeviceGetDynamicPstatesInfoFunc == nil { + panic("Interface.DeviceGetDynamicPstatesInfoFunc: method is nil but Interface.DeviceGetDynamicPstatesInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetDynamicPstatesInfo.Lock() + mock.calls.DeviceGetDynamicPstatesInfo = append(mock.calls.DeviceGetDynamicPstatesInfo, callInfo) + mock.lockDeviceGetDynamicPstatesInfo.Unlock() + return mock.DeviceGetDynamicPstatesInfoFunc(device) +} + +// DeviceGetDynamicPstatesInfoCalls gets all the calls that were made to DeviceGetDynamicPstatesInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetDynamicPstatesInfoCalls()) +func (mock *Interface) DeviceGetDynamicPstatesInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetDynamicPstatesInfo.RLock() + calls = mock.calls.DeviceGetDynamicPstatesInfo + mock.lockDeviceGetDynamicPstatesInfo.RUnlock() + return calls +} + +// DeviceGetEccMode calls DeviceGetEccModeFunc. +func (mock *Interface) DeviceGetEccMode(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) { + if mock.DeviceGetEccModeFunc == nil { + panic("Interface.DeviceGetEccModeFunc: method is nil but Interface.DeviceGetEccMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetEccMode.Lock() + mock.calls.DeviceGetEccMode = append(mock.calls.DeviceGetEccMode, callInfo) + mock.lockDeviceGetEccMode.Unlock() + return mock.DeviceGetEccModeFunc(device) +} + +// DeviceGetEccModeCalls gets all the calls that were made to DeviceGetEccMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetEccModeCalls()) +func (mock *Interface) DeviceGetEccModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetEccMode.RLock() + calls = mock.calls.DeviceGetEccMode + mock.lockDeviceGetEccMode.RUnlock() + return calls +} + +// DeviceGetEncoderCapacity calls DeviceGetEncoderCapacityFunc. +func (mock *Interface) DeviceGetEncoderCapacity(device nvml.Device, encoderType nvml.EncoderType) (int, nvml.Return) { + if mock.DeviceGetEncoderCapacityFunc == nil { + panic("Interface.DeviceGetEncoderCapacityFunc: method is nil but Interface.DeviceGetEncoderCapacity was just called") + } + callInfo := struct { + Device nvml.Device + EncoderType nvml.EncoderType + }{ + Device: device, + EncoderType: encoderType, + } + mock.lockDeviceGetEncoderCapacity.Lock() + mock.calls.DeviceGetEncoderCapacity = append(mock.calls.DeviceGetEncoderCapacity, callInfo) + mock.lockDeviceGetEncoderCapacity.Unlock() + return mock.DeviceGetEncoderCapacityFunc(device, encoderType) +} + +// DeviceGetEncoderCapacityCalls gets all the calls that were made to DeviceGetEncoderCapacity. +// Check the length with: +// +// len(mockedInterface.DeviceGetEncoderCapacityCalls()) +func (mock *Interface) DeviceGetEncoderCapacityCalls() []struct { + Device nvml.Device + EncoderType nvml.EncoderType +} { + var calls []struct { + Device nvml.Device + EncoderType nvml.EncoderType + } + mock.lockDeviceGetEncoderCapacity.RLock() + calls = mock.calls.DeviceGetEncoderCapacity + mock.lockDeviceGetEncoderCapacity.RUnlock() + return calls +} + +// DeviceGetEncoderSessions calls DeviceGetEncoderSessionsFunc. +func (mock *Interface) DeviceGetEncoderSessions(device nvml.Device) ([]nvml.EncoderSessionInfo, nvml.Return) { + if mock.DeviceGetEncoderSessionsFunc == nil { + panic("Interface.DeviceGetEncoderSessionsFunc: method is nil but Interface.DeviceGetEncoderSessions was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetEncoderSessions.Lock() + mock.calls.DeviceGetEncoderSessions = append(mock.calls.DeviceGetEncoderSessions, callInfo) + mock.lockDeviceGetEncoderSessions.Unlock() + return mock.DeviceGetEncoderSessionsFunc(device) +} + +// DeviceGetEncoderSessionsCalls gets all the calls that were made to DeviceGetEncoderSessions. +// Check the length with: +// +// len(mockedInterface.DeviceGetEncoderSessionsCalls()) +func (mock *Interface) DeviceGetEncoderSessionsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetEncoderSessions.RLock() + calls = mock.calls.DeviceGetEncoderSessions + mock.lockDeviceGetEncoderSessions.RUnlock() + return calls +} + +// DeviceGetEncoderStats calls DeviceGetEncoderStatsFunc. +func (mock *Interface) DeviceGetEncoderStats(device nvml.Device) (int, uint32, uint32, nvml.Return) { + if mock.DeviceGetEncoderStatsFunc == nil { + panic("Interface.DeviceGetEncoderStatsFunc: method is nil but Interface.DeviceGetEncoderStats was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetEncoderStats.Lock() + mock.calls.DeviceGetEncoderStats = append(mock.calls.DeviceGetEncoderStats, callInfo) + mock.lockDeviceGetEncoderStats.Unlock() + return mock.DeviceGetEncoderStatsFunc(device) +} + +// DeviceGetEncoderStatsCalls gets all the calls that were made to DeviceGetEncoderStats. +// Check the length with: +// +// len(mockedInterface.DeviceGetEncoderStatsCalls()) +func (mock *Interface) DeviceGetEncoderStatsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetEncoderStats.RLock() + calls = mock.calls.DeviceGetEncoderStats + mock.lockDeviceGetEncoderStats.RUnlock() + return calls +} + +// DeviceGetEncoderUtilization calls DeviceGetEncoderUtilizationFunc. +func (mock *Interface) DeviceGetEncoderUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { + if mock.DeviceGetEncoderUtilizationFunc == nil { + panic("Interface.DeviceGetEncoderUtilizationFunc: method is nil but Interface.DeviceGetEncoderUtilization was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetEncoderUtilization.Lock() + mock.calls.DeviceGetEncoderUtilization = append(mock.calls.DeviceGetEncoderUtilization, callInfo) + mock.lockDeviceGetEncoderUtilization.Unlock() + return mock.DeviceGetEncoderUtilizationFunc(device) +} + +// DeviceGetEncoderUtilizationCalls gets all the calls that were made to DeviceGetEncoderUtilization. +// Check the length with: +// +// len(mockedInterface.DeviceGetEncoderUtilizationCalls()) +func (mock *Interface) DeviceGetEncoderUtilizationCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetEncoderUtilization.RLock() + calls = mock.calls.DeviceGetEncoderUtilization + mock.lockDeviceGetEncoderUtilization.RUnlock() + return calls +} + +// DeviceGetEnforcedPowerLimit calls DeviceGetEnforcedPowerLimitFunc. +func (mock *Interface) DeviceGetEnforcedPowerLimit(device nvml.Device) (uint32, nvml.Return) { + if mock.DeviceGetEnforcedPowerLimitFunc == nil { + panic("Interface.DeviceGetEnforcedPowerLimitFunc: method is nil but Interface.DeviceGetEnforcedPowerLimit was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetEnforcedPowerLimit.Lock() + mock.calls.DeviceGetEnforcedPowerLimit = append(mock.calls.DeviceGetEnforcedPowerLimit, callInfo) + mock.lockDeviceGetEnforcedPowerLimit.Unlock() + return mock.DeviceGetEnforcedPowerLimitFunc(device) +} + +// DeviceGetEnforcedPowerLimitCalls gets all the calls that were made to DeviceGetEnforcedPowerLimit. +// Check the length with: +// +// len(mockedInterface.DeviceGetEnforcedPowerLimitCalls()) +func (mock *Interface) DeviceGetEnforcedPowerLimitCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetEnforcedPowerLimit.RLock() + calls = mock.calls.DeviceGetEnforcedPowerLimit + mock.lockDeviceGetEnforcedPowerLimit.RUnlock() + return calls +} + +// DeviceGetFBCSessions calls DeviceGetFBCSessionsFunc. +func (mock *Interface) DeviceGetFBCSessions(device nvml.Device) ([]nvml.FBCSessionInfo, nvml.Return) { + if mock.DeviceGetFBCSessionsFunc == nil { + panic("Interface.DeviceGetFBCSessionsFunc: method is nil but Interface.DeviceGetFBCSessions was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetFBCSessions.Lock() + mock.calls.DeviceGetFBCSessions = append(mock.calls.DeviceGetFBCSessions, callInfo) + mock.lockDeviceGetFBCSessions.Unlock() + return mock.DeviceGetFBCSessionsFunc(device) +} + +// DeviceGetFBCSessionsCalls gets all the calls that were made to DeviceGetFBCSessions. +// Check the length with: +// +// len(mockedInterface.DeviceGetFBCSessionsCalls()) +func (mock *Interface) DeviceGetFBCSessionsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetFBCSessions.RLock() + calls = mock.calls.DeviceGetFBCSessions + mock.lockDeviceGetFBCSessions.RUnlock() + return calls +} + +// DeviceGetFBCStats calls DeviceGetFBCStatsFunc. +func (mock *Interface) DeviceGetFBCStats(device nvml.Device) (nvml.FBCStats, nvml.Return) { + if mock.DeviceGetFBCStatsFunc == nil { + panic("Interface.DeviceGetFBCStatsFunc: method is nil but Interface.DeviceGetFBCStats was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetFBCStats.Lock() + mock.calls.DeviceGetFBCStats = append(mock.calls.DeviceGetFBCStats, callInfo) + mock.lockDeviceGetFBCStats.Unlock() + return mock.DeviceGetFBCStatsFunc(device) +} + +// DeviceGetFBCStatsCalls gets all the calls that were made to DeviceGetFBCStats. +// Check the length with: +// +// len(mockedInterface.DeviceGetFBCStatsCalls()) +func (mock *Interface) DeviceGetFBCStatsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetFBCStats.RLock() + calls = mock.calls.DeviceGetFBCStats + mock.lockDeviceGetFBCStats.RUnlock() + return calls +} + +// DeviceGetFanControlPolicy_v2 calls DeviceGetFanControlPolicy_v2Func. +func (mock *Interface) DeviceGetFanControlPolicy_v2(device nvml.Device, n int) (nvml.FanControlPolicy, nvml.Return) { + if mock.DeviceGetFanControlPolicy_v2Func == nil { + panic("Interface.DeviceGetFanControlPolicy_v2Func: method is nil but Interface.DeviceGetFanControlPolicy_v2 was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetFanControlPolicy_v2.Lock() + mock.calls.DeviceGetFanControlPolicy_v2 = append(mock.calls.DeviceGetFanControlPolicy_v2, callInfo) + mock.lockDeviceGetFanControlPolicy_v2.Unlock() + return mock.DeviceGetFanControlPolicy_v2Func(device, n) +} + +// DeviceGetFanControlPolicy_v2Calls gets all the calls that were made to DeviceGetFanControlPolicy_v2. +// Check the length with: +// +// len(mockedInterface.DeviceGetFanControlPolicy_v2Calls()) +func (mock *Interface) DeviceGetFanControlPolicy_v2Calls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetFanControlPolicy_v2.RLock() + calls = mock.calls.DeviceGetFanControlPolicy_v2 + mock.lockDeviceGetFanControlPolicy_v2.RUnlock() + return calls +} + +// DeviceGetFanSpeed calls DeviceGetFanSpeedFunc. +func (mock *Interface) DeviceGetFanSpeed(device nvml.Device) (uint32, nvml.Return) { + if mock.DeviceGetFanSpeedFunc == nil { + panic("Interface.DeviceGetFanSpeedFunc: method is nil but Interface.DeviceGetFanSpeed was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetFanSpeed.Lock() + mock.calls.DeviceGetFanSpeed = append(mock.calls.DeviceGetFanSpeed, callInfo) + mock.lockDeviceGetFanSpeed.Unlock() + return mock.DeviceGetFanSpeedFunc(device) +} + +// DeviceGetFanSpeedCalls gets all the calls that were made to DeviceGetFanSpeed. +// Check the length with: +// +// len(mockedInterface.DeviceGetFanSpeedCalls()) +func (mock *Interface) DeviceGetFanSpeedCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetFanSpeed.RLock() + calls = mock.calls.DeviceGetFanSpeed + mock.lockDeviceGetFanSpeed.RUnlock() + return calls +} + +// DeviceGetFanSpeedRPM calls DeviceGetFanSpeedRPMFunc. +func (mock *Interface) DeviceGetFanSpeedRPM(device nvml.Device) (nvml.FanSpeedInfo, nvml.Return) { + if mock.DeviceGetFanSpeedRPMFunc == nil { + panic("Interface.DeviceGetFanSpeedRPMFunc: method is nil but Interface.DeviceGetFanSpeedRPM was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetFanSpeedRPM.Lock() + mock.calls.DeviceGetFanSpeedRPM = append(mock.calls.DeviceGetFanSpeedRPM, callInfo) + mock.lockDeviceGetFanSpeedRPM.Unlock() + return mock.DeviceGetFanSpeedRPMFunc(device) +} + +// DeviceGetFanSpeedRPMCalls gets all the calls that were made to DeviceGetFanSpeedRPM. +// Check the length with: +// +// len(mockedInterface.DeviceGetFanSpeedRPMCalls()) +func (mock *Interface) DeviceGetFanSpeedRPMCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetFanSpeedRPM.RLock() + calls = mock.calls.DeviceGetFanSpeedRPM + mock.lockDeviceGetFanSpeedRPM.RUnlock() + return calls +} + +// DeviceGetFanSpeed_v2 calls DeviceGetFanSpeed_v2Func. +func (mock *Interface) DeviceGetFanSpeed_v2(device nvml.Device, n int) (uint32, nvml.Return) { + if mock.DeviceGetFanSpeed_v2Func == nil { + panic("Interface.DeviceGetFanSpeed_v2Func: method is nil but Interface.DeviceGetFanSpeed_v2 was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetFanSpeed_v2.Lock() + mock.calls.DeviceGetFanSpeed_v2 = append(mock.calls.DeviceGetFanSpeed_v2, callInfo) + mock.lockDeviceGetFanSpeed_v2.Unlock() + return mock.DeviceGetFanSpeed_v2Func(device, n) +} + +// DeviceGetFanSpeed_v2Calls gets all the calls that were made to DeviceGetFanSpeed_v2. +// Check the length with: +// +// len(mockedInterface.DeviceGetFanSpeed_v2Calls()) +func (mock *Interface) DeviceGetFanSpeed_v2Calls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetFanSpeed_v2.RLock() + calls = mock.calls.DeviceGetFanSpeed_v2 + mock.lockDeviceGetFanSpeed_v2.RUnlock() + return calls +} + +// DeviceGetFieldValues calls DeviceGetFieldValuesFunc. +func (mock *Interface) DeviceGetFieldValues(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return { + if mock.DeviceGetFieldValuesFunc == nil { + panic("Interface.DeviceGetFieldValuesFunc: method is nil but Interface.DeviceGetFieldValues was just called") + } + callInfo := struct { + Device nvml.Device + FieldValues []nvml.FieldValue + }{ + Device: device, + FieldValues: fieldValues, + } + mock.lockDeviceGetFieldValues.Lock() + mock.calls.DeviceGetFieldValues = append(mock.calls.DeviceGetFieldValues, callInfo) + mock.lockDeviceGetFieldValues.Unlock() + return mock.DeviceGetFieldValuesFunc(device, fieldValues) +} + +// DeviceGetFieldValuesCalls gets all the calls that were made to DeviceGetFieldValues. +// Check the length with: +// +// len(mockedInterface.DeviceGetFieldValuesCalls()) +func (mock *Interface) DeviceGetFieldValuesCalls() []struct { + Device nvml.Device + FieldValues []nvml.FieldValue +} { + var calls []struct { + Device nvml.Device + FieldValues []nvml.FieldValue + } + mock.lockDeviceGetFieldValues.RLock() + calls = mock.calls.DeviceGetFieldValues + mock.lockDeviceGetFieldValues.RUnlock() + return calls +} + +// DeviceGetGpcClkMinMaxVfOffset calls DeviceGetGpcClkMinMaxVfOffsetFunc. +func (mock *Interface) DeviceGetGpcClkMinMaxVfOffset(device nvml.Device) (int, int, nvml.Return) { + if mock.DeviceGetGpcClkMinMaxVfOffsetFunc == nil { + panic("Interface.DeviceGetGpcClkMinMaxVfOffsetFunc: method is nil but Interface.DeviceGetGpcClkMinMaxVfOffset was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGpcClkMinMaxVfOffset.Lock() + mock.calls.DeviceGetGpcClkMinMaxVfOffset = append(mock.calls.DeviceGetGpcClkMinMaxVfOffset, callInfo) + mock.lockDeviceGetGpcClkMinMaxVfOffset.Unlock() + return mock.DeviceGetGpcClkMinMaxVfOffsetFunc(device) +} + +// DeviceGetGpcClkMinMaxVfOffsetCalls gets all the calls that were made to DeviceGetGpcClkMinMaxVfOffset. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpcClkMinMaxVfOffsetCalls()) +func (mock *Interface) DeviceGetGpcClkMinMaxVfOffsetCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGpcClkMinMaxVfOffset.RLock() + calls = mock.calls.DeviceGetGpcClkMinMaxVfOffset + mock.lockDeviceGetGpcClkMinMaxVfOffset.RUnlock() + return calls +} + +// DeviceGetGpcClkVfOffset calls DeviceGetGpcClkVfOffsetFunc. +func (mock *Interface) DeviceGetGpcClkVfOffset(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetGpcClkVfOffsetFunc == nil { + panic("Interface.DeviceGetGpcClkVfOffsetFunc: method is nil but Interface.DeviceGetGpcClkVfOffset was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGpcClkVfOffset.Lock() + mock.calls.DeviceGetGpcClkVfOffset = append(mock.calls.DeviceGetGpcClkVfOffset, callInfo) + mock.lockDeviceGetGpcClkVfOffset.Unlock() + return mock.DeviceGetGpcClkVfOffsetFunc(device) +} + +// DeviceGetGpcClkVfOffsetCalls gets all the calls that were made to DeviceGetGpcClkVfOffset. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpcClkVfOffsetCalls()) +func (mock *Interface) DeviceGetGpcClkVfOffsetCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGpcClkVfOffset.RLock() + calls = mock.calls.DeviceGetGpcClkVfOffset + mock.lockDeviceGetGpcClkVfOffset.RUnlock() + return calls +} + +// DeviceGetGpuFabricInfo calls DeviceGetGpuFabricInfoFunc. +func (mock *Interface) DeviceGetGpuFabricInfo(device nvml.Device) (nvml.GpuFabricInfo, nvml.Return) { + if mock.DeviceGetGpuFabricInfoFunc == nil { + panic("Interface.DeviceGetGpuFabricInfoFunc: method is nil but Interface.DeviceGetGpuFabricInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGpuFabricInfo.Lock() + mock.calls.DeviceGetGpuFabricInfo = append(mock.calls.DeviceGetGpuFabricInfo, callInfo) + mock.lockDeviceGetGpuFabricInfo.Unlock() + return mock.DeviceGetGpuFabricInfoFunc(device) +} + +// DeviceGetGpuFabricInfoCalls gets all the calls that were made to DeviceGetGpuFabricInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuFabricInfoCalls()) +func (mock *Interface) DeviceGetGpuFabricInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGpuFabricInfo.RLock() + calls = mock.calls.DeviceGetGpuFabricInfo + mock.lockDeviceGetGpuFabricInfo.RUnlock() + return calls +} + +// DeviceGetGpuFabricInfoV calls DeviceGetGpuFabricInfoVFunc. +func (mock *Interface) DeviceGetGpuFabricInfoV(device nvml.Device) nvml.GpuFabricInfoHandler { + if mock.DeviceGetGpuFabricInfoVFunc == nil { + panic("Interface.DeviceGetGpuFabricInfoVFunc: method is nil but Interface.DeviceGetGpuFabricInfoV was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGpuFabricInfoV.Lock() + mock.calls.DeviceGetGpuFabricInfoV = append(mock.calls.DeviceGetGpuFabricInfoV, callInfo) + mock.lockDeviceGetGpuFabricInfoV.Unlock() + return mock.DeviceGetGpuFabricInfoVFunc(device) +} + +// DeviceGetGpuFabricInfoVCalls gets all the calls that were made to DeviceGetGpuFabricInfoV. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuFabricInfoVCalls()) +func (mock *Interface) DeviceGetGpuFabricInfoVCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGpuFabricInfoV.RLock() + calls = mock.calls.DeviceGetGpuFabricInfoV + mock.lockDeviceGetGpuFabricInfoV.RUnlock() + return calls +} + +// DeviceGetGpuInstanceById calls DeviceGetGpuInstanceByIdFunc. +func (mock *Interface) DeviceGetGpuInstanceById(device nvml.Device, n int) (nvml.GpuInstance, nvml.Return) { + if mock.DeviceGetGpuInstanceByIdFunc == nil { + panic("Interface.DeviceGetGpuInstanceByIdFunc: method is nil but Interface.DeviceGetGpuInstanceById was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetGpuInstanceById.Lock() + mock.calls.DeviceGetGpuInstanceById = append(mock.calls.DeviceGetGpuInstanceById, callInfo) + mock.lockDeviceGetGpuInstanceById.Unlock() + return mock.DeviceGetGpuInstanceByIdFunc(device, n) +} + +// DeviceGetGpuInstanceByIdCalls gets all the calls that were made to DeviceGetGpuInstanceById. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuInstanceByIdCalls()) +func (mock *Interface) DeviceGetGpuInstanceByIdCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetGpuInstanceById.RLock() + calls = mock.calls.DeviceGetGpuInstanceById + mock.lockDeviceGetGpuInstanceById.RUnlock() + return calls +} + +// DeviceGetGpuInstanceId calls DeviceGetGpuInstanceIdFunc. +func (mock *Interface) DeviceGetGpuInstanceId(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetGpuInstanceIdFunc == nil { + panic("Interface.DeviceGetGpuInstanceIdFunc: method is nil but Interface.DeviceGetGpuInstanceId was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGpuInstanceId.Lock() + mock.calls.DeviceGetGpuInstanceId = append(mock.calls.DeviceGetGpuInstanceId, callInfo) + mock.lockDeviceGetGpuInstanceId.Unlock() + return mock.DeviceGetGpuInstanceIdFunc(device) +} + +// DeviceGetGpuInstanceIdCalls gets all the calls that were made to DeviceGetGpuInstanceId. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuInstanceIdCalls()) +func (mock *Interface) DeviceGetGpuInstanceIdCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGpuInstanceId.RLock() + calls = mock.calls.DeviceGetGpuInstanceId + mock.lockDeviceGetGpuInstanceId.RUnlock() + return calls +} + +// DeviceGetGpuInstancePossiblePlacements calls DeviceGetGpuInstancePossiblePlacementsFunc. +func (mock *Interface) DeviceGetGpuInstancePossiblePlacements(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { + if mock.DeviceGetGpuInstancePossiblePlacementsFunc == nil { + panic("Interface.DeviceGetGpuInstancePossiblePlacementsFunc: method is nil but Interface.DeviceGetGpuInstancePossiblePlacements was just called") + } + callInfo := struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + }{ + Device: device, + GpuInstanceProfileInfo: gpuInstanceProfileInfo, + } + mock.lockDeviceGetGpuInstancePossiblePlacements.Lock() + mock.calls.DeviceGetGpuInstancePossiblePlacements = append(mock.calls.DeviceGetGpuInstancePossiblePlacements, callInfo) + mock.lockDeviceGetGpuInstancePossiblePlacements.Unlock() + return mock.DeviceGetGpuInstancePossiblePlacementsFunc(device, gpuInstanceProfileInfo) +} + +// DeviceGetGpuInstancePossiblePlacementsCalls gets all the calls that were made to DeviceGetGpuInstancePossiblePlacements. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuInstancePossiblePlacementsCalls()) +func (mock *Interface) DeviceGetGpuInstancePossiblePlacementsCalls() []struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo +} { + var calls []struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + mock.lockDeviceGetGpuInstancePossiblePlacements.RLock() + calls = mock.calls.DeviceGetGpuInstancePossiblePlacements + mock.lockDeviceGetGpuInstancePossiblePlacements.RUnlock() + return calls +} + +// DeviceGetGpuInstanceProfileInfo calls DeviceGetGpuInstanceProfileInfoFunc. +func (mock *Interface) DeviceGetGpuInstanceProfileInfo(device nvml.Device, n int) (nvml.GpuInstanceProfileInfo, nvml.Return) { + if mock.DeviceGetGpuInstanceProfileInfoFunc == nil { + panic("Interface.DeviceGetGpuInstanceProfileInfoFunc: method is nil but Interface.DeviceGetGpuInstanceProfileInfo was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetGpuInstanceProfileInfo.Lock() + mock.calls.DeviceGetGpuInstanceProfileInfo = append(mock.calls.DeviceGetGpuInstanceProfileInfo, callInfo) + mock.lockDeviceGetGpuInstanceProfileInfo.Unlock() + return mock.DeviceGetGpuInstanceProfileInfoFunc(device, n) +} + +// DeviceGetGpuInstanceProfileInfoCalls gets all the calls that were made to DeviceGetGpuInstanceProfileInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuInstanceProfileInfoCalls()) +func (mock *Interface) DeviceGetGpuInstanceProfileInfoCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetGpuInstanceProfileInfo.RLock() + calls = mock.calls.DeviceGetGpuInstanceProfileInfo + mock.lockDeviceGetGpuInstanceProfileInfo.RUnlock() + return calls +} + +// DeviceGetGpuInstanceProfileInfoByIdV calls DeviceGetGpuInstanceProfileInfoByIdVFunc. +func (mock *Interface) DeviceGetGpuInstanceProfileInfoByIdV(device nvml.Device, n int) nvml.GpuInstanceProfileInfoByIdHandler { + if mock.DeviceGetGpuInstanceProfileInfoByIdVFunc == nil { + panic("Interface.DeviceGetGpuInstanceProfileInfoByIdVFunc: method is nil but Interface.DeviceGetGpuInstanceProfileInfoByIdV was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetGpuInstanceProfileInfoByIdV.Lock() + mock.calls.DeviceGetGpuInstanceProfileInfoByIdV = append(mock.calls.DeviceGetGpuInstanceProfileInfoByIdV, callInfo) + mock.lockDeviceGetGpuInstanceProfileInfoByIdV.Unlock() + return mock.DeviceGetGpuInstanceProfileInfoByIdVFunc(device, n) +} + +// DeviceGetGpuInstanceProfileInfoByIdVCalls gets all the calls that were made to DeviceGetGpuInstanceProfileInfoByIdV. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuInstanceProfileInfoByIdVCalls()) +func (mock *Interface) DeviceGetGpuInstanceProfileInfoByIdVCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetGpuInstanceProfileInfoByIdV.RLock() + calls = mock.calls.DeviceGetGpuInstanceProfileInfoByIdV + mock.lockDeviceGetGpuInstanceProfileInfoByIdV.RUnlock() + return calls +} + +// DeviceGetGpuInstanceProfileInfoV calls DeviceGetGpuInstanceProfileInfoVFunc. +func (mock *Interface) DeviceGetGpuInstanceProfileInfoV(device nvml.Device, n int) nvml.GpuInstanceProfileInfoHandler { + if mock.DeviceGetGpuInstanceProfileInfoVFunc == nil { + panic("Interface.DeviceGetGpuInstanceProfileInfoVFunc: method is nil but Interface.DeviceGetGpuInstanceProfileInfoV was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetGpuInstanceProfileInfoV.Lock() + mock.calls.DeviceGetGpuInstanceProfileInfoV = append(mock.calls.DeviceGetGpuInstanceProfileInfoV, callInfo) + mock.lockDeviceGetGpuInstanceProfileInfoV.Unlock() + return mock.DeviceGetGpuInstanceProfileInfoVFunc(device, n) +} + +// DeviceGetGpuInstanceProfileInfoVCalls gets all the calls that were made to DeviceGetGpuInstanceProfileInfoV. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuInstanceProfileInfoVCalls()) +func (mock *Interface) DeviceGetGpuInstanceProfileInfoVCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetGpuInstanceProfileInfoV.RLock() + calls = mock.calls.DeviceGetGpuInstanceProfileInfoV + mock.lockDeviceGetGpuInstanceProfileInfoV.RUnlock() + return calls +} + +// DeviceGetGpuInstanceRemainingCapacity calls DeviceGetGpuInstanceRemainingCapacityFunc. +func (mock *Interface) DeviceGetGpuInstanceRemainingCapacity(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) { + if mock.DeviceGetGpuInstanceRemainingCapacityFunc == nil { + panic("Interface.DeviceGetGpuInstanceRemainingCapacityFunc: method is nil but Interface.DeviceGetGpuInstanceRemainingCapacity was just called") + } + callInfo := struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + }{ + Device: device, + GpuInstanceProfileInfo: gpuInstanceProfileInfo, + } + mock.lockDeviceGetGpuInstanceRemainingCapacity.Lock() + mock.calls.DeviceGetGpuInstanceRemainingCapacity = append(mock.calls.DeviceGetGpuInstanceRemainingCapacity, callInfo) + mock.lockDeviceGetGpuInstanceRemainingCapacity.Unlock() + return mock.DeviceGetGpuInstanceRemainingCapacityFunc(device, gpuInstanceProfileInfo) +} + +// DeviceGetGpuInstanceRemainingCapacityCalls gets all the calls that were made to DeviceGetGpuInstanceRemainingCapacity. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuInstanceRemainingCapacityCalls()) +func (mock *Interface) DeviceGetGpuInstanceRemainingCapacityCalls() []struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo +} { + var calls []struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + mock.lockDeviceGetGpuInstanceRemainingCapacity.RLock() + calls = mock.calls.DeviceGetGpuInstanceRemainingCapacity + mock.lockDeviceGetGpuInstanceRemainingCapacity.RUnlock() + return calls +} + +// DeviceGetGpuInstances calls DeviceGetGpuInstancesFunc. +func (mock *Interface) DeviceGetGpuInstances(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { + if mock.DeviceGetGpuInstancesFunc == nil { + panic("Interface.DeviceGetGpuInstancesFunc: method is nil but Interface.DeviceGetGpuInstances was just called") + } + callInfo := struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + }{ + Device: device, + GpuInstanceProfileInfo: gpuInstanceProfileInfo, + } + mock.lockDeviceGetGpuInstances.Lock() + mock.calls.DeviceGetGpuInstances = append(mock.calls.DeviceGetGpuInstances, callInfo) + mock.lockDeviceGetGpuInstances.Unlock() + return mock.DeviceGetGpuInstancesFunc(device, gpuInstanceProfileInfo) +} + +// DeviceGetGpuInstancesCalls gets all the calls that were made to DeviceGetGpuInstances. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuInstancesCalls()) +func (mock *Interface) DeviceGetGpuInstancesCalls() []struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo +} { + var calls []struct { + Device nvml.Device + GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo + } + mock.lockDeviceGetGpuInstances.RLock() + calls = mock.calls.DeviceGetGpuInstances + mock.lockDeviceGetGpuInstances.RUnlock() + return calls +} + +// DeviceGetGpuMaxPcieLinkGeneration calls DeviceGetGpuMaxPcieLinkGenerationFunc. +func (mock *Interface) DeviceGetGpuMaxPcieLinkGeneration(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetGpuMaxPcieLinkGenerationFunc == nil { + panic("Interface.DeviceGetGpuMaxPcieLinkGenerationFunc: method is nil but Interface.DeviceGetGpuMaxPcieLinkGeneration was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGpuMaxPcieLinkGeneration.Lock() + mock.calls.DeviceGetGpuMaxPcieLinkGeneration = append(mock.calls.DeviceGetGpuMaxPcieLinkGeneration, callInfo) + mock.lockDeviceGetGpuMaxPcieLinkGeneration.Unlock() + return mock.DeviceGetGpuMaxPcieLinkGenerationFunc(device) +} + +// DeviceGetGpuMaxPcieLinkGenerationCalls gets all the calls that were made to DeviceGetGpuMaxPcieLinkGeneration. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuMaxPcieLinkGenerationCalls()) +func (mock *Interface) DeviceGetGpuMaxPcieLinkGenerationCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGpuMaxPcieLinkGeneration.RLock() + calls = mock.calls.DeviceGetGpuMaxPcieLinkGeneration + mock.lockDeviceGetGpuMaxPcieLinkGeneration.RUnlock() + return calls +} + +// DeviceGetGpuOperationMode calls DeviceGetGpuOperationModeFunc. +func (mock *Interface) DeviceGetGpuOperationMode(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { + if mock.DeviceGetGpuOperationModeFunc == nil { + panic("Interface.DeviceGetGpuOperationModeFunc: method is nil but Interface.DeviceGetGpuOperationMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGpuOperationMode.Lock() + mock.calls.DeviceGetGpuOperationMode = append(mock.calls.DeviceGetGpuOperationMode, callInfo) + mock.lockDeviceGetGpuOperationMode.Unlock() + return mock.DeviceGetGpuOperationModeFunc(device) +} + +// DeviceGetGpuOperationModeCalls gets all the calls that were made to DeviceGetGpuOperationMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetGpuOperationModeCalls()) +func (mock *Interface) DeviceGetGpuOperationModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGpuOperationMode.RLock() + calls = mock.calls.DeviceGetGpuOperationMode + mock.lockDeviceGetGpuOperationMode.RUnlock() + return calls +} + +// DeviceGetGraphicsRunningProcesses calls DeviceGetGraphicsRunningProcessesFunc. +func (mock *Interface) DeviceGetGraphicsRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { + if mock.DeviceGetGraphicsRunningProcessesFunc == nil { + panic("Interface.DeviceGetGraphicsRunningProcessesFunc: method is nil but Interface.DeviceGetGraphicsRunningProcesses was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGraphicsRunningProcesses.Lock() + mock.calls.DeviceGetGraphicsRunningProcesses = append(mock.calls.DeviceGetGraphicsRunningProcesses, callInfo) + mock.lockDeviceGetGraphicsRunningProcesses.Unlock() + return mock.DeviceGetGraphicsRunningProcessesFunc(device) +} + +// DeviceGetGraphicsRunningProcessesCalls gets all the calls that were made to DeviceGetGraphicsRunningProcesses. +// Check the length with: +// +// len(mockedInterface.DeviceGetGraphicsRunningProcessesCalls()) +func (mock *Interface) DeviceGetGraphicsRunningProcessesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGraphicsRunningProcesses.RLock() + calls = mock.calls.DeviceGetGraphicsRunningProcesses + mock.lockDeviceGetGraphicsRunningProcesses.RUnlock() + return calls +} + +// DeviceGetGridLicensableFeatures calls DeviceGetGridLicensableFeaturesFunc. +func (mock *Interface) DeviceGetGridLicensableFeatures(device nvml.Device) (nvml.GridLicensableFeatures, nvml.Return) { + if mock.DeviceGetGridLicensableFeaturesFunc == nil { + panic("Interface.DeviceGetGridLicensableFeaturesFunc: method is nil but Interface.DeviceGetGridLicensableFeatures was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGridLicensableFeatures.Lock() + mock.calls.DeviceGetGridLicensableFeatures = append(mock.calls.DeviceGetGridLicensableFeatures, callInfo) + mock.lockDeviceGetGridLicensableFeatures.Unlock() + return mock.DeviceGetGridLicensableFeaturesFunc(device) +} + +// DeviceGetGridLicensableFeaturesCalls gets all the calls that were made to DeviceGetGridLicensableFeatures. +// Check the length with: +// +// len(mockedInterface.DeviceGetGridLicensableFeaturesCalls()) +func (mock *Interface) DeviceGetGridLicensableFeaturesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGridLicensableFeatures.RLock() + calls = mock.calls.DeviceGetGridLicensableFeatures + mock.lockDeviceGetGridLicensableFeatures.RUnlock() + return calls +} + +// DeviceGetGspFirmwareMode calls DeviceGetGspFirmwareModeFunc. +func (mock *Interface) DeviceGetGspFirmwareMode(device nvml.Device) (bool, bool, nvml.Return) { + if mock.DeviceGetGspFirmwareModeFunc == nil { + panic("Interface.DeviceGetGspFirmwareModeFunc: method is nil but Interface.DeviceGetGspFirmwareMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGspFirmwareMode.Lock() + mock.calls.DeviceGetGspFirmwareMode = append(mock.calls.DeviceGetGspFirmwareMode, callInfo) + mock.lockDeviceGetGspFirmwareMode.Unlock() + return mock.DeviceGetGspFirmwareModeFunc(device) +} + +// DeviceGetGspFirmwareModeCalls gets all the calls that were made to DeviceGetGspFirmwareMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetGspFirmwareModeCalls()) +func (mock *Interface) DeviceGetGspFirmwareModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGspFirmwareMode.RLock() + calls = mock.calls.DeviceGetGspFirmwareMode + mock.lockDeviceGetGspFirmwareMode.RUnlock() + return calls +} + +// DeviceGetGspFirmwareVersion calls DeviceGetGspFirmwareVersionFunc. +func (mock *Interface) DeviceGetGspFirmwareVersion(device nvml.Device) (string, nvml.Return) { + if mock.DeviceGetGspFirmwareVersionFunc == nil { + panic("Interface.DeviceGetGspFirmwareVersionFunc: method is nil but Interface.DeviceGetGspFirmwareVersion was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetGspFirmwareVersion.Lock() + mock.calls.DeviceGetGspFirmwareVersion = append(mock.calls.DeviceGetGspFirmwareVersion, callInfo) + mock.lockDeviceGetGspFirmwareVersion.Unlock() + return mock.DeviceGetGspFirmwareVersionFunc(device) +} + +// DeviceGetGspFirmwareVersionCalls gets all the calls that were made to DeviceGetGspFirmwareVersion. +// Check the length with: +// +// len(mockedInterface.DeviceGetGspFirmwareVersionCalls()) +func (mock *Interface) DeviceGetGspFirmwareVersionCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetGspFirmwareVersion.RLock() + calls = mock.calls.DeviceGetGspFirmwareVersion + mock.lockDeviceGetGspFirmwareVersion.RUnlock() + return calls +} + +// DeviceGetHandleByIndex calls DeviceGetHandleByIndexFunc. +func (mock *Interface) DeviceGetHandleByIndex(n int) (nvml.Device, nvml.Return) { + if mock.DeviceGetHandleByIndexFunc == nil { + panic("Interface.DeviceGetHandleByIndexFunc: method is nil but Interface.DeviceGetHandleByIndex was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockDeviceGetHandleByIndex.Lock() + mock.calls.DeviceGetHandleByIndex = append(mock.calls.DeviceGetHandleByIndex, callInfo) + mock.lockDeviceGetHandleByIndex.Unlock() + return mock.DeviceGetHandleByIndexFunc(n) +} + +// DeviceGetHandleByIndexCalls gets all the calls that were made to DeviceGetHandleByIndex. +// Check the length with: +// +// len(mockedInterface.DeviceGetHandleByIndexCalls()) +func (mock *Interface) DeviceGetHandleByIndexCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockDeviceGetHandleByIndex.RLock() + calls = mock.calls.DeviceGetHandleByIndex + mock.lockDeviceGetHandleByIndex.RUnlock() + return calls +} + +// DeviceGetHandleByPciBusId calls DeviceGetHandleByPciBusIdFunc. +func (mock *Interface) DeviceGetHandleByPciBusId(s string) (nvml.Device, nvml.Return) { + if mock.DeviceGetHandleByPciBusIdFunc == nil { + panic("Interface.DeviceGetHandleByPciBusIdFunc: method is nil but Interface.DeviceGetHandleByPciBusId was just called") + } + callInfo := struct { + S string + }{ + S: s, + } + mock.lockDeviceGetHandleByPciBusId.Lock() + mock.calls.DeviceGetHandleByPciBusId = append(mock.calls.DeviceGetHandleByPciBusId, callInfo) + mock.lockDeviceGetHandleByPciBusId.Unlock() + return mock.DeviceGetHandleByPciBusIdFunc(s) +} + +// DeviceGetHandleByPciBusIdCalls gets all the calls that were made to DeviceGetHandleByPciBusId. +// Check the length with: +// +// len(mockedInterface.DeviceGetHandleByPciBusIdCalls()) +func (mock *Interface) DeviceGetHandleByPciBusIdCalls() []struct { + S string +} { + var calls []struct { + S string + } + mock.lockDeviceGetHandleByPciBusId.RLock() + calls = mock.calls.DeviceGetHandleByPciBusId + mock.lockDeviceGetHandleByPciBusId.RUnlock() + return calls +} + +// DeviceGetHandleBySerial calls DeviceGetHandleBySerialFunc. +func (mock *Interface) DeviceGetHandleBySerial(s string) (nvml.Device, nvml.Return) { + if mock.DeviceGetHandleBySerialFunc == nil { + panic("Interface.DeviceGetHandleBySerialFunc: method is nil but Interface.DeviceGetHandleBySerial was just called") + } + callInfo := struct { + S string + }{ + S: s, + } + mock.lockDeviceGetHandleBySerial.Lock() + mock.calls.DeviceGetHandleBySerial = append(mock.calls.DeviceGetHandleBySerial, callInfo) + mock.lockDeviceGetHandleBySerial.Unlock() + return mock.DeviceGetHandleBySerialFunc(s) +} + +// DeviceGetHandleBySerialCalls gets all the calls that were made to DeviceGetHandleBySerial. +// Check the length with: +// +// len(mockedInterface.DeviceGetHandleBySerialCalls()) +func (mock *Interface) DeviceGetHandleBySerialCalls() []struct { + S string +} { + var calls []struct { + S string + } + mock.lockDeviceGetHandleBySerial.RLock() + calls = mock.calls.DeviceGetHandleBySerial + mock.lockDeviceGetHandleBySerial.RUnlock() + return calls +} + +// DeviceGetHandleByUUID calls DeviceGetHandleByUUIDFunc. +func (mock *Interface) DeviceGetHandleByUUID(s string) (nvml.Device, nvml.Return) { + if mock.DeviceGetHandleByUUIDFunc == nil { + panic("Interface.DeviceGetHandleByUUIDFunc: method is nil but Interface.DeviceGetHandleByUUID was just called") + } + callInfo := struct { + S string + }{ + S: s, + } + mock.lockDeviceGetHandleByUUID.Lock() + mock.calls.DeviceGetHandleByUUID = append(mock.calls.DeviceGetHandleByUUID, callInfo) + mock.lockDeviceGetHandleByUUID.Unlock() + return mock.DeviceGetHandleByUUIDFunc(s) +} + +// DeviceGetHandleByUUIDCalls gets all the calls that were made to DeviceGetHandleByUUID. +// Check the length with: +// +// len(mockedInterface.DeviceGetHandleByUUIDCalls()) +func (mock *Interface) DeviceGetHandleByUUIDCalls() []struct { + S string +} { + var calls []struct { + S string + } + mock.lockDeviceGetHandleByUUID.RLock() + calls = mock.calls.DeviceGetHandleByUUID + mock.lockDeviceGetHandleByUUID.RUnlock() + return calls +} + +// DeviceGetHandleByUUIDV calls DeviceGetHandleByUUIDVFunc. +func (mock *Interface) DeviceGetHandleByUUIDV(uUID *nvml.UUID) (nvml.Device, nvml.Return) { + if mock.DeviceGetHandleByUUIDVFunc == nil { + panic("Interface.DeviceGetHandleByUUIDVFunc: method is nil but Interface.DeviceGetHandleByUUIDV was just called") + } + callInfo := struct { + UUID *nvml.UUID + }{ + UUID: uUID, + } + mock.lockDeviceGetHandleByUUIDV.Lock() + mock.calls.DeviceGetHandleByUUIDV = append(mock.calls.DeviceGetHandleByUUIDV, callInfo) + mock.lockDeviceGetHandleByUUIDV.Unlock() + return mock.DeviceGetHandleByUUIDVFunc(uUID) +} + +// DeviceGetHandleByUUIDVCalls gets all the calls that were made to DeviceGetHandleByUUIDV. +// Check the length with: +// +// len(mockedInterface.DeviceGetHandleByUUIDVCalls()) +func (mock *Interface) DeviceGetHandleByUUIDVCalls() []struct { + UUID *nvml.UUID +} { + var calls []struct { + UUID *nvml.UUID + } + mock.lockDeviceGetHandleByUUIDV.RLock() + calls = mock.calls.DeviceGetHandleByUUIDV + mock.lockDeviceGetHandleByUUIDV.RUnlock() + return calls +} + +// DeviceGetHostVgpuMode calls DeviceGetHostVgpuModeFunc. +func (mock *Interface) DeviceGetHostVgpuMode(device nvml.Device) (nvml.HostVgpuMode, nvml.Return) { + if mock.DeviceGetHostVgpuModeFunc == nil { + panic("Interface.DeviceGetHostVgpuModeFunc: method is nil but Interface.DeviceGetHostVgpuMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetHostVgpuMode.Lock() + mock.calls.DeviceGetHostVgpuMode = append(mock.calls.DeviceGetHostVgpuMode, callInfo) + mock.lockDeviceGetHostVgpuMode.Unlock() + return mock.DeviceGetHostVgpuModeFunc(device) +} + +// DeviceGetHostVgpuModeCalls gets all the calls that were made to DeviceGetHostVgpuMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetHostVgpuModeCalls()) +func (mock *Interface) DeviceGetHostVgpuModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetHostVgpuMode.RLock() + calls = mock.calls.DeviceGetHostVgpuMode + mock.lockDeviceGetHostVgpuMode.RUnlock() + return calls +} + +// DeviceGetIndex calls DeviceGetIndexFunc. +func (mock *Interface) DeviceGetIndex(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetIndexFunc == nil { + panic("Interface.DeviceGetIndexFunc: method is nil but Interface.DeviceGetIndex was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetIndex.Lock() + mock.calls.DeviceGetIndex = append(mock.calls.DeviceGetIndex, callInfo) + mock.lockDeviceGetIndex.Unlock() + return mock.DeviceGetIndexFunc(device) +} + +// DeviceGetIndexCalls gets all the calls that were made to DeviceGetIndex. +// Check the length with: +// +// len(mockedInterface.DeviceGetIndexCalls()) +func (mock *Interface) DeviceGetIndexCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetIndex.RLock() + calls = mock.calls.DeviceGetIndex + mock.lockDeviceGetIndex.RUnlock() + return calls +} + +// DeviceGetInforomConfigurationChecksum calls DeviceGetInforomConfigurationChecksumFunc. +func (mock *Interface) DeviceGetInforomConfigurationChecksum(device nvml.Device) (uint32, nvml.Return) { + if mock.DeviceGetInforomConfigurationChecksumFunc == nil { + panic("Interface.DeviceGetInforomConfigurationChecksumFunc: method is nil but Interface.DeviceGetInforomConfigurationChecksum was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetInforomConfigurationChecksum.Lock() + mock.calls.DeviceGetInforomConfigurationChecksum = append(mock.calls.DeviceGetInforomConfigurationChecksum, callInfo) + mock.lockDeviceGetInforomConfigurationChecksum.Unlock() + return mock.DeviceGetInforomConfigurationChecksumFunc(device) +} + +// DeviceGetInforomConfigurationChecksumCalls gets all the calls that were made to DeviceGetInforomConfigurationChecksum. +// Check the length with: +// +// len(mockedInterface.DeviceGetInforomConfigurationChecksumCalls()) +func (mock *Interface) DeviceGetInforomConfigurationChecksumCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetInforomConfigurationChecksum.RLock() + calls = mock.calls.DeviceGetInforomConfigurationChecksum + mock.lockDeviceGetInforomConfigurationChecksum.RUnlock() + return calls +} + +// DeviceGetInforomImageVersion calls DeviceGetInforomImageVersionFunc. +func (mock *Interface) DeviceGetInforomImageVersion(device nvml.Device) (string, nvml.Return) { + if mock.DeviceGetInforomImageVersionFunc == nil { + panic("Interface.DeviceGetInforomImageVersionFunc: method is nil but Interface.DeviceGetInforomImageVersion was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetInforomImageVersion.Lock() + mock.calls.DeviceGetInforomImageVersion = append(mock.calls.DeviceGetInforomImageVersion, callInfo) + mock.lockDeviceGetInforomImageVersion.Unlock() + return mock.DeviceGetInforomImageVersionFunc(device) +} + +// DeviceGetInforomImageVersionCalls gets all the calls that were made to DeviceGetInforomImageVersion. +// Check the length with: +// +// len(mockedInterface.DeviceGetInforomImageVersionCalls()) +func (mock *Interface) DeviceGetInforomImageVersionCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetInforomImageVersion.RLock() + calls = mock.calls.DeviceGetInforomImageVersion + mock.lockDeviceGetInforomImageVersion.RUnlock() + return calls +} + +// DeviceGetInforomVersion calls DeviceGetInforomVersionFunc. +func (mock *Interface) DeviceGetInforomVersion(device nvml.Device, inforomObject nvml.InforomObject) (string, nvml.Return) { + if mock.DeviceGetInforomVersionFunc == nil { + panic("Interface.DeviceGetInforomVersionFunc: method is nil but Interface.DeviceGetInforomVersion was just called") + } + callInfo := struct { + Device nvml.Device + InforomObject nvml.InforomObject + }{ + Device: device, + InforomObject: inforomObject, + } + mock.lockDeviceGetInforomVersion.Lock() + mock.calls.DeviceGetInforomVersion = append(mock.calls.DeviceGetInforomVersion, callInfo) + mock.lockDeviceGetInforomVersion.Unlock() + return mock.DeviceGetInforomVersionFunc(device, inforomObject) +} + +// DeviceGetInforomVersionCalls gets all the calls that were made to DeviceGetInforomVersion. +// Check the length with: +// +// len(mockedInterface.DeviceGetInforomVersionCalls()) +func (mock *Interface) DeviceGetInforomVersionCalls() []struct { + Device nvml.Device + InforomObject nvml.InforomObject +} { + var calls []struct { + Device nvml.Device + InforomObject nvml.InforomObject + } + mock.lockDeviceGetInforomVersion.RLock() + calls = mock.calls.DeviceGetInforomVersion + mock.lockDeviceGetInforomVersion.RUnlock() + return calls +} + +// DeviceGetIrqNum calls DeviceGetIrqNumFunc. +func (mock *Interface) DeviceGetIrqNum(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetIrqNumFunc == nil { + panic("Interface.DeviceGetIrqNumFunc: method is nil but Interface.DeviceGetIrqNum was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetIrqNum.Lock() + mock.calls.DeviceGetIrqNum = append(mock.calls.DeviceGetIrqNum, callInfo) + mock.lockDeviceGetIrqNum.Unlock() + return mock.DeviceGetIrqNumFunc(device) +} + +// DeviceGetIrqNumCalls gets all the calls that were made to DeviceGetIrqNum. +// Check the length with: +// +// len(mockedInterface.DeviceGetIrqNumCalls()) +func (mock *Interface) DeviceGetIrqNumCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetIrqNum.RLock() + calls = mock.calls.DeviceGetIrqNum + mock.lockDeviceGetIrqNum.RUnlock() + return calls +} + +// DeviceGetJpgUtilization calls DeviceGetJpgUtilizationFunc. +func (mock *Interface) DeviceGetJpgUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { + if mock.DeviceGetJpgUtilizationFunc == nil { + panic("Interface.DeviceGetJpgUtilizationFunc: method is nil but Interface.DeviceGetJpgUtilization was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetJpgUtilization.Lock() + mock.calls.DeviceGetJpgUtilization = append(mock.calls.DeviceGetJpgUtilization, callInfo) + mock.lockDeviceGetJpgUtilization.Unlock() + return mock.DeviceGetJpgUtilizationFunc(device) +} + +// DeviceGetJpgUtilizationCalls gets all the calls that were made to DeviceGetJpgUtilization. +// Check the length with: +// +// len(mockedInterface.DeviceGetJpgUtilizationCalls()) +func (mock *Interface) DeviceGetJpgUtilizationCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetJpgUtilization.RLock() + calls = mock.calls.DeviceGetJpgUtilization + mock.lockDeviceGetJpgUtilization.RUnlock() + return calls +} + +// DeviceGetLastBBXFlushTime calls DeviceGetLastBBXFlushTimeFunc. +func (mock *Interface) DeviceGetLastBBXFlushTime(device nvml.Device) (uint64, uint, nvml.Return) { + if mock.DeviceGetLastBBXFlushTimeFunc == nil { + panic("Interface.DeviceGetLastBBXFlushTimeFunc: method is nil but Interface.DeviceGetLastBBXFlushTime was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetLastBBXFlushTime.Lock() + mock.calls.DeviceGetLastBBXFlushTime = append(mock.calls.DeviceGetLastBBXFlushTime, callInfo) + mock.lockDeviceGetLastBBXFlushTime.Unlock() + return mock.DeviceGetLastBBXFlushTimeFunc(device) +} + +// DeviceGetLastBBXFlushTimeCalls gets all the calls that were made to DeviceGetLastBBXFlushTime. +// Check the length with: +// +// len(mockedInterface.DeviceGetLastBBXFlushTimeCalls()) +func (mock *Interface) DeviceGetLastBBXFlushTimeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetLastBBXFlushTime.RLock() + calls = mock.calls.DeviceGetLastBBXFlushTime + mock.lockDeviceGetLastBBXFlushTime.RUnlock() + return calls +} + +// DeviceGetMPSComputeRunningProcesses calls DeviceGetMPSComputeRunningProcessesFunc. +func (mock *Interface) DeviceGetMPSComputeRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { + if mock.DeviceGetMPSComputeRunningProcessesFunc == nil { + panic("Interface.DeviceGetMPSComputeRunningProcessesFunc: method is nil but Interface.DeviceGetMPSComputeRunningProcesses was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMPSComputeRunningProcesses.Lock() + mock.calls.DeviceGetMPSComputeRunningProcesses = append(mock.calls.DeviceGetMPSComputeRunningProcesses, callInfo) + mock.lockDeviceGetMPSComputeRunningProcesses.Unlock() + return mock.DeviceGetMPSComputeRunningProcessesFunc(device) +} + +// DeviceGetMPSComputeRunningProcessesCalls gets all the calls that were made to DeviceGetMPSComputeRunningProcesses. +// Check the length with: +// +// len(mockedInterface.DeviceGetMPSComputeRunningProcessesCalls()) +func (mock *Interface) DeviceGetMPSComputeRunningProcessesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMPSComputeRunningProcesses.RLock() + calls = mock.calls.DeviceGetMPSComputeRunningProcesses + mock.lockDeviceGetMPSComputeRunningProcesses.RUnlock() + return calls +} + +// DeviceGetMarginTemperature calls DeviceGetMarginTemperatureFunc. +func (mock *Interface) DeviceGetMarginTemperature(device nvml.Device) (nvml.MarginTemperature, nvml.Return) { + if mock.DeviceGetMarginTemperatureFunc == nil { + panic("Interface.DeviceGetMarginTemperatureFunc: method is nil but Interface.DeviceGetMarginTemperature was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMarginTemperature.Lock() + mock.calls.DeviceGetMarginTemperature = append(mock.calls.DeviceGetMarginTemperature, callInfo) + mock.lockDeviceGetMarginTemperature.Unlock() + return mock.DeviceGetMarginTemperatureFunc(device) +} + +// DeviceGetMarginTemperatureCalls gets all the calls that were made to DeviceGetMarginTemperature. +// Check the length with: +// +// len(mockedInterface.DeviceGetMarginTemperatureCalls()) +func (mock *Interface) DeviceGetMarginTemperatureCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMarginTemperature.RLock() + calls = mock.calls.DeviceGetMarginTemperature + mock.lockDeviceGetMarginTemperature.RUnlock() + return calls +} + +// DeviceGetMaxClockInfo calls DeviceGetMaxClockInfoFunc. +func (mock *Interface) DeviceGetMaxClockInfo(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { + if mock.DeviceGetMaxClockInfoFunc == nil { + panic("Interface.DeviceGetMaxClockInfoFunc: method is nil but Interface.DeviceGetMaxClockInfo was just called") + } + callInfo := struct { + Device nvml.Device + ClockType nvml.ClockType + }{ + Device: device, + ClockType: clockType, + } + mock.lockDeviceGetMaxClockInfo.Lock() + mock.calls.DeviceGetMaxClockInfo = append(mock.calls.DeviceGetMaxClockInfo, callInfo) + mock.lockDeviceGetMaxClockInfo.Unlock() + return mock.DeviceGetMaxClockInfoFunc(device, clockType) +} + +// DeviceGetMaxClockInfoCalls gets all the calls that were made to DeviceGetMaxClockInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetMaxClockInfoCalls()) +func (mock *Interface) DeviceGetMaxClockInfoCalls() []struct { + Device nvml.Device + ClockType nvml.ClockType +} { + var calls []struct { + Device nvml.Device + ClockType nvml.ClockType + } + mock.lockDeviceGetMaxClockInfo.RLock() + calls = mock.calls.DeviceGetMaxClockInfo + mock.lockDeviceGetMaxClockInfo.RUnlock() + return calls +} + +// DeviceGetMaxCustomerBoostClock calls DeviceGetMaxCustomerBoostClockFunc. +func (mock *Interface) DeviceGetMaxCustomerBoostClock(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { + if mock.DeviceGetMaxCustomerBoostClockFunc == nil { + panic("Interface.DeviceGetMaxCustomerBoostClockFunc: method is nil but Interface.DeviceGetMaxCustomerBoostClock was just called") + } + callInfo := struct { + Device nvml.Device + ClockType nvml.ClockType + }{ + Device: device, + ClockType: clockType, + } + mock.lockDeviceGetMaxCustomerBoostClock.Lock() + mock.calls.DeviceGetMaxCustomerBoostClock = append(mock.calls.DeviceGetMaxCustomerBoostClock, callInfo) + mock.lockDeviceGetMaxCustomerBoostClock.Unlock() + return mock.DeviceGetMaxCustomerBoostClockFunc(device, clockType) +} + +// DeviceGetMaxCustomerBoostClockCalls gets all the calls that were made to DeviceGetMaxCustomerBoostClock. +// Check the length with: +// +// len(mockedInterface.DeviceGetMaxCustomerBoostClockCalls()) +func (mock *Interface) DeviceGetMaxCustomerBoostClockCalls() []struct { + Device nvml.Device + ClockType nvml.ClockType +} { + var calls []struct { + Device nvml.Device + ClockType nvml.ClockType + } + mock.lockDeviceGetMaxCustomerBoostClock.RLock() + calls = mock.calls.DeviceGetMaxCustomerBoostClock + mock.lockDeviceGetMaxCustomerBoostClock.RUnlock() + return calls +} + +// DeviceGetMaxMigDeviceCount calls DeviceGetMaxMigDeviceCountFunc. +func (mock *Interface) DeviceGetMaxMigDeviceCount(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetMaxMigDeviceCountFunc == nil { + panic("Interface.DeviceGetMaxMigDeviceCountFunc: method is nil but Interface.DeviceGetMaxMigDeviceCount was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMaxMigDeviceCount.Lock() + mock.calls.DeviceGetMaxMigDeviceCount = append(mock.calls.DeviceGetMaxMigDeviceCount, callInfo) + mock.lockDeviceGetMaxMigDeviceCount.Unlock() + return mock.DeviceGetMaxMigDeviceCountFunc(device) +} + +// DeviceGetMaxMigDeviceCountCalls gets all the calls that were made to DeviceGetMaxMigDeviceCount. +// Check the length with: +// +// len(mockedInterface.DeviceGetMaxMigDeviceCountCalls()) +func (mock *Interface) DeviceGetMaxMigDeviceCountCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMaxMigDeviceCount.RLock() + calls = mock.calls.DeviceGetMaxMigDeviceCount + mock.lockDeviceGetMaxMigDeviceCount.RUnlock() + return calls +} + +// DeviceGetMaxPcieLinkGeneration calls DeviceGetMaxPcieLinkGenerationFunc. +func (mock *Interface) DeviceGetMaxPcieLinkGeneration(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetMaxPcieLinkGenerationFunc == nil { + panic("Interface.DeviceGetMaxPcieLinkGenerationFunc: method is nil but Interface.DeviceGetMaxPcieLinkGeneration was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMaxPcieLinkGeneration.Lock() + mock.calls.DeviceGetMaxPcieLinkGeneration = append(mock.calls.DeviceGetMaxPcieLinkGeneration, callInfo) + mock.lockDeviceGetMaxPcieLinkGeneration.Unlock() + return mock.DeviceGetMaxPcieLinkGenerationFunc(device) +} + +// DeviceGetMaxPcieLinkGenerationCalls gets all the calls that were made to DeviceGetMaxPcieLinkGeneration. +// Check the length with: +// +// len(mockedInterface.DeviceGetMaxPcieLinkGenerationCalls()) +func (mock *Interface) DeviceGetMaxPcieLinkGenerationCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMaxPcieLinkGeneration.RLock() + calls = mock.calls.DeviceGetMaxPcieLinkGeneration + mock.lockDeviceGetMaxPcieLinkGeneration.RUnlock() + return calls +} + +// DeviceGetMaxPcieLinkWidth calls DeviceGetMaxPcieLinkWidthFunc. +func (mock *Interface) DeviceGetMaxPcieLinkWidth(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetMaxPcieLinkWidthFunc == nil { + panic("Interface.DeviceGetMaxPcieLinkWidthFunc: method is nil but Interface.DeviceGetMaxPcieLinkWidth was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMaxPcieLinkWidth.Lock() + mock.calls.DeviceGetMaxPcieLinkWidth = append(mock.calls.DeviceGetMaxPcieLinkWidth, callInfo) + mock.lockDeviceGetMaxPcieLinkWidth.Unlock() + return mock.DeviceGetMaxPcieLinkWidthFunc(device) +} + +// DeviceGetMaxPcieLinkWidthCalls gets all the calls that were made to DeviceGetMaxPcieLinkWidth. +// Check the length with: +// +// len(mockedInterface.DeviceGetMaxPcieLinkWidthCalls()) +func (mock *Interface) DeviceGetMaxPcieLinkWidthCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMaxPcieLinkWidth.RLock() + calls = mock.calls.DeviceGetMaxPcieLinkWidth + mock.lockDeviceGetMaxPcieLinkWidth.RUnlock() + return calls +} + +// DeviceGetMemClkMinMaxVfOffset calls DeviceGetMemClkMinMaxVfOffsetFunc. +func (mock *Interface) DeviceGetMemClkMinMaxVfOffset(device nvml.Device) (int, int, nvml.Return) { + if mock.DeviceGetMemClkMinMaxVfOffsetFunc == nil { + panic("Interface.DeviceGetMemClkMinMaxVfOffsetFunc: method is nil but Interface.DeviceGetMemClkMinMaxVfOffset was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMemClkMinMaxVfOffset.Lock() + mock.calls.DeviceGetMemClkMinMaxVfOffset = append(mock.calls.DeviceGetMemClkMinMaxVfOffset, callInfo) + mock.lockDeviceGetMemClkMinMaxVfOffset.Unlock() + return mock.DeviceGetMemClkMinMaxVfOffsetFunc(device) +} + +// DeviceGetMemClkMinMaxVfOffsetCalls gets all the calls that were made to DeviceGetMemClkMinMaxVfOffset. +// Check the length with: +// +// len(mockedInterface.DeviceGetMemClkMinMaxVfOffsetCalls()) +func (mock *Interface) DeviceGetMemClkMinMaxVfOffsetCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMemClkMinMaxVfOffset.RLock() + calls = mock.calls.DeviceGetMemClkMinMaxVfOffset + mock.lockDeviceGetMemClkMinMaxVfOffset.RUnlock() + return calls +} + +// DeviceGetMemClkVfOffset calls DeviceGetMemClkVfOffsetFunc. +func (mock *Interface) DeviceGetMemClkVfOffset(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetMemClkVfOffsetFunc == nil { + panic("Interface.DeviceGetMemClkVfOffsetFunc: method is nil but Interface.DeviceGetMemClkVfOffset was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMemClkVfOffset.Lock() + mock.calls.DeviceGetMemClkVfOffset = append(mock.calls.DeviceGetMemClkVfOffset, callInfo) + mock.lockDeviceGetMemClkVfOffset.Unlock() + return mock.DeviceGetMemClkVfOffsetFunc(device) +} + +// DeviceGetMemClkVfOffsetCalls gets all the calls that were made to DeviceGetMemClkVfOffset. +// Check the length with: +// +// len(mockedInterface.DeviceGetMemClkVfOffsetCalls()) +func (mock *Interface) DeviceGetMemClkVfOffsetCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMemClkVfOffset.RLock() + calls = mock.calls.DeviceGetMemClkVfOffset + mock.lockDeviceGetMemClkVfOffset.RUnlock() + return calls +} + +// DeviceGetMemoryAffinity calls DeviceGetMemoryAffinityFunc. +func (mock *Interface) DeviceGetMemoryAffinity(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { + if mock.DeviceGetMemoryAffinityFunc == nil { + panic("Interface.DeviceGetMemoryAffinityFunc: method is nil but Interface.DeviceGetMemoryAffinity was just called") + } + callInfo := struct { + Device nvml.Device + N int + AffinityScope nvml.AffinityScope + }{ + Device: device, + N: n, + AffinityScope: affinityScope, + } + mock.lockDeviceGetMemoryAffinity.Lock() + mock.calls.DeviceGetMemoryAffinity = append(mock.calls.DeviceGetMemoryAffinity, callInfo) + mock.lockDeviceGetMemoryAffinity.Unlock() + return mock.DeviceGetMemoryAffinityFunc(device, n, affinityScope) +} + +// DeviceGetMemoryAffinityCalls gets all the calls that were made to DeviceGetMemoryAffinity. +// Check the length with: +// +// len(mockedInterface.DeviceGetMemoryAffinityCalls()) +func (mock *Interface) DeviceGetMemoryAffinityCalls() []struct { + Device nvml.Device + N int + AffinityScope nvml.AffinityScope +} { + var calls []struct { + Device nvml.Device + N int + AffinityScope nvml.AffinityScope + } + mock.lockDeviceGetMemoryAffinity.RLock() + calls = mock.calls.DeviceGetMemoryAffinity + mock.lockDeviceGetMemoryAffinity.RUnlock() + return calls +} + +// DeviceGetMemoryBusWidth calls DeviceGetMemoryBusWidthFunc. +func (mock *Interface) DeviceGetMemoryBusWidth(device nvml.Device) (uint32, nvml.Return) { + if mock.DeviceGetMemoryBusWidthFunc == nil { + panic("Interface.DeviceGetMemoryBusWidthFunc: method is nil but Interface.DeviceGetMemoryBusWidth was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMemoryBusWidth.Lock() + mock.calls.DeviceGetMemoryBusWidth = append(mock.calls.DeviceGetMemoryBusWidth, callInfo) + mock.lockDeviceGetMemoryBusWidth.Unlock() + return mock.DeviceGetMemoryBusWidthFunc(device) +} + +// DeviceGetMemoryBusWidthCalls gets all the calls that were made to DeviceGetMemoryBusWidth. +// Check the length with: +// +// len(mockedInterface.DeviceGetMemoryBusWidthCalls()) +func (mock *Interface) DeviceGetMemoryBusWidthCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMemoryBusWidth.RLock() + calls = mock.calls.DeviceGetMemoryBusWidth + mock.lockDeviceGetMemoryBusWidth.RUnlock() + return calls +} + +// DeviceGetMemoryErrorCounter calls DeviceGetMemoryErrorCounterFunc. +func (mock *Interface) DeviceGetMemoryErrorCounter(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) { + if mock.DeviceGetMemoryErrorCounterFunc == nil { + panic("Interface.DeviceGetMemoryErrorCounterFunc: method is nil but Interface.DeviceGetMemoryErrorCounter was just called") + } + callInfo := struct { + Device nvml.Device + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + MemoryLocation nvml.MemoryLocation + }{ + Device: device, + MemoryErrorType: memoryErrorType, + EccCounterType: eccCounterType, + MemoryLocation: memoryLocation, + } + mock.lockDeviceGetMemoryErrorCounter.Lock() + mock.calls.DeviceGetMemoryErrorCounter = append(mock.calls.DeviceGetMemoryErrorCounter, callInfo) + mock.lockDeviceGetMemoryErrorCounter.Unlock() + return mock.DeviceGetMemoryErrorCounterFunc(device, memoryErrorType, eccCounterType, memoryLocation) +} + +// DeviceGetMemoryErrorCounterCalls gets all the calls that were made to DeviceGetMemoryErrorCounter. +// Check the length with: +// +// len(mockedInterface.DeviceGetMemoryErrorCounterCalls()) +func (mock *Interface) DeviceGetMemoryErrorCounterCalls() []struct { + Device nvml.Device + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + MemoryLocation nvml.MemoryLocation +} { + var calls []struct { + Device nvml.Device + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + MemoryLocation nvml.MemoryLocation + } + mock.lockDeviceGetMemoryErrorCounter.RLock() + calls = mock.calls.DeviceGetMemoryErrorCounter + mock.lockDeviceGetMemoryErrorCounter.RUnlock() + return calls +} + +// DeviceGetMemoryInfo calls DeviceGetMemoryInfoFunc. +func (mock *Interface) DeviceGetMemoryInfo(device nvml.Device) (nvml.Memory, nvml.Return) { + if mock.DeviceGetMemoryInfoFunc == nil { + panic("Interface.DeviceGetMemoryInfoFunc: method is nil but Interface.DeviceGetMemoryInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMemoryInfo.Lock() + mock.calls.DeviceGetMemoryInfo = append(mock.calls.DeviceGetMemoryInfo, callInfo) + mock.lockDeviceGetMemoryInfo.Unlock() + return mock.DeviceGetMemoryInfoFunc(device) +} + +// DeviceGetMemoryInfoCalls gets all the calls that were made to DeviceGetMemoryInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetMemoryInfoCalls()) +func (mock *Interface) DeviceGetMemoryInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMemoryInfo.RLock() + calls = mock.calls.DeviceGetMemoryInfo + mock.lockDeviceGetMemoryInfo.RUnlock() + return calls +} + +// DeviceGetMemoryInfo_v2 calls DeviceGetMemoryInfo_v2Func. +func (mock *Interface) DeviceGetMemoryInfo_v2(device nvml.Device) (nvml.Memory_v2, nvml.Return) { + if mock.DeviceGetMemoryInfo_v2Func == nil { + panic("Interface.DeviceGetMemoryInfo_v2Func: method is nil but Interface.DeviceGetMemoryInfo_v2 was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMemoryInfo_v2.Lock() + mock.calls.DeviceGetMemoryInfo_v2 = append(mock.calls.DeviceGetMemoryInfo_v2, callInfo) + mock.lockDeviceGetMemoryInfo_v2.Unlock() + return mock.DeviceGetMemoryInfo_v2Func(device) +} + +// DeviceGetMemoryInfo_v2Calls gets all the calls that were made to DeviceGetMemoryInfo_v2. +// Check the length with: +// +// len(mockedInterface.DeviceGetMemoryInfo_v2Calls()) +func (mock *Interface) DeviceGetMemoryInfo_v2Calls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMemoryInfo_v2.RLock() + calls = mock.calls.DeviceGetMemoryInfo_v2 + mock.lockDeviceGetMemoryInfo_v2.RUnlock() + return calls +} + +// DeviceGetMigDeviceHandleByIndex calls DeviceGetMigDeviceHandleByIndexFunc. +func (mock *Interface) DeviceGetMigDeviceHandleByIndex(device nvml.Device, n int) (nvml.Device, nvml.Return) { + if mock.DeviceGetMigDeviceHandleByIndexFunc == nil { + panic("Interface.DeviceGetMigDeviceHandleByIndexFunc: method is nil but Interface.DeviceGetMigDeviceHandleByIndex was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetMigDeviceHandleByIndex.Lock() + mock.calls.DeviceGetMigDeviceHandleByIndex = append(mock.calls.DeviceGetMigDeviceHandleByIndex, callInfo) + mock.lockDeviceGetMigDeviceHandleByIndex.Unlock() + return mock.DeviceGetMigDeviceHandleByIndexFunc(device, n) +} + +// DeviceGetMigDeviceHandleByIndexCalls gets all the calls that were made to DeviceGetMigDeviceHandleByIndex. +// Check the length with: +// +// len(mockedInterface.DeviceGetMigDeviceHandleByIndexCalls()) +func (mock *Interface) DeviceGetMigDeviceHandleByIndexCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetMigDeviceHandleByIndex.RLock() + calls = mock.calls.DeviceGetMigDeviceHandleByIndex + mock.lockDeviceGetMigDeviceHandleByIndex.RUnlock() + return calls +} + +// DeviceGetMigMode calls DeviceGetMigModeFunc. +func (mock *Interface) DeviceGetMigMode(device nvml.Device) (int, int, nvml.Return) { + if mock.DeviceGetMigModeFunc == nil { + panic("Interface.DeviceGetMigModeFunc: method is nil but Interface.DeviceGetMigMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMigMode.Lock() + mock.calls.DeviceGetMigMode = append(mock.calls.DeviceGetMigMode, callInfo) + mock.lockDeviceGetMigMode.Unlock() + return mock.DeviceGetMigModeFunc(device) +} + +// DeviceGetMigModeCalls gets all the calls that were made to DeviceGetMigMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetMigModeCalls()) +func (mock *Interface) DeviceGetMigModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMigMode.RLock() + calls = mock.calls.DeviceGetMigMode + mock.lockDeviceGetMigMode.RUnlock() + return calls +} + +// DeviceGetMinMaxClockOfPState calls DeviceGetMinMaxClockOfPStateFunc. +func (mock *Interface) DeviceGetMinMaxClockOfPState(device nvml.Device, clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) { + if mock.DeviceGetMinMaxClockOfPStateFunc == nil { + panic("Interface.DeviceGetMinMaxClockOfPStateFunc: method is nil but Interface.DeviceGetMinMaxClockOfPState was just called") + } + callInfo := struct { + Device nvml.Device + ClockType nvml.ClockType + Pstates nvml.Pstates + }{ + Device: device, + ClockType: clockType, + Pstates: pstates, + } + mock.lockDeviceGetMinMaxClockOfPState.Lock() + mock.calls.DeviceGetMinMaxClockOfPState = append(mock.calls.DeviceGetMinMaxClockOfPState, callInfo) + mock.lockDeviceGetMinMaxClockOfPState.Unlock() + return mock.DeviceGetMinMaxClockOfPStateFunc(device, clockType, pstates) +} + +// DeviceGetMinMaxClockOfPStateCalls gets all the calls that were made to DeviceGetMinMaxClockOfPState. +// Check the length with: +// +// len(mockedInterface.DeviceGetMinMaxClockOfPStateCalls()) +func (mock *Interface) DeviceGetMinMaxClockOfPStateCalls() []struct { + Device nvml.Device + ClockType nvml.ClockType + Pstates nvml.Pstates +} { + var calls []struct { + Device nvml.Device + ClockType nvml.ClockType + Pstates nvml.Pstates + } + mock.lockDeviceGetMinMaxClockOfPState.RLock() + calls = mock.calls.DeviceGetMinMaxClockOfPState + mock.lockDeviceGetMinMaxClockOfPState.RUnlock() + return calls +} + +// DeviceGetMinMaxFanSpeed calls DeviceGetMinMaxFanSpeedFunc. +func (mock *Interface) DeviceGetMinMaxFanSpeed(device nvml.Device) (int, int, nvml.Return) { + if mock.DeviceGetMinMaxFanSpeedFunc == nil { + panic("Interface.DeviceGetMinMaxFanSpeedFunc: method is nil but Interface.DeviceGetMinMaxFanSpeed was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMinMaxFanSpeed.Lock() + mock.calls.DeviceGetMinMaxFanSpeed = append(mock.calls.DeviceGetMinMaxFanSpeed, callInfo) + mock.lockDeviceGetMinMaxFanSpeed.Unlock() + return mock.DeviceGetMinMaxFanSpeedFunc(device) +} + +// DeviceGetMinMaxFanSpeedCalls gets all the calls that were made to DeviceGetMinMaxFanSpeed. +// Check the length with: +// +// len(mockedInterface.DeviceGetMinMaxFanSpeedCalls()) +func (mock *Interface) DeviceGetMinMaxFanSpeedCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMinMaxFanSpeed.RLock() + calls = mock.calls.DeviceGetMinMaxFanSpeed + mock.lockDeviceGetMinMaxFanSpeed.RUnlock() + return calls +} + +// DeviceGetMinorNumber calls DeviceGetMinorNumberFunc. +func (mock *Interface) DeviceGetMinorNumber(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetMinorNumberFunc == nil { + panic("Interface.DeviceGetMinorNumberFunc: method is nil but Interface.DeviceGetMinorNumber was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMinorNumber.Lock() + mock.calls.DeviceGetMinorNumber = append(mock.calls.DeviceGetMinorNumber, callInfo) + mock.lockDeviceGetMinorNumber.Unlock() + return mock.DeviceGetMinorNumberFunc(device) +} + +// DeviceGetMinorNumberCalls gets all the calls that were made to DeviceGetMinorNumber. +// Check the length with: +// +// len(mockedInterface.DeviceGetMinorNumberCalls()) +func (mock *Interface) DeviceGetMinorNumberCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMinorNumber.RLock() + calls = mock.calls.DeviceGetMinorNumber + mock.lockDeviceGetMinorNumber.RUnlock() + return calls +} + +// DeviceGetModuleId calls DeviceGetModuleIdFunc. +func (mock *Interface) DeviceGetModuleId(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetModuleIdFunc == nil { + panic("Interface.DeviceGetModuleIdFunc: method is nil but Interface.DeviceGetModuleId was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetModuleId.Lock() + mock.calls.DeviceGetModuleId = append(mock.calls.DeviceGetModuleId, callInfo) + mock.lockDeviceGetModuleId.Unlock() + return mock.DeviceGetModuleIdFunc(device) +} + +// DeviceGetModuleIdCalls gets all the calls that were made to DeviceGetModuleId. +// Check the length with: +// +// len(mockedInterface.DeviceGetModuleIdCalls()) +func (mock *Interface) DeviceGetModuleIdCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetModuleId.RLock() + calls = mock.calls.DeviceGetModuleId + mock.lockDeviceGetModuleId.RUnlock() + return calls +} + +// DeviceGetMultiGpuBoard calls DeviceGetMultiGpuBoardFunc. +func (mock *Interface) DeviceGetMultiGpuBoard(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetMultiGpuBoardFunc == nil { + panic("Interface.DeviceGetMultiGpuBoardFunc: method is nil but Interface.DeviceGetMultiGpuBoard was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetMultiGpuBoard.Lock() + mock.calls.DeviceGetMultiGpuBoard = append(mock.calls.DeviceGetMultiGpuBoard, callInfo) + mock.lockDeviceGetMultiGpuBoard.Unlock() + return mock.DeviceGetMultiGpuBoardFunc(device) +} + +// DeviceGetMultiGpuBoardCalls gets all the calls that were made to DeviceGetMultiGpuBoard. +// Check the length with: +// +// len(mockedInterface.DeviceGetMultiGpuBoardCalls()) +func (mock *Interface) DeviceGetMultiGpuBoardCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetMultiGpuBoard.RLock() + calls = mock.calls.DeviceGetMultiGpuBoard + mock.lockDeviceGetMultiGpuBoard.RUnlock() + return calls +} + +// DeviceGetName calls DeviceGetNameFunc. +func (mock *Interface) DeviceGetName(device nvml.Device) (string, nvml.Return) { + if mock.DeviceGetNameFunc == nil { + panic("Interface.DeviceGetNameFunc: method is nil but Interface.DeviceGetName was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetName.Lock() + mock.calls.DeviceGetName = append(mock.calls.DeviceGetName, callInfo) + mock.lockDeviceGetName.Unlock() + return mock.DeviceGetNameFunc(device) +} + +// DeviceGetNameCalls gets all the calls that were made to DeviceGetName. +// Check the length with: +// +// len(mockedInterface.DeviceGetNameCalls()) +func (mock *Interface) DeviceGetNameCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetName.RLock() + calls = mock.calls.DeviceGetName + mock.lockDeviceGetName.RUnlock() + return calls +} + +// DeviceGetNumFans calls DeviceGetNumFansFunc. +func (mock *Interface) DeviceGetNumFans(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetNumFansFunc == nil { + panic("Interface.DeviceGetNumFansFunc: method is nil but Interface.DeviceGetNumFans was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetNumFans.Lock() + mock.calls.DeviceGetNumFans = append(mock.calls.DeviceGetNumFans, callInfo) + mock.lockDeviceGetNumFans.Unlock() + return mock.DeviceGetNumFansFunc(device) +} + +// DeviceGetNumFansCalls gets all the calls that were made to DeviceGetNumFans. +// Check the length with: +// +// len(mockedInterface.DeviceGetNumFansCalls()) +func (mock *Interface) DeviceGetNumFansCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetNumFans.RLock() + calls = mock.calls.DeviceGetNumFans + mock.lockDeviceGetNumFans.RUnlock() + return calls +} + +// DeviceGetNumGpuCores calls DeviceGetNumGpuCoresFunc. +func (mock *Interface) DeviceGetNumGpuCores(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetNumGpuCoresFunc == nil { + panic("Interface.DeviceGetNumGpuCoresFunc: method is nil but Interface.DeviceGetNumGpuCores was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetNumGpuCores.Lock() + mock.calls.DeviceGetNumGpuCores = append(mock.calls.DeviceGetNumGpuCores, callInfo) + mock.lockDeviceGetNumGpuCores.Unlock() + return mock.DeviceGetNumGpuCoresFunc(device) +} + +// DeviceGetNumGpuCoresCalls gets all the calls that were made to DeviceGetNumGpuCores. +// Check the length with: +// +// len(mockedInterface.DeviceGetNumGpuCoresCalls()) +func (mock *Interface) DeviceGetNumGpuCoresCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetNumGpuCores.RLock() + calls = mock.calls.DeviceGetNumGpuCores + mock.lockDeviceGetNumGpuCores.RUnlock() + return calls +} + +// DeviceGetNumaNodeId calls DeviceGetNumaNodeIdFunc. +func (mock *Interface) DeviceGetNumaNodeId(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetNumaNodeIdFunc == nil { + panic("Interface.DeviceGetNumaNodeIdFunc: method is nil but Interface.DeviceGetNumaNodeId was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetNumaNodeId.Lock() + mock.calls.DeviceGetNumaNodeId = append(mock.calls.DeviceGetNumaNodeId, callInfo) + mock.lockDeviceGetNumaNodeId.Unlock() + return mock.DeviceGetNumaNodeIdFunc(device) +} + +// DeviceGetNumaNodeIdCalls gets all the calls that were made to DeviceGetNumaNodeId. +// Check the length with: +// +// len(mockedInterface.DeviceGetNumaNodeIdCalls()) +func (mock *Interface) DeviceGetNumaNodeIdCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetNumaNodeId.RLock() + calls = mock.calls.DeviceGetNumaNodeId + mock.lockDeviceGetNumaNodeId.RUnlock() + return calls +} + +// DeviceGetNvLinkCapability calls DeviceGetNvLinkCapabilityFunc. +func (mock *Interface) DeviceGetNvLinkCapability(device nvml.Device, n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) { + if mock.DeviceGetNvLinkCapabilityFunc == nil { + panic("Interface.DeviceGetNvLinkCapabilityFunc: method is nil but Interface.DeviceGetNvLinkCapability was just called") + } + callInfo := struct { + Device nvml.Device + N int + NvLinkCapability nvml.NvLinkCapability + }{ + Device: device, + N: n, + NvLinkCapability: nvLinkCapability, + } + mock.lockDeviceGetNvLinkCapability.Lock() + mock.calls.DeviceGetNvLinkCapability = append(mock.calls.DeviceGetNvLinkCapability, callInfo) + mock.lockDeviceGetNvLinkCapability.Unlock() + return mock.DeviceGetNvLinkCapabilityFunc(device, n, nvLinkCapability) +} + +// DeviceGetNvLinkCapabilityCalls gets all the calls that were made to DeviceGetNvLinkCapability. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvLinkCapabilityCalls()) +func (mock *Interface) DeviceGetNvLinkCapabilityCalls() []struct { + Device nvml.Device + N int + NvLinkCapability nvml.NvLinkCapability +} { + var calls []struct { + Device nvml.Device + N int + NvLinkCapability nvml.NvLinkCapability + } + mock.lockDeviceGetNvLinkCapability.RLock() + calls = mock.calls.DeviceGetNvLinkCapability + mock.lockDeviceGetNvLinkCapability.RUnlock() + return calls +} + +// DeviceGetNvLinkErrorCounter calls DeviceGetNvLinkErrorCounterFunc. +func (mock *Interface) DeviceGetNvLinkErrorCounter(device nvml.Device, n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) { + if mock.DeviceGetNvLinkErrorCounterFunc == nil { + panic("Interface.DeviceGetNvLinkErrorCounterFunc: method is nil but Interface.DeviceGetNvLinkErrorCounter was just called") + } + callInfo := struct { + Device nvml.Device + N int + NvLinkErrorCounter nvml.NvLinkErrorCounter + }{ + Device: device, + N: n, + NvLinkErrorCounter: nvLinkErrorCounter, + } + mock.lockDeviceGetNvLinkErrorCounter.Lock() + mock.calls.DeviceGetNvLinkErrorCounter = append(mock.calls.DeviceGetNvLinkErrorCounter, callInfo) + mock.lockDeviceGetNvLinkErrorCounter.Unlock() + return mock.DeviceGetNvLinkErrorCounterFunc(device, n, nvLinkErrorCounter) +} + +// DeviceGetNvLinkErrorCounterCalls gets all the calls that were made to DeviceGetNvLinkErrorCounter. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvLinkErrorCounterCalls()) +func (mock *Interface) DeviceGetNvLinkErrorCounterCalls() []struct { + Device nvml.Device + N int + NvLinkErrorCounter nvml.NvLinkErrorCounter +} { + var calls []struct { + Device nvml.Device + N int + NvLinkErrorCounter nvml.NvLinkErrorCounter + } + mock.lockDeviceGetNvLinkErrorCounter.RLock() + calls = mock.calls.DeviceGetNvLinkErrorCounter + mock.lockDeviceGetNvLinkErrorCounter.RUnlock() + return calls +} + +// DeviceGetNvLinkInfo calls DeviceGetNvLinkInfoFunc. +func (mock *Interface) DeviceGetNvLinkInfo(device nvml.Device) nvml.NvLinkInfoHandler { + if mock.DeviceGetNvLinkInfoFunc == nil { + panic("Interface.DeviceGetNvLinkInfoFunc: method is nil but Interface.DeviceGetNvLinkInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetNvLinkInfo.Lock() + mock.calls.DeviceGetNvLinkInfo = append(mock.calls.DeviceGetNvLinkInfo, callInfo) + mock.lockDeviceGetNvLinkInfo.Unlock() + return mock.DeviceGetNvLinkInfoFunc(device) +} + +// DeviceGetNvLinkInfoCalls gets all the calls that were made to DeviceGetNvLinkInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvLinkInfoCalls()) +func (mock *Interface) DeviceGetNvLinkInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetNvLinkInfo.RLock() + calls = mock.calls.DeviceGetNvLinkInfo + mock.lockDeviceGetNvLinkInfo.RUnlock() + return calls +} + +// DeviceGetNvLinkRemoteDeviceType calls DeviceGetNvLinkRemoteDeviceTypeFunc. +func (mock *Interface) DeviceGetNvLinkRemoteDeviceType(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, nvml.Return) { + if mock.DeviceGetNvLinkRemoteDeviceTypeFunc == nil { + panic("Interface.DeviceGetNvLinkRemoteDeviceTypeFunc: method is nil but Interface.DeviceGetNvLinkRemoteDeviceType was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetNvLinkRemoteDeviceType.Lock() + mock.calls.DeviceGetNvLinkRemoteDeviceType = append(mock.calls.DeviceGetNvLinkRemoteDeviceType, callInfo) + mock.lockDeviceGetNvLinkRemoteDeviceType.Unlock() + return mock.DeviceGetNvLinkRemoteDeviceTypeFunc(device, n) +} + +// DeviceGetNvLinkRemoteDeviceTypeCalls gets all the calls that were made to DeviceGetNvLinkRemoteDeviceType. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvLinkRemoteDeviceTypeCalls()) +func (mock *Interface) DeviceGetNvLinkRemoteDeviceTypeCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetNvLinkRemoteDeviceType.RLock() + calls = mock.calls.DeviceGetNvLinkRemoteDeviceType + mock.lockDeviceGetNvLinkRemoteDeviceType.RUnlock() + return calls +} + +// DeviceGetNvLinkRemotePciInfo calls DeviceGetNvLinkRemotePciInfoFunc. +func (mock *Interface) DeviceGetNvLinkRemotePciInfo(device nvml.Device, n int) (nvml.PciInfo, nvml.Return) { + if mock.DeviceGetNvLinkRemotePciInfoFunc == nil { + panic("Interface.DeviceGetNvLinkRemotePciInfoFunc: method is nil but Interface.DeviceGetNvLinkRemotePciInfo was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetNvLinkRemotePciInfo.Lock() + mock.calls.DeviceGetNvLinkRemotePciInfo = append(mock.calls.DeviceGetNvLinkRemotePciInfo, callInfo) + mock.lockDeviceGetNvLinkRemotePciInfo.Unlock() + return mock.DeviceGetNvLinkRemotePciInfoFunc(device, n) +} + +// DeviceGetNvLinkRemotePciInfoCalls gets all the calls that were made to DeviceGetNvLinkRemotePciInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvLinkRemotePciInfoCalls()) +func (mock *Interface) DeviceGetNvLinkRemotePciInfoCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetNvLinkRemotePciInfo.RLock() + calls = mock.calls.DeviceGetNvLinkRemotePciInfo + mock.lockDeviceGetNvLinkRemotePciInfo.RUnlock() + return calls +} + +// DeviceGetNvLinkState calls DeviceGetNvLinkStateFunc. +func (mock *Interface) DeviceGetNvLinkState(device nvml.Device, n int) (nvml.EnableState, nvml.Return) { + if mock.DeviceGetNvLinkStateFunc == nil { + panic("Interface.DeviceGetNvLinkStateFunc: method is nil but Interface.DeviceGetNvLinkState was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetNvLinkState.Lock() + mock.calls.DeviceGetNvLinkState = append(mock.calls.DeviceGetNvLinkState, callInfo) + mock.lockDeviceGetNvLinkState.Unlock() + return mock.DeviceGetNvLinkStateFunc(device, n) +} + +// DeviceGetNvLinkStateCalls gets all the calls that were made to DeviceGetNvLinkState. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvLinkStateCalls()) +func (mock *Interface) DeviceGetNvLinkStateCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetNvLinkState.RLock() + calls = mock.calls.DeviceGetNvLinkState + mock.lockDeviceGetNvLinkState.RUnlock() + return calls +} + +// DeviceGetNvLinkUtilizationControl calls DeviceGetNvLinkUtilizationControlFunc. +func (mock *Interface) DeviceGetNvLinkUtilizationControl(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { + if mock.DeviceGetNvLinkUtilizationControlFunc == nil { + panic("Interface.DeviceGetNvLinkUtilizationControlFunc: method is nil but Interface.DeviceGetNvLinkUtilizationControl was just called") + } + callInfo := struct { + Device nvml.Device + N1 int + N2 int + }{ + Device: device, + N1: n1, + N2: n2, + } + mock.lockDeviceGetNvLinkUtilizationControl.Lock() + mock.calls.DeviceGetNvLinkUtilizationControl = append(mock.calls.DeviceGetNvLinkUtilizationControl, callInfo) + mock.lockDeviceGetNvLinkUtilizationControl.Unlock() + return mock.DeviceGetNvLinkUtilizationControlFunc(device, n1, n2) +} + +// DeviceGetNvLinkUtilizationControlCalls gets all the calls that were made to DeviceGetNvLinkUtilizationControl. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvLinkUtilizationControlCalls()) +func (mock *Interface) DeviceGetNvLinkUtilizationControlCalls() []struct { + Device nvml.Device + N1 int + N2 int +} { + var calls []struct { + Device nvml.Device + N1 int + N2 int + } + mock.lockDeviceGetNvLinkUtilizationControl.RLock() + calls = mock.calls.DeviceGetNvLinkUtilizationControl + mock.lockDeviceGetNvLinkUtilizationControl.RUnlock() + return calls +} + +// DeviceGetNvLinkUtilizationCounter calls DeviceGetNvLinkUtilizationCounterFunc. +func (mock *Interface) DeviceGetNvLinkUtilizationCounter(device nvml.Device, n1 int, n2 int) (uint64, uint64, nvml.Return) { + if mock.DeviceGetNvLinkUtilizationCounterFunc == nil { + panic("Interface.DeviceGetNvLinkUtilizationCounterFunc: method is nil but Interface.DeviceGetNvLinkUtilizationCounter was just called") + } + callInfo := struct { + Device nvml.Device + N1 int + N2 int + }{ + Device: device, + N1: n1, + N2: n2, + } + mock.lockDeviceGetNvLinkUtilizationCounter.Lock() + mock.calls.DeviceGetNvLinkUtilizationCounter = append(mock.calls.DeviceGetNvLinkUtilizationCounter, callInfo) + mock.lockDeviceGetNvLinkUtilizationCounter.Unlock() + return mock.DeviceGetNvLinkUtilizationCounterFunc(device, n1, n2) +} + +// DeviceGetNvLinkUtilizationCounterCalls gets all the calls that were made to DeviceGetNvLinkUtilizationCounter. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvLinkUtilizationCounterCalls()) +func (mock *Interface) DeviceGetNvLinkUtilizationCounterCalls() []struct { + Device nvml.Device + N1 int + N2 int +} { + var calls []struct { + Device nvml.Device + N1 int + N2 int + } + mock.lockDeviceGetNvLinkUtilizationCounter.RLock() + calls = mock.calls.DeviceGetNvLinkUtilizationCounter + mock.lockDeviceGetNvLinkUtilizationCounter.RUnlock() + return calls +} + +// DeviceGetNvLinkVersion calls DeviceGetNvLinkVersionFunc. +func (mock *Interface) DeviceGetNvLinkVersion(device nvml.Device, n int) (uint32, nvml.Return) { + if mock.DeviceGetNvLinkVersionFunc == nil { + panic("Interface.DeviceGetNvLinkVersionFunc: method is nil but Interface.DeviceGetNvLinkVersion was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetNvLinkVersion.Lock() + mock.calls.DeviceGetNvLinkVersion = append(mock.calls.DeviceGetNvLinkVersion, callInfo) + mock.lockDeviceGetNvLinkVersion.Unlock() + return mock.DeviceGetNvLinkVersionFunc(device, n) +} + +// DeviceGetNvLinkVersionCalls gets all the calls that were made to DeviceGetNvLinkVersion. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvLinkVersionCalls()) +func (mock *Interface) DeviceGetNvLinkVersionCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetNvLinkVersion.RLock() + calls = mock.calls.DeviceGetNvLinkVersion + mock.lockDeviceGetNvLinkVersion.RUnlock() + return calls +} + +// DeviceGetNvlinkBwMode calls DeviceGetNvlinkBwModeFunc. +func (mock *Interface) DeviceGetNvlinkBwMode(device nvml.Device) (nvml.NvlinkGetBwMode, nvml.Return) { + if mock.DeviceGetNvlinkBwModeFunc == nil { + panic("Interface.DeviceGetNvlinkBwModeFunc: method is nil but Interface.DeviceGetNvlinkBwMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetNvlinkBwMode.Lock() + mock.calls.DeviceGetNvlinkBwMode = append(mock.calls.DeviceGetNvlinkBwMode, callInfo) + mock.lockDeviceGetNvlinkBwMode.Unlock() + return mock.DeviceGetNvlinkBwModeFunc(device) +} + +// DeviceGetNvlinkBwModeCalls gets all the calls that were made to DeviceGetNvlinkBwMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvlinkBwModeCalls()) +func (mock *Interface) DeviceGetNvlinkBwModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetNvlinkBwMode.RLock() + calls = mock.calls.DeviceGetNvlinkBwMode + mock.lockDeviceGetNvlinkBwMode.RUnlock() + return calls +} + +// DeviceGetNvlinkSupportedBwModes calls DeviceGetNvlinkSupportedBwModesFunc. +func (mock *Interface) DeviceGetNvlinkSupportedBwModes(device nvml.Device) (nvml.NvlinkSupportedBwModes, nvml.Return) { + if mock.DeviceGetNvlinkSupportedBwModesFunc == nil { + panic("Interface.DeviceGetNvlinkSupportedBwModesFunc: method is nil but Interface.DeviceGetNvlinkSupportedBwModes was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetNvlinkSupportedBwModes.Lock() + mock.calls.DeviceGetNvlinkSupportedBwModes = append(mock.calls.DeviceGetNvlinkSupportedBwModes, callInfo) + mock.lockDeviceGetNvlinkSupportedBwModes.Unlock() + return mock.DeviceGetNvlinkSupportedBwModesFunc(device) +} + +// DeviceGetNvlinkSupportedBwModesCalls gets all the calls that were made to DeviceGetNvlinkSupportedBwModes. +// Check the length with: +// +// len(mockedInterface.DeviceGetNvlinkSupportedBwModesCalls()) +func (mock *Interface) DeviceGetNvlinkSupportedBwModesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetNvlinkSupportedBwModes.RLock() + calls = mock.calls.DeviceGetNvlinkSupportedBwModes + mock.lockDeviceGetNvlinkSupportedBwModes.RUnlock() + return calls +} + +// DeviceGetOfaUtilization calls DeviceGetOfaUtilizationFunc. +func (mock *Interface) DeviceGetOfaUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { + if mock.DeviceGetOfaUtilizationFunc == nil { + panic("Interface.DeviceGetOfaUtilizationFunc: method is nil but Interface.DeviceGetOfaUtilization was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetOfaUtilization.Lock() + mock.calls.DeviceGetOfaUtilization = append(mock.calls.DeviceGetOfaUtilization, callInfo) + mock.lockDeviceGetOfaUtilization.Unlock() + return mock.DeviceGetOfaUtilizationFunc(device) +} + +// DeviceGetOfaUtilizationCalls gets all the calls that were made to DeviceGetOfaUtilization. +// Check the length with: +// +// len(mockedInterface.DeviceGetOfaUtilizationCalls()) +func (mock *Interface) DeviceGetOfaUtilizationCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetOfaUtilization.RLock() + calls = mock.calls.DeviceGetOfaUtilization + mock.lockDeviceGetOfaUtilization.RUnlock() + return calls +} + +// DeviceGetP2PStatus calls DeviceGetP2PStatusFunc. +func (mock *Interface) DeviceGetP2PStatus(device1 nvml.Device, device2 nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) { + if mock.DeviceGetP2PStatusFunc == nil { + panic("Interface.DeviceGetP2PStatusFunc: method is nil but Interface.DeviceGetP2PStatus was just called") + } + callInfo := struct { + Device1 nvml.Device + Device2 nvml.Device + GpuP2PCapsIndex nvml.GpuP2PCapsIndex + }{ + Device1: device1, + Device2: device2, + GpuP2PCapsIndex: gpuP2PCapsIndex, + } + mock.lockDeviceGetP2PStatus.Lock() + mock.calls.DeviceGetP2PStatus = append(mock.calls.DeviceGetP2PStatus, callInfo) + mock.lockDeviceGetP2PStatus.Unlock() + return mock.DeviceGetP2PStatusFunc(device1, device2, gpuP2PCapsIndex) +} + +// DeviceGetP2PStatusCalls gets all the calls that were made to DeviceGetP2PStatus. +// Check the length with: +// +// len(mockedInterface.DeviceGetP2PStatusCalls()) +func (mock *Interface) DeviceGetP2PStatusCalls() []struct { + Device1 nvml.Device + Device2 nvml.Device + GpuP2PCapsIndex nvml.GpuP2PCapsIndex +} { + var calls []struct { + Device1 nvml.Device + Device2 nvml.Device + GpuP2PCapsIndex nvml.GpuP2PCapsIndex + } + mock.lockDeviceGetP2PStatus.RLock() + calls = mock.calls.DeviceGetP2PStatus + mock.lockDeviceGetP2PStatus.RUnlock() + return calls +} + +// DeviceGetPciInfo calls DeviceGetPciInfoFunc. +func (mock *Interface) DeviceGetPciInfo(device nvml.Device) (nvml.PciInfo, nvml.Return) { + if mock.DeviceGetPciInfoFunc == nil { + panic("Interface.DeviceGetPciInfoFunc: method is nil but Interface.DeviceGetPciInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPciInfo.Lock() + mock.calls.DeviceGetPciInfo = append(mock.calls.DeviceGetPciInfo, callInfo) + mock.lockDeviceGetPciInfo.Unlock() + return mock.DeviceGetPciInfoFunc(device) +} + +// DeviceGetPciInfoCalls gets all the calls that were made to DeviceGetPciInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetPciInfoCalls()) +func (mock *Interface) DeviceGetPciInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPciInfo.RLock() + calls = mock.calls.DeviceGetPciInfo + mock.lockDeviceGetPciInfo.RUnlock() + return calls +} + +// DeviceGetPciInfoExt calls DeviceGetPciInfoExtFunc. +func (mock *Interface) DeviceGetPciInfoExt(device nvml.Device) (nvml.PciInfoExt, nvml.Return) { + if mock.DeviceGetPciInfoExtFunc == nil { + panic("Interface.DeviceGetPciInfoExtFunc: method is nil but Interface.DeviceGetPciInfoExt was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPciInfoExt.Lock() + mock.calls.DeviceGetPciInfoExt = append(mock.calls.DeviceGetPciInfoExt, callInfo) + mock.lockDeviceGetPciInfoExt.Unlock() + return mock.DeviceGetPciInfoExtFunc(device) +} + +// DeviceGetPciInfoExtCalls gets all the calls that were made to DeviceGetPciInfoExt. +// Check the length with: +// +// len(mockedInterface.DeviceGetPciInfoExtCalls()) +func (mock *Interface) DeviceGetPciInfoExtCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPciInfoExt.RLock() + calls = mock.calls.DeviceGetPciInfoExt + mock.lockDeviceGetPciInfoExt.RUnlock() + return calls +} + +// DeviceGetPcieLinkMaxSpeed calls DeviceGetPcieLinkMaxSpeedFunc. +func (mock *Interface) DeviceGetPcieLinkMaxSpeed(device nvml.Device) (uint32, nvml.Return) { + if mock.DeviceGetPcieLinkMaxSpeedFunc == nil { + panic("Interface.DeviceGetPcieLinkMaxSpeedFunc: method is nil but Interface.DeviceGetPcieLinkMaxSpeed was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPcieLinkMaxSpeed.Lock() + mock.calls.DeviceGetPcieLinkMaxSpeed = append(mock.calls.DeviceGetPcieLinkMaxSpeed, callInfo) + mock.lockDeviceGetPcieLinkMaxSpeed.Unlock() + return mock.DeviceGetPcieLinkMaxSpeedFunc(device) +} + +// DeviceGetPcieLinkMaxSpeedCalls gets all the calls that were made to DeviceGetPcieLinkMaxSpeed. +// Check the length with: +// +// len(mockedInterface.DeviceGetPcieLinkMaxSpeedCalls()) +func (mock *Interface) DeviceGetPcieLinkMaxSpeedCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPcieLinkMaxSpeed.RLock() + calls = mock.calls.DeviceGetPcieLinkMaxSpeed + mock.lockDeviceGetPcieLinkMaxSpeed.RUnlock() + return calls +} + +// DeviceGetPcieReplayCounter calls DeviceGetPcieReplayCounterFunc. +func (mock *Interface) DeviceGetPcieReplayCounter(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetPcieReplayCounterFunc == nil { + panic("Interface.DeviceGetPcieReplayCounterFunc: method is nil but Interface.DeviceGetPcieReplayCounter was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPcieReplayCounter.Lock() + mock.calls.DeviceGetPcieReplayCounter = append(mock.calls.DeviceGetPcieReplayCounter, callInfo) + mock.lockDeviceGetPcieReplayCounter.Unlock() + return mock.DeviceGetPcieReplayCounterFunc(device) +} + +// DeviceGetPcieReplayCounterCalls gets all the calls that were made to DeviceGetPcieReplayCounter. +// Check the length with: +// +// len(mockedInterface.DeviceGetPcieReplayCounterCalls()) +func (mock *Interface) DeviceGetPcieReplayCounterCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPcieReplayCounter.RLock() + calls = mock.calls.DeviceGetPcieReplayCounter + mock.lockDeviceGetPcieReplayCounter.RUnlock() + return calls +} + +// DeviceGetPcieSpeed calls DeviceGetPcieSpeedFunc. +func (mock *Interface) DeviceGetPcieSpeed(device nvml.Device) (int, nvml.Return) { + if mock.DeviceGetPcieSpeedFunc == nil { + panic("Interface.DeviceGetPcieSpeedFunc: method is nil but Interface.DeviceGetPcieSpeed was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPcieSpeed.Lock() + mock.calls.DeviceGetPcieSpeed = append(mock.calls.DeviceGetPcieSpeed, callInfo) + mock.lockDeviceGetPcieSpeed.Unlock() + return mock.DeviceGetPcieSpeedFunc(device) +} + +// DeviceGetPcieSpeedCalls gets all the calls that were made to DeviceGetPcieSpeed. +// Check the length with: +// +// len(mockedInterface.DeviceGetPcieSpeedCalls()) +func (mock *Interface) DeviceGetPcieSpeedCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPcieSpeed.RLock() + calls = mock.calls.DeviceGetPcieSpeed + mock.lockDeviceGetPcieSpeed.RUnlock() + return calls +} + +// DeviceGetPcieThroughput calls DeviceGetPcieThroughputFunc. +func (mock *Interface) DeviceGetPcieThroughput(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { + if mock.DeviceGetPcieThroughputFunc == nil { + panic("Interface.DeviceGetPcieThroughputFunc: method is nil but Interface.DeviceGetPcieThroughput was just called") + } + callInfo := struct { + Device nvml.Device + PcieUtilCounter nvml.PcieUtilCounter + }{ + Device: device, + PcieUtilCounter: pcieUtilCounter, + } + mock.lockDeviceGetPcieThroughput.Lock() + mock.calls.DeviceGetPcieThroughput = append(mock.calls.DeviceGetPcieThroughput, callInfo) + mock.lockDeviceGetPcieThroughput.Unlock() + return mock.DeviceGetPcieThroughputFunc(device, pcieUtilCounter) +} + +// DeviceGetPcieThroughputCalls gets all the calls that were made to DeviceGetPcieThroughput. +// Check the length with: +// +// len(mockedInterface.DeviceGetPcieThroughputCalls()) +func (mock *Interface) DeviceGetPcieThroughputCalls() []struct { + Device nvml.Device + PcieUtilCounter nvml.PcieUtilCounter +} { + var calls []struct { + Device nvml.Device + PcieUtilCounter nvml.PcieUtilCounter + } + mock.lockDeviceGetPcieThroughput.RLock() + calls = mock.calls.DeviceGetPcieThroughput + mock.lockDeviceGetPcieThroughput.RUnlock() + return calls +} + +// DeviceGetPdi calls DeviceGetPdiFunc. +func (mock *Interface) DeviceGetPdi(device nvml.Device) (nvml.Pdi, nvml.Return) { + if mock.DeviceGetPdiFunc == nil { + panic("Interface.DeviceGetPdiFunc: method is nil but Interface.DeviceGetPdi was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPdi.Lock() + mock.calls.DeviceGetPdi = append(mock.calls.DeviceGetPdi, callInfo) + mock.lockDeviceGetPdi.Unlock() + return mock.DeviceGetPdiFunc(device) +} + +// DeviceGetPdiCalls gets all the calls that were made to DeviceGetPdi. +// Check the length with: +// +// len(mockedInterface.DeviceGetPdiCalls()) +func (mock *Interface) DeviceGetPdiCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPdi.RLock() + calls = mock.calls.DeviceGetPdi + mock.lockDeviceGetPdi.RUnlock() + return calls +} + +// DeviceGetPerformanceModes calls DeviceGetPerformanceModesFunc. +func (mock *Interface) DeviceGetPerformanceModes(device nvml.Device) (nvml.DevicePerfModes, nvml.Return) { + if mock.DeviceGetPerformanceModesFunc == nil { + panic("Interface.DeviceGetPerformanceModesFunc: method is nil but Interface.DeviceGetPerformanceModes was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPerformanceModes.Lock() + mock.calls.DeviceGetPerformanceModes = append(mock.calls.DeviceGetPerformanceModes, callInfo) + mock.lockDeviceGetPerformanceModes.Unlock() + return mock.DeviceGetPerformanceModesFunc(device) +} + +// DeviceGetPerformanceModesCalls gets all the calls that were made to DeviceGetPerformanceModes. +// Check the length with: +// +// len(mockedInterface.DeviceGetPerformanceModesCalls()) +func (mock *Interface) DeviceGetPerformanceModesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPerformanceModes.RLock() + calls = mock.calls.DeviceGetPerformanceModes + mock.lockDeviceGetPerformanceModes.RUnlock() + return calls +} + +// DeviceGetPerformanceState calls DeviceGetPerformanceStateFunc. +func (mock *Interface) DeviceGetPerformanceState(device nvml.Device) (nvml.Pstates, nvml.Return) { + if mock.DeviceGetPerformanceStateFunc == nil { + panic("Interface.DeviceGetPerformanceStateFunc: method is nil but Interface.DeviceGetPerformanceState was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPerformanceState.Lock() + mock.calls.DeviceGetPerformanceState = append(mock.calls.DeviceGetPerformanceState, callInfo) + mock.lockDeviceGetPerformanceState.Unlock() + return mock.DeviceGetPerformanceStateFunc(device) +} + +// DeviceGetPerformanceStateCalls gets all the calls that were made to DeviceGetPerformanceState. +// Check the length with: +// +// len(mockedInterface.DeviceGetPerformanceStateCalls()) +func (mock *Interface) DeviceGetPerformanceStateCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPerformanceState.RLock() + calls = mock.calls.DeviceGetPerformanceState + mock.lockDeviceGetPerformanceState.RUnlock() + return calls +} + +// DeviceGetPersistenceMode calls DeviceGetPersistenceModeFunc. +func (mock *Interface) DeviceGetPersistenceMode(device nvml.Device) (nvml.EnableState, nvml.Return) { + if mock.DeviceGetPersistenceModeFunc == nil { + panic("Interface.DeviceGetPersistenceModeFunc: method is nil but Interface.DeviceGetPersistenceMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPersistenceMode.Lock() + mock.calls.DeviceGetPersistenceMode = append(mock.calls.DeviceGetPersistenceMode, callInfo) + mock.lockDeviceGetPersistenceMode.Unlock() + return mock.DeviceGetPersistenceModeFunc(device) +} + +// DeviceGetPersistenceModeCalls gets all the calls that were made to DeviceGetPersistenceMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetPersistenceModeCalls()) +func (mock *Interface) DeviceGetPersistenceModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPersistenceMode.RLock() + calls = mock.calls.DeviceGetPersistenceMode + mock.lockDeviceGetPersistenceMode.RUnlock() + return calls +} + +// DeviceGetPgpuMetadataString calls DeviceGetPgpuMetadataStringFunc. +func (mock *Interface) DeviceGetPgpuMetadataString(device nvml.Device) (string, nvml.Return) { + if mock.DeviceGetPgpuMetadataStringFunc == nil { + panic("Interface.DeviceGetPgpuMetadataStringFunc: method is nil but Interface.DeviceGetPgpuMetadataString was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPgpuMetadataString.Lock() + mock.calls.DeviceGetPgpuMetadataString = append(mock.calls.DeviceGetPgpuMetadataString, callInfo) + mock.lockDeviceGetPgpuMetadataString.Unlock() + return mock.DeviceGetPgpuMetadataStringFunc(device) +} + +// DeviceGetPgpuMetadataStringCalls gets all the calls that were made to DeviceGetPgpuMetadataString. +// Check the length with: +// +// len(mockedInterface.DeviceGetPgpuMetadataStringCalls()) +func (mock *Interface) DeviceGetPgpuMetadataStringCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPgpuMetadataString.RLock() + calls = mock.calls.DeviceGetPgpuMetadataString + mock.lockDeviceGetPgpuMetadataString.RUnlock() + return calls +} + +// DeviceGetPlatformInfo calls DeviceGetPlatformInfoFunc. +func (mock *Interface) DeviceGetPlatformInfo(device nvml.Device) (nvml.PlatformInfo, nvml.Return) { + if mock.DeviceGetPlatformInfoFunc == nil { + panic("Interface.DeviceGetPlatformInfoFunc: method is nil but Interface.DeviceGetPlatformInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPlatformInfo.Lock() + mock.calls.DeviceGetPlatformInfo = append(mock.calls.DeviceGetPlatformInfo, callInfo) + mock.lockDeviceGetPlatformInfo.Unlock() + return mock.DeviceGetPlatformInfoFunc(device) +} + +// DeviceGetPlatformInfoCalls gets all the calls that were made to DeviceGetPlatformInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetPlatformInfoCalls()) +func (mock *Interface) DeviceGetPlatformInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPlatformInfo.RLock() + calls = mock.calls.DeviceGetPlatformInfo + mock.lockDeviceGetPlatformInfo.RUnlock() + return calls +} + +// DeviceGetPowerManagementDefaultLimit calls DeviceGetPowerManagementDefaultLimitFunc. +func (mock *Interface) DeviceGetPowerManagementDefaultLimit(device nvml.Device) (uint32, nvml.Return) { + if mock.DeviceGetPowerManagementDefaultLimitFunc == nil { + panic("Interface.DeviceGetPowerManagementDefaultLimitFunc: method is nil but Interface.DeviceGetPowerManagementDefaultLimit was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPowerManagementDefaultLimit.Lock() + mock.calls.DeviceGetPowerManagementDefaultLimit = append(mock.calls.DeviceGetPowerManagementDefaultLimit, callInfo) + mock.lockDeviceGetPowerManagementDefaultLimit.Unlock() + return mock.DeviceGetPowerManagementDefaultLimitFunc(device) +} + +// DeviceGetPowerManagementDefaultLimitCalls gets all the calls that were made to DeviceGetPowerManagementDefaultLimit. +// Check the length with: +// +// len(mockedInterface.DeviceGetPowerManagementDefaultLimitCalls()) +func (mock *Interface) DeviceGetPowerManagementDefaultLimitCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPowerManagementDefaultLimit.RLock() + calls = mock.calls.DeviceGetPowerManagementDefaultLimit + mock.lockDeviceGetPowerManagementDefaultLimit.RUnlock() + return calls +} + +// DeviceGetPowerManagementLimit calls DeviceGetPowerManagementLimitFunc. +func (mock *Interface) DeviceGetPowerManagementLimit(device nvml.Device) (uint32, nvml.Return) { + if mock.DeviceGetPowerManagementLimitFunc == nil { + panic("Interface.DeviceGetPowerManagementLimitFunc: method is nil but Interface.DeviceGetPowerManagementLimit was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPowerManagementLimit.Lock() + mock.calls.DeviceGetPowerManagementLimit = append(mock.calls.DeviceGetPowerManagementLimit, callInfo) + mock.lockDeviceGetPowerManagementLimit.Unlock() + return mock.DeviceGetPowerManagementLimitFunc(device) +} + +// DeviceGetPowerManagementLimitCalls gets all the calls that were made to DeviceGetPowerManagementLimit. +// Check the length with: +// +// len(mockedInterface.DeviceGetPowerManagementLimitCalls()) +func (mock *Interface) DeviceGetPowerManagementLimitCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPowerManagementLimit.RLock() + calls = mock.calls.DeviceGetPowerManagementLimit + mock.lockDeviceGetPowerManagementLimit.RUnlock() + return calls +} + +// DeviceGetPowerManagementLimitConstraints calls DeviceGetPowerManagementLimitConstraintsFunc. +func (mock *Interface) DeviceGetPowerManagementLimitConstraints(device nvml.Device) (uint32, uint32, nvml.Return) { + if mock.DeviceGetPowerManagementLimitConstraintsFunc == nil { + panic("Interface.DeviceGetPowerManagementLimitConstraintsFunc: method is nil but Interface.DeviceGetPowerManagementLimitConstraints was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPowerManagementLimitConstraints.Lock() + mock.calls.DeviceGetPowerManagementLimitConstraints = append(mock.calls.DeviceGetPowerManagementLimitConstraints, callInfo) + mock.lockDeviceGetPowerManagementLimitConstraints.Unlock() + return mock.DeviceGetPowerManagementLimitConstraintsFunc(device) +} + +// DeviceGetPowerManagementLimitConstraintsCalls gets all the calls that were made to DeviceGetPowerManagementLimitConstraints. +// Check the length with: +// +// len(mockedInterface.DeviceGetPowerManagementLimitConstraintsCalls()) +func (mock *Interface) DeviceGetPowerManagementLimitConstraintsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPowerManagementLimitConstraints.RLock() + calls = mock.calls.DeviceGetPowerManagementLimitConstraints + mock.lockDeviceGetPowerManagementLimitConstraints.RUnlock() + return calls +} + +// DeviceGetPowerManagementMode calls DeviceGetPowerManagementModeFunc. +func (mock *Interface) DeviceGetPowerManagementMode(device nvml.Device) (nvml.EnableState, nvml.Return) { + if mock.DeviceGetPowerManagementModeFunc == nil { + panic("Interface.DeviceGetPowerManagementModeFunc: method is nil but Interface.DeviceGetPowerManagementMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPowerManagementMode.Lock() + mock.calls.DeviceGetPowerManagementMode = append(mock.calls.DeviceGetPowerManagementMode, callInfo) + mock.lockDeviceGetPowerManagementMode.Unlock() + return mock.DeviceGetPowerManagementModeFunc(device) +} + +// DeviceGetPowerManagementModeCalls gets all the calls that were made to DeviceGetPowerManagementMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetPowerManagementModeCalls()) +func (mock *Interface) DeviceGetPowerManagementModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPowerManagementMode.RLock() + calls = mock.calls.DeviceGetPowerManagementMode + mock.lockDeviceGetPowerManagementMode.RUnlock() + return calls +} + +// DeviceGetPowerMizerMode_v1 calls DeviceGetPowerMizerMode_v1Func. +func (mock *Interface) DeviceGetPowerMizerMode_v1(device nvml.Device) (nvml.DevicePowerMizerModes_v1, nvml.Return) { + if mock.DeviceGetPowerMizerMode_v1Func == nil { + panic("Interface.DeviceGetPowerMizerMode_v1Func: method is nil but Interface.DeviceGetPowerMizerMode_v1 was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPowerMizerMode_v1.Lock() + mock.calls.DeviceGetPowerMizerMode_v1 = append(mock.calls.DeviceGetPowerMizerMode_v1, callInfo) + mock.lockDeviceGetPowerMizerMode_v1.Unlock() + return mock.DeviceGetPowerMizerMode_v1Func(device) +} + +// DeviceGetPowerMizerMode_v1Calls gets all the calls that were made to DeviceGetPowerMizerMode_v1. +// Check the length with: +// +// len(mockedInterface.DeviceGetPowerMizerMode_v1Calls()) +func (mock *Interface) DeviceGetPowerMizerMode_v1Calls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPowerMizerMode_v1.RLock() + calls = mock.calls.DeviceGetPowerMizerMode_v1 + mock.lockDeviceGetPowerMizerMode_v1.RUnlock() + return calls +} + +// DeviceGetPowerSource calls DeviceGetPowerSourceFunc. +func (mock *Interface) DeviceGetPowerSource(device nvml.Device) (nvml.PowerSource, nvml.Return) { + if mock.DeviceGetPowerSourceFunc == nil { + panic("Interface.DeviceGetPowerSourceFunc: method is nil but Interface.DeviceGetPowerSource was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPowerSource.Lock() + mock.calls.DeviceGetPowerSource = append(mock.calls.DeviceGetPowerSource, callInfo) + mock.lockDeviceGetPowerSource.Unlock() + return mock.DeviceGetPowerSourceFunc(device) +} + +// DeviceGetPowerSourceCalls gets all the calls that were made to DeviceGetPowerSource. +// Check the length with: +// +// len(mockedInterface.DeviceGetPowerSourceCalls()) +func (mock *Interface) DeviceGetPowerSourceCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPowerSource.RLock() + calls = mock.calls.DeviceGetPowerSource + mock.lockDeviceGetPowerSource.RUnlock() + return calls +} + +// DeviceGetPowerState calls DeviceGetPowerStateFunc. +func (mock *Interface) DeviceGetPowerState(device nvml.Device) (nvml.Pstates, nvml.Return) { + if mock.DeviceGetPowerStateFunc == nil { + panic("Interface.DeviceGetPowerStateFunc: method is nil but Interface.DeviceGetPowerState was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPowerState.Lock() + mock.calls.DeviceGetPowerState = append(mock.calls.DeviceGetPowerState, callInfo) + mock.lockDeviceGetPowerState.Unlock() + return mock.DeviceGetPowerStateFunc(device) +} + +// DeviceGetPowerStateCalls gets all the calls that were made to DeviceGetPowerState. +// Check the length with: +// +// len(mockedInterface.DeviceGetPowerStateCalls()) +func (mock *Interface) DeviceGetPowerStateCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPowerState.RLock() + calls = mock.calls.DeviceGetPowerState + mock.lockDeviceGetPowerState.RUnlock() + return calls +} + +// DeviceGetPowerUsage calls DeviceGetPowerUsageFunc. +func (mock *Interface) DeviceGetPowerUsage(device nvml.Device) (uint32, nvml.Return) { + if mock.DeviceGetPowerUsageFunc == nil { + panic("Interface.DeviceGetPowerUsageFunc: method is nil but Interface.DeviceGetPowerUsage was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetPowerUsage.Lock() + mock.calls.DeviceGetPowerUsage = append(mock.calls.DeviceGetPowerUsage, callInfo) + mock.lockDeviceGetPowerUsage.Unlock() + return mock.DeviceGetPowerUsageFunc(device) +} + +// DeviceGetPowerUsageCalls gets all the calls that were made to DeviceGetPowerUsage. +// Check the length with: +// +// len(mockedInterface.DeviceGetPowerUsageCalls()) +func (mock *Interface) DeviceGetPowerUsageCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetPowerUsage.RLock() + calls = mock.calls.DeviceGetPowerUsage + mock.lockDeviceGetPowerUsage.RUnlock() + return calls +} + +// DeviceGetProcessUtilization calls DeviceGetProcessUtilizationFunc. +func (mock *Interface) DeviceGetProcessUtilization(device nvml.Device, v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) { + if mock.DeviceGetProcessUtilizationFunc == nil { + panic("Interface.DeviceGetProcessUtilizationFunc: method is nil but Interface.DeviceGetProcessUtilization was just called") + } + callInfo := struct { + Device nvml.Device + V uint64 + }{ + Device: device, + V: v, + } + mock.lockDeviceGetProcessUtilization.Lock() + mock.calls.DeviceGetProcessUtilization = append(mock.calls.DeviceGetProcessUtilization, callInfo) + mock.lockDeviceGetProcessUtilization.Unlock() + return mock.DeviceGetProcessUtilizationFunc(device, v) +} + +// DeviceGetProcessUtilizationCalls gets all the calls that were made to DeviceGetProcessUtilization. +// Check the length with: +// +// len(mockedInterface.DeviceGetProcessUtilizationCalls()) +func (mock *Interface) DeviceGetProcessUtilizationCalls() []struct { + Device nvml.Device + V uint64 +} { + var calls []struct { + Device nvml.Device + V uint64 + } + mock.lockDeviceGetProcessUtilization.RLock() + calls = mock.calls.DeviceGetProcessUtilization + mock.lockDeviceGetProcessUtilization.RUnlock() + return calls +} + +// DeviceGetProcessesUtilizationInfo calls DeviceGetProcessesUtilizationInfoFunc. +func (mock *Interface) DeviceGetProcessesUtilizationInfo(device nvml.Device) (nvml.ProcessesUtilizationInfo, nvml.Return) { + if mock.DeviceGetProcessesUtilizationInfoFunc == nil { + panic("Interface.DeviceGetProcessesUtilizationInfoFunc: method is nil but Interface.DeviceGetProcessesUtilizationInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetProcessesUtilizationInfo.Lock() + mock.calls.DeviceGetProcessesUtilizationInfo = append(mock.calls.DeviceGetProcessesUtilizationInfo, callInfo) + mock.lockDeviceGetProcessesUtilizationInfo.Unlock() + return mock.DeviceGetProcessesUtilizationInfoFunc(device) +} + +// DeviceGetProcessesUtilizationInfoCalls gets all the calls that were made to DeviceGetProcessesUtilizationInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetProcessesUtilizationInfoCalls()) +func (mock *Interface) DeviceGetProcessesUtilizationInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetProcessesUtilizationInfo.RLock() + calls = mock.calls.DeviceGetProcessesUtilizationInfo + mock.lockDeviceGetProcessesUtilizationInfo.RUnlock() + return calls +} + +// DeviceGetRemappedRows calls DeviceGetRemappedRowsFunc. +func (mock *Interface) DeviceGetRemappedRows(device nvml.Device) (int, int, bool, bool, nvml.Return) { + if mock.DeviceGetRemappedRowsFunc == nil { + panic("Interface.DeviceGetRemappedRowsFunc: method is nil but Interface.DeviceGetRemappedRows was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetRemappedRows.Lock() + mock.calls.DeviceGetRemappedRows = append(mock.calls.DeviceGetRemappedRows, callInfo) + mock.lockDeviceGetRemappedRows.Unlock() + return mock.DeviceGetRemappedRowsFunc(device) +} + +// DeviceGetRemappedRowsCalls gets all the calls that were made to DeviceGetRemappedRows. +// Check the length with: +// +// len(mockedInterface.DeviceGetRemappedRowsCalls()) +func (mock *Interface) DeviceGetRemappedRowsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetRemappedRows.RLock() + calls = mock.calls.DeviceGetRemappedRows + mock.lockDeviceGetRemappedRows.RUnlock() + return calls +} + +// DeviceGetRepairStatus calls DeviceGetRepairStatusFunc. +func (mock *Interface) DeviceGetRepairStatus(device nvml.Device) (nvml.RepairStatus, nvml.Return) { + if mock.DeviceGetRepairStatusFunc == nil { + panic("Interface.DeviceGetRepairStatusFunc: method is nil but Interface.DeviceGetRepairStatus was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetRepairStatus.Lock() + mock.calls.DeviceGetRepairStatus = append(mock.calls.DeviceGetRepairStatus, callInfo) + mock.lockDeviceGetRepairStatus.Unlock() + return mock.DeviceGetRepairStatusFunc(device) +} + +// DeviceGetRepairStatusCalls gets all the calls that were made to DeviceGetRepairStatus. +// Check the length with: +// +// len(mockedInterface.DeviceGetRepairStatusCalls()) +func (mock *Interface) DeviceGetRepairStatusCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetRepairStatus.RLock() + calls = mock.calls.DeviceGetRepairStatus + mock.lockDeviceGetRepairStatus.RUnlock() + return calls +} + +// DeviceGetRetiredPages calls DeviceGetRetiredPagesFunc. +func (mock *Interface) DeviceGetRetiredPages(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) { + if mock.DeviceGetRetiredPagesFunc == nil { + panic("Interface.DeviceGetRetiredPagesFunc: method is nil but Interface.DeviceGetRetiredPages was just called") + } + callInfo := struct { + Device nvml.Device + PageRetirementCause nvml.PageRetirementCause + }{ + Device: device, + PageRetirementCause: pageRetirementCause, + } + mock.lockDeviceGetRetiredPages.Lock() + mock.calls.DeviceGetRetiredPages = append(mock.calls.DeviceGetRetiredPages, callInfo) + mock.lockDeviceGetRetiredPages.Unlock() + return mock.DeviceGetRetiredPagesFunc(device, pageRetirementCause) +} + +// DeviceGetRetiredPagesCalls gets all the calls that were made to DeviceGetRetiredPages. +// Check the length with: +// +// len(mockedInterface.DeviceGetRetiredPagesCalls()) +func (mock *Interface) DeviceGetRetiredPagesCalls() []struct { + Device nvml.Device + PageRetirementCause nvml.PageRetirementCause +} { + var calls []struct { + Device nvml.Device + PageRetirementCause nvml.PageRetirementCause + } + mock.lockDeviceGetRetiredPages.RLock() + calls = mock.calls.DeviceGetRetiredPages + mock.lockDeviceGetRetiredPages.RUnlock() + return calls +} + +// DeviceGetRetiredPagesPendingStatus calls DeviceGetRetiredPagesPendingStatusFunc. +func (mock *Interface) DeviceGetRetiredPagesPendingStatus(device nvml.Device) (nvml.EnableState, nvml.Return) { + if mock.DeviceGetRetiredPagesPendingStatusFunc == nil { + panic("Interface.DeviceGetRetiredPagesPendingStatusFunc: method is nil but Interface.DeviceGetRetiredPagesPendingStatus was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetRetiredPagesPendingStatus.Lock() + mock.calls.DeviceGetRetiredPagesPendingStatus = append(mock.calls.DeviceGetRetiredPagesPendingStatus, callInfo) + mock.lockDeviceGetRetiredPagesPendingStatus.Unlock() + return mock.DeviceGetRetiredPagesPendingStatusFunc(device) +} + +// DeviceGetRetiredPagesPendingStatusCalls gets all the calls that were made to DeviceGetRetiredPagesPendingStatus. +// Check the length with: +// +// len(mockedInterface.DeviceGetRetiredPagesPendingStatusCalls()) +func (mock *Interface) DeviceGetRetiredPagesPendingStatusCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetRetiredPagesPendingStatus.RLock() + calls = mock.calls.DeviceGetRetiredPagesPendingStatus + mock.lockDeviceGetRetiredPagesPendingStatus.RUnlock() + return calls +} + +// DeviceGetRetiredPages_v2 calls DeviceGetRetiredPages_v2Func. +func (mock *Interface) DeviceGetRetiredPages_v2(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) { + if mock.DeviceGetRetiredPages_v2Func == nil { + panic("Interface.DeviceGetRetiredPages_v2Func: method is nil but Interface.DeviceGetRetiredPages_v2 was just called") + } + callInfo := struct { + Device nvml.Device + PageRetirementCause nvml.PageRetirementCause + }{ + Device: device, + PageRetirementCause: pageRetirementCause, + } + mock.lockDeviceGetRetiredPages_v2.Lock() + mock.calls.DeviceGetRetiredPages_v2 = append(mock.calls.DeviceGetRetiredPages_v2, callInfo) + mock.lockDeviceGetRetiredPages_v2.Unlock() + return mock.DeviceGetRetiredPages_v2Func(device, pageRetirementCause) +} + +// DeviceGetRetiredPages_v2Calls gets all the calls that were made to DeviceGetRetiredPages_v2. +// Check the length with: +// +// len(mockedInterface.DeviceGetRetiredPages_v2Calls()) +func (mock *Interface) DeviceGetRetiredPages_v2Calls() []struct { + Device nvml.Device + PageRetirementCause nvml.PageRetirementCause +} { + var calls []struct { + Device nvml.Device + PageRetirementCause nvml.PageRetirementCause + } + mock.lockDeviceGetRetiredPages_v2.RLock() + calls = mock.calls.DeviceGetRetiredPages_v2 + mock.lockDeviceGetRetiredPages_v2.RUnlock() + return calls +} + +// DeviceGetRowRemapperHistogram calls DeviceGetRowRemapperHistogramFunc. +func (mock *Interface) DeviceGetRowRemapperHistogram(device nvml.Device) (nvml.RowRemapperHistogramValues, nvml.Return) { + if mock.DeviceGetRowRemapperHistogramFunc == nil { + panic("Interface.DeviceGetRowRemapperHistogramFunc: method is nil but Interface.DeviceGetRowRemapperHistogram was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetRowRemapperHistogram.Lock() + mock.calls.DeviceGetRowRemapperHistogram = append(mock.calls.DeviceGetRowRemapperHistogram, callInfo) + mock.lockDeviceGetRowRemapperHistogram.Unlock() + return mock.DeviceGetRowRemapperHistogramFunc(device) +} + +// DeviceGetRowRemapperHistogramCalls gets all the calls that were made to DeviceGetRowRemapperHistogram. +// Check the length with: +// +// len(mockedInterface.DeviceGetRowRemapperHistogramCalls()) +func (mock *Interface) DeviceGetRowRemapperHistogramCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetRowRemapperHistogram.RLock() + calls = mock.calls.DeviceGetRowRemapperHistogram + mock.lockDeviceGetRowRemapperHistogram.RUnlock() + return calls +} + +// DeviceGetRunningProcessDetailList calls DeviceGetRunningProcessDetailListFunc. +func (mock *Interface) DeviceGetRunningProcessDetailList(device nvml.Device) (nvml.ProcessDetailList, nvml.Return) { + if mock.DeviceGetRunningProcessDetailListFunc == nil { + panic("Interface.DeviceGetRunningProcessDetailListFunc: method is nil but Interface.DeviceGetRunningProcessDetailList was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetRunningProcessDetailList.Lock() + mock.calls.DeviceGetRunningProcessDetailList = append(mock.calls.DeviceGetRunningProcessDetailList, callInfo) + mock.lockDeviceGetRunningProcessDetailList.Unlock() + return mock.DeviceGetRunningProcessDetailListFunc(device) +} + +// DeviceGetRunningProcessDetailListCalls gets all the calls that were made to DeviceGetRunningProcessDetailList. +// Check the length with: +// +// len(mockedInterface.DeviceGetRunningProcessDetailListCalls()) +func (mock *Interface) DeviceGetRunningProcessDetailListCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetRunningProcessDetailList.RLock() + calls = mock.calls.DeviceGetRunningProcessDetailList + mock.lockDeviceGetRunningProcessDetailList.RUnlock() + return calls +} + +// DeviceGetSamples calls DeviceGetSamplesFunc. +func (mock *Interface) DeviceGetSamples(device nvml.Device, samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) { + if mock.DeviceGetSamplesFunc == nil { + panic("Interface.DeviceGetSamplesFunc: method is nil but Interface.DeviceGetSamples was just called") + } + callInfo := struct { + Device nvml.Device + SamplingType nvml.SamplingType + V uint64 + }{ + Device: device, + SamplingType: samplingType, + V: v, + } + mock.lockDeviceGetSamples.Lock() + mock.calls.DeviceGetSamples = append(mock.calls.DeviceGetSamples, callInfo) + mock.lockDeviceGetSamples.Unlock() + return mock.DeviceGetSamplesFunc(device, samplingType, v) +} + +// DeviceGetSamplesCalls gets all the calls that were made to DeviceGetSamples. +// Check the length with: +// +// len(mockedInterface.DeviceGetSamplesCalls()) +func (mock *Interface) DeviceGetSamplesCalls() []struct { + Device nvml.Device + SamplingType nvml.SamplingType + V uint64 +} { + var calls []struct { + Device nvml.Device + SamplingType nvml.SamplingType + V uint64 + } + mock.lockDeviceGetSamples.RLock() + calls = mock.calls.DeviceGetSamples + mock.lockDeviceGetSamples.RUnlock() + return calls +} + +// DeviceGetSerial calls DeviceGetSerialFunc. +func (mock *Interface) DeviceGetSerial(device nvml.Device) (string, nvml.Return) { + if mock.DeviceGetSerialFunc == nil { + panic("Interface.DeviceGetSerialFunc: method is nil but Interface.DeviceGetSerial was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetSerial.Lock() + mock.calls.DeviceGetSerial = append(mock.calls.DeviceGetSerial, callInfo) + mock.lockDeviceGetSerial.Unlock() + return mock.DeviceGetSerialFunc(device) +} + +// DeviceGetSerialCalls gets all the calls that were made to DeviceGetSerial. +// Check the length with: +// +// len(mockedInterface.DeviceGetSerialCalls()) +func (mock *Interface) DeviceGetSerialCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetSerial.RLock() + calls = mock.calls.DeviceGetSerial + mock.lockDeviceGetSerial.RUnlock() + return calls +} + +// DeviceGetSramEccErrorStatus calls DeviceGetSramEccErrorStatusFunc. +func (mock *Interface) DeviceGetSramEccErrorStatus(device nvml.Device) (nvml.EccSramErrorStatus, nvml.Return) { + if mock.DeviceGetSramEccErrorStatusFunc == nil { + panic("Interface.DeviceGetSramEccErrorStatusFunc: method is nil but Interface.DeviceGetSramEccErrorStatus was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetSramEccErrorStatus.Lock() + mock.calls.DeviceGetSramEccErrorStatus = append(mock.calls.DeviceGetSramEccErrorStatus, callInfo) + mock.lockDeviceGetSramEccErrorStatus.Unlock() + return mock.DeviceGetSramEccErrorStatusFunc(device) +} + +// DeviceGetSramEccErrorStatusCalls gets all the calls that were made to DeviceGetSramEccErrorStatus. +// Check the length with: +// +// len(mockedInterface.DeviceGetSramEccErrorStatusCalls()) +func (mock *Interface) DeviceGetSramEccErrorStatusCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetSramEccErrorStatus.RLock() + calls = mock.calls.DeviceGetSramEccErrorStatus + mock.lockDeviceGetSramEccErrorStatus.RUnlock() + return calls +} + +// DeviceGetSramUniqueUncorrectedEccErrorCounts calls DeviceGetSramUniqueUncorrectedEccErrorCountsFunc. +func (mock *Interface) DeviceGetSramUniqueUncorrectedEccErrorCounts(device nvml.Device, eccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts) nvml.Return { + if mock.DeviceGetSramUniqueUncorrectedEccErrorCountsFunc == nil { + panic("Interface.DeviceGetSramUniqueUncorrectedEccErrorCountsFunc: method is nil but Interface.DeviceGetSramUniqueUncorrectedEccErrorCounts was just called") + } + callInfo := struct { + Device nvml.Device + EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts + }{ + Device: device, + EccSramUniqueUncorrectedErrorCounts: eccSramUniqueUncorrectedErrorCounts, + } + mock.lockDeviceGetSramUniqueUncorrectedEccErrorCounts.Lock() + mock.calls.DeviceGetSramUniqueUncorrectedEccErrorCounts = append(mock.calls.DeviceGetSramUniqueUncorrectedEccErrorCounts, callInfo) + mock.lockDeviceGetSramUniqueUncorrectedEccErrorCounts.Unlock() + return mock.DeviceGetSramUniqueUncorrectedEccErrorCountsFunc(device, eccSramUniqueUncorrectedErrorCounts) +} + +// DeviceGetSramUniqueUncorrectedEccErrorCountsCalls gets all the calls that were made to DeviceGetSramUniqueUncorrectedEccErrorCounts. +// Check the length with: +// +// len(mockedInterface.DeviceGetSramUniqueUncorrectedEccErrorCountsCalls()) +func (mock *Interface) DeviceGetSramUniqueUncorrectedEccErrorCountsCalls() []struct { + Device nvml.Device + EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts +} { + var calls []struct { + Device nvml.Device + EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts + } + mock.lockDeviceGetSramUniqueUncorrectedEccErrorCounts.RLock() + calls = mock.calls.DeviceGetSramUniqueUncorrectedEccErrorCounts + mock.lockDeviceGetSramUniqueUncorrectedEccErrorCounts.RUnlock() + return calls +} + +// DeviceGetSupportedClocksEventReasons calls DeviceGetSupportedClocksEventReasonsFunc. +func (mock *Interface) DeviceGetSupportedClocksEventReasons(device nvml.Device) (uint64, nvml.Return) { + if mock.DeviceGetSupportedClocksEventReasonsFunc == nil { + panic("Interface.DeviceGetSupportedClocksEventReasonsFunc: method is nil but Interface.DeviceGetSupportedClocksEventReasons was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetSupportedClocksEventReasons.Lock() + mock.calls.DeviceGetSupportedClocksEventReasons = append(mock.calls.DeviceGetSupportedClocksEventReasons, callInfo) + mock.lockDeviceGetSupportedClocksEventReasons.Unlock() + return mock.DeviceGetSupportedClocksEventReasonsFunc(device) +} + +// DeviceGetSupportedClocksEventReasonsCalls gets all the calls that were made to DeviceGetSupportedClocksEventReasons. +// Check the length with: +// +// len(mockedInterface.DeviceGetSupportedClocksEventReasonsCalls()) +func (mock *Interface) DeviceGetSupportedClocksEventReasonsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetSupportedClocksEventReasons.RLock() + calls = mock.calls.DeviceGetSupportedClocksEventReasons + mock.lockDeviceGetSupportedClocksEventReasons.RUnlock() + return calls +} + +// DeviceGetSupportedClocksThrottleReasons calls DeviceGetSupportedClocksThrottleReasonsFunc. +func (mock *Interface) DeviceGetSupportedClocksThrottleReasons(device nvml.Device) (uint64, nvml.Return) { + if mock.DeviceGetSupportedClocksThrottleReasonsFunc == nil { + panic("Interface.DeviceGetSupportedClocksThrottleReasonsFunc: method is nil but Interface.DeviceGetSupportedClocksThrottleReasons was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetSupportedClocksThrottleReasons.Lock() + mock.calls.DeviceGetSupportedClocksThrottleReasons = append(mock.calls.DeviceGetSupportedClocksThrottleReasons, callInfo) + mock.lockDeviceGetSupportedClocksThrottleReasons.Unlock() + return mock.DeviceGetSupportedClocksThrottleReasonsFunc(device) +} + +// DeviceGetSupportedClocksThrottleReasonsCalls gets all the calls that were made to DeviceGetSupportedClocksThrottleReasons. +// Check the length with: +// +// len(mockedInterface.DeviceGetSupportedClocksThrottleReasonsCalls()) +func (mock *Interface) DeviceGetSupportedClocksThrottleReasonsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetSupportedClocksThrottleReasons.RLock() + calls = mock.calls.DeviceGetSupportedClocksThrottleReasons + mock.lockDeviceGetSupportedClocksThrottleReasons.RUnlock() + return calls +} + +// DeviceGetSupportedEventTypes calls DeviceGetSupportedEventTypesFunc. +func (mock *Interface) DeviceGetSupportedEventTypes(device nvml.Device) (uint64, nvml.Return) { + if mock.DeviceGetSupportedEventTypesFunc == nil { + panic("Interface.DeviceGetSupportedEventTypesFunc: method is nil but Interface.DeviceGetSupportedEventTypes was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetSupportedEventTypes.Lock() + mock.calls.DeviceGetSupportedEventTypes = append(mock.calls.DeviceGetSupportedEventTypes, callInfo) + mock.lockDeviceGetSupportedEventTypes.Unlock() + return mock.DeviceGetSupportedEventTypesFunc(device) +} + +// DeviceGetSupportedEventTypesCalls gets all the calls that were made to DeviceGetSupportedEventTypes. +// Check the length with: +// +// len(mockedInterface.DeviceGetSupportedEventTypesCalls()) +func (mock *Interface) DeviceGetSupportedEventTypesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetSupportedEventTypes.RLock() + calls = mock.calls.DeviceGetSupportedEventTypes + mock.lockDeviceGetSupportedEventTypes.RUnlock() + return calls +} + +// DeviceGetSupportedGraphicsClocks calls DeviceGetSupportedGraphicsClocksFunc. +func (mock *Interface) DeviceGetSupportedGraphicsClocks(device nvml.Device, n int) (int, uint32, nvml.Return) { + if mock.DeviceGetSupportedGraphicsClocksFunc == nil { + panic("Interface.DeviceGetSupportedGraphicsClocksFunc: method is nil but Interface.DeviceGetSupportedGraphicsClocks was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetSupportedGraphicsClocks.Lock() + mock.calls.DeviceGetSupportedGraphicsClocks = append(mock.calls.DeviceGetSupportedGraphicsClocks, callInfo) + mock.lockDeviceGetSupportedGraphicsClocks.Unlock() + return mock.DeviceGetSupportedGraphicsClocksFunc(device, n) +} + +// DeviceGetSupportedGraphicsClocksCalls gets all the calls that were made to DeviceGetSupportedGraphicsClocks. +// Check the length with: +// +// len(mockedInterface.DeviceGetSupportedGraphicsClocksCalls()) +func (mock *Interface) DeviceGetSupportedGraphicsClocksCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetSupportedGraphicsClocks.RLock() + calls = mock.calls.DeviceGetSupportedGraphicsClocks + mock.lockDeviceGetSupportedGraphicsClocks.RUnlock() + return calls +} + +// DeviceGetSupportedMemoryClocks calls DeviceGetSupportedMemoryClocksFunc. +func (mock *Interface) DeviceGetSupportedMemoryClocks(device nvml.Device) (int, uint32, nvml.Return) { + if mock.DeviceGetSupportedMemoryClocksFunc == nil { + panic("Interface.DeviceGetSupportedMemoryClocksFunc: method is nil but Interface.DeviceGetSupportedMemoryClocks was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetSupportedMemoryClocks.Lock() + mock.calls.DeviceGetSupportedMemoryClocks = append(mock.calls.DeviceGetSupportedMemoryClocks, callInfo) + mock.lockDeviceGetSupportedMemoryClocks.Unlock() + return mock.DeviceGetSupportedMemoryClocksFunc(device) +} + +// DeviceGetSupportedMemoryClocksCalls gets all the calls that were made to DeviceGetSupportedMemoryClocks. +// Check the length with: +// +// len(mockedInterface.DeviceGetSupportedMemoryClocksCalls()) +func (mock *Interface) DeviceGetSupportedMemoryClocksCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetSupportedMemoryClocks.RLock() + calls = mock.calls.DeviceGetSupportedMemoryClocks + mock.lockDeviceGetSupportedMemoryClocks.RUnlock() + return calls +} + +// DeviceGetSupportedPerformanceStates calls DeviceGetSupportedPerformanceStatesFunc. +func (mock *Interface) DeviceGetSupportedPerformanceStates(device nvml.Device) ([]nvml.Pstates, nvml.Return) { + if mock.DeviceGetSupportedPerformanceStatesFunc == nil { + panic("Interface.DeviceGetSupportedPerformanceStatesFunc: method is nil but Interface.DeviceGetSupportedPerformanceStates was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetSupportedPerformanceStates.Lock() + mock.calls.DeviceGetSupportedPerformanceStates = append(mock.calls.DeviceGetSupportedPerformanceStates, callInfo) + mock.lockDeviceGetSupportedPerformanceStates.Unlock() + return mock.DeviceGetSupportedPerformanceStatesFunc(device) +} + +// DeviceGetSupportedPerformanceStatesCalls gets all the calls that were made to DeviceGetSupportedPerformanceStates. +// Check the length with: +// +// len(mockedInterface.DeviceGetSupportedPerformanceStatesCalls()) +func (mock *Interface) DeviceGetSupportedPerformanceStatesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetSupportedPerformanceStates.RLock() + calls = mock.calls.DeviceGetSupportedPerformanceStates + mock.lockDeviceGetSupportedPerformanceStates.RUnlock() + return calls +} + +// DeviceGetSupportedVgpus calls DeviceGetSupportedVgpusFunc. +func (mock *Interface) DeviceGetSupportedVgpus(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) { + if mock.DeviceGetSupportedVgpusFunc == nil { + panic("Interface.DeviceGetSupportedVgpusFunc: method is nil but Interface.DeviceGetSupportedVgpus was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetSupportedVgpus.Lock() + mock.calls.DeviceGetSupportedVgpus = append(mock.calls.DeviceGetSupportedVgpus, callInfo) + mock.lockDeviceGetSupportedVgpus.Unlock() + return mock.DeviceGetSupportedVgpusFunc(device) +} + +// DeviceGetSupportedVgpusCalls gets all the calls that were made to DeviceGetSupportedVgpus. +// Check the length with: +// +// len(mockedInterface.DeviceGetSupportedVgpusCalls()) +func (mock *Interface) DeviceGetSupportedVgpusCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetSupportedVgpus.RLock() + calls = mock.calls.DeviceGetSupportedVgpus + mock.lockDeviceGetSupportedVgpus.RUnlock() + return calls +} + +// DeviceGetTargetFanSpeed calls DeviceGetTargetFanSpeedFunc. +func (mock *Interface) DeviceGetTargetFanSpeed(device nvml.Device, n int) (int, nvml.Return) { + if mock.DeviceGetTargetFanSpeedFunc == nil { + panic("Interface.DeviceGetTargetFanSpeedFunc: method is nil but Interface.DeviceGetTargetFanSpeed was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceGetTargetFanSpeed.Lock() + mock.calls.DeviceGetTargetFanSpeed = append(mock.calls.DeviceGetTargetFanSpeed, callInfo) + mock.lockDeviceGetTargetFanSpeed.Unlock() + return mock.DeviceGetTargetFanSpeedFunc(device, n) +} + +// DeviceGetTargetFanSpeedCalls gets all the calls that were made to DeviceGetTargetFanSpeed. +// Check the length with: +// +// len(mockedInterface.DeviceGetTargetFanSpeedCalls()) +func (mock *Interface) DeviceGetTargetFanSpeedCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceGetTargetFanSpeed.RLock() + calls = mock.calls.DeviceGetTargetFanSpeed + mock.lockDeviceGetTargetFanSpeed.RUnlock() + return calls +} + +// DeviceGetTemperature calls DeviceGetTemperatureFunc. +func (mock *Interface) DeviceGetTemperature(device nvml.Device, temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) { + if mock.DeviceGetTemperatureFunc == nil { + panic("Interface.DeviceGetTemperatureFunc: method is nil but Interface.DeviceGetTemperature was just called") + } + callInfo := struct { + Device nvml.Device + TemperatureSensors nvml.TemperatureSensors + }{ + Device: device, + TemperatureSensors: temperatureSensors, + } + mock.lockDeviceGetTemperature.Lock() + mock.calls.DeviceGetTemperature = append(mock.calls.DeviceGetTemperature, callInfo) + mock.lockDeviceGetTemperature.Unlock() + return mock.DeviceGetTemperatureFunc(device, temperatureSensors) +} + +// DeviceGetTemperatureCalls gets all the calls that were made to DeviceGetTemperature. +// Check the length with: +// +// len(mockedInterface.DeviceGetTemperatureCalls()) +func (mock *Interface) DeviceGetTemperatureCalls() []struct { + Device nvml.Device + TemperatureSensors nvml.TemperatureSensors +} { + var calls []struct { + Device nvml.Device + TemperatureSensors nvml.TemperatureSensors + } + mock.lockDeviceGetTemperature.RLock() + calls = mock.calls.DeviceGetTemperature + mock.lockDeviceGetTemperature.RUnlock() + return calls +} + +// DeviceGetTemperatureThreshold calls DeviceGetTemperatureThresholdFunc. +func (mock *Interface) DeviceGetTemperatureThreshold(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { + if mock.DeviceGetTemperatureThresholdFunc == nil { + panic("Interface.DeviceGetTemperatureThresholdFunc: method is nil but Interface.DeviceGetTemperatureThreshold was just called") + } + callInfo := struct { + Device nvml.Device + TemperatureThresholds nvml.TemperatureThresholds + }{ + Device: device, + TemperatureThresholds: temperatureThresholds, + } + mock.lockDeviceGetTemperatureThreshold.Lock() + mock.calls.DeviceGetTemperatureThreshold = append(mock.calls.DeviceGetTemperatureThreshold, callInfo) + mock.lockDeviceGetTemperatureThreshold.Unlock() + return mock.DeviceGetTemperatureThresholdFunc(device, temperatureThresholds) +} + +// DeviceGetTemperatureThresholdCalls gets all the calls that were made to DeviceGetTemperatureThreshold. +// Check the length with: +// +// len(mockedInterface.DeviceGetTemperatureThresholdCalls()) +func (mock *Interface) DeviceGetTemperatureThresholdCalls() []struct { + Device nvml.Device + TemperatureThresholds nvml.TemperatureThresholds +} { + var calls []struct { + Device nvml.Device + TemperatureThresholds nvml.TemperatureThresholds + } + mock.lockDeviceGetTemperatureThreshold.RLock() + calls = mock.calls.DeviceGetTemperatureThreshold + mock.lockDeviceGetTemperatureThreshold.RUnlock() + return calls +} + +// DeviceGetTemperatureV calls DeviceGetTemperatureVFunc. +func (mock *Interface) DeviceGetTemperatureV(device nvml.Device) nvml.TemperatureHandler { + if mock.DeviceGetTemperatureVFunc == nil { + panic("Interface.DeviceGetTemperatureVFunc: method is nil but Interface.DeviceGetTemperatureV was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetTemperatureV.Lock() + mock.calls.DeviceGetTemperatureV = append(mock.calls.DeviceGetTemperatureV, callInfo) + mock.lockDeviceGetTemperatureV.Unlock() + return mock.DeviceGetTemperatureVFunc(device) +} + +// DeviceGetTemperatureVCalls gets all the calls that were made to DeviceGetTemperatureV. +// Check the length with: +// +// len(mockedInterface.DeviceGetTemperatureVCalls()) +func (mock *Interface) DeviceGetTemperatureVCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetTemperatureV.RLock() + calls = mock.calls.DeviceGetTemperatureV + mock.lockDeviceGetTemperatureV.RUnlock() + return calls +} + +// DeviceGetThermalSettings calls DeviceGetThermalSettingsFunc. +func (mock *Interface) DeviceGetThermalSettings(device nvml.Device, v uint32) (nvml.GpuThermalSettings, nvml.Return) { + if mock.DeviceGetThermalSettingsFunc == nil { + panic("Interface.DeviceGetThermalSettingsFunc: method is nil but Interface.DeviceGetThermalSettings was just called") + } + callInfo := struct { + Device nvml.Device + V uint32 + }{ + Device: device, + V: v, + } + mock.lockDeviceGetThermalSettings.Lock() + mock.calls.DeviceGetThermalSettings = append(mock.calls.DeviceGetThermalSettings, callInfo) + mock.lockDeviceGetThermalSettings.Unlock() + return mock.DeviceGetThermalSettingsFunc(device, v) +} + +// DeviceGetThermalSettingsCalls gets all the calls that were made to DeviceGetThermalSettings. +// Check the length with: +// +// len(mockedInterface.DeviceGetThermalSettingsCalls()) +func (mock *Interface) DeviceGetThermalSettingsCalls() []struct { + Device nvml.Device + V uint32 +} { + var calls []struct { + Device nvml.Device + V uint32 + } + mock.lockDeviceGetThermalSettings.RLock() + calls = mock.calls.DeviceGetThermalSettings + mock.lockDeviceGetThermalSettings.RUnlock() + return calls +} + +// DeviceGetTopologyCommonAncestor calls DeviceGetTopologyCommonAncestorFunc. +func (mock *Interface) DeviceGetTopologyCommonAncestor(device1 nvml.Device, device2 nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) { + if mock.DeviceGetTopologyCommonAncestorFunc == nil { + panic("Interface.DeviceGetTopologyCommonAncestorFunc: method is nil but Interface.DeviceGetTopologyCommonAncestor was just called") + } + callInfo := struct { + Device1 nvml.Device + Device2 nvml.Device + }{ + Device1: device1, + Device2: device2, + } + mock.lockDeviceGetTopologyCommonAncestor.Lock() + mock.calls.DeviceGetTopologyCommonAncestor = append(mock.calls.DeviceGetTopologyCommonAncestor, callInfo) + mock.lockDeviceGetTopologyCommonAncestor.Unlock() + return mock.DeviceGetTopologyCommonAncestorFunc(device1, device2) +} + +// DeviceGetTopologyCommonAncestorCalls gets all the calls that were made to DeviceGetTopologyCommonAncestor. +// Check the length with: +// +// len(mockedInterface.DeviceGetTopologyCommonAncestorCalls()) +func (mock *Interface) DeviceGetTopologyCommonAncestorCalls() []struct { + Device1 nvml.Device + Device2 nvml.Device +} { + var calls []struct { + Device1 nvml.Device + Device2 nvml.Device + } + mock.lockDeviceGetTopologyCommonAncestor.RLock() + calls = mock.calls.DeviceGetTopologyCommonAncestor + mock.lockDeviceGetTopologyCommonAncestor.RUnlock() + return calls +} + +// DeviceGetTopologyNearestGpus calls DeviceGetTopologyNearestGpusFunc. +func (mock *Interface) DeviceGetTopologyNearestGpus(device nvml.Device, gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) { + if mock.DeviceGetTopologyNearestGpusFunc == nil { + panic("Interface.DeviceGetTopologyNearestGpusFunc: method is nil but Interface.DeviceGetTopologyNearestGpus was just called") + } + callInfo := struct { + Device nvml.Device + GpuTopologyLevel nvml.GpuTopologyLevel + }{ + Device: device, + GpuTopologyLevel: gpuTopologyLevel, + } + mock.lockDeviceGetTopologyNearestGpus.Lock() + mock.calls.DeviceGetTopologyNearestGpus = append(mock.calls.DeviceGetTopologyNearestGpus, callInfo) + mock.lockDeviceGetTopologyNearestGpus.Unlock() + return mock.DeviceGetTopologyNearestGpusFunc(device, gpuTopologyLevel) +} + +// DeviceGetTopologyNearestGpusCalls gets all the calls that were made to DeviceGetTopologyNearestGpus. +// Check the length with: +// +// len(mockedInterface.DeviceGetTopologyNearestGpusCalls()) +func (mock *Interface) DeviceGetTopologyNearestGpusCalls() []struct { + Device nvml.Device + GpuTopologyLevel nvml.GpuTopologyLevel +} { + var calls []struct { + Device nvml.Device + GpuTopologyLevel nvml.GpuTopologyLevel + } + mock.lockDeviceGetTopologyNearestGpus.RLock() + calls = mock.calls.DeviceGetTopologyNearestGpus + mock.lockDeviceGetTopologyNearestGpus.RUnlock() + return calls +} + +// DeviceGetTotalEccErrors calls DeviceGetTotalEccErrorsFunc. +func (mock *Interface) DeviceGetTotalEccErrors(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) { + if mock.DeviceGetTotalEccErrorsFunc == nil { + panic("Interface.DeviceGetTotalEccErrorsFunc: method is nil but Interface.DeviceGetTotalEccErrors was just called") + } + callInfo := struct { + Device nvml.Device + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + }{ + Device: device, + MemoryErrorType: memoryErrorType, + EccCounterType: eccCounterType, + } + mock.lockDeviceGetTotalEccErrors.Lock() + mock.calls.DeviceGetTotalEccErrors = append(mock.calls.DeviceGetTotalEccErrors, callInfo) + mock.lockDeviceGetTotalEccErrors.Unlock() + return mock.DeviceGetTotalEccErrorsFunc(device, memoryErrorType, eccCounterType) +} + +// DeviceGetTotalEccErrorsCalls gets all the calls that were made to DeviceGetTotalEccErrors. +// Check the length with: +// +// len(mockedInterface.DeviceGetTotalEccErrorsCalls()) +func (mock *Interface) DeviceGetTotalEccErrorsCalls() []struct { + Device nvml.Device + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType +} { + var calls []struct { + Device nvml.Device + MemoryErrorType nvml.MemoryErrorType + EccCounterType nvml.EccCounterType + } + mock.lockDeviceGetTotalEccErrors.RLock() + calls = mock.calls.DeviceGetTotalEccErrors + mock.lockDeviceGetTotalEccErrors.RUnlock() + return calls +} + +// DeviceGetTotalEnergyConsumption calls DeviceGetTotalEnergyConsumptionFunc. +func (mock *Interface) DeviceGetTotalEnergyConsumption(device nvml.Device) (uint64, nvml.Return) { + if mock.DeviceGetTotalEnergyConsumptionFunc == nil { + panic("Interface.DeviceGetTotalEnergyConsumptionFunc: method is nil but Interface.DeviceGetTotalEnergyConsumption was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetTotalEnergyConsumption.Lock() + mock.calls.DeviceGetTotalEnergyConsumption = append(mock.calls.DeviceGetTotalEnergyConsumption, callInfo) + mock.lockDeviceGetTotalEnergyConsumption.Unlock() + return mock.DeviceGetTotalEnergyConsumptionFunc(device) +} + +// DeviceGetTotalEnergyConsumptionCalls gets all the calls that were made to DeviceGetTotalEnergyConsumption. +// Check the length with: +// +// len(mockedInterface.DeviceGetTotalEnergyConsumptionCalls()) +func (mock *Interface) DeviceGetTotalEnergyConsumptionCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetTotalEnergyConsumption.RLock() + calls = mock.calls.DeviceGetTotalEnergyConsumption + mock.lockDeviceGetTotalEnergyConsumption.RUnlock() + return calls +} + +// DeviceGetUUID calls DeviceGetUUIDFunc. +func (mock *Interface) DeviceGetUUID(device nvml.Device) (string, nvml.Return) { + if mock.DeviceGetUUIDFunc == nil { + panic("Interface.DeviceGetUUIDFunc: method is nil but Interface.DeviceGetUUID was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetUUID.Lock() + mock.calls.DeviceGetUUID = append(mock.calls.DeviceGetUUID, callInfo) + mock.lockDeviceGetUUID.Unlock() + return mock.DeviceGetUUIDFunc(device) +} + +// DeviceGetUUIDCalls gets all the calls that were made to DeviceGetUUID. +// Check the length with: +// +// len(mockedInterface.DeviceGetUUIDCalls()) +func (mock *Interface) DeviceGetUUIDCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetUUID.RLock() + calls = mock.calls.DeviceGetUUID + mock.lockDeviceGetUUID.RUnlock() + return calls +} + +// DeviceGetUtilizationRates calls DeviceGetUtilizationRatesFunc. +func (mock *Interface) DeviceGetUtilizationRates(device nvml.Device) (nvml.Utilization, nvml.Return) { + if mock.DeviceGetUtilizationRatesFunc == nil { + panic("Interface.DeviceGetUtilizationRatesFunc: method is nil but Interface.DeviceGetUtilizationRates was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetUtilizationRates.Lock() + mock.calls.DeviceGetUtilizationRates = append(mock.calls.DeviceGetUtilizationRates, callInfo) + mock.lockDeviceGetUtilizationRates.Unlock() + return mock.DeviceGetUtilizationRatesFunc(device) +} + +// DeviceGetUtilizationRatesCalls gets all the calls that were made to DeviceGetUtilizationRates. +// Check the length with: +// +// len(mockedInterface.DeviceGetUtilizationRatesCalls()) +func (mock *Interface) DeviceGetUtilizationRatesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetUtilizationRates.RLock() + calls = mock.calls.DeviceGetUtilizationRates + mock.lockDeviceGetUtilizationRates.RUnlock() + return calls +} + +// DeviceGetVbiosVersion calls DeviceGetVbiosVersionFunc. +func (mock *Interface) DeviceGetVbiosVersion(device nvml.Device) (string, nvml.Return) { + if mock.DeviceGetVbiosVersionFunc == nil { + panic("Interface.DeviceGetVbiosVersionFunc: method is nil but Interface.DeviceGetVbiosVersion was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetVbiosVersion.Lock() + mock.calls.DeviceGetVbiosVersion = append(mock.calls.DeviceGetVbiosVersion, callInfo) + mock.lockDeviceGetVbiosVersion.Unlock() + return mock.DeviceGetVbiosVersionFunc(device) +} + +// DeviceGetVbiosVersionCalls gets all the calls that were made to DeviceGetVbiosVersion. +// Check the length with: +// +// len(mockedInterface.DeviceGetVbiosVersionCalls()) +func (mock *Interface) DeviceGetVbiosVersionCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetVbiosVersion.RLock() + calls = mock.calls.DeviceGetVbiosVersion + mock.lockDeviceGetVbiosVersion.RUnlock() + return calls +} + +// DeviceGetVgpuCapabilities calls DeviceGetVgpuCapabilitiesFunc. +func (mock *Interface) DeviceGetVgpuCapabilities(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) { + if mock.DeviceGetVgpuCapabilitiesFunc == nil { + panic("Interface.DeviceGetVgpuCapabilitiesFunc: method is nil but Interface.DeviceGetVgpuCapabilities was just called") + } + callInfo := struct { + Device nvml.Device + DeviceVgpuCapability nvml.DeviceVgpuCapability + }{ + Device: device, + DeviceVgpuCapability: deviceVgpuCapability, + } + mock.lockDeviceGetVgpuCapabilities.Lock() + mock.calls.DeviceGetVgpuCapabilities = append(mock.calls.DeviceGetVgpuCapabilities, callInfo) + mock.lockDeviceGetVgpuCapabilities.Unlock() + return mock.DeviceGetVgpuCapabilitiesFunc(device, deviceVgpuCapability) +} + +// DeviceGetVgpuCapabilitiesCalls gets all the calls that were made to DeviceGetVgpuCapabilities. +// Check the length with: +// +// len(mockedInterface.DeviceGetVgpuCapabilitiesCalls()) +func (mock *Interface) DeviceGetVgpuCapabilitiesCalls() []struct { + Device nvml.Device + DeviceVgpuCapability nvml.DeviceVgpuCapability +} { + var calls []struct { + Device nvml.Device + DeviceVgpuCapability nvml.DeviceVgpuCapability + } + mock.lockDeviceGetVgpuCapabilities.RLock() + calls = mock.calls.DeviceGetVgpuCapabilities + mock.lockDeviceGetVgpuCapabilities.RUnlock() + return calls +} + +// DeviceGetVgpuHeterogeneousMode calls DeviceGetVgpuHeterogeneousModeFunc. +func (mock *Interface) DeviceGetVgpuHeterogeneousMode(device nvml.Device) (nvml.VgpuHeterogeneousMode, nvml.Return) { + if mock.DeviceGetVgpuHeterogeneousModeFunc == nil { + panic("Interface.DeviceGetVgpuHeterogeneousModeFunc: method is nil but Interface.DeviceGetVgpuHeterogeneousMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetVgpuHeterogeneousMode.Lock() + mock.calls.DeviceGetVgpuHeterogeneousMode = append(mock.calls.DeviceGetVgpuHeterogeneousMode, callInfo) + mock.lockDeviceGetVgpuHeterogeneousMode.Unlock() + return mock.DeviceGetVgpuHeterogeneousModeFunc(device) +} + +// DeviceGetVgpuHeterogeneousModeCalls gets all the calls that were made to DeviceGetVgpuHeterogeneousMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetVgpuHeterogeneousModeCalls()) +func (mock *Interface) DeviceGetVgpuHeterogeneousModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetVgpuHeterogeneousMode.RLock() + calls = mock.calls.DeviceGetVgpuHeterogeneousMode + mock.lockDeviceGetVgpuHeterogeneousMode.RUnlock() + return calls +} + +// DeviceGetVgpuInstancesUtilizationInfo calls DeviceGetVgpuInstancesUtilizationInfoFunc. +func (mock *Interface) DeviceGetVgpuInstancesUtilizationInfo(device nvml.Device) (nvml.VgpuInstancesUtilizationInfo, nvml.Return) { + if mock.DeviceGetVgpuInstancesUtilizationInfoFunc == nil { + panic("Interface.DeviceGetVgpuInstancesUtilizationInfoFunc: method is nil but Interface.DeviceGetVgpuInstancesUtilizationInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetVgpuInstancesUtilizationInfo.Lock() + mock.calls.DeviceGetVgpuInstancesUtilizationInfo = append(mock.calls.DeviceGetVgpuInstancesUtilizationInfo, callInfo) + mock.lockDeviceGetVgpuInstancesUtilizationInfo.Unlock() + return mock.DeviceGetVgpuInstancesUtilizationInfoFunc(device) +} + +// DeviceGetVgpuInstancesUtilizationInfoCalls gets all the calls that were made to DeviceGetVgpuInstancesUtilizationInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetVgpuInstancesUtilizationInfoCalls()) +func (mock *Interface) DeviceGetVgpuInstancesUtilizationInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetVgpuInstancesUtilizationInfo.RLock() + calls = mock.calls.DeviceGetVgpuInstancesUtilizationInfo + mock.lockDeviceGetVgpuInstancesUtilizationInfo.RUnlock() + return calls +} + +// DeviceGetVgpuMetadata calls DeviceGetVgpuMetadataFunc. +func (mock *Interface) DeviceGetVgpuMetadata(device nvml.Device) (nvml.VgpuPgpuMetadata, nvml.Return) { + if mock.DeviceGetVgpuMetadataFunc == nil { + panic("Interface.DeviceGetVgpuMetadataFunc: method is nil but Interface.DeviceGetVgpuMetadata was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetVgpuMetadata.Lock() + mock.calls.DeviceGetVgpuMetadata = append(mock.calls.DeviceGetVgpuMetadata, callInfo) + mock.lockDeviceGetVgpuMetadata.Unlock() + return mock.DeviceGetVgpuMetadataFunc(device) +} + +// DeviceGetVgpuMetadataCalls gets all the calls that were made to DeviceGetVgpuMetadata. +// Check the length with: +// +// len(mockedInterface.DeviceGetVgpuMetadataCalls()) +func (mock *Interface) DeviceGetVgpuMetadataCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetVgpuMetadata.RLock() + calls = mock.calls.DeviceGetVgpuMetadata + mock.lockDeviceGetVgpuMetadata.RUnlock() + return calls +} + +// DeviceGetVgpuProcessUtilization calls DeviceGetVgpuProcessUtilizationFunc. +func (mock *Interface) DeviceGetVgpuProcessUtilization(device nvml.Device, v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) { + if mock.DeviceGetVgpuProcessUtilizationFunc == nil { + panic("Interface.DeviceGetVgpuProcessUtilizationFunc: method is nil but Interface.DeviceGetVgpuProcessUtilization was just called") + } + callInfo := struct { + Device nvml.Device + V uint64 + }{ + Device: device, + V: v, + } + mock.lockDeviceGetVgpuProcessUtilization.Lock() + mock.calls.DeviceGetVgpuProcessUtilization = append(mock.calls.DeviceGetVgpuProcessUtilization, callInfo) + mock.lockDeviceGetVgpuProcessUtilization.Unlock() + return mock.DeviceGetVgpuProcessUtilizationFunc(device, v) +} + +// DeviceGetVgpuProcessUtilizationCalls gets all the calls that were made to DeviceGetVgpuProcessUtilization. +// Check the length with: +// +// len(mockedInterface.DeviceGetVgpuProcessUtilizationCalls()) +func (mock *Interface) DeviceGetVgpuProcessUtilizationCalls() []struct { + Device nvml.Device + V uint64 +} { + var calls []struct { + Device nvml.Device + V uint64 + } + mock.lockDeviceGetVgpuProcessUtilization.RLock() + calls = mock.calls.DeviceGetVgpuProcessUtilization + mock.lockDeviceGetVgpuProcessUtilization.RUnlock() + return calls +} + +// DeviceGetVgpuProcessesUtilizationInfo calls DeviceGetVgpuProcessesUtilizationInfoFunc. +func (mock *Interface) DeviceGetVgpuProcessesUtilizationInfo(device nvml.Device) (nvml.VgpuProcessesUtilizationInfo, nvml.Return) { + if mock.DeviceGetVgpuProcessesUtilizationInfoFunc == nil { + panic("Interface.DeviceGetVgpuProcessesUtilizationInfoFunc: method is nil but Interface.DeviceGetVgpuProcessesUtilizationInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetVgpuProcessesUtilizationInfo.Lock() + mock.calls.DeviceGetVgpuProcessesUtilizationInfo = append(mock.calls.DeviceGetVgpuProcessesUtilizationInfo, callInfo) + mock.lockDeviceGetVgpuProcessesUtilizationInfo.Unlock() + return mock.DeviceGetVgpuProcessesUtilizationInfoFunc(device) +} + +// DeviceGetVgpuProcessesUtilizationInfoCalls gets all the calls that were made to DeviceGetVgpuProcessesUtilizationInfo. +// Check the length with: +// +// len(mockedInterface.DeviceGetVgpuProcessesUtilizationInfoCalls()) +func (mock *Interface) DeviceGetVgpuProcessesUtilizationInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetVgpuProcessesUtilizationInfo.RLock() + calls = mock.calls.DeviceGetVgpuProcessesUtilizationInfo + mock.lockDeviceGetVgpuProcessesUtilizationInfo.RUnlock() + return calls +} + +// DeviceGetVgpuSchedulerCapabilities calls DeviceGetVgpuSchedulerCapabilitiesFunc. +func (mock *Interface) DeviceGetVgpuSchedulerCapabilities(device nvml.Device) (nvml.VgpuSchedulerCapabilities, nvml.Return) { + if mock.DeviceGetVgpuSchedulerCapabilitiesFunc == nil { + panic("Interface.DeviceGetVgpuSchedulerCapabilitiesFunc: method is nil but Interface.DeviceGetVgpuSchedulerCapabilities was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetVgpuSchedulerCapabilities.Lock() + mock.calls.DeviceGetVgpuSchedulerCapabilities = append(mock.calls.DeviceGetVgpuSchedulerCapabilities, callInfo) + mock.lockDeviceGetVgpuSchedulerCapabilities.Unlock() + return mock.DeviceGetVgpuSchedulerCapabilitiesFunc(device) +} + +// DeviceGetVgpuSchedulerCapabilitiesCalls gets all the calls that were made to DeviceGetVgpuSchedulerCapabilities. +// Check the length with: +// +// len(mockedInterface.DeviceGetVgpuSchedulerCapabilitiesCalls()) +func (mock *Interface) DeviceGetVgpuSchedulerCapabilitiesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetVgpuSchedulerCapabilities.RLock() + calls = mock.calls.DeviceGetVgpuSchedulerCapabilities + mock.lockDeviceGetVgpuSchedulerCapabilities.RUnlock() + return calls +} + +// DeviceGetVgpuSchedulerLog calls DeviceGetVgpuSchedulerLogFunc. +func (mock *Interface) DeviceGetVgpuSchedulerLog(device nvml.Device) (nvml.VgpuSchedulerLog, nvml.Return) { + if mock.DeviceGetVgpuSchedulerLogFunc == nil { + panic("Interface.DeviceGetVgpuSchedulerLogFunc: method is nil but Interface.DeviceGetVgpuSchedulerLog was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetVgpuSchedulerLog.Lock() + mock.calls.DeviceGetVgpuSchedulerLog = append(mock.calls.DeviceGetVgpuSchedulerLog, callInfo) + mock.lockDeviceGetVgpuSchedulerLog.Unlock() + return mock.DeviceGetVgpuSchedulerLogFunc(device) +} + +// DeviceGetVgpuSchedulerLogCalls gets all the calls that were made to DeviceGetVgpuSchedulerLog. +// Check the length with: +// +// len(mockedInterface.DeviceGetVgpuSchedulerLogCalls()) +func (mock *Interface) DeviceGetVgpuSchedulerLogCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetVgpuSchedulerLog.RLock() + calls = mock.calls.DeviceGetVgpuSchedulerLog + mock.lockDeviceGetVgpuSchedulerLog.RUnlock() + return calls +} + +// DeviceGetVgpuSchedulerState calls DeviceGetVgpuSchedulerStateFunc. +func (mock *Interface) DeviceGetVgpuSchedulerState(device nvml.Device) (nvml.VgpuSchedulerGetState, nvml.Return) { + if mock.DeviceGetVgpuSchedulerStateFunc == nil { + panic("Interface.DeviceGetVgpuSchedulerStateFunc: method is nil but Interface.DeviceGetVgpuSchedulerState was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetVgpuSchedulerState.Lock() + mock.calls.DeviceGetVgpuSchedulerState = append(mock.calls.DeviceGetVgpuSchedulerState, callInfo) + mock.lockDeviceGetVgpuSchedulerState.Unlock() + return mock.DeviceGetVgpuSchedulerStateFunc(device) +} + +// DeviceGetVgpuSchedulerStateCalls gets all the calls that were made to DeviceGetVgpuSchedulerState. +// Check the length with: +// +// len(mockedInterface.DeviceGetVgpuSchedulerStateCalls()) +func (mock *Interface) DeviceGetVgpuSchedulerStateCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetVgpuSchedulerState.RLock() + calls = mock.calls.DeviceGetVgpuSchedulerState + mock.lockDeviceGetVgpuSchedulerState.RUnlock() + return calls +} + +// DeviceGetVgpuTypeCreatablePlacements calls DeviceGetVgpuTypeCreatablePlacementsFunc. +func (mock *Interface) DeviceGetVgpuTypeCreatablePlacements(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { + if mock.DeviceGetVgpuTypeCreatablePlacementsFunc == nil { + panic("Interface.DeviceGetVgpuTypeCreatablePlacementsFunc: method is nil but Interface.DeviceGetVgpuTypeCreatablePlacements was just called") + } + callInfo := struct { + Device nvml.Device + VgpuTypeId nvml.VgpuTypeId + }{ + Device: device, + VgpuTypeId: vgpuTypeId, + } + mock.lockDeviceGetVgpuTypeCreatablePlacements.Lock() + mock.calls.DeviceGetVgpuTypeCreatablePlacements = append(mock.calls.DeviceGetVgpuTypeCreatablePlacements, callInfo) + mock.lockDeviceGetVgpuTypeCreatablePlacements.Unlock() + return mock.DeviceGetVgpuTypeCreatablePlacementsFunc(device, vgpuTypeId) +} + +// DeviceGetVgpuTypeCreatablePlacementsCalls gets all the calls that were made to DeviceGetVgpuTypeCreatablePlacements. +// Check the length with: +// +// len(mockedInterface.DeviceGetVgpuTypeCreatablePlacementsCalls()) +func (mock *Interface) DeviceGetVgpuTypeCreatablePlacementsCalls() []struct { + Device nvml.Device + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + Device nvml.Device + VgpuTypeId nvml.VgpuTypeId + } + mock.lockDeviceGetVgpuTypeCreatablePlacements.RLock() + calls = mock.calls.DeviceGetVgpuTypeCreatablePlacements + mock.lockDeviceGetVgpuTypeCreatablePlacements.RUnlock() + return calls +} + +// DeviceGetVgpuTypeSupportedPlacements calls DeviceGetVgpuTypeSupportedPlacementsFunc. +func (mock *Interface) DeviceGetVgpuTypeSupportedPlacements(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { + if mock.DeviceGetVgpuTypeSupportedPlacementsFunc == nil { + panic("Interface.DeviceGetVgpuTypeSupportedPlacementsFunc: method is nil but Interface.DeviceGetVgpuTypeSupportedPlacements was just called") + } + callInfo := struct { + Device nvml.Device + VgpuTypeId nvml.VgpuTypeId + }{ + Device: device, + VgpuTypeId: vgpuTypeId, + } + mock.lockDeviceGetVgpuTypeSupportedPlacements.Lock() + mock.calls.DeviceGetVgpuTypeSupportedPlacements = append(mock.calls.DeviceGetVgpuTypeSupportedPlacements, callInfo) + mock.lockDeviceGetVgpuTypeSupportedPlacements.Unlock() + return mock.DeviceGetVgpuTypeSupportedPlacementsFunc(device, vgpuTypeId) +} + +// DeviceGetVgpuTypeSupportedPlacementsCalls gets all the calls that were made to DeviceGetVgpuTypeSupportedPlacements. +// Check the length with: +// +// len(mockedInterface.DeviceGetVgpuTypeSupportedPlacementsCalls()) +func (mock *Interface) DeviceGetVgpuTypeSupportedPlacementsCalls() []struct { + Device nvml.Device + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + Device nvml.Device + VgpuTypeId nvml.VgpuTypeId + } + mock.lockDeviceGetVgpuTypeSupportedPlacements.RLock() + calls = mock.calls.DeviceGetVgpuTypeSupportedPlacements + mock.lockDeviceGetVgpuTypeSupportedPlacements.RUnlock() + return calls +} + +// DeviceGetVgpuUtilization calls DeviceGetVgpuUtilizationFunc. +func (mock *Interface) DeviceGetVgpuUtilization(device nvml.Device, v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) { + if mock.DeviceGetVgpuUtilizationFunc == nil { + panic("Interface.DeviceGetVgpuUtilizationFunc: method is nil but Interface.DeviceGetVgpuUtilization was just called") + } + callInfo := struct { + Device nvml.Device + V uint64 + }{ + Device: device, + V: v, + } + mock.lockDeviceGetVgpuUtilization.Lock() + mock.calls.DeviceGetVgpuUtilization = append(mock.calls.DeviceGetVgpuUtilization, callInfo) + mock.lockDeviceGetVgpuUtilization.Unlock() + return mock.DeviceGetVgpuUtilizationFunc(device, v) +} + +// DeviceGetVgpuUtilizationCalls gets all the calls that were made to DeviceGetVgpuUtilization. +// Check the length with: +// +// len(mockedInterface.DeviceGetVgpuUtilizationCalls()) +func (mock *Interface) DeviceGetVgpuUtilizationCalls() []struct { + Device nvml.Device + V uint64 +} { + var calls []struct { + Device nvml.Device + V uint64 + } + mock.lockDeviceGetVgpuUtilization.RLock() + calls = mock.calls.DeviceGetVgpuUtilization + mock.lockDeviceGetVgpuUtilization.RUnlock() + return calls +} + +// DeviceGetViolationStatus calls DeviceGetViolationStatusFunc. +func (mock *Interface) DeviceGetViolationStatus(device nvml.Device, perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) { + if mock.DeviceGetViolationStatusFunc == nil { + panic("Interface.DeviceGetViolationStatusFunc: method is nil but Interface.DeviceGetViolationStatus was just called") + } + callInfo := struct { + Device nvml.Device + PerfPolicyType nvml.PerfPolicyType + }{ + Device: device, + PerfPolicyType: perfPolicyType, + } + mock.lockDeviceGetViolationStatus.Lock() + mock.calls.DeviceGetViolationStatus = append(mock.calls.DeviceGetViolationStatus, callInfo) + mock.lockDeviceGetViolationStatus.Unlock() + return mock.DeviceGetViolationStatusFunc(device, perfPolicyType) +} + +// DeviceGetViolationStatusCalls gets all the calls that were made to DeviceGetViolationStatus. +// Check the length with: +// +// len(mockedInterface.DeviceGetViolationStatusCalls()) +func (mock *Interface) DeviceGetViolationStatusCalls() []struct { + Device nvml.Device + PerfPolicyType nvml.PerfPolicyType +} { + var calls []struct { + Device nvml.Device + PerfPolicyType nvml.PerfPolicyType + } + mock.lockDeviceGetViolationStatus.RLock() + calls = mock.calls.DeviceGetViolationStatus + mock.lockDeviceGetViolationStatus.RUnlock() + return calls +} + +// DeviceGetVirtualizationMode calls DeviceGetVirtualizationModeFunc. +func (mock *Interface) DeviceGetVirtualizationMode(device nvml.Device) (nvml.GpuVirtualizationMode, nvml.Return) { + if mock.DeviceGetVirtualizationModeFunc == nil { + panic("Interface.DeviceGetVirtualizationModeFunc: method is nil but Interface.DeviceGetVirtualizationMode was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceGetVirtualizationMode.Lock() + mock.calls.DeviceGetVirtualizationMode = append(mock.calls.DeviceGetVirtualizationMode, callInfo) + mock.lockDeviceGetVirtualizationMode.Unlock() + return mock.DeviceGetVirtualizationModeFunc(device) +} + +// DeviceGetVirtualizationModeCalls gets all the calls that were made to DeviceGetVirtualizationMode. +// Check the length with: +// +// len(mockedInterface.DeviceGetVirtualizationModeCalls()) +func (mock *Interface) DeviceGetVirtualizationModeCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceGetVirtualizationMode.RLock() + calls = mock.calls.DeviceGetVirtualizationMode + mock.lockDeviceGetVirtualizationMode.RUnlock() + return calls +} + +// DeviceIsMigDeviceHandle calls DeviceIsMigDeviceHandleFunc. +func (mock *Interface) DeviceIsMigDeviceHandle(device nvml.Device) (bool, nvml.Return) { + if mock.DeviceIsMigDeviceHandleFunc == nil { + panic("Interface.DeviceIsMigDeviceHandleFunc: method is nil but Interface.DeviceIsMigDeviceHandle was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceIsMigDeviceHandle.Lock() + mock.calls.DeviceIsMigDeviceHandle = append(mock.calls.DeviceIsMigDeviceHandle, callInfo) + mock.lockDeviceIsMigDeviceHandle.Unlock() + return mock.DeviceIsMigDeviceHandleFunc(device) +} + +// DeviceIsMigDeviceHandleCalls gets all the calls that were made to DeviceIsMigDeviceHandle. +// Check the length with: +// +// len(mockedInterface.DeviceIsMigDeviceHandleCalls()) +func (mock *Interface) DeviceIsMigDeviceHandleCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceIsMigDeviceHandle.RLock() + calls = mock.calls.DeviceIsMigDeviceHandle + mock.lockDeviceIsMigDeviceHandle.RUnlock() + return calls +} + +// DeviceModifyDrainState calls DeviceModifyDrainStateFunc. +func (mock *Interface) DeviceModifyDrainState(pciInfo *nvml.PciInfo, enableState nvml.EnableState) nvml.Return { + if mock.DeviceModifyDrainStateFunc == nil { + panic("Interface.DeviceModifyDrainStateFunc: method is nil but Interface.DeviceModifyDrainState was just called") + } + callInfo := struct { + PciInfo *nvml.PciInfo + EnableState nvml.EnableState + }{ + PciInfo: pciInfo, + EnableState: enableState, + } + mock.lockDeviceModifyDrainState.Lock() + mock.calls.DeviceModifyDrainState = append(mock.calls.DeviceModifyDrainState, callInfo) + mock.lockDeviceModifyDrainState.Unlock() + return mock.DeviceModifyDrainStateFunc(pciInfo, enableState) +} + +// DeviceModifyDrainStateCalls gets all the calls that were made to DeviceModifyDrainState. +// Check the length with: +// +// len(mockedInterface.DeviceModifyDrainStateCalls()) +func (mock *Interface) DeviceModifyDrainStateCalls() []struct { + PciInfo *nvml.PciInfo + EnableState nvml.EnableState +} { + var calls []struct { + PciInfo *nvml.PciInfo + EnableState nvml.EnableState + } + mock.lockDeviceModifyDrainState.RLock() + calls = mock.calls.DeviceModifyDrainState + mock.lockDeviceModifyDrainState.RUnlock() + return calls +} + +// DeviceOnSameBoard calls DeviceOnSameBoardFunc. +func (mock *Interface) DeviceOnSameBoard(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) { + if mock.DeviceOnSameBoardFunc == nil { + panic("Interface.DeviceOnSameBoardFunc: method is nil but Interface.DeviceOnSameBoard was just called") + } + callInfo := struct { + Device1 nvml.Device + Device2 nvml.Device + }{ + Device1: device1, + Device2: device2, + } + mock.lockDeviceOnSameBoard.Lock() + mock.calls.DeviceOnSameBoard = append(mock.calls.DeviceOnSameBoard, callInfo) + mock.lockDeviceOnSameBoard.Unlock() + return mock.DeviceOnSameBoardFunc(device1, device2) +} + +// DeviceOnSameBoardCalls gets all the calls that were made to DeviceOnSameBoard. +// Check the length with: +// +// len(mockedInterface.DeviceOnSameBoardCalls()) +func (mock *Interface) DeviceOnSameBoardCalls() []struct { + Device1 nvml.Device + Device2 nvml.Device +} { + var calls []struct { + Device1 nvml.Device + Device2 nvml.Device + } + mock.lockDeviceOnSameBoard.RLock() + calls = mock.calls.DeviceOnSameBoard + mock.lockDeviceOnSameBoard.RUnlock() + return calls +} + +// DevicePowerSmoothingActivatePresetProfile calls DevicePowerSmoothingActivatePresetProfileFunc. +func (mock *Interface) DevicePowerSmoothingActivatePresetProfile(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { + if mock.DevicePowerSmoothingActivatePresetProfileFunc == nil { + panic("Interface.DevicePowerSmoothingActivatePresetProfileFunc: method is nil but Interface.DevicePowerSmoothingActivatePresetProfile was just called") + } + callInfo := struct { + Device nvml.Device + PowerSmoothingProfile *nvml.PowerSmoothingProfile + }{ + Device: device, + PowerSmoothingProfile: powerSmoothingProfile, + } + mock.lockDevicePowerSmoothingActivatePresetProfile.Lock() + mock.calls.DevicePowerSmoothingActivatePresetProfile = append(mock.calls.DevicePowerSmoothingActivatePresetProfile, callInfo) + mock.lockDevicePowerSmoothingActivatePresetProfile.Unlock() + return mock.DevicePowerSmoothingActivatePresetProfileFunc(device, powerSmoothingProfile) +} + +// DevicePowerSmoothingActivatePresetProfileCalls gets all the calls that were made to DevicePowerSmoothingActivatePresetProfile. +// Check the length with: +// +// len(mockedInterface.DevicePowerSmoothingActivatePresetProfileCalls()) +func (mock *Interface) DevicePowerSmoothingActivatePresetProfileCalls() []struct { + Device nvml.Device + PowerSmoothingProfile *nvml.PowerSmoothingProfile +} { + var calls []struct { + Device nvml.Device + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + mock.lockDevicePowerSmoothingActivatePresetProfile.RLock() + calls = mock.calls.DevicePowerSmoothingActivatePresetProfile + mock.lockDevicePowerSmoothingActivatePresetProfile.RUnlock() + return calls +} + +// DevicePowerSmoothingSetState calls DevicePowerSmoothingSetStateFunc. +func (mock *Interface) DevicePowerSmoothingSetState(device nvml.Device, powerSmoothingState *nvml.PowerSmoothingState) nvml.Return { + if mock.DevicePowerSmoothingSetStateFunc == nil { + panic("Interface.DevicePowerSmoothingSetStateFunc: method is nil but Interface.DevicePowerSmoothingSetState was just called") + } + callInfo := struct { + Device nvml.Device + PowerSmoothingState *nvml.PowerSmoothingState + }{ + Device: device, + PowerSmoothingState: powerSmoothingState, + } + mock.lockDevicePowerSmoothingSetState.Lock() + mock.calls.DevicePowerSmoothingSetState = append(mock.calls.DevicePowerSmoothingSetState, callInfo) + mock.lockDevicePowerSmoothingSetState.Unlock() + return mock.DevicePowerSmoothingSetStateFunc(device, powerSmoothingState) +} + +// DevicePowerSmoothingSetStateCalls gets all the calls that were made to DevicePowerSmoothingSetState. +// Check the length with: +// +// len(mockedInterface.DevicePowerSmoothingSetStateCalls()) +func (mock *Interface) DevicePowerSmoothingSetStateCalls() []struct { + Device nvml.Device + PowerSmoothingState *nvml.PowerSmoothingState +} { + var calls []struct { + Device nvml.Device + PowerSmoothingState *nvml.PowerSmoothingState + } + mock.lockDevicePowerSmoothingSetState.RLock() + calls = mock.calls.DevicePowerSmoothingSetState + mock.lockDevicePowerSmoothingSetState.RUnlock() + return calls +} + +// DevicePowerSmoothingUpdatePresetProfileParam calls DevicePowerSmoothingUpdatePresetProfileParamFunc. +func (mock *Interface) DevicePowerSmoothingUpdatePresetProfileParam(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { + if mock.DevicePowerSmoothingUpdatePresetProfileParamFunc == nil { + panic("Interface.DevicePowerSmoothingUpdatePresetProfileParamFunc: method is nil but Interface.DevicePowerSmoothingUpdatePresetProfileParam was just called") + } + callInfo := struct { + Device nvml.Device + PowerSmoothingProfile *nvml.PowerSmoothingProfile + }{ + Device: device, + PowerSmoothingProfile: powerSmoothingProfile, + } + mock.lockDevicePowerSmoothingUpdatePresetProfileParam.Lock() + mock.calls.DevicePowerSmoothingUpdatePresetProfileParam = append(mock.calls.DevicePowerSmoothingUpdatePresetProfileParam, callInfo) + mock.lockDevicePowerSmoothingUpdatePresetProfileParam.Unlock() + return mock.DevicePowerSmoothingUpdatePresetProfileParamFunc(device, powerSmoothingProfile) +} + +// DevicePowerSmoothingUpdatePresetProfileParamCalls gets all the calls that were made to DevicePowerSmoothingUpdatePresetProfileParam. +// Check the length with: +// +// len(mockedInterface.DevicePowerSmoothingUpdatePresetProfileParamCalls()) +func (mock *Interface) DevicePowerSmoothingUpdatePresetProfileParamCalls() []struct { + Device nvml.Device + PowerSmoothingProfile *nvml.PowerSmoothingProfile +} { + var calls []struct { + Device nvml.Device + PowerSmoothingProfile *nvml.PowerSmoothingProfile + } + mock.lockDevicePowerSmoothingUpdatePresetProfileParam.RLock() + calls = mock.calls.DevicePowerSmoothingUpdatePresetProfileParam + mock.lockDevicePowerSmoothingUpdatePresetProfileParam.RUnlock() + return calls +} + +// DeviceQueryDrainState calls DeviceQueryDrainStateFunc. +func (mock *Interface) DeviceQueryDrainState(pciInfo *nvml.PciInfo) (nvml.EnableState, nvml.Return) { + if mock.DeviceQueryDrainStateFunc == nil { + panic("Interface.DeviceQueryDrainStateFunc: method is nil but Interface.DeviceQueryDrainState was just called") + } + callInfo := struct { + PciInfo *nvml.PciInfo + }{ + PciInfo: pciInfo, + } + mock.lockDeviceQueryDrainState.Lock() + mock.calls.DeviceQueryDrainState = append(mock.calls.DeviceQueryDrainState, callInfo) + mock.lockDeviceQueryDrainState.Unlock() + return mock.DeviceQueryDrainStateFunc(pciInfo) +} + +// DeviceQueryDrainStateCalls gets all the calls that were made to DeviceQueryDrainState. +// Check the length with: +// +// len(mockedInterface.DeviceQueryDrainStateCalls()) +func (mock *Interface) DeviceQueryDrainStateCalls() []struct { + PciInfo *nvml.PciInfo +} { + var calls []struct { + PciInfo *nvml.PciInfo + } + mock.lockDeviceQueryDrainState.RLock() + calls = mock.calls.DeviceQueryDrainState + mock.lockDeviceQueryDrainState.RUnlock() + return calls +} + +// DeviceReadWritePRM_v1 calls DeviceReadWritePRM_v1Func. +func (mock *Interface) DeviceReadWritePRM_v1(device nvml.Device, pRMTLV_v1 *nvml.PRMTLV_v1) nvml.Return { + if mock.DeviceReadWritePRM_v1Func == nil { + panic("Interface.DeviceReadWritePRM_v1Func: method is nil but Interface.DeviceReadWritePRM_v1 was just called") + } + callInfo := struct { + Device nvml.Device + PRMTLV_v1 *nvml.PRMTLV_v1 + }{ + Device: device, + PRMTLV_v1: pRMTLV_v1, + } + mock.lockDeviceReadWritePRM_v1.Lock() + mock.calls.DeviceReadWritePRM_v1 = append(mock.calls.DeviceReadWritePRM_v1, callInfo) + mock.lockDeviceReadWritePRM_v1.Unlock() + return mock.DeviceReadWritePRM_v1Func(device, pRMTLV_v1) +} + +// DeviceReadWritePRM_v1Calls gets all the calls that were made to DeviceReadWritePRM_v1. +// Check the length with: +// +// len(mockedInterface.DeviceReadWritePRM_v1Calls()) +func (mock *Interface) DeviceReadWritePRM_v1Calls() []struct { + Device nvml.Device + PRMTLV_v1 *nvml.PRMTLV_v1 +} { + var calls []struct { + Device nvml.Device + PRMTLV_v1 *nvml.PRMTLV_v1 + } + mock.lockDeviceReadWritePRM_v1.RLock() + calls = mock.calls.DeviceReadWritePRM_v1 + mock.lockDeviceReadWritePRM_v1.RUnlock() + return calls +} + +// DeviceRegisterEvents calls DeviceRegisterEventsFunc. +func (mock *Interface) DeviceRegisterEvents(device nvml.Device, v uint64, eventSet nvml.EventSet) nvml.Return { + if mock.DeviceRegisterEventsFunc == nil { + panic("Interface.DeviceRegisterEventsFunc: method is nil but Interface.DeviceRegisterEvents was just called") + } + callInfo := struct { + Device nvml.Device + V uint64 + EventSet nvml.EventSet + }{ + Device: device, + V: v, + EventSet: eventSet, + } + mock.lockDeviceRegisterEvents.Lock() + mock.calls.DeviceRegisterEvents = append(mock.calls.DeviceRegisterEvents, callInfo) + mock.lockDeviceRegisterEvents.Unlock() + return mock.DeviceRegisterEventsFunc(device, v, eventSet) +} + +// DeviceRegisterEventsCalls gets all the calls that were made to DeviceRegisterEvents. +// Check the length with: +// +// len(mockedInterface.DeviceRegisterEventsCalls()) +func (mock *Interface) DeviceRegisterEventsCalls() []struct { + Device nvml.Device + V uint64 + EventSet nvml.EventSet +} { + var calls []struct { + Device nvml.Device + V uint64 + EventSet nvml.EventSet + } + mock.lockDeviceRegisterEvents.RLock() + calls = mock.calls.DeviceRegisterEvents + mock.lockDeviceRegisterEvents.RUnlock() + return calls +} + +// DeviceRemoveGpu calls DeviceRemoveGpuFunc. +func (mock *Interface) DeviceRemoveGpu(pciInfo *nvml.PciInfo) nvml.Return { + if mock.DeviceRemoveGpuFunc == nil { + panic("Interface.DeviceRemoveGpuFunc: method is nil but Interface.DeviceRemoveGpu was just called") + } + callInfo := struct { + PciInfo *nvml.PciInfo + }{ + PciInfo: pciInfo, + } + mock.lockDeviceRemoveGpu.Lock() + mock.calls.DeviceRemoveGpu = append(mock.calls.DeviceRemoveGpu, callInfo) + mock.lockDeviceRemoveGpu.Unlock() + return mock.DeviceRemoveGpuFunc(pciInfo) +} + +// DeviceRemoveGpuCalls gets all the calls that were made to DeviceRemoveGpu. +// Check the length with: +// +// len(mockedInterface.DeviceRemoveGpuCalls()) +func (mock *Interface) DeviceRemoveGpuCalls() []struct { + PciInfo *nvml.PciInfo +} { + var calls []struct { + PciInfo *nvml.PciInfo + } + mock.lockDeviceRemoveGpu.RLock() + calls = mock.calls.DeviceRemoveGpu + mock.lockDeviceRemoveGpu.RUnlock() + return calls +} + +// DeviceRemoveGpu_v2 calls DeviceRemoveGpu_v2Func. +func (mock *Interface) DeviceRemoveGpu_v2(pciInfo *nvml.PciInfo, detachGpuState nvml.DetachGpuState, pcieLinkState nvml.PcieLinkState) nvml.Return { + if mock.DeviceRemoveGpu_v2Func == nil { + panic("Interface.DeviceRemoveGpu_v2Func: method is nil but Interface.DeviceRemoveGpu_v2 was just called") + } + callInfo := struct { + PciInfo *nvml.PciInfo + DetachGpuState nvml.DetachGpuState + PcieLinkState nvml.PcieLinkState + }{ + PciInfo: pciInfo, + DetachGpuState: detachGpuState, + PcieLinkState: pcieLinkState, + } + mock.lockDeviceRemoveGpu_v2.Lock() + mock.calls.DeviceRemoveGpu_v2 = append(mock.calls.DeviceRemoveGpu_v2, callInfo) + mock.lockDeviceRemoveGpu_v2.Unlock() + return mock.DeviceRemoveGpu_v2Func(pciInfo, detachGpuState, pcieLinkState) +} + +// DeviceRemoveGpu_v2Calls gets all the calls that were made to DeviceRemoveGpu_v2. +// Check the length with: +// +// len(mockedInterface.DeviceRemoveGpu_v2Calls()) +func (mock *Interface) DeviceRemoveGpu_v2Calls() []struct { + PciInfo *nvml.PciInfo + DetachGpuState nvml.DetachGpuState + PcieLinkState nvml.PcieLinkState +} { + var calls []struct { + PciInfo *nvml.PciInfo + DetachGpuState nvml.DetachGpuState + PcieLinkState nvml.PcieLinkState + } + mock.lockDeviceRemoveGpu_v2.RLock() + calls = mock.calls.DeviceRemoveGpu_v2 + mock.lockDeviceRemoveGpu_v2.RUnlock() + return calls +} + +// DeviceResetApplicationsClocks calls DeviceResetApplicationsClocksFunc. +func (mock *Interface) DeviceResetApplicationsClocks(device nvml.Device) nvml.Return { + if mock.DeviceResetApplicationsClocksFunc == nil { + panic("Interface.DeviceResetApplicationsClocksFunc: method is nil but Interface.DeviceResetApplicationsClocks was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceResetApplicationsClocks.Lock() + mock.calls.DeviceResetApplicationsClocks = append(mock.calls.DeviceResetApplicationsClocks, callInfo) + mock.lockDeviceResetApplicationsClocks.Unlock() + return mock.DeviceResetApplicationsClocksFunc(device) +} + +// DeviceResetApplicationsClocksCalls gets all the calls that were made to DeviceResetApplicationsClocks. +// Check the length with: +// +// len(mockedInterface.DeviceResetApplicationsClocksCalls()) +func (mock *Interface) DeviceResetApplicationsClocksCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceResetApplicationsClocks.RLock() + calls = mock.calls.DeviceResetApplicationsClocks + mock.lockDeviceResetApplicationsClocks.RUnlock() + return calls +} + +// DeviceResetGpuLockedClocks calls DeviceResetGpuLockedClocksFunc. +func (mock *Interface) DeviceResetGpuLockedClocks(device nvml.Device) nvml.Return { + if mock.DeviceResetGpuLockedClocksFunc == nil { + panic("Interface.DeviceResetGpuLockedClocksFunc: method is nil but Interface.DeviceResetGpuLockedClocks was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceResetGpuLockedClocks.Lock() + mock.calls.DeviceResetGpuLockedClocks = append(mock.calls.DeviceResetGpuLockedClocks, callInfo) + mock.lockDeviceResetGpuLockedClocks.Unlock() + return mock.DeviceResetGpuLockedClocksFunc(device) +} + +// DeviceResetGpuLockedClocksCalls gets all the calls that were made to DeviceResetGpuLockedClocks. +// Check the length with: +// +// len(mockedInterface.DeviceResetGpuLockedClocksCalls()) +func (mock *Interface) DeviceResetGpuLockedClocksCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceResetGpuLockedClocks.RLock() + calls = mock.calls.DeviceResetGpuLockedClocks + mock.lockDeviceResetGpuLockedClocks.RUnlock() + return calls +} + +// DeviceResetMemoryLockedClocks calls DeviceResetMemoryLockedClocksFunc. +func (mock *Interface) DeviceResetMemoryLockedClocks(device nvml.Device) nvml.Return { + if mock.DeviceResetMemoryLockedClocksFunc == nil { + panic("Interface.DeviceResetMemoryLockedClocksFunc: method is nil but Interface.DeviceResetMemoryLockedClocks was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceResetMemoryLockedClocks.Lock() + mock.calls.DeviceResetMemoryLockedClocks = append(mock.calls.DeviceResetMemoryLockedClocks, callInfo) + mock.lockDeviceResetMemoryLockedClocks.Unlock() + return mock.DeviceResetMemoryLockedClocksFunc(device) +} + +// DeviceResetMemoryLockedClocksCalls gets all the calls that were made to DeviceResetMemoryLockedClocks. +// Check the length with: +// +// len(mockedInterface.DeviceResetMemoryLockedClocksCalls()) +func (mock *Interface) DeviceResetMemoryLockedClocksCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceResetMemoryLockedClocks.RLock() + calls = mock.calls.DeviceResetMemoryLockedClocks + mock.lockDeviceResetMemoryLockedClocks.RUnlock() + return calls +} + +// DeviceResetNvLinkErrorCounters calls DeviceResetNvLinkErrorCountersFunc. +func (mock *Interface) DeviceResetNvLinkErrorCounters(device nvml.Device, n int) nvml.Return { + if mock.DeviceResetNvLinkErrorCountersFunc == nil { + panic("Interface.DeviceResetNvLinkErrorCountersFunc: method is nil but Interface.DeviceResetNvLinkErrorCounters was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceResetNvLinkErrorCounters.Lock() + mock.calls.DeviceResetNvLinkErrorCounters = append(mock.calls.DeviceResetNvLinkErrorCounters, callInfo) + mock.lockDeviceResetNvLinkErrorCounters.Unlock() + return mock.DeviceResetNvLinkErrorCountersFunc(device, n) +} + +// DeviceResetNvLinkErrorCountersCalls gets all the calls that were made to DeviceResetNvLinkErrorCounters. +// Check the length with: +// +// len(mockedInterface.DeviceResetNvLinkErrorCountersCalls()) +func (mock *Interface) DeviceResetNvLinkErrorCountersCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceResetNvLinkErrorCounters.RLock() + calls = mock.calls.DeviceResetNvLinkErrorCounters + mock.lockDeviceResetNvLinkErrorCounters.RUnlock() + return calls +} + +// DeviceResetNvLinkUtilizationCounter calls DeviceResetNvLinkUtilizationCounterFunc. +func (mock *Interface) DeviceResetNvLinkUtilizationCounter(device nvml.Device, n1 int, n2 int) nvml.Return { + if mock.DeviceResetNvLinkUtilizationCounterFunc == nil { + panic("Interface.DeviceResetNvLinkUtilizationCounterFunc: method is nil but Interface.DeviceResetNvLinkUtilizationCounter was just called") + } + callInfo := struct { + Device nvml.Device + N1 int + N2 int + }{ + Device: device, + N1: n1, + N2: n2, + } + mock.lockDeviceResetNvLinkUtilizationCounter.Lock() + mock.calls.DeviceResetNvLinkUtilizationCounter = append(mock.calls.DeviceResetNvLinkUtilizationCounter, callInfo) + mock.lockDeviceResetNvLinkUtilizationCounter.Unlock() + return mock.DeviceResetNvLinkUtilizationCounterFunc(device, n1, n2) +} + +// DeviceResetNvLinkUtilizationCounterCalls gets all the calls that were made to DeviceResetNvLinkUtilizationCounter. +// Check the length with: +// +// len(mockedInterface.DeviceResetNvLinkUtilizationCounterCalls()) +func (mock *Interface) DeviceResetNvLinkUtilizationCounterCalls() []struct { + Device nvml.Device + N1 int + N2 int +} { + var calls []struct { + Device nvml.Device + N1 int + N2 int + } + mock.lockDeviceResetNvLinkUtilizationCounter.RLock() + calls = mock.calls.DeviceResetNvLinkUtilizationCounter + mock.lockDeviceResetNvLinkUtilizationCounter.RUnlock() + return calls +} + +// DeviceSetAPIRestriction calls DeviceSetAPIRestrictionFunc. +func (mock *Interface) DeviceSetAPIRestriction(device nvml.Device, restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return { + if mock.DeviceSetAPIRestrictionFunc == nil { + panic("Interface.DeviceSetAPIRestrictionFunc: method is nil but Interface.DeviceSetAPIRestriction was just called") + } + callInfo := struct { + Device nvml.Device + RestrictedAPI nvml.RestrictedAPI + EnableState nvml.EnableState + }{ + Device: device, + RestrictedAPI: restrictedAPI, + EnableState: enableState, + } + mock.lockDeviceSetAPIRestriction.Lock() + mock.calls.DeviceSetAPIRestriction = append(mock.calls.DeviceSetAPIRestriction, callInfo) + mock.lockDeviceSetAPIRestriction.Unlock() + return mock.DeviceSetAPIRestrictionFunc(device, restrictedAPI, enableState) +} + +// DeviceSetAPIRestrictionCalls gets all the calls that were made to DeviceSetAPIRestriction. +// Check the length with: +// +// len(mockedInterface.DeviceSetAPIRestrictionCalls()) +func (mock *Interface) DeviceSetAPIRestrictionCalls() []struct { + Device nvml.Device + RestrictedAPI nvml.RestrictedAPI + EnableState nvml.EnableState +} { + var calls []struct { + Device nvml.Device + RestrictedAPI nvml.RestrictedAPI + EnableState nvml.EnableState + } + mock.lockDeviceSetAPIRestriction.RLock() + calls = mock.calls.DeviceSetAPIRestriction + mock.lockDeviceSetAPIRestriction.RUnlock() + return calls +} + +// DeviceSetAccountingMode calls DeviceSetAccountingModeFunc. +func (mock *Interface) DeviceSetAccountingMode(device nvml.Device, enableState nvml.EnableState) nvml.Return { + if mock.DeviceSetAccountingModeFunc == nil { + panic("Interface.DeviceSetAccountingModeFunc: method is nil but Interface.DeviceSetAccountingMode was just called") + } + callInfo := struct { + Device nvml.Device + EnableState nvml.EnableState + }{ + Device: device, + EnableState: enableState, + } + mock.lockDeviceSetAccountingMode.Lock() + mock.calls.DeviceSetAccountingMode = append(mock.calls.DeviceSetAccountingMode, callInfo) + mock.lockDeviceSetAccountingMode.Unlock() + return mock.DeviceSetAccountingModeFunc(device, enableState) +} + +// DeviceSetAccountingModeCalls gets all the calls that were made to DeviceSetAccountingMode. +// Check the length with: +// +// len(mockedInterface.DeviceSetAccountingModeCalls()) +func (mock *Interface) DeviceSetAccountingModeCalls() []struct { + Device nvml.Device + EnableState nvml.EnableState +} { + var calls []struct { + Device nvml.Device + EnableState nvml.EnableState + } + mock.lockDeviceSetAccountingMode.RLock() + calls = mock.calls.DeviceSetAccountingMode + mock.lockDeviceSetAccountingMode.RUnlock() + return calls +} + +// DeviceSetApplicationsClocks calls DeviceSetApplicationsClocksFunc. +func (mock *Interface) DeviceSetApplicationsClocks(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { + if mock.DeviceSetApplicationsClocksFunc == nil { + panic("Interface.DeviceSetApplicationsClocksFunc: method is nil but Interface.DeviceSetApplicationsClocks was just called") + } + callInfo := struct { + Device nvml.Device + V1 uint32 + V2 uint32 + }{ + Device: device, + V1: v1, + V2: v2, + } + mock.lockDeviceSetApplicationsClocks.Lock() + mock.calls.DeviceSetApplicationsClocks = append(mock.calls.DeviceSetApplicationsClocks, callInfo) + mock.lockDeviceSetApplicationsClocks.Unlock() + return mock.DeviceSetApplicationsClocksFunc(device, v1, v2) +} + +// DeviceSetApplicationsClocksCalls gets all the calls that were made to DeviceSetApplicationsClocks. +// Check the length with: +// +// len(mockedInterface.DeviceSetApplicationsClocksCalls()) +func (mock *Interface) DeviceSetApplicationsClocksCalls() []struct { + Device nvml.Device + V1 uint32 + V2 uint32 +} { + var calls []struct { + Device nvml.Device + V1 uint32 + V2 uint32 + } + mock.lockDeviceSetApplicationsClocks.RLock() + calls = mock.calls.DeviceSetApplicationsClocks + mock.lockDeviceSetApplicationsClocks.RUnlock() + return calls +} + +// DeviceSetAutoBoostedClocksEnabled calls DeviceSetAutoBoostedClocksEnabledFunc. +func (mock *Interface) DeviceSetAutoBoostedClocksEnabled(device nvml.Device, enableState nvml.EnableState) nvml.Return { + if mock.DeviceSetAutoBoostedClocksEnabledFunc == nil { + panic("Interface.DeviceSetAutoBoostedClocksEnabledFunc: method is nil but Interface.DeviceSetAutoBoostedClocksEnabled was just called") + } + callInfo := struct { + Device nvml.Device + EnableState nvml.EnableState + }{ + Device: device, + EnableState: enableState, + } + mock.lockDeviceSetAutoBoostedClocksEnabled.Lock() + mock.calls.DeviceSetAutoBoostedClocksEnabled = append(mock.calls.DeviceSetAutoBoostedClocksEnabled, callInfo) + mock.lockDeviceSetAutoBoostedClocksEnabled.Unlock() + return mock.DeviceSetAutoBoostedClocksEnabledFunc(device, enableState) +} + +// DeviceSetAutoBoostedClocksEnabledCalls gets all the calls that were made to DeviceSetAutoBoostedClocksEnabled. +// Check the length with: +// +// len(mockedInterface.DeviceSetAutoBoostedClocksEnabledCalls()) +func (mock *Interface) DeviceSetAutoBoostedClocksEnabledCalls() []struct { + Device nvml.Device + EnableState nvml.EnableState +} { + var calls []struct { + Device nvml.Device + EnableState nvml.EnableState + } + mock.lockDeviceSetAutoBoostedClocksEnabled.RLock() + calls = mock.calls.DeviceSetAutoBoostedClocksEnabled + mock.lockDeviceSetAutoBoostedClocksEnabled.RUnlock() + return calls +} + +// DeviceSetClockOffsets calls DeviceSetClockOffsetsFunc. +func (mock *Interface) DeviceSetClockOffsets(device nvml.Device, clockOffset nvml.ClockOffset) nvml.Return { + if mock.DeviceSetClockOffsetsFunc == nil { + panic("Interface.DeviceSetClockOffsetsFunc: method is nil but Interface.DeviceSetClockOffsets was just called") + } + callInfo := struct { + Device nvml.Device + ClockOffset nvml.ClockOffset + }{ + Device: device, + ClockOffset: clockOffset, + } + mock.lockDeviceSetClockOffsets.Lock() + mock.calls.DeviceSetClockOffsets = append(mock.calls.DeviceSetClockOffsets, callInfo) + mock.lockDeviceSetClockOffsets.Unlock() + return mock.DeviceSetClockOffsetsFunc(device, clockOffset) +} + +// DeviceSetClockOffsetsCalls gets all the calls that were made to DeviceSetClockOffsets. +// Check the length with: +// +// len(mockedInterface.DeviceSetClockOffsetsCalls()) +func (mock *Interface) DeviceSetClockOffsetsCalls() []struct { + Device nvml.Device + ClockOffset nvml.ClockOffset +} { + var calls []struct { + Device nvml.Device + ClockOffset nvml.ClockOffset + } + mock.lockDeviceSetClockOffsets.RLock() + calls = mock.calls.DeviceSetClockOffsets + mock.lockDeviceSetClockOffsets.RUnlock() + return calls +} + +// DeviceSetComputeMode calls DeviceSetComputeModeFunc. +func (mock *Interface) DeviceSetComputeMode(device nvml.Device, computeMode nvml.ComputeMode) nvml.Return { + if mock.DeviceSetComputeModeFunc == nil { + panic("Interface.DeviceSetComputeModeFunc: method is nil but Interface.DeviceSetComputeMode was just called") + } + callInfo := struct { + Device nvml.Device + ComputeMode nvml.ComputeMode + }{ + Device: device, + ComputeMode: computeMode, + } + mock.lockDeviceSetComputeMode.Lock() + mock.calls.DeviceSetComputeMode = append(mock.calls.DeviceSetComputeMode, callInfo) + mock.lockDeviceSetComputeMode.Unlock() + return mock.DeviceSetComputeModeFunc(device, computeMode) +} + +// DeviceSetComputeModeCalls gets all the calls that were made to DeviceSetComputeMode. +// Check the length with: +// +// len(mockedInterface.DeviceSetComputeModeCalls()) +func (mock *Interface) DeviceSetComputeModeCalls() []struct { + Device nvml.Device + ComputeMode nvml.ComputeMode +} { + var calls []struct { + Device nvml.Device + ComputeMode nvml.ComputeMode + } + mock.lockDeviceSetComputeMode.RLock() + calls = mock.calls.DeviceSetComputeMode + mock.lockDeviceSetComputeMode.RUnlock() + return calls +} + +// DeviceSetConfComputeUnprotectedMemSize calls DeviceSetConfComputeUnprotectedMemSizeFunc. +func (mock *Interface) DeviceSetConfComputeUnprotectedMemSize(device nvml.Device, v uint64) nvml.Return { + if mock.DeviceSetConfComputeUnprotectedMemSizeFunc == nil { + panic("Interface.DeviceSetConfComputeUnprotectedMemSizeFunc: method is nil but Interface.DeviceSetConfComputeUnprotectedMemSize was just called") + } + callInfo := struct { + Device nvml.Device + V uint64 + }{ + Device: device, + V: v, + } + mock.lockDeviceSetConfComputeUnprotectedMemSize.Lock() + mock.calls.DeviceSetConfComputeUnprotectedMemSize = append(mock.calls.DeviceSetConfComputeUnprotectedMemSize, callInfo) + mock.lockDeviceSetConfComputeUnprotectedMemSize.Unlock() + return mock.DeviceSetConfComputeUnprotectedMemSizeFunc(device, v) +} + +// DeviceSetConfComputeUnprotectedMemSizeCalls gets all the calls that were made to DeviceSetConfComputeUnprotectedMemSize. +// Check the length with: +// +// len(mockedInterface.DeviceSetConfComputeUnprotectedMemSizeCalls()) +func (mock *Interface) DeviceSetConfComputeUnprotectedMemSizeCalls() []struct { + Device nvml.Device + V uint64 +} { + var calls []struct { + Device nvml.Device + V uint64 + } + mock.lockDeviceSetConfComputeUnprotectedMemSize.RLock() + calls = mock.calls.DeviceSetConfComputeUnprotectedMemSize + mock.lockDeviceSetConfComputeUnprotectedMemSize.RUnlock() + return calls +} + +// DeviceSetCpuAffinity calls DeviceSetCpuAffinityFunc. +func (mock *Interface) DeviceSetCpuAffinity(device nvml.Device) nvml.Return { + if mock.DeviceSetCpuAffinityFunc == nil { + panic("Interface.DeviceSetCpuAffinityFunc: method is nil but Interface.DeviceSetCpuAffinity was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceSetCpuAffinity.Lock() + mock.calls.DeviceSetCpuAffinity = append(mock.calls.DeviceSetCpuAffinity, callInfo) + mock.lockDeviceSetCpuAffinity.Unlock() + return mock.DeviceSetCpuAffinityFunc(device) +} + +// DeviceSetCpuAffinityCalls gets all the calls that were made to DeviceSetCpuAffinity. +// Check the length with: +// +// len(mockedInterface.DeviceSetCpuAffinityCalls()) +func (mock *Interface) DeviceSetCpuAffinityCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceSetCpuAffinity.RLock() + calls = mock.calls.DeviceSetCpuAffinity + mock.lockDeviceSetCpuAffinity.RUnlock() + return calls +} + +// DeviceSetDefaultAutoBoostedClocksEnabled calls DeviceSetDefaultAutoBoostedClocksEnabledFunc. +func (mock *Interface) DeviceSetDefaultAutoBoostedClocksEnabled(device nvml.Device, enableState nvml.EnableState, v uint32) nvml.Return { + if mock.DeviceSetDefaultAutoBoostedClocksEnabledFunc == nil { + panic("Interface.DeviceSetDefaultAutoBoostedClocksEnabledFunc: method is nil but Interface.DeviceSetDefaultAutoBoostedClocksEnabled was just called") + } + callInfo := struct { + Device nvml.Device + EnableState nvml.EnableState + V uint32 + }{ + Device: device, + EnableState: enableState, + V: v, + } + mock.lockDeviceSetDefaultAutoBoostedClocksEnabled.Lock() + mock.calls.DeviceSetDefaultAutoBoostedClocksEnabled = append(mock.calls.DeviceSetDefaultAutoBoostedClocksEnabled, callInfo) + mock.lockDeviceSetDefaultAutoBoostedClocksEnabled.Unlock() + return mock.DeviceSetDefaultAutoBoostedClocksEnabledFunc(device, enableState, v) +} + +// DeviceSetDefaultAutoBoostedClocksEnabledCalls gets all the calls that were made to DeviceSetDefaultAutoBoostedClocksEnabled. +// Check the length with: +// +// len(mockedInterface.DeviceSetDefaultAutoBoostedClocksEnabledCalls()) +func (mock *Interface) DeviceSetDefaultAutoBoostedClocksEnabledCalls() []struct { + Device nvml.Device + EnableState nvml.EnableState + V uint32 +} { + var calls []struct { + Device nvml.Device + EnableState nvml.EnableState + V uint32 + } + mock.lockDeviceSetDefaultAutoBoostedClocksEnabled.RLock() + calls = mock.calls.DeviceSetDefaultAutoBoostedClocksEnabled + mock.lockDeviceSetDefaultAutoBoostedClocksEnabled.RUnlock() + return calls +} + +// DeviceSetDefaultFanSpeed_v2 calls DeviceSetDefaultFanSpeed_v2Func. +func (mock *Interface) DeviceSetDefaultFanSpeed_v2(device nvml.Device, n int) nvml.Return { + if mock.DeviceSetDefaultFanSpeed_v2Func == nil { + panic("Interface.DeviceSetDefaultFanSpeed_v2Func: method is nil but Interface.DeviceSetDefaultFanSpeed_v2 was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceSetDefaultFanSpeed_v2.Lock() + mock.calls.DeviceSetDefaultFanSpeed_v2 = append(mock.calls.DeviceSetDefaultFanSpeed_v2, callInfo) + mock.lockDeviceSetDefaultFanSpeed_v2.Unlock() + return mock.DeviceSetDefaultFanSpeed_v2Func(device, n) +} + +// DeviceSetDefaultFanSpeed_v2Calls gets all the calls that were made to DeviceSetDefaultFanSpeed_v2. +// Check the length with: +// +// len(mockedInterface.DeviceSetDefaultFanSpeed_v2Calls()) +func (mock *Interface) DeviceSetDefaultFanSpeed_v2Calls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceSetDefaultFanSpeed_v2.RLock() + calls = mock.calls.DeviceSetDefaultFanSpeed_v2 + mock.lockDeviceSetDefaultFanSpeed_v2.RUnlock() + return calls +} + +// DeviceSetDramEncryptionMode calls DeviceSetDramEncryptionModeFunc. +func (mock *Interface) DeviceSetDramEncryptionMode(device nvml.Device, dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return { + if mock.DeviceSetDramEncryptionModeFunc == nil { + panic("Interface.DeviceSetDramEncryptionModeFunc: method is nil but Interface.DeviceSetDramEncryptionMode was just called") + } + callInfo := struct { + Device nvml.Device + DramEncryptionInfo *nvml.DramEncryptionInfo + }{ + Device: device, + DramEncryptionInfo: dramEncryptionInfo, + } + mock.lockDeviceSetDramEncryptionMode.Lock() + mock.calls.DeviceSetDramEncryptionMode = append(mock.calls.DeviceSetDramEncryptionMode, callInfo) + mock.lockDeviceSetDramEncryptionMode.Unlock() + return mock.DeviceSetDramEncryptionModeFunc(device, dramEncryptionInfo) +} + +// DeviceSetDramEncryptionModeCalls gets all the calls that were made to DeviceSetDramEncryptionMode. +// Check the length with: +// +// len(mockedInterface.DeviceSetDramEncryptionModeCalls()) +func (mock *Interface) DeviceSetDramEncryptionModeCalls() []struct { + Device nvml.Device + DramEncryptionInfo *nvml.DramEncryptionInfo +} { + var calls []struct { + Device nvml.Device + DramEncryptionInfo *nvml.DramEncryptionInfo + } + mock.lockDeviceSetDramEncryptionMode.RLock() + calls = mock.calls.DeviceSetDramEncryptionMode + mock.lockDeviceSetDramEncryptionMode.RUnlock() + return calls +} + +// DeviceSetDriverModel calls DeviceSetDriverModelFunc. +func (mock *Interface) DeviceSetDriverModel(device nvml.Device, driverModel nvml.DriverModel, v uint32) nvml.Return { + if mock.DeviceSetDriverModelFunc == nil { + panic("Interface.DeviceSetDriverModelFunc: method is nil but Interface.DeviceSetDriverModel was just called") + } + callInfo := struct { + Device nvml.Device + DriverModel nvml.DriverModel + V uint32 + }{ + Device: device, + DriverModel: driverModel, + V: v, + } + mock.lockDeviceSetDriverModel.Lock() + mock.calls.DeviceSetDriverModel = append(mock.calls.DeviceSetDriverModel, callInfo) + mock.lockDeviceSetDriverModel.Unlock() + return mock.DeviceSetDriverModelFunc(device, driverModel, v) +} + +// DeviceSetDriverModelCalls gets all the calls that were made to DeviceSetDriverModel. +// Check the length with: +// +// len(mockedInterface.DeviceSetDriverModelCalls()) +func (mock *Interface) DeviceSetDriverModelCalls() []struct { + Device nvml.Device + DriverModel nvml.DriverModel + V uint32 +} { + var calls []struct { + Device nvml.Device + DriverModel nvml.DriverModel + V uint32 + } + mock.lockDeviceSetDriverModel.RLock() + calls = mock.calls.DeviceSetDriverModel + mock.lockDeviceSetDriverModel.RUnlock() + return calls +} + +// DeviceSetEccMode calls DeviceSetEccModeFunc. +func (mock *Interface) DeviceSetEccMode(device nvml.Device, enableState nvml.EnableState) nvml.Return { + if mock.DeviceSetEccModeFunc == nil { + panic("Interface.DeviceSetEccModeFunc: method is nil but Interface.DeviceSetEccMode was just called") + } + callInfo := struct { + Device nvml.Device + EnableState nvml.EnableState + }{ + Device: device, + EnableState: enableState, + } + mock.lockDeviceSetEccMode.Lock() + mock.calls.DeviceSetEccMode = append(mock.calls.DeviceSetEccMode, callInfo) + mock.lockDeviceSetEccMode.Unlock() + return mock.DeviceSetEccModeFunc(device, enableState) +} + +// DeviceSetEccModeCalls gets all the calls that were made to DeviceSetEccMode. +// Check the length with: +// +// len(mockedInterface.DeviceSetEccModeCalls()) +func (mock *Interface) DeviceSetEccModeCalls() []struct { + Device nvml.Device + EnableState nvml.EnableState +} { + var calls []struct { + Device nvml.Device + EnableState nvml.EnableState + } + mock.lockDeviceSetEccMode.RLock() + calls = mock.calls.DeviceSetEccMode + mock.lockDeviceSetEccMode.RUnlock() + return calls +} + +// DeviceSetFanControlPolicy calls DeviceSetFanControlPolicyFunc. +func (mock *Interface) DeviceSetFanControlPolicy(device nvml.Device, n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return { + if mock.DeviceSetFanControlPolicyFunc == nil { + panic("Interface.DeviceSetFanControlPolicyFunc: method is nil but Interface.DeviceSetFanControlPolicy was just called") + } + callInfo := struct { + Device nvml.Device + N int + FanControlPolicy nvml.FanControlPolicy + }{ + Device: device, + N: n, + FanControlPolicy: fanControlPolicy, + } + mock.lockDeviceSetFanControlPolicy.Lock() + mock.calls.DeviceSetFanControlPolicy = append(mock.calls.DeviceSetFanControlPolicy, callInfo) + mock.lockDeviceSetFanControlPolicy.Unlock() + return mock.DeviceSetFanControlPolicyFunc(device, n, fanControlPolicy) +} + +// DeviceSetFanControlPolicyCalls gets all the calls that were made to DeviceSetFanControlPolicy. +// Check the length with: +// +// len(mockedInterface.DeviceSetFanControlPolicyCalls()) +func (mock *Interface) DeviceSetFanControlPolicyCalls() []struct { + Device nvml.Device + N int + FanControlPolicy nvml.FanControlPolicy +} { + var calls []struct { + Device nvml.Device + N int + FanControlPolicy nvml.FanControlPolicy + } + mock.lockDeviceSetFanControlPolicy.RLock() + calls = mock.calls.DeviceSetFanControlPolicy + mock.lockDeviceSetFanControlPolicy.RUnlock() + return calls +} + +// DeviceSetFanSpeed_v2 calls DeviceSetFanSpeed_v2Func. +func (mock *Interface) DeviceSetFanSpeed_v2(device nvml.Device, n1 int, n2 int) nvml.Return { + if mock.DeviceSetFanSpeed_v2Func == nil { + panic("Interface.DeviceSetFanSpeed_v2Func: method is nil but Interface.DeviceSetFanSpeed_v2 was just called") + } + callInfo := struct { + Device nvml.Device + N1 int + N2 int + }{ + Device: device, + N1: n1, + N2: n2, + } + mock.lockDeviceSetFanSpeed_v2.Lock() + mock.calls.DeviceSetFanSpeed_v2 = append(mock.calls.DeviceSetFanSpeed_v2, callInfo) + mock.lockDeviceSetFanSpeed_v2.Unlock() + return mock.DeviceSetFanSpeed_v2Func(device, n1, n2) +} + +// DeviceSetFanSpeed_v2Calls gets all the calls that were made to DeviceSetFanSpeed_v2. +// Check the length with: +// +// len(mockedInterface.DeviceSetFanSpeed_v2Calls()) +func (mock *Interface) DeviceSetFanSpeed_v2Calls() []struct { + Device nvml.Device + N1 int + N2 int +} { + var calls []struct { + Device nvml.Device + N1 int + N2 int + } + mock.lockDeviceSetFanSpeed_v2.RLock() + calls = mock.calls.DeviceSetFanSpeed_v2 + mock.lockDeviceSetFanSpeed_v2.RUnlock() + return calls +} + +// DeviceSetGpcClkVfOffset calls DeviceSetGpcClkVfOffsetFunc. +func (mock *Interface) DeviceSetGpcClkVfOffset(device nvml.Device, n int) nvml.Return { + if mock.DeviceSetGpcClkVfOffsetFunc == nil { + panic("Interface.DeviceSetGpcClkVfOffsetFunc: method is nil but Interface.DeviceSetGpcClkVfOffset was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceSetGpcClkVfOffset.Lock() + mock.calls.DeviceSetGpcClkVfOffset = append(mock.calls.DeviceSetGpcClkVfOffset, callInfo) + mock.lockDeviceSetGpcClkVfOffset.Unlock() + return mock.DeviceSetGpcClkVfOffsetFunc(device, n) +} + +// DeviceSetGpcClkVfOffsetCalls gets all the calls that were made to DeviceSetGpcClkVfOffset. +// Check the length with: +// +// len(mockedInterface.DeviceSetGpcClkVfOffsetCalls()) +func (mock *Interface) DeviceSetGpcClkVfOffsetCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceSetGpcClkVfOffset.RLock() + calls = mock.calls.DeviceSetGpcClkVfOffset + mock.lockDeviceSetGpcClkVfOffset.RUnlock() + return calls +} + +// DeviceSetGpuLockedClocks calls DeviceSetGpuLockedClocksFunc. +func (mock *Interface) DeviceSetGpuLockedClocks(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { + if mock.DeviceSetGpuLockedClocksFunc == nil { + panic("Interface.DeviceSetGpuLockedClocksFunc: method is nil but Interface.DeviceSetGpuLockedClocks was just called") + } + callInfo := struct { + Device nvml.Device + V1 uint32 + V2 uint32 + }{ + Device: device, + V1: v1, + V2: v2, + } + mock.lockDeviceSetGpuLockedClocks.Lock() + mock.calls.DeviceSetGpuLockedClocks = append(mock.calls.DeviceSetGpuLockedClocks, callInfo) + mock.lockDeviceSetGpuLockedClocks.Unlock() + return mock.DeviceSetGpuLockedClocksFunc(device, v1, v2) +} + +// DeviceSetGpuLockedClocksCalls gets all the calls that were made to DeviceSetGpuLockedClocks. +// Check the length with: +// +// len(mockedInterface.DeviceSetGpuLockedClocksCalls()) +func (mock *Interface) DeviceSetGpuLockedClocksCalls() []struct { + Device nvml.Device + V1 uint32 + V2 uint32 +} { + var calls []struct { + Device nvml.Device + V1 uint32 + V2 uint32 + } + mock.lockDeviceSetGpuLockedClocks.RLock() + calls = mock.calls.DeviceSetGpuLockedClocks + mock.lockDeviceSetGpuLockedClocks.RUnlock() + return calls +} + +// DeviceSetGpuOperationMode calls DeviceSetGpuOperationModeFunc. +func (mock *Interface) DeviceSetGpuOperationMode(device nvml.Device, gpuOperationMode nvml.GpuOperationMode) nvml.Return { + if mock.DeviceSetGpuOperationModeFunc == nil { + panic("Interface.DeviceSetGpuOperationModeFunc: method is nil but Interface.DeviceSetGpuOperationMode was just called") + } + callInfo := struct { + Device nvml.Device + GpuOperationMode nvml.GpuOperationMode + }{ + Device: device, + GpuOperationMode: gpuOperationMode, + } + mock.lockDeviceSetGpuOperationMode.Lock() + mock.calls.DeviceSetGpuOperationMode = append(mock.calls.DeviceSetGpuOperationMode, callInfo) + mock.lockDeviceSetGpuOperationMode.Unlock() + return mock.DeviceSetGpuOperationModeFunc(device, gpuOperationMode) +} + +// DeviceSetGpuOperationModeCalls gets all the calls that were made to DeviceSetGpuOperationMode. +// Check the length with: +// +// len(mockedInterface.DeviceSetGpuOperationModeCalls()) +func (mock *Interface) DeviceSetGpuOperationModeCalls() []struct { + Device nvml.Device + GpuOperationMode nvml.GpuOperationMode +} { + var calls []struct { + Device nvml.Device + GpuOperationMode nvml.GpuOperationMode + } + mock.lockDeviceSetGpuOperationMode.RLock() + calls = mock.calls.DeviceSetGpuOperationMode + mock.lockDeviceSetGpuOperationMode.RUnlock() + return calls +} + +// DeviceSetMemClkVfOffset calls DeviceSetMemClkVfOffsetFunc. +func (mock *Interface) DeviceSetMemClkVfOffset(device nvml.Device, n int) nvml.Return { + if mock.DeviceSetMemClkVfOffsetFunc == nil { + panic("Interface.DeviceSetMemClkVfOffsetFunc: method is nil but Interface.DeviceSetMemClkVfOffset was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceSetMemClkVfOffset.Lock() + mock.calls.DeviceSetMemClkVfOffset = append(mock.calls.DeviceSetMemClkVfOffset, callInfo) + mock.lockDeviceSetMemClkVfOffset.Unlock() + return mock.DeviceSetMemClkVfOffsetFunc(device, n) +} + +// DeviceSetMemClkVfOffsetCalls gets all the calls that were made to DeviceSetMemClkVfOffset. +// Check the length with: +// +// len(mockedInterface.DeviceSetMemClkVfOffsetCalls()) +func (mock *Interface) DeviceSetMemClkVfOffsetCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceSetMemClkVfOffset.RLock() + calls = mock.calls.DeviceSetMemClkVfOffset + mock.lockDeviceSetMemClkVfOffset.RUnlock() + return calls +} + +// DeviceSetMemoryLockedClocks calls DeviceSetMemoryLockedClocksFunc. +func (mock *Interface) DeviceSetMemoryLockedClocks(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { + if mock.DeviceSetMemoryLockedClocksFunc == nil { + panic("Interface.DeviceSetMemoryLockedClocksFunc: method is nil but Interface.DeviceSetMemoryLockedClocks was just called") + } + callInfo := struct { + Device nvml.Device + V1 uint32 + V2 uint32 + }{ + Device: device, + V1: v1, + V2: v2, + } + mock.lockDeviceSetMemoryLockedClocks.Lock() + mock.calls.DeviceSetMemoryLockedClocks = append(mock.calls.DeviceSetMemoryLockedClocks, callInfo) + mock.lockDeviceSetMemoryLockedClocks.Unlock() + return mock.DeviceSetMemoryLockedClocksFunc(device, v1, v2) +} + +// DeviceSetMemoryLockedClocksCalls gets all the calls that were made to DeviceSetMemoryLockedClocks. +// Check the length with: +// +// len(mockedInterface.DeviceSetMemoryLockedClocksCalls()) +func (mock *Interface) DeviceSetMemoryLockedClocksCalls() []struct { + Device nvml.Device + V1 uint32 + V2 uint32 +} { + var calls []struct { + Device nvml.Device + V1 uint32 + V2 uint32 + } + mock.lockDeviceSetMemoryLockedClocks.RLock() + calls = mock.calls.DeviceSetMemoryLockedClocks + mock.lockDeviceSetMemoryLockedClocks.RUnlock() + return calls +} + +// DeviceSetMigMode calls DeviceSetMigModeFunc. +func (mock *Interface) DeviceSetMigMode(device nvml.Device, n int) (nvml.Return, nvml.Return) { + if mock.DeviceSetMigModeFunc == nil { + panic("Interface.DeviceSetMigModeFunc: method is nil but Interface.DeviceSetMigMode was just called") + } + callInfo := struct { + Device nvml.Device + N int + }{ + Device: device, + N: n, + } + mock.lockDeviceSetMigMode.Lock() + mock.calls.DeviceSetMigMode = append(mock.calls.DeviceSetMigMode, callInfo) + mock.lockDeviceSetMigMode.Unlock() + return mock.DeviceSetMigModeFunc(device, n) +} + +// DeviceSetMigModeCalls gets all the calls that were made to DeviceSetMigMode. +// Check the length with: +// +// len(mockedInterface.DeviceSetMigModeCalls()) +func (mock *Interface) DeviceSetMigModeCalls() []struct { + Device nvml.Device + N int +} { + var calls []struct { + Device nvml.Device + N int + } + mock.lockDeviceSetMigMode.RLock() + calls = mock.calls.DeviceSetMigMode + mock.lockDeviceSetMigMode.RUnlock() + return calls +} + +// DeviceSetNvLinkDeviceLowPowerThreshold calls DeviceSetNvLinkDeviceLowPowerThresholdFunc. +func (mock *Interface) DeviceSetNvLinkDeviceLowPowerThreshold(device nvml.Device, nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return { + if mock.DeviceSetNvLinkDeviceLowPowerThresholdFunc == nil { + panic("Interface.DeviceSetNvLinkDeviceLowPowerThresholdFunc: method is nil but Interface.DeviceSetNvLinkDeviceLowPowerThreshold was just called") + } + callInfo := struct { + Device nvml.Device + NvLinkPowerThres *nvml.NvLinkPowerThres + }{ + Device: device, + NvLinkPowerThres: nvLinkPowerThres, + } + mock.lockDeviceSetNvLinkDeviceLowPowerThreshold.Lock() + mock.calls.DeviceSetNvLinkDeviceLowPowerThreshold = append(mock.calls.DeviceSetNvLinkDeviceLowPowerThreshold, callInfo) + mock.lockDeviceSetNvLinkDeviceLowPowerThreshold.Unlock() + return mock.DeviceSetNvLinkDeviceLowPowerThresholdFunc(device, nvLinkPowerThres) +} + +// DeviceSetNvLinkDeviceLowPowerThresholdCalls gets all the calls that were made to DeviceSetNvLinkDeviceLowPowerThreshold. +// Check the length with: +// +// len(mockedInterface.DeviceSetNvLinkDeviceLowPowerThresholdCalls()) +func (mock *Interface) DeviceSetNvLinkDeviceLowPowerThresholdCalls() []struct { + Device nvml.Device + NvLinkPowerThres *nvml.NvLinkPowerThres +} { + var calls []struct { + Device nvml.Device + NvLinkPowerThres *nvml.NvLinkPowerThres + } + mock.lockDeviceSetNvLinkDeviceLowPowerThreshold.RLock() + calls = mock.calls.DeviceSetNvLinkDeviceLowPowerThreshold + mock.lockDeviceSetNvLinkDeviceLowPowerThreshold.RUnlock() + return calls +} + +// DeviceSetNvLinkUtilizationControl calls DeviceSetNvLinkUtilizationControlFunc. +func (mock *Interface) DeviceSetNvLinkUtilizationControl(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { + if mock.DeviceSetNvLinkUtilizationControlFunc == nil { + panic("Interface.DeviceSetNvLinkUtilizationControlFunc: method is nil but Interface.DeviceSetNvLinkUtilizationControl was just called") + } + callInfo := struct { + Device nvml.Device + N1 int + N2 int + NvLinkUtilizationControl *nvml.NvLinkUtilizationControl + B bool + }{ + Device: device, + N1: n1, + N2: n2, + NvLinkUtilizationControl: nvLinkUtilizationControl, + B: b, + } + mock.lockDeviceSetNvLinkUtilizationControl.Lock() + mock.calls.DeviceSetNvLinkUtilizationControl = append(mock.calls.DeviceSetNvLinkUtilizationControl, callInfo) + mock.lockDeviceSetNvLinkUtilizationControl.Unlock() + return mock.DeviceSetNvLinkUtilizationControlFunc(device, n1, n2, nvLinkUtilizationControl, b) +} + +// DeviceSetNvLinkUtilizationControlCalls gets all the calls that were made to DeviceSetNvLinkUtilizationControl. +// Check the length with: +// +// len(mockedInterface.DeviceSetNvLinkUtilizationControlCalls()) +func (mock *Interface) DeviceSetNvLinkUtilizationControlCalls() []struct { + Device nvml.Device + N1 int + N2 int + NvLinkUtilizationControl *nvml.NvLinkUtilizationControl + B bool +} { + var calls []struct { + Device nvml.Device + N1 int + N2 int + NvLinkUtilizationControl *nvml.NvLinkUtilizationControl + B bool + } + mock.lockDeviceSetNvLinkUtilizationControl.RLock() + calls = mock.calls.DeviceSetNvLinkUtilizationControl + mock.lockDeviceSetNvLinkUtilizationControl.RUnlock() + return calls +} + +// DeviceSetNvlinkBwMode calls DeviceSetNvlinkBwModeFunc. +func (mock *Interface) DeviceSetNvlinkBwMode(device nvml.Device, nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { + if mock.DeviceSetNvlinkBwModeFunc == nil { + panic("Interface.DeviceSetNvlinkBwModeFunc: method is nil but Interface.DeviceSetNvlinkBwMode was just called") + } + callInfo := struct { + Device nvml.Device + NvlinkSetBwMode *nvml.NvlinkSetBwMode + }{ + Device: device, + NvlinkSetBwMode: nvlinkSetBwMode, + } + mock.lockDeviceSetNvlinkBwMode.Lock() + mock.calls.DeviceSetNvlinkBwMode = append(mock.calls.DeviceSetNvlinkBwMode, callInfo) + mock.lockDeviceSetNvlinkBwMode.Unlock() + return mock.DeviceSetNvlinkBwModeFunc(device, nvlinkSetBwMode) +} + +// DeviceSetNvlinkBwModeCalls gets all the calls that were made to DeviceSetNvlinkBwMode. +// Check the length with: +// +// len(mockedInterface.DeviceSetNvlinkBwModeCalls()) +func (mock *Interface) DeviceSetNvlinkBwModeCalls() []struct { + Device nvml.Device + NvlinkSetBwMode *nvml.NvlinkSetBwMode +} { + var calls []struct { + Device nvml.Device + NvlinkSetBwMode *nvml.NvlinkSetBwMode + } + mock.lockDeviceSetNvlinkBwMode.RLock() + calls = mock.calls.DeviceSetNvlinkBwMode + mock.lockDeviceSetNvlinkBwMode.RUnlock() + return calls +} + +// DeviceSetPersistenceMode calls DeviceSetPersistenceModeFunc. +func (mock *Interface) DeviceSetPersistenceMode(device nvml.Device, enableState nvml.EnableState) nvml.Return { + if mock.DeviceSetPersistenceModeFunc == nil { + panic("Interface.DeviceSetPersistenceModeFunc: method is nil but Interface.DeviceSetPersistenceMode was just called") + } + callInfo := struct { + Device nvml.Device + EnableState nvml.EnableState + }{ + Device: device, + EnableState: enableState, + } + mock.lockDeviceSetPersistenceMode.Lock() + mock.calls.DeviceSetPersistenceMode = append(mock.calls.DeviceSetPersistenceMode, callInfo) + mock.lockDeviceSetPersistenceMode.Unlock() + return mock.DeviceSetPersistenceModeFunc(device, enableState) +} + +// DeviceSetPersistenceModeCalls gets all the calls that were made to DeviceSetPersistenceMode. +// Check the length with: +// +// len(mockedInterface.DeviceSetPersistenceModeCalls()) +func (mock *Interface) DeviceSetPersistenceModeCalls() []struct { + Device nvml.Device + EnableState nvml.EnableState +} { + var calls []struct { + Device nvml.Device + EnableState nvml.EnableState + } + mock.lockDeviceSetPersistenceMode.RLock() + calls = mock.calls.DeviceSetPersistenceMode + mock.lockDeviceSetPersistenceMode.RUnlock() + return calls +} + +// DeviceSetPowerManagementLimit calls DeviceSetPowerManagementLimitFunc. +func (mock *Interface) DeviceSetPowerManagementLimit(device nvml.Device, v uint32) nvml.Return { + if mock.DeviceSetPowerManagementLimitFunc == nil { + panic("Interface.DeviceSetPowerManagementLimitFunc: method is nil but Interface.DeviceSetPowerManagementLimit was just called") + } + callInfo := struct { + Device nvml.Device + V uint32 + }{ + Device: device, + V: v, + } + mock.lockDeviceSetPowerManagementLimit.Lock() + mock.calls.DeviceSetPowerManagementLimit = append(mock.calls.DeviceSetPowerManagementLimit, callInfo) + mock.lockDeviceSetPowerManagementLimit.Unlock() + return mock.DeviceSetPowerManagementLimitFunc(device, v) +} + +// DeviceSetPowerManagementLimitCalls gets all the calls that were made to DeviceSetPowerManagementLimit. +// Check the length with: +// +// len(mockedInterface.DeviceSetPowerManagementLimitCalls()) +func (mock *Interface) DeviceSetPowerManagementLimitCalls() []struct { + Device nvml.Device + V uint32 +} { + var calls []struct { + Device nvml.Device + V uint32 + } + mock.lockDeviceSetPowerManagementLimit.RLock() + calls = mock.calls.DeviceSetPowerManagementLimit + mock.lockDeviceSetPowerManagementLimit.RUnlock() + return calls +} + +// DeviceSetPowerManagementLimit_v2 calls DeviceSetPowerManagementLimit_v2Func. +func (mock *Interface) DeviceSetPowerManagementLimit_v2(device nvml.Device, powerValue_v2 *nvml.PowerValue_v2) nvml.Return { + if mock.DeviceSetPowerManagementLimit_v2Func == nil { + panic("Interface.DeviceSetPowerManagementLimit_v2Func: method is nil but Interface.DeviceSetPowerManagementLimit_v2 was just called") + } + callInfo := struct { + Device nvml.Device + PowerValue_v2 *nvml.PowerValue_v2 + }{ + Device: device, + PowerValue_v2: powerValue_v2, + } + mock.lockDeviceSetPowerManagementLimit_v2.Lock() + mock.calls.DeviceSetPowerManagementLimit_v2 = append(mock.calls.DeviceSetPowerManagementLimit_v2, callInfo) + mock.lockDeviceSetPowerManagementLimit_v2.Unlock() + return mock.DeviceSetPowerManagementLimit_v2Func(device, powerValue_v2) +} + +// DeviceSetPowerManagementLimit_v2Calls gets all the calls that were made to DeviceSetPowerManagementLimit_v2. +// Check the length with: +// +// len(mockedInterface.DeviceSetPowerManagementLimit_v2Calls()) +func (mock *Interface) DeviceSetPowerManagementLimit_v2Calls() []struct { + Device nvml.Device + PowerValue_v2 *nvml.PowerValue_v2 +} { + var calls []struct { + Device nvml.Device + PowerValue_v2 *nvml.PowerValue_v2 + } + mock.lockDeviceSetPowerManagementLimit_v2.RLock() + calls = mock.calls.DeviceSetPowerManagementLimit_v2 + mock.lockDeviceSetPowerManagementLimit_v2.RUnlock() + return calls +} + +// DeviceSetTemperatureThreshold calls DeviceSetTemperatureThresholdFunc. +func (mock *Interface) DeviceSetTemperatureThreshold(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return { + if mock.DeviceSetTemperatureThresholdFunc == nil { + panic("Interface.DeviceSetTemperatureThresholdFunc: method is nil but Interface.DeviceSetTemperatureThreshold was just called") + } + callInfo := struct { + Device nvml.Device + TemperatureThresholds nvml.TemperatureThresholds + N int + }{ + Device: device, + TemperatureThresholds: temperatureThresholds, + N: n, + } + mock.lockDeviceSetTemperatureThreshold.Lock() + mock.calls.DeviceSetTemperatureThreshold = append(mock.calls.DeviceSetTemperatureThreshold, callInfo) + mock.lockDeviceSetTemperatureThreshold.Unlock() + return mock.DeviceSetTemperatureThresholdFunc(device, temperatureThresholds, n) +} + +// DeviceSetTemperatureThresholdCalls gets all the calls that were made to DeviceSetTemperatureThreshold. +// Check the length with: +// +// len(mockedInterface.DeviceSetTemperatureThresholdCalls()) +func (mock *Interface) DeviceSetTemperatureThresholdCalls() []struct { + Device nvml.Device + TemperatureThresholds nvml.TemperatureThresholds + N int +} { + var calls []struct { + Device nvml.Device + TemperatureThresholds nvml.TemperatureThresholds + N int + } + mock.lockDeviceSetTemperatureThreshold.RLock() + calls = mock.calls.DeviceSetTemperatureThreshold + mock.lockDeviceSetTemperatureThreshold.RUnlock() + return calls +} + +// DeviceSetVgpuCapabilities calls DeviceSetVgpuCapabilitiesFunc. +func (mock *Interface) DeviceSetVgpuCapabilities(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return { + if mock.DeviceSetVgpuCapabilitiesFunc == nil { + panic("Interface.DeviceSetVgpuCapabilitiesFunc: method is nil but Interface.DeviceSetVgpuCapabilities was just called") + } + callInfo := struct { + Device nvml.Device + DeviceVgpuCapability nvml.DeviceVgpuCapability + EnableState nvml.EnableState + }{ + Device: device, + DeviceVgpuCapability: deviceVgpuCapability, + EnableState: enableState, + } + mock.lockDeviceSetVgpuCapabilities.Lock() + mock.calls.DeviceSetVgpuCapabilities = append(mock.calls.DeviceSetVgpuCapabilities, callInfo) + mock.lockDeviceSetVgpuCapabilities.Unlock() + return mock.DeviceSetVgpuCapabilitiesFunc(device, deviceVgpuCapability, enableState) +} + +// DeviceSetVgpuCapabilitiesCalls gets all the calls that were made to DeviceSetVgpuCapabilities. +// Check the length with: +// +// len(mockedInterface.DeviceSetVgpuCapabilitiesCalls()) +func (mock *Interface) DeviceSetVgpuCapabilitiesCalls() []struct { + Device nvml.Device + DeviceVgpuCapability nvml.DeviceVgpuCapability + EnableState nvml.EnableState +} { + var calls []struct { + Device nvml.Device + DeviceVgpuCapability nvml.DeviceVgpuCapability + EnableState nvml.EnableState + } + mock.lockDeviceSetVgpuCapabilities.RLock() + calls = mock.calls.DeviceSetVgpuCapabilities + mock.lockDeviceSetVgpuCapabilities.RUnlock() + return calls +} + +// DeviceSetVgpuHeterogeneousMode calls DeviceSetVgpuHeterogeneousModeFunc. +func (mock *Interface) DeviceSetVgpuHeterogeneousMode(device nvml.Device, vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return { + if mock.DeviceSetVgpuHeterogeneousModeFunc == nil { + panic("Interface.DeviceSetVgpuHeterogeneousModeFunc: method is nil but Interface.DeviceSetVgpuHeterogeneousMode was just called") + } + callInfo := struct { + Device nvml.Device + VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode + }{ + Device: device, + VgpuHeterogeneousMode: vgpuHeterogeneousMode, + } + mock.lockDeviceSetVgpuHeterogeneousMode.Lock() + mock.calls.DeviceSetVgpuHeterogeneousMode = append(mock.calls.DeviceSetVgpuHeterogeneousMode, callInfo) + mock.lockDeviceSetVgpuHeterogeneousMode.Unlock() + return mock.DeviceSetVgpuHeterogeneousModeFunc(device, vgpuHeterogeneousMode) +} + +// DeviceSetVgpuHeterogeneousModeCalls gets all the calls that were made to DeviceSetVgpuHeterogeneousMode. +// Check the length with: +// +// len(mockedInterface.DeviceSetVgpuHeterogeneousModeCalls()) +func (mock *Interface) DeviceSetVgpuHeterogeneousModeCalls() []struct { + Device nvml.Device + VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode +} { + var calls []struct { + Device nvml.Device + VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode + } + mock.lockDeviceSetVgpuHeterogeneousMode.RLock() + calls = mock.calls.DeviceSetVgpuHeterogeneousMode + mock.lockDeviceSetVgpuHeterogeneousMode.RUnlock() + return calls +} + +// DeviceSetVgpuSchedulerState calls DeviceSetVgpuSchedulerStateFunc. +func (mock *Interface) DeviceSetVgpuSchedulerState(device nvml.Device, vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return { + if mock.DeviceSetVgpuSchedulerStateFunc == nil { + panic("Interface.DeviceSetVgpuSchedulerStateFunc: method is nil but Interface.DeviceSetVgpuSchedulerState was just called") + } + callInfo := struct { + Device nvml.Device + VgpuSchedulerSetState *nvml.VgpuSchedulerSetState + }{ + Device: device, + VgpuSchedulerSetState: vgpuSchedulerSetState, + } + mock.lockDeviceSetVgpuSchedulerState.Lock() + mock.calls.DeviceSetVgpuSchedulerState = append(mock.calls.DeviceSetVgpuSchedulerState, callInfo) + mock.lockDeviceSetVgpuSchedulerState.Unlock() + return mock.DeviceSetVgpuSchedulerStateFunc(device, vgpuSchedulerSetState) +} + +// DeviceSetVgpuSchedulerStateCalls gets all the calls that were made to DeviceSetVgpuSchedulerState. +// Check the length with: +// +// len(mockedInterface.DeviceSetVgpuSchedulerStateCalls()) +func (mock *Interface) DeviceSetVgpuSchedulerStateCalls() []struct { + Device nvml.Device + VgpuSchedulerSetState *nvml.VgpuSchedulerSetState +} { + var calls []struct { + Device nvml.Device + VgpuSchedulerSetState *nvml.VgpuSchedulerSetState + } + mock.lockDeviceSetVgpuSchedulerState.RLock() + calls = mock.calls.DeviceSetVgpuSchedulerState + mock.lockDeviceSetVgpuSchedulerState.RUnlock() + return calls +} + +// DeviceSetVirtualizationMode calls DeviceSetVirtualizationModeFunc. +func (mock *Interface) DeviceSetVirtualizationMode(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { + if mock.DeviceSetVirtualizationModeFunc == nil { + panic("Interface.DeviceSetVirtualizationModeFunc: method is nil but Interface.DeviceSetVirtualizationMode was just called") + } + callInfo := struct { + Device nvml.Device + GpuVirtualizationMode nvml.GpuVirtualizationMode + }{ + Device: device, + GpuVirtualizationMode: gpuVirtualizationMode, + } + mock.lockDeviceSetVirtualizationMode.Lock() + mock.calls.DeviceSetVirtualizationMode = append(mock.calls.DeviceSetVirtualizationMode, callInfo) + mock.lockDeviceSetVirtualizationMode.Unlock() + return mock.DeviceSetVirtualizationModeFunc(device, gpuVirtualizationMode) +} + +// DeviceSetVirtualizationModeCalls gets all the calls that were made to DeviceSetVirtualizationMode. +// Check the length with: +// +// len(mockedInterface.DeviceSetVirtualizationModeCalls()) +func (mock *Interface) DeviceSetVirtualizationModeCalls() []struct { + Device nvml.Device + GpuVirtualizationMode nvml.GpuVirtualizationMode +} { + var calls []struct { + Device nvml.Device + GpuVirtualizationMode nvml.GpuVirtualizationMode + } + mock.lockDeviceSetVirtualizationMode.RLock() + calls = mock.calls.DeviceSetVirtualizationMode + mock.lockDeviceSetVirtualizationMode.RUnlock() + return calls +} + +// DeviceValidateInforom calls DeviceValidateInforomFunc. +func (mock *Interface) DeviceValidateInforom(device nvml.Device) nvml.Return { + if mock.DeviceValidateInforomFunc == nil { + panic("Interface.DeviceValidateInforomFunc: method is nil but Interface.DeviceValidateInforom was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceValidateInforom.Lock() + mock.calls.DeviceValidateInforom = append(mock.calls.DeviceValidateInforom, callInfo) + mock.lockDeviceValidateInforom.Unlock() + return mock.DeviceValidateInforomFunc(device) +} + +// DeviceValidateInforomCalls gets all the calls that were made to DeviceValidateInforom. +// Check the length with: +// +// len(mockedInterface.DeviceValidateInforomCalls()) +func (mock *Interface) DeviceValidateInforomCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceValidateInforom.RLock() + calls = mock.calls.DeviceValidateInforom + mock.lockDeviceValidateInforom.RUnlock() + return calls +} + +// DeviceWorkloadPowerProfileClearRequestedProfiles calls DeviceWorkloadPowerProfileClearRequestedProfilesFunc. +func (mock *Interface) DeviceWorkloadPowerProfileClearRequestedProfiles(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { + if mock.DeviceWorkloadPowerProfileClearRequestedProfilesFunc == nil { + panic("Interface.DeviceWorkloadPowerProfileClearRequestedProfilesFunc: method is nil but Interface.DeviceWorkloadPowerProfileClearRequestedProfiles was just called") + } + callInfo := struct { + Device nvml.Device + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + }{ + Device: device, + WorkloadPowerProfileRequestedProfiles: workloadPowerProfileRequestedProfiles, + } + mock.lockDeviceWorkloadPowerProfileClearRequestedProfiles.Lock() + mock.calls.DeviceWorkloadPowerProfileClearRequestedProfiles = append(mock.calls.DeviceWorkloadPowerProfileClearRequestedProfiles, callInfo) + mock.lockDeviceWorkloadPowerProfileClearRequestedProfiles.Unlock() + return mock.DeviceWorkloadPowerProfileClearRequestedProfilesFunc(device, workloadPowerProfileRequestedProfiles) +} + +// DeviceWorkloadPowerProfileClearRequestedProfilesCalls gets all the calls that were made to DeviceWorkloadPowerProfileClearRequestedProfiles. +// Check the length with: +// +// len(mockedInterface.DeviceWorkloadPowerProfileClearRequestedProfilesCalls()) +func (mock *Interface) DeviceWorkloadPowerProfileClearRequestedProfilesCalls() []struct { + Device nvml.Device + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles +} { + var calls []struct { + Device nvml.Device + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + mock.lockDeviceWorkloadPowerProfileClearRequestedProfiles.RLock() + calls = mock.calls.DeviceWorkloadPowerProfileClearRequestedProfiles + mock.lockDeviceWorkloadPowerProfileClearRequestedProfiles.RUnlock() + return calls +} + +// DeviceWorkloadPowerProfileGetCurrentProfiles calls DeviceWorkloadPowerProfileGetCurrentProfilesFunc. +func (mock *Interface) DeviceWorkloadPowerProfileGetCurrentProfiles(device nvml.Device) (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) { + if mock.DeviceWorkloadPowerProfileGetCurrentProfilesFunc == nil { + panic("Interface.DeviceWorkloadPowerProfileGetCurrentProfilesFunc: method is nil but Interface.DeviceWorkloadPowerProfileGetCurrentProfiles was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceWorkloadPowerProfileGetCurrentProfiles.Lock() + mock.calls.DeviceWorkloadPowerProfileGetCurrentProfiles = append(mock.calls.DeviceWorkloadPowerProfileGetCurrentProfiles, callInfo) + mock.lockDeviceWorkloadPowerProfileGetCurrentProfiles.Unlock() + return mock.DeviceWorkloadPowerProfileGetCurrentProfilesFunc(device) +} + +// DeviceWorkloadPowerProfileGetCurrentProfilesCalls gets all the calls that were made to DeviceWorkloadPowerProfileGetCurrentProfiles. +// Check the length with: +// +// len(mockedInterface.DeviceWorkloadPowerProfileGetCurrentProfilesCalls()) +func (mock *Interface) DeviceWorkloadPowerProfileGetCurrentProfilesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceWorkloadPowerProfileGetCurrentProfiles.RLock() + calls = mock.calls.DeviceWorkloadPowerProfileGetCurrentProfiles + mock.lockDeviceWorkloadPowerProfileGetCurrentProfiles.RUnlock() + return calls +} + +// DeviceWorkloadPowerProfileGetProfilesInfo calls DeviceWorkloadPowerProfileGetProfilesInfoFunc. +func (mock *Interface) DeviceWorkloadPowerProfileGetProfilesInfo(device nvml.Device) (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) { + if mock.DeviceWorkloadPowerProfileGetProfilesInfoFunc == nil { + panic("Interface.DeviceWorkloadPowerProfileGetProfilesInfoFunc: method is nil but Interface.DeviceWorkloadPowerProfileGetProfilesInfo was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockDeviceWorkloadPowerProfileGetProfilesInfo.Lock() + mock.calls.DeviceWorkloadPowerProfileGetProfilesInfo = append(mock.calls.DeviceWorkloadPowerProfileGetProfilesInfo, callInfo) + mock.lockDeviceWorkloadPowerProfileGetProfilesInfo.Unlock() + return mock.DeviceWorkloadPowerProfileGetProfilesInfoFunc(device) +} + +// DeviceWorkloadPowerProfileGetProfilesInfoCalls gets all the calls that were made to DeviceWorkloadPowerProfileGetProfilesInfo. +// Check the length with: +// +// len(mockedInterface.DeviceWorkloadPowerProfileGetProfilesInfoCalls()) +func (mock *Interface) DeviceWorkloadPowerProfileGetProfilesInfoCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockDeviceWorkloadPowerProfileGetProfilesInfo.RLock() + calls = mock.calls.DeviceWorkloadPowerProfileGetProfilesInfo + mock.lockDeviceWorkloadPowerProfileGetProfilesInfo.RUnlock() + return calls +} + +// DeviceWorkloadPowerProfileSetRequestedProfiles calls DeviceWorkloadPowerProfileSetRequestedProfilesFunc. +func (mock *Interface) DeviceWorkloadPowerProfileSetRequestedProfiles(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { + if mock.DeviceWorkloadPowerProfileSetRequestedProfilesFunc == nil { + panic("Interface.DeviceWorkloadPowerProfileSetRequestedProfilesFunc: method is nil but Interface.DeviceWorkloadPowerProfileSetRequestedProfiles was just called") + } + callInfo := struct { + Device nvml.Device + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + }{ + Device: device, + WorkloadPowerProfileRequestedProfiles: workloadPowerProfileRequestedProfiles, + } + mock.lockDeviceWorkloadPowerProfileSetRequestedProfiles.Lock() + mock.calls.DeviceWorkloadPowerProfileSetRequestedProfiles = append(mock.calls.DeviceWorkloadPowerProfileSetRequestedProfiles, callInfo) + mock.lockDeviceWorkloadPowerProfileSetRequestedProfiles.Unlock() + return mock.DeviceWorkloadPowerProfileSetRequestedProfilesFunc(device, workloadPowerProfileRequestedProfiles) +} + +// DeviceWorkloadPowerProfileSetRequestedProfilesCalls gets all the calls that were made to DeviceWorkloadPowerProfileSetRequestedProfiles. +// Check the length with: +// +// len(mockedInterface.DeviceWorkloadPowerProfileSetRequestedProfilesCalls()) +func (mock *Interface) DeviceWorkloadPowerProfileSetRequestedProfilesCalls() []struct { + Device nvml.Device + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles +} { + var calls []struct { + Device nvml.Device + WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles + } + mock.lockDeviceWorkloadPowerProfileSetRequestedProfiles.RLock() + calls = mock.calls.DeviceWorkloadPowerProfileSetRequestedProfiles + mock.lockDeviceWorkloadPowerProfileSetRequestedProfiles.RUnlock() + return calls +} + +// ErrorString calls ErrorStringFunc. +func (mock *Interface) ErrorString(returnMoqParam nvml.Return) string { + if mock.ErrorStringFunc == nil { + panic("Interface.ErrorStringFunc: method is nil but Interface.ErrorString was just called") + } + callInfo := struct { + ReturnMoqParam nvml.Return + }{ + ReturnMoqParam: returnMoqParam, + } + mock.lockErrorString.Lock() + mock.calls.ErrorString = append(mock.calls.ErrorString, callInfo) + mock.lockErrorString.Unlock() + return mock.ErrorStringFunc(returnMoqParam) +} + +// ErrorStringCalls gets all the calls that were made to ErrorString. +// Check the length with: +// +// len(mockedInterface.ErrorStringCalls()) +func (mock *Interface) ErrorStringCalls() []struct { + ReturnMoqParam nvml.Return +} { + var calls []struct { + ReturnMoqParam nvml.Return + } + mock.lockErrorString.RLock() + calls = mock.calls.ErrorString + mock.lockErrorString.RUnlock() + return calls +} + +// EventSetCreate calls EventSetCreateFunc. +func (mock *Interface) EventSetCreate() (nvml.EventSet, nvml.Return) { + if mock.EventSetCreateFunc == nil { + panic("Interface.EventSetCreateFunc: method is nil but Interface.EventSetCreate was just called") + } + callInfo := struct { + }{} + mock.lockEventSetCreate.Lock() + mock.calls.EventSetCreate = append(mock.calls.EventSetCreate, callInfo) + mock.lockEventSetCreate.Unlock() + return mock.EventSetCreateFunc() +} + +// EventSetCreateCalls gets all the calls that were made to EventSetCreate. +// Check the length with: +// +// len(mockedInterface.EventSetCreateCalls()) +func (mock *Interface) EventSetCreateCalls() []struct { +} { + var calls []struct { + } + mock.lockEventSetCreate.RLock() + calls = mock.calls.EventSetCreate + mock.lockEventSetCreate.RUnlock() + return calls +} + +// EventSetFree calls EventSetFreeFunc. +func (mock *Interface) EventSetFree(eventSet nvml.EventSet) nvml.Return { + if mock.EventSetFreeFunc == nil { + panic("Interface.EventSetFreeFunc: method is nil but Interface.EventSetFree was just called") + } + callInfo := struct { + EventSet nvml.EventSet + }{ + EventSet: eventSet, + } + mock.lockEventSetFree.Lock() + mock.calls.EventSetFree = append(mock.calls.EventSetFree, callInfo) + mock.lockEventSetFree.Unlock() + return mock.EventSetFreeFunc(eventSet) +} + +// EventSetFreeCalls gets all the calls that were made to EventSetFree. +// Check the length with: +// +// len(mockedInterface.EventSetFreeCalls()) +func (mock *Interface) EventSetFreeCalls() []struct { + EventSet nvml.EventSet +} { + var calls []struct { + EventSet nvml.EventSet + } + mock.lockEventSetFree.RLock() + calls = mock.calls.EventSetFree + mock.lockEventSetFree.RUnlock() + return calls +} + +// EventSetWait calls EventSetWaitFunc. +func (mock *Interface) EventSetWait(eventSet nvml.EventSet, v uint32) (nvml.EventData, nvml.Return) { + if mock.EventSetWaitFunc == nil { + panic("Interface.EventSetWaitFunc: method is nil but Interface.EventSetWait was just called") + } + callInfo := struct { + EventSet nvml.EventSet + V uint32 + }{ + EventSet: eventSet, + V: v, + } + mock.lockEventSetWait.Lock() + mock.calls.EventSetWait = append(mock.calls.EventSetWait, callInfo) + mock.lockEventSetWait.Unlock() + return mock.EventSetWaitFunc(eventSet, v) +} + +// EventSetWaitCalls gets all the calls that were made to EventSetWait. +// Check the length with: +// +// len(mockedInterface.EventSetWaitCalls()) +func (mock *Interface) EventSetWaitCalls() []struct { + EventSet nvml.EventSet + V uint32 +} { + var calls []struct { + EventSet nvml.EventSet + V uint32 + } + mock.lockEventSetWait.RLock() + calls = mock.calls.EventSetWait + mock.lockEventSetWait.RUnlock() + return calls +} + +// Extensions calls ExtensionsFunc. +func (mock *Interface) Extensions() nvml.ExtendedInterface { + if mock.ExtensionsFunc == nil { + panic("Interface.ExtensionsFunc: method is nil but Interface.Extensions was just called") + } + callInfo := struct { + }{} + mock.lockExtensions.Lock() + mock.calls.Extensions = append(mock.calls.Extensions, callInfo) + mock.lockExtensions.Unlock() + return mock.ExtensionsFunc() +} + +// ExtensionsCalls gets all the calls that were made to Extensions. +// Check the length with: +// +// len(mockedInterface.ExtensionsCalls()) +func (mock *Interface) ExtensionsCalls() []struct { +} { + var calls []struct { + } + mock.lockExtensions.RLock() + calls = mock.calls.Extensions + mock.lockExtensions.RUnlock() + return calls +} + +// GetExcludedDeviceCount calls GetExcludedDeviceCountFunc. +func (mock *Interface) GetExcludedDeviceCount() (int, nvml.Return) { + if mock.GetExcludedDeviceCountFunc == nil { + panic("Interface.GetExcludedDeviceCountFunc: method is nil but Interface.GetExcludedDeviceCount was just called") + } + callInfo := struct { + }{} + mock.lockGetExcludedDeviceCount.Lock() + mock.calls.GetExcludedDeviceCount = append(mock.calls.GetExcludedDeviceCount, callInfo) + mock.lockGetExcludedDeviceCount.Unlock() + return mock.GetExcludedDeviceCountFunc() +} + +// GetExcludedDeviceCountCalls gets all the calls that were made to GetExcludedDeviceCount. +// Check the length with: +// +// len(mockedInterface.GetExcludedDeviceCountCalls()) +func (mock *Interface) GetExcludedDeviceCountCalls() []struct { +} { + var calls []struct { + } + mock.lockGetExcludedDeviceCount.RLock() + calls = mock.calls.GetExcludedDeviceCount + mock.lockGetExcludedDeviceCount.RUnlock() + return calls +} + +// GetExcludedDeviceInfoByIndex calls GetExcludedDeviceInfoByIndexFunc. +func (mock *Interface) GetExcludedDeviceInfoByIndex(n int) (nvml.ExcludedDeviceInfo, nvml.Return) { + if mock.GetExcludedDeviceInfoByIndexFunc == nil { + panic("Interface.GetExcludedDeviceInfoByIndexFunc: method is nil but Interface.GetExcludedDeviceInfoByIndex was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetExcludedDeviceInfoByIndex.Lock() + mock.calls.GetExcludedDeviceInfoByIndex = append(mock.calls.GetExcludedDeviceInfoByIndex, callInfo) + mock.lockGetExcludedDeviceInfoByIndex.Unlock() + return mock.GetExcludedDeviceInfoByIndexFunc(n) +} + +// GetExcludedDeviceInfoByIndexCalls gets all the calls that were made to GetExcludedDeviceInfoByIndex. +// Check the length with: +// +// len(mockedInterface.GetExcludedDeviceInfoByIndexCalls()) +func (mock *Interface) GetExcludedDeviceInfoByIndexCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetExcludedDeviceInfoByIndex.RLock() + calls = mock.calls.GetExcludedDeviceInfoByIndex + mock.lockGetExcludedDeviceInfoByIndex.RUnlock() + return calls +} + +// GetVgpuCompatibility calls GetVgpuCompatibilityFunc. +func (mock *Interface) GetVgpuCompatibility(vgpuMetadata *nvml.VgpuMetadata, vgpuPgpuMetadata *nvml.VgpuPgpuMetadata) (nvml.VgpuPgpuCompatibility, nvml.Return) { + if mock.GetVgpuCompatibilityFunc == nil { + panic("Interface.GetVgpuCompatibilityFunc: method is nil but Interface.GetVgpuCompatibility was just called") + } + callInfo := struct { + VgpuMetadata *nvml.VgpuMetadata + VgpuPgpuMetadata *nvml.VgpuPgpuMetadata + }{ + VgpuMetadata: vgpuMetadata, + VgpuPgpuMetadata: vgpuPgpuMetadata, + } + mock.lockGetVgpuCompatibility.Lock() + mock.calls.GetVgpuCompatibility = append(mock.calls.GetVgpuCompatibility, callInfo) + mock.lockGetVgpuCompatibility.Unlock() + return mock.GetVgpuCompatibilityFunc(vgpuMetadata, vgpuPgpuMetadata) +} + +// GetVgpuCompatibilityCalls gets all the calls that were made to GetVgpuCompatibility. +// Check the length with: +// +// len(mockedInterface.GetVgpuCompatibilityCalls()) +func (mock *Interface) GetVgpuCompatibilityCalls() []struct { + VgpuMetadata *nvml.VgpuMetadata + VgpuPgpuMetadata *nvml.VgpuPgpuMetadata +} { + var calls []struct { + VgpuMetadata *nvml.VgpuMetadata + VgpuPgpuMetadata *nvml.VgpuPgpuMetadata + } + mock.lockGetVgpuCompatibility.RLock() + calls = mock.calls.GetVgpuCompatibility + mock.lockGetVgpuCompatibility.RUnlock() + return calls +} + +// GetVgpuDriverCapabilities calls GetVgpuDriverCapabilitiesFunc. +func (mock *Interface) GetVgpuDriverCapabilities(vgpuDriverCapability nvml.VgpuDriverCapability) (bool, nvml.Return) { + if mock.GetVgpuDriverCapabilitiesFunc == nil { + panic("Interface.GetVgpuDriverCapabilitiesFunc: method is nil but Interface.GetVgpuDriverCapabilities was just called") + } + callInfo := struct { + VgpuDriverCapability nvml.VgpuDriverCapability + }{ + VgpuDriverCapability: vgpuDriverCapability, + } + mock.lockGetVgpuDriverCapabilities.Lock() + mock.calls.GetVgpuDriverCapabilities = append(mock.calls.GetVgpuDriverCapabilities, callInfo) + mock.lockGetVgpuDriverCapabilities.Unlock() + return mock.GetVgpuDriverCapabilitiesFunc(vgpuDriverCapability) +} + +// GetVgpuDriverCapabilitiesCalls gets all the calls that were made to GetVgpuDriverCapabilities. +// Check the length with: +// +// len(mockedInterface.GetVgpuDriverCapabilitiesCalls()) +func (mock *Interface) GetVgpuDriverCapabilitiesCalls() []struct { + VgpuDriverCapability nvml.VgpuDriverCapability +} { + var calls []struct { + VgpuDriverCapability nvml.VgpuDriverCapability + } + mock.lockGetVgpuDriverCapabilities.RLock() + calls = mock.calls.GetVgpuDriverCapabilities + mock.lockGetVgpuDriverCapabilities.RUnlock() + return calls +} + +// GetVgpuVersion calls GetVgpuVersionFunc. +func (mock *Interface) GetVgpuVersion() (nvml.VgpuVersion, nvml.VgpuVersion, nvml.Return) { + if mock.GetVgpuVersionFunc == nil { + panic("Interface.GetVgpuVersionFunc: method is nil but Interface.GetVgpuVersion was just called") + } + callInfo := struct { + }{} + mock.lockGetVgpuVersion.Lock() + mock.calls.GetVgpuVersion = append(mock.calls.GetVgpuVersion, callInfo) + mock.lockGetVgpuVersion.Unlock() + return mock.GetVgpuVersionFunc() +} + +// GetVgpuVersionCalls gets all the calls that were made to GetVgpuVersion. +// Check the length with: +// +// len(mockedInterface.GetVgpuVersionCalls()) +func (mock *Interface) GetVgpuVersionCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVgpuVersion.RLock() + calls = mock.calls.GetVgpuVersion + mock.lockGetVgpuVersion.RUnlock() + return calls +} + +// GpmMetricsGet calls GpmMetricsGetFunc. +func (mock *Interface) GpmMetricsGet(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.Return { + if mock.GpmMetricsGetFunc == nil { + panic("Interface.GpmMetricsGetFunc: method is nil but Interface.GpmMetricsGet was just called") + } + callInfo := struct { + GpmMetricsGetType *nvml.GpmMetricsGetType + }{ + GpmMetricsGetType: gpmMetricsGetType, + } + mock.lockGpmMetricsGet.Lock() + mock.calls.GpmMetricsGet = append(mock.calls.GpmMetricsGet, callInfo) + mock.lockGpmMetricsGet.Unlock() + return mock.GpmMetricsGetFunc(gpmMetricsGetType) +} + +// GpmMetricsGetCalls gets all the calls that were made to GpmMetricsGet. +// Check the length with: +// +// len(mockedInterface.GpmMetricsGetCalls()) +func (mock *Interface) GpmMetricsGetCalls() []struct { + GpmMetricsGetType *nvml.GpmMetricsGetType +} { + var calls []struct { + GpmMetricsGetType *nvml.GpmMetricsGetType + } + mock.lockGpmMetricsGet.RLock() + calls = mock.calls.GpmMetricsGet + mock.lockGpmMetricsGet.RUnlock() + return calls +} + +// GpmMetricsGetV calls GpmMetricsGetVFunc. +func (mock *Interface) GpmMetricsGetV(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.GpmMetricsGetVType { + if mock.GpmMetricsGetVFunc == nil { + panic("Interface.GpmMetricsGetVFunc: method is nil but Interface.GpmMetricsGetV was just called") + } + callInfo := struct { + GpmMetricsGetType *nvml.GpmMetricsGetType + }{ + GpmMetricsGetType: gpmMetricsGetType, + } + mock.lockGpmMetricsGetV.Lock() + mock.calls.GpmMetricsGetV = append(mock.calls.GpmMetricsGetV, callInfo) + mock.lockGpmMetricsGetV.Unlock() + return mock.GpmMetricsGetVFunc(gpmMetricsGetType) +} + +// GpmMetricsGetVCalls gets all the calls that were made to GpmMetricsGetV. +// Check the length with: +// +// len(mockedInterface.GpmMetricsGetVCalls()) +func (mock *Interface) GpmMetricsGetVCalls() []struct { + GpmMetricsGetType *nvml.GpmMetricsGetType +} { + var calls []struct { + GpmMetricsGetType *nvml.GpmMetricsGetType + } + mock.lockGpmMetricsGetV.RLock() + calls = mock.calls.GpmMetricsGetV + mock.lockGpmMetricsGetV.RUnlock() + return calls +} + +// GpmMigSampleGet calls GpmMigSampleGetFunc. +func (mock *Interface) GpmMigSampleGet(device nvml.Device, n int, gpmSample nvml.GpmSample) nvml.Return { + if mock.GpmMigSampleGetFunc == nil { + panic("Interface.GpmMigSampleGetFunc: method is nil but Interface.GpmMigSampleGet was just called") + } + callInfo := struct { + Device nvml.Device + N int + GpmSample nvml.GpmSample + }{ + Device: device, + N: n, + GpmSample: gpmSample, + } + mock.lockGpmMigSampleGet.Lock() + mock.calls.GpmMigSampleGet = append(mock.calls.GpmMigSampleGet, callInfo) + mock.lockGpmMigSampleGet.Unlock() + return mock.GpmMigSampleGetFunc(device, n, gpmSample) +} + +// GpmMigSampleGetCalls gets all the calls that were made to GpmMigSampleGet. +// Check the length with: +// +// len(mockedInterface.GpmMigSampleGetCalls()) +func (mock *Interface) GpmMigSampleGetCalls() []struct { + Device nvml.Device + N int + GpmSample nvml.GpmSample +} { + var calls []struct { + Device nvml.Device + N int + GpmSample nvml.GpmSample + } + mock.lockGpmMigSampleGet.RLock() + calls = mock.calls.GpmMigSampleGet + mock.lockGpmMigSampleGet.RUnlock() + return calls +} + +// GpmQueryDeviceSupport calls GpmQueryDeviceSupportFunc. +func (mock *Interface) GpmQueryDeviceSupport(device nvml.Device) (nvml.GpmSupport, nvml.Return) { + if mock.GpmQueryDeviceSupportFunc == nil { + panic("Interface.GpmQueryDeviceSupportFunc: method is nil but Interface.GpmQueryDeviceSupport was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockGpmQueryDeviceSupport.Lock() + mock.calls.GpmQueryDeviceSupport = append(mock.calls.GpmQueryDeviceSupport, callInfo) + mock.lockGpmQueryDeviceSupport.Unlock() + return mock.GpmQueryDeviceSupportFunc(device) +} + +// GpmQueryDeviceSupportCalls gets all the calls that were made to GpmQueryDeviceSupport. +// Check the length with: +// +// len(mockedInterface.GpmQueryDeviceSupportCalls()) +func (mock *Interface) GpmQueryDeviceSupportCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockGpmQueryDeviceSupport.RLock() + calls = mock.calls.GpmQueryDeviceSupport + mock.lockGpmQueryDeviceSupport.RUnlock() + return calls +} + +// GpmQueryDeviceSupportV calls GpmQueryDeviceSupportVFunc. +func (mock *Interface) GpmQueryDeviceSupportV(device nvml.Device) nvml.GpmSupportV { + if mock.GpmQueryDeviceSupportVFunc == nil { + panic("Interface.GpmQueryDeviceSupportVFunc: method is nil but Interface.GpmQueryDeviceSupportV was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockGpmQueryDeviceSupportV.Lock() + mock.calls.GpmQueryDeviceSupportV = append(mock.calls.GpmQueryDeviceSupportV, callInfo) + mock.lockGpmQueryDeviceSupportV.Unlock() + return mock.GpmQueryDeviceSupportVFunc(device) +} + +// GpmQueryDeviceSupportVCalls gets all the calls that were made to GpmQueryDeviceSupportV. +// Check the length with: +// +// len(mockedInterface.GpmQueryDeviceSupportVCalls()) +func (mock *Interface) GpmQueryDeviceSupportVCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockGpmQueryDeviceSupportV.RLock() + calls = mock.calls.GpmQueryDeviceSupportV + mock.lockGpmQueryDeviceSupportV.RUnlock() + return calls +} + +// GpmQueryIfStreamingEnabled calls GpmQueryIfStreamingEnabledFunc. +func (mock *Interface) GpmQueryIfStreamingEnabled(device nvml.Device) (uint32, nvml.Return) { + if mock.GpmQueryIfStreamingEnabledFunc == nil { + panic("Interface.GpmQueryIfStreamingEnabledFunc: method is nil but Interface.GpmQueryIfStreamingEnabled was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockGpmQueryIfStreamingEnabled.Lock() + mock.calls.GpmQueryIfStreamingEnabled = append(mock.calls.GpmQueryIfStreamingEnabled, callInfo) + mock.lockGpmQueryIfStreamingEnabled.Unlock() + return mock.GpmQueryIfStreamingEnabledFunc(device) +} + +// GpmQueryIfStreamingEnabledCalls gets all the calls that were made to GpmQueryIfStreamingEnabled. +// Check the length with: +// +// len(mockedInterface.GpmQueryIfStreamingEnabledCalls()) +func (mock *Interface) GpmQueryIfStreamingEnabledCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockGpmQueryIfStreamingEnabled.RLock() + calls = mock.calls.GpmQueryIfStreamingEnabled + mock.lockGpmQueryIfStreamingEnabled.RUnlock() + return calls +} + +// GpmSampleAlloc calls GpmSampleAllocFunc. +func (mock *Interface) GpmSampleAlloc() (nvml.GpmSample, nvml.Return) { + if mock.GpmSampleAllocFunc == nil { + panic("Interface.GpmSampleAllocFunc: method is nil but Interface.GpmSampleAlloc was just called") + } + callInfo := struct { + }{} + mock.lockGpmSampleAlloc.Lock() + mock.calls.GpmSampleAlloc = append(mock.calls.GpmSampleAlloc, callInfo) + mock.lockGpmSampleAlloc.Unlock() + return mock.GpmSampleAllocFunc() +} + +// GpmSampleAllocCalls gets all the calls that were made to GpmSampleAlloc. +// Check the length with: +// +// len(mockedInterface.GpmSampleAllocCalls()) +func (mock *Interface) GpmSampleAllocCalls() []struct { +} { + var calls []struct { + } + mock.lockGpmSampleAlloc.RLock() + calls = mock.calls.GpmSampleAlloc + mock.lockGpmSampleAlloc.RUnlock() + return calls +} + +// GpmSampleFree calls GpmSampleFreeFunc. +func (mock *Interface) GpmSampleFree(gpmSample nvml.GpmSample) nvml.Return { + if mock.GpmSampleFreeFunc == nil { + panic("Interface.GpmSampleFreeFunc: method is nil but Interface.GpmSampleFree was just called") + } + callInfo := struct { + GpmSample nvml.GpmSample + }{ + GpmSample: gpmSample, + } + mock.lockGpmSampleFree.Lock() + mock.calls.GpmSampleFree = append(mock.calls.GpmSampleFree, callInfo) + mock.lockGpmSampleFree.Unlock() + return mock.GpmSampleFreeFunc(gpmSample) +} + +// GpmSampleFreeCalls gets all the calls that were made to GpmSampleFree. +// Check the length with: +// +// len(mockedInterface.GpmSampleFreeCalls()) +func (mock *Interface) GpmSampleFreeCalls() []struct { + GpmSample nvml.GpmSample +} { + var calls []struct { + GpmSample nvml.GpmSample + } + mock.lockGpmSampleFree.RLock() + calls = mock.calls.GpmSampleFree + mock.lockGpmSampleFree.RUnlock() + return calls +} + +// GpmSampleGet calls GpmSampleGetFunc. +func (mock *Interface) GpmSampleGet(device nvml.Device, gpmSample nvml.GpmSample) nvml.Return { + if mock.GpmSampleGetFunc == nil { + panic("Interface.GpmSampleGetFunc: method is nil but Interface.GpmSampleGet was just called") + } + callInfo := struct { + Device nvml.Device + GpmSample nvml.GpmSample + }{ + Device: device, + GpmSample: gpmSample, + } + mock.lockGpmSampleGet.Lock() + mock.calls.GpmSampleGet = append(mock.calls.GpmSampleGet, callInfo) + mock.lockGpmSampleGet.Unlock() + return mock.GpmSampleGetFunc(device, gpmSample) +} + +// GpmSampleGetCalls gets all the calls that were made to GpmSampleGet. +// Check the length with: +// +// len(mockedInterface.GpmSampleGetCalls()) +func (mock *Interface) GpmSampleGetCalls() []struct { + Device nvml.Device + GpmSample nvml.GpmSample +} { + var calls []struct { + Device nvml.Device + GpmSample nvml.GpmSample + } + mock.lockGpmSampleGet.RLock() + calls = mock.calls.GpmSampleGet + mock.lockGpmSampleGet.RUnlock() + return calls +} + +// GpmSetStreamingEnabled calls GpmSetStreamingEnabledFunc. +func (mock *Interface) GpmSetStreamingEnabled(device nvml.Device, v uint32) nvml.Return { + if mock.GpmSetStreamingEnabledFunc == nil { + panic("Interface.GpmSetStreamingEnabledFunc: method is nil but Interface.GpmSetStreamingEnabled was just called") + } + callInfo := struct { + Device nvml.Device + V uint32 + }{ + Device: device, + V: v, + } + mock.lockGpmSetStreamingEnabled.Lock() + mock.calls.GpmSetStreamingEnabled = append(mock.calls.GpmSetStreamingEnabled, callInfo) + mock.lockGpmSetStreamingEnabled.Unlock() + return mock.GpmSetStreamingEnabledFunc(device, v) +} + +// GpmSetStreamingEnabledCalls gets all the calls that were made to GpmSetStreamingEnabled. +// Check the length with: +// +// len(mockedInterface.GpmSetStreamingEnabledCalls()) +func (mock *Interface) GpmSetStreamingEnabledCalls() []struct { + Device nvml.Device + V uint32 +} { + var calls []struct { + Device nvml.Device + V uint32 + } + mock.lockGpmSetStreamingEnabled.RLock() + calls = mock.calls.GpmSetStreamingEnabled + mock.lockGpmSetStreamingEnabled.RUnlock() + return calls +} + +// GpuInstanceCreateComputeInstance calls GpuInstanceCreateComputeInstanceFunc. +func (mock *Interface) GpuInstanceCreateComputeInstance(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { + if mock.GpuInstanceCreateComputeInstanceFunc == nil { + panic("Interface.GpuInstanceCreateComputeInstanceFunc: method is nil but Interface.GpuInstanceCreateComputeInstance was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + }{ + GpuInstance: gpuInstance, + ComputeInstanceProfileInfo: computeInstanceProfileInfo, + } + mock.lockGpuInstanceCreateComputeInstance.Lock() + mock.calls.GpuInstanceCreateComputeInstance = append(mock.calls.GpuInstanceCreateComputeInstance, callInfo) + mock.lockGpuInstanceCreateComputeInstance.Unlock() + return mock.GpuInstanceCreateComputeInstanceFunc(gpuInstance, computeInstanceProfileInfo) +} + +// GpuInstanceCreateComputeInstanceCalls gets all the calls that were made to GpuInstanceCreateComputeInstance. +// Check the length with: +// +// len(mockedInterface.GpuInstanceCreateComputeInstanceCalls()) +func (mock *Interface) GpuInstanceCreateComputeInstanceCalls() []struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo +} { + var calls []struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + mock.lockGpuInstanceCreateComputeInstance.RLock() + calls = mock.calls.GpuInstanceCreateComputeInstance + mock.lockGpuInstanceCreateComputeInstance.RUnlock() + return calls +} + +// GpuInstanceCreateComputeInstanceWithPlacement calls GpuInstanceCreateComputeInstanceWithPlacementFunc. +func (mock *Interface) GpuInstanceCreateComputeInstanceWithPlacement(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) { + if mock.GpuInstanceCreateComputeInstanceWithPlacementFunc == nil { + panic("Interface.GpuInstanceCreateComputeInstanceWithPlacementFunc: method is nil but Interface.GpuInstanceCreateComputeInstanceWithPlacement was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + ComputeInstancePlacement *nvml.ComputeInstancePlacement + }{ + GpuInstance: gpuInstance, + ComputeInstanceProfileInfo: computeInstanceProfileInfo, + ComputeInstancePlacement: computeInstancePlacement, + } + mock.lockGpuInstanceCreateComputeInstanceWithPlacement.Lock() + mock.calls.GpuInstanceCreateComputeInstanceWithPlacement = append(mock.calls.GpuInstanceCreateComputeInstanceWithPlacement, callInfo) + mock.lockGpuInstanceCreateComputeInstanceWithPlacement.Unlock() + return mock.GpuInstanceCreateComputeInstanceWithPlacementFunc(gpuInstance, computeInstanceProfileInfo, computeInstancePlacement) +} + +// GpuInstanceCreateComputeInstanceWithPlacementCalls gets all the calls that were made to GpuInstanceCreateComputeInstanceWithPlacement. +// Check the length with: +// +// len(mockedInterface.GpuInstanceCreateComputeInstanceWithPlacementCalls()) +func (mock *Interface) GpuInstanceCreateComputeInstanceWithPlacementCalls() []struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + ComputeInstancePlacement *nvml.ComputeInstancePlacement +} { + var calls []struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + ComputeInstancePlacement *nvml.ComputeInstancePlacement + } + mock.lockGpuInstanceCreateComputeInstanceWithPlacement.RLock() + calls = mock.calls.GpuInstanceCreateComputeInstanceWithPlacement + mock.lockGpuInstanceCreateComputeInstanceWithPlacement.RUnlock() + return calls +} + +// GpuInstanceDestroy calls GpuInstanceDestroyFunc. +func (mock *Interface) GpuInstanceDestroy(gpuInstance nvml.GpuInstance) nvml.Return { + if mock.GpuInstanceDestroyFunc == nil { + panic("Interface.GpuInstanceDestroyFunc: method is nil but Interface.GpuInstanceDestroy was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceDestroy.Lock() + mock.calls.GpuInstanceDestroy = append(mock.calls.GpuInstanceDestroy, callInfo) + mock.lockGpuInstanceDestroy.Unlock() + return mock.GpuInstanceDestroyFunc(gpuInstance) +} + +// GpuInstanceDestroyCalls gets all the calls that were made to GpuInstanceDestroy. +// Check the length with: +// +// len(mockedInterface.GpuInstanceDestroyCalls()) +func (mock *Interface) GpuInstanceDestroyCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceDestroy.RLock() + calls = mock.calls.GpuInstanceDestroy + mock.lockGpuInstanceDestroy.RUnlock() + return calls +} + +// GpuInstanceGetActiveVgpus calls GpuInstanceGetActiveVgpusFunc. +func (mock *Interface) GpuInstanceGetActiveVgpus(gpuInstance nvml.GpuInstance) (nvml.ActiveVgpuInstanceInfo, nvml.Return) { + if mock.GpuInstanceGetActiveVgpusFunc == nil { + panic("Interface.GpuInstanceGetActiveVgpusFunc: method is nil but Interface.GpuInstanceGetActiveVgpus was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetActiveVgpus.Lock() + mock.calls.GpuInstanceGetActiveVgpus = append(mock.calls.GpuInstanceGetActiveVgpus, callInfo) + mock.lockGpuInstanceGetActiveVgpus.Unlock() + return mock.GpuInstanceGetActiveVgpusFunc(gpuInstance) +} + +// GpuInstanceGetActiveVgpusCalls gets all the calls that were made to GpuInstanceGetActiveVgpus. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetActiveVgpusCalls()) +func (mock *Interface) GpuInstanceGetActiveVgpusCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetActiveVgpus.RLock() + calls = mock.calls.GpuInstanceGetActiveVgpus + mock.lockGpuInstanceGetActiveVgpus.RUnlock() + return calls +} + +// GpuInstanceGetComputeInstanceById calls GpuInstanceGetComputeInstanceByIdFunc. +func (mock *Interface) GpuInstanceGetComputeInstanceById(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, nvml.Return) { + if mock.GpuInstanceGetComputeInstanceByIdFunc == nil { + panic("Interface.GpuInstanceGetComputeInstanceByIdFunc: method is nil but Interface.GpuInstanceGetComputeInstanceById was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + N int + }{ + GpuInstance: gpuInstance, + N: n, + } + mock.lockGpuInstanceGetComputeInstanceById.Lock() + mock.calls.GpuInstanceGetComputeInstanceById = append(mock.calls.GpuInstanceGetComputeInstanceById, callInfo) + mock.lockGpuInstanceGetComputeInstanceById.Unlock() + return mock.GpuInstanceGetComputeInstanceByIdFunc(gpuInstance, n) +} + +// GpuInstanceGetComputeInstanceByIdCalls gets all the calls that were made to GpuInstanceGetComputeInstanceById. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetComputeInstanceByIdCalls()) +func (mock *Interface) GpuInstanceGetComputeInstanceByIdCalls() []struct { + GpuInstance nvml.GpuInstance + N int +} { + var calls []struct { + GpuInstance nvml.GpuInstance + N int + } + mock.lockGpuInstanceGetComputeInstanceById.RLock() + calls = mock.calls.GpuInstanceGetComputeInstanceById + mock.lockGpuInstanceGetComputeInstanceById.RUnlock() + return calls +} + +// GpuInstanceGetComputeInstancePossiblePlacements calls GpuInstanceGetComputeInstancePossiblePlacementsFunc. +func (mock *Interface) GpuInstanceGetComputeInstancePossiblePlacements(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { + if mock.GpuInstanceGetComputeInstancePossiblePlacementsFunc == nil { + panic("Interface.GpuInstanceGetComputeInstancePossiblePlacementsFunc: method is nil but Interface.GpuInstanceGetComputeInstancePossiblePlacements was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + }{ + GpuInstance: gpuInstance, + ComputeInstanceProfileInfo: computeInstanceProfileInfo, + } + mock.lockGpuInstanceGetComputeInstancePossiblePlacements.Lock() + mock.calls.GpuInstanceGetComputeInstancePossiblePlacements = append(mock.calls.GpuInstanceGetComputeInstancePossiblePlacements, callInfo) + mock.lockGpuInstanceGetComputeInstancePossiblePlacements.Unlock() + return mock.GpuInstanceGetComputeInstancePossiblePlacementsFunc(gpuInstance, computeInstanceProfileInfo) +} + +// GpuInstanceGetComputeInstancePossiblePlacementsCalls gets all the calls that were made to GpuInstanceGetComputeInstancePossiblePlacements. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetComputeInstancePossiblePlacementsCalls()) +func (mock *Interface) GpuInstanceGetComputeInstancePossiblePlacementsCalls() []struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo +} { + var calls []struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + mock.lockGpuInstanceGetComputeInstancePossiblePlacements.RLock() + calls = mock.calls.GpuInstanceGetComputeInstancePossiblePlacements + mock.lockGpuInstanceGetComputeInstancePossiblePlacements.RUnlock() + return calls +} + +// GpuInstanceGetComputeInstanceProfileInfo calls GpuInstanceGetComputeInstanceProfileInfoFunc. +func (mock *Interface) GpuInstanceGetComputeInstanceProfileInfo(gpuInstance nvml.GpuInstance, n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { + if mock.GpuInstanceGetComputeInstanceProfileInfoFunc == nil { + panic("Interface.GpuInstanceGetComputeInstanceProfileInfoFunc: method is nil but Interface.GpuInstanceGetComputeInstanceProfileInfo was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + N1 int + N2 int + }{ + GpuInstance: gpuInstance, + N1: n1, + N2: n2, + } + mock.lockGpuInstanceGetComputeInstanceProfileInfo.Lock() + mock.calls.GpuInstanceGetComputeInstanceProfileInfo = append(mock.calls.GpuInstanceGetComputeInstanceProfileInfo, callInfo) + mock.lockGpuInstanceGetComputeInstanceProfileInfo.Unlock() + return mock.GpuInstanceGetComputeInstanceProfileInfoFunc(gpuInstance, n1, n2) +} + +// GpuInstanceGetComputeInstanceProfileInfoCalls gets all the calls that were made to GpuInstanceGetComputeInstanceProfileInfo. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetComputeInstanceProfileInfoCalls()) +func (mock *Interface) GpuInstanceGetComputeInstanceProfileInfoCalls() []struct { + GpuInstance nvml.GpuInstance + N1 int + N2 int +} { + var calls []struct { + GpuInstance nvml.GpuInstance + N1 int + N2 int + } + mock.lockGpuInstanceGetComputeInstanceProfileInfo.RLock() + calls = mock.calls.GpuInstanceGetComputeInstanceProfileInfo + mock.lockGpuInstanceGetComputeInstanceProfileInfo.RUnlock() + return calls +} + +// GpuInstanceGetComputeInstanceProfileInfoV calls GpuInstanceGetComputeInstanceProfileInfoVFunc. +func (mock *Interface) GpuInstanceGetComputeInstanceProfileInfoV(gpuInstance nvml.GpuInstance, n1 int, n2 int) nvml.ComputeInstanceProfileInfoHandler { + if mock.GpuInstanceGetComputeInstanceProfileInfoVFunc == nil { + panic("Interface.GpuInstanceGetComputeInstanceProfileInfoVFunc: method is nil but Interface.GpuInstanceGetComputeInstanceProfileInfoV was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + N1 int + N2 int + }{ + GpuInstance: gpuInstance, + N1: n1, + N2: n2, + } + mock.lockGpuInstanceGetComputeInstanceProfileInfoV.Lock() + mock.calls.GpuInstanceGetComputeInstanceProfileInfoV = append(mock.calls.GpuInstanceGetComputeInstanceProfileInfoV, callInfo) + mock.lockGpuInstanceGetComputeInstanceProfileInfoV.Unlock() + return mock.GpuInstanceGetComputeInstanceProfileInfoVFunc(gpuInstance, n1, n2) +} + +// GpuInstanceGetComputeInstanceProfileInfoVCalls gets all the calls that were made to GpuInstanceGetComputeInstanceProfileInfoV. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetComputeInstanceProfileInfoVCalls()) +func (mock *Interface) GpuInstanceGetComputeInstanceProfileInfoVCalls() []struct { + GpuInstance nvml.GpuInstance + N1 int + N2 int +} { + var calls []struct { + GpuInstance nvml.GpuInstance + N1 int + N2 int + } + mock.lockGpuInstanceGetComputeInstanceProfileInfoV.RLock() + calls = mock.calls.GpuInstanceGetComputeInstanceProfileInfoV + mock.lockGpuInstanceGetComputeInstanceProfileInfoV.RUnlock() + return calls +} + +// GpuInstanceGetComputeInstanceRemainingCapacity calls GpuInstanceGetComputeInstanceRemainingCapacityFunc. +func (mock *Interface) GpuInstanceGetComputeInstanceRemainingCapacity(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, nvml.Return) { + if mock.GpuInstanceGetComputeInstanceRemainingCapacityFunc == nil { + panic("Interface.GpuInstanceGetComputeInstanceRemainingCapacityFunc: method is nil but Interface.GpuInstanceGetComputeInstanceRemainingCapacity was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + }{ + GpuInstance: gpuInstance, + ComputeInstanceProfileInfo: computeInstanceProfileInfo, + } + mock.lockGpuInstanceGetComputeInstanceRemainingCapacity.Lock() + mock.calls.GpuInstanceGetComputeInstanceRemainingCapacity = append(mock.calls.GpuInstanceGetComputeInstanceRemainingCapacity, callInfo) + mock.lockGpuInstanceGetComputeInstanceRemainingCapacity.Unlock() + return mock.GpuInstanceGetComputeInstanceRemainingCapacityFunc(gpuInstance, computeInstanceProfileInfo) +} + +// GpuInstanceGetComputeInstanceRemainingCapacityCalls gets all the calls that were made to GpuInstanceGetComputeInstanceRemainingCapacity. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetComputeInstanceRemainingCapacityCalls()) +func (mock *Interface) GpuInstanceGetComputeInstanceRemainingCapacityCalls() []struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo +} { + var calls []struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + mock.lockGpuInstanceGetComputeInstanceRemainingCapacity.RLock() + calls = mock.calls.GpuInstanceGetComputeInstanceRemainingCapacity + mock.lockGpuInstanceGetComputeInstanceRemainingCapacity.RUnlock() + return calls +} + +// GpuInstanceGetComputeInstances calls GpuInstanceGetComputeInstancesFunc. +func (mock *Interface) GpuInstanceGetComputeInstances(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { + if mock.GpuInstanceGetComputeInstancesFunc == nil { + panic("Interface.GpuInstanceGetComputeInstancesFunc: method is nil but Interface.GpuInstanceGetComputeInstances was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + }{ + GpuInstance: gpuInstance, + ComputeInstanceProfileInfo: computeInstanceProfileInfo, + } + mock.lockGpuInstanceGetComputeInstances.Lock() + mock.calls.GpuInstanceGetComputeInstances = append(mock.calls.GpuInstanceGetComputeInstances, callInfo) + mock.lockGpuInstanceGetComputeInstances.Unlock() + return mock.GpuInstanceGetComputeInstancesFunc(gpuInstance, computeInstanceProfileInfo) +} + +// GpuInstanceGetComputeInstancesCalls gets all the calls that were made to GpuInstanceGetComputeInstances. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetComputeInstancesCalls()) +func (mock *Interface) GpuInstanceGetComputeInstancesCalls() []struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo +} { + var calls []struct { + GpuInstance nvml.GpuInstance + ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo + } + mock.lockGpuInstanceGetComputeInstances.RLock() + calls = mock.calls.GpuInstanceGetComputeInstances + mock.lockGpuInstanceGetComputeInstances.RUnlock() + return calls +} + +// GpuInstanceGetCreatableVgpus calls GpuInstanceGetCreatableVgpusFunc. +func (mock *Interface) GpuInstanceGetCreatableVgpus(gpuInstance nvml.GpuInstance) (nvml.VgpuTypeIdInfo, nvml.Return) { + if mock.GpuInstanceGetCreatableVgpusFunc == nil { + panic("Interface.GpuInstanceGetCreatableVgpusFunc: method is nil but Interface.GpuInstanceGetCreatableVgpus was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetCreatableVgpus.Lock() + mock.calls.GpuInstanceGetCreatableVgpus = append(mock.calls.GpuInstanceGetCreatableVgpus, callInfo) + mock.lockGpuInstanceGetCreatableVgpus.Unlock() + return mock.GpuInstanceGetCreatableVgpusFunc(gpuInstance) +} + +// GpuInstanceGetCreatableVgpusCalls gets all the calls that were made to GpuInstanceGetCreatableVgpus. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetCreatableVgpusCalls()) +func (mock *Interface) GpuInstanceGetCreatableVgpusCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetCreatableVgpus.RLock() + calls = mock.calls.GpuInstanceGetCreatableVgpus + mock.lockGpuInstanceGetCreatableVgpus.RUnlock() + return calls +} + +// GpuInstanceGetInfo calls GpuInstanceGetInfoFunc. +func (mock *Interface) GpuInstanceGetInfo(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, nvml.Return) { + if mock.GpuInstanceGetInfoFunc == nil { + panic("Interface.GpuInstanceGetInfoFunc: method is nil but Interface.GpuInstanceGetInfo was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetInfo.Lock() + mock.calls.GpuInstanceGetInfo = append(mock.calls.GpuInstanceGetInfo, callInfo) + mock.lockGpuInstanceGetInfo.Unlock() + return mock.GpuInstanceGetInfoFunc(gpuInstance) +} + +// GpuInstanceGetInfoCalls gets all the calls that were made to GpuInstanceGetInfo. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetInfoCalls()) +func (mock *Interface) GpuInstanceGetInfoCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetInfo.RLock() + calls = mock.calls.GpuInstanceGetInfo + mock.lockGpuInstanceGetInfo.RUnlock() + return calls +} + +// GpuInstanceGetVgpuHeterogeneousMode calls GpuInstanceGetVgpuHeterogeneousModeFunc. +func (mock *Interface) GpuInstanceGetVgpuHeterogeneousMode(gpuInstance nvml.GpuInstance) (nvml.VgpuHeterogeneousMode, nvml.Return) { + if mock.GpuInstanceGetVgpuHeterogeneousModeFunc == nil { + panic("Interface.GpuInstanceGetVgpuHeterogeneousModeFunc: method is nil but Interface.GpuInstanceGetVgpuHeterogeneousMode was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetVgpuHeterogeneousMode.Lock() + mock.calls.GpuInstanceGetVgpuHeterogeneousMode = append(mock.calls.GpuInstanceGetVgpuHeterogeneousMode, callInfo) + mock.lockGpuInstanceGetVgpuHeterogeneousMode.Unlock() + return mock.GpuInstanceGetVgpuHeterogeneousModeFunc(gpuInstance) +} + +// GpuInstanceGetVgpuHeterogeneousModeCalls gets all the calls that were made to GpuInstanceGetVgpuHeterogeneousMode. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetVgpuHeterogeneousModeCalls()) +func (mock *Interface) GpuInstanceGetVgpuHeterogeneousModeCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetVgpuHeterogeneousMode.RLock() + calls = mock.calls.GpuInstanceGetVgpuHeterogeneousMode + mock.lockGpuInstanceGetVgpuHeterogeneousMode.RUnlock() + return calls +} + +// GpuInstanceGetVgpuSchedulerLog calls GpuInstanceGetVgpuSchedulerLogFunc. +func (mock *Interface) GpuInstanceGetVgpuSchedulerLog(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerLogInfo, nvml.Return) { + if mock.GpuInstanceGetVgpuSchedulerLogFunc == nil { + panic("Interface.GpuInstanceGetVgpuSchedulerLogFunc: method is nil but Interface.GpuInstanceGetVgpuSchedulerLog was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetVgpuSchedulerLog.Lock() + mock.calls.GpuInstanceGetVgpuSchedulerLog = append(mock.calls.GpuInstanceGetVgpuSchedulerLog, callInfo) + mock.lockGpuInstanceGetVgpuSchedulerLog.Unlock() + return mock.GpuInstanceGetVgpuSchedulerLogFunc(gpuInstance) +} + +// GpuInstanceGetVgpuSchedulerLogCalls gets all the calls that were made to GpuInstanceGetVgpuSchedulerLog. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetVgpuSchedulerLogCalls()) +func (mock *Interface) GpuInstanceGetVgpuSchedulerLogCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetVgpuSchedulerLog.RLock() + calls = mock.calls.GpuInstanceGetVgpuSchedulerLog + mock.lockGpuInstanceGetVgpuSchedulerLog.RUnlock() + return calls +} + +// GpuInstanceGetVgpuSchedulerState calls GpuInstanceGetVgpuSchedulerStateFunc. +func (mock *Interface) GpuInstanceGetVgpuSchedulerState(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerStateInfo, nvml.Return) { + if mock.GpuInstanceGetVgpuSchedulerStateFunc == nil { + panic("Interface.GpuInstanceGetVgpuSchedulerStateFunc: method is nil but Interface.GpuInstanceGetVgpuSchedulerState was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetVgpuSchedulerState.Lock() + mock.calls.GpuInstanceGetVgpuSchedulerState = append(mock.calls.GpuInstanceGetVgpuSchedulerState, callInfo) + mock.lockGpuInstanceGetVgpuSchedulerState.Unlock() + return mock.GpuInstanceGetVgpuSchedulerStateFunc(gpuInstance) +} + +// GpuInstanceGetVgpuSchedulerStateCalls gets all the calls that were made to GpuInstanceGetVgpuSchedulerState. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetVgpuSchedulerStateCalls()) +func (mock *Interface) GpuInstanceGetVgpuSchedulerStateCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetVgpuSchedulerState.RLock() + calls = mock.calls.GpuInstanceGetVgpuSchedulerState + mock.lockGpuInstanceGetVgpuSchedulerState.RUnlock() + return calls +} + +// GpuInstanceGetVgpuTypeCreatablePlacements calls GpuInstanceGetVgpuTypeCreatablePlacementsFunc. +func (mock *Interface) GpuInstanceGetVgpuTypeCreatablePlacements(gpuInstance nvml.GpuInstance) (nvml.VgpuCreatablePlacementInfo, nvml.Return) { + if mock.GpuInstanceGetVgpuTypeCreatablePlacementsFunc == nil { + panic("Interface.GpuInstanceGetVgpuTypeCreatablePlacementsFunc: method is nil but Interface.GpuInstanceGetVgpuTypeCreatablePlacements was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + }{ + GpuInstance: gpuInstance, + } + mock.lockGpuInstanceGetVgpuTypeCreatablePlacements.Lock() + mock.calls.GpuInstanceGetVgpuTypeCreatablePlacements = append(mock.calls.GpuInstanceGetVgpuTypeCreatablePlacements, callInfo) + mock.lockGpuInstanceGetVgpuTypeCreatablePlacements.Unlock() + return mock.GpuInstanceGetVgpuTypeCreatablePlacementsFunc(gpuInstance) +} + +// GpuInstanceGetVgpuTypeCreatablePlacementsCalls gets all the calls that were made to GpuInstanceGetVgpuTypeCreatablePlacements. +// Check the length with: +// +// len(mockedInterface.GpuInstanceGetVgpuTypeCreatablePlacementsCalls()) +func (mock *Interface) GpuInstanceGetVgpuTypeCreatablePlacementsCalls() []struct { + GpuInstance nvml.GpuInstance +} { + var calls []struct { + GpuInstance nvml.GpuInstance + } + mock.lockGpuInstanceGetVgpuTypeCreatablePlacements.RLock() + calls = mock.calls.GpuInstanceGetVgpuTypeCreatablePlacements + mock.lockGpuInstanceGetVgpuTypeCreatablePlacements.RUnlock() + return calls +} + +// GpuInstanceSetVgpuHeterogeneousMode calls GpuInstanceSetVgpuHeterogeneousModeFunc. +func (mock *Interface) GpuInstanceSetVgpuHeterogeneousMode(gpuInstance nvml.GpuInstance, vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return { + if mock.GpuInstanceSetVgpuHeterogeneousModeFunc == nil { + panic("Interface.GpuInstanceSetVgpuHeterogeneousModeFunc: method is nil but Interface.GpuInstanceSetVgpuHeterogeneousMode was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode + }{ + GpuInstance: gpuInstance, + VgpuHeterogeneousMode: vgpuHeterogeneousMode, + } + mock.lockGpuInstanceSetVgpuHeterogeneousMode.Lock() + mock.calls.GpuInstanceSetVgpuHeterogeneousMode = append(mock.calls.GpuInstanceSetVgpuHeterogeneousMode, callInfo) + mock.lockGpuInstanceSetVgpuHeterogeneousMode.Unlock() + return mock.GpuInstanceSetVgpuHeterogeneousModeFunc(gpuInstance, vgpuHeterogeneousMode) +} + +// GpuInstanceSetVgpuHeterogeneousModeCalls gets all the calls that were made to GpuInstanceSetVgpuHeterogeneousMode. +// Check the length with: +// +// len(mockedInterface.GpuInstanceSetVgpuHeterogeneousModeCalls()) +func (mock *Interface) GpuInstanceSetVgpuHeterogeneousModeCalls() []struct { + GpuInstance nvml.GpuInstance + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode +} { + var calls []struct { + GpuInstance nvml.GpuInstance + VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode + } + mock.lockGpuInstanceSetVgpuHeterogeneousMode.RLock() + calls = mock.calls.GpuInstanceSetVgpuHeterogeneousMode + mock.lockGpuInstanceSetVgpuHeterogeneousMode.RUnlock() + return calls +} + +// GpuInstanceSetVgpuSchedulerState calls GpuInstanceSetVgpuSchedulerStateFunc. +func (mock *Interface) GpuInstanceSetVgpuSchedulerState(gpuInstance nvml.GpuInstance, vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return { + if mock.GpuInstanceSetVgpuSchedulerStateFunc == nil { + panic("Interface.GpuInstanceSetVgpuSchedulerStateFunc: method is nil but Interface.GpuInstanceSetVgpuSchedulerState was just called") + } + callInfo := struct { + GpuInstance nvml.GpuInstance + VgpuSchedulerState *nvml.VgpuSchedulerState + }{ + GpuInstance: gpuInstance, + VgpuSchedulerState: vgpuSchedulerState, + } + mock.lockGpuInstanceSetVgpuSchedulerState.Lock() + mock.calls.GpuInstanceSetVgpuSchedulerState = append(mock.calls.GpuInstanceSetVgpuSchedulerState, callInfo) + mock.lockGpuInstanceSetVgpuSchedulerState.Unlock() + return mock.GpuInstanceSetVgpuSchedulerStateFunc(gpuInstance, vgpuSchedulerState) +} + +// GpuInstanceSetVgpuSchedulerStateCalls gets all the calls that were made to GpuInstanceSetVgpuSchedulerState. +// Check the length with: +// +// len(mockedInterface.GpuInstanceSetVgpuSchedulerStateCalls()) +func (mock *Interface) GpuInstanceSetVgpuSchedulerStateCalls() []struct { + GpuInstance nvml.GpuInstance + VgpuSchedulerState *nvml.VgpuSchedulerState +} { + var calls []struct { + GpuInstance nvml.GpuInstance + VgpuSchedulerState *nvml.VgpuSchedulerState + } + mock.lockGpuInstanceSetVgpuSchedulerState.RLock() + calls = mock.calls.GpuInstanceSetVgpuSchedulerState + mock.lockGpuInstanceSetVgpuSchedulerState.RUnlock() + return calls +} + +// Init calls InitFunc. +func (mock *Interface) Init() nvml.Return { + if mock.InitFunc == nil { + panic("Interface.InitFunc: method is nil but Interface.Init was just called") + } + callInfo := struct { + }{} + mock.lockInit.Lock() + mock.calls.Init = append(mock.calls.Init, callInfo) + mock.lockInit.Unlock() + return mock.InitFunc() +} + +// InitCalls gets all the calls that were made to Init. +// Check the length with: +// +// len(mockedInterface.InitCalls()) +func (mock *Interface) InitCalls() []struct { +} { + var calls []struct { + } + mock.lockInit.RLock() + calls = mock.calls.Init + mock.lockInit.RUnlock() + return calls +} + +// InitWithFlags calls InitWithFlagsFunc. +func (mock *Interface) InitWithFlags(v uint32) nvml.Return { + if mock.InitWithFlagsFunc == nil { + panic("Interface.InitWithFlagsFunc: method is nil but Interface.InitWithFlags was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockInitWithFlags.Lock() + mock.calls.InitWithFlags = append(mock.calls.InitWithFlags, callInfo) + mock.lockInitWithFlags.Unlock() + return mock.InitWithFlagsFunc(v) +} + +// InitWithFlagsCalls gets all the calls that were made to InitWithFlags. +// Check the length with: +// +// len(mockedInterface.InitWithFlagsCalls()) +func (mock *Interface) InitWithFlagsCalls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockInitWithFlags.RLock() + calls = mock.calls.InitWithFlags + mock.lockInitWithFlags.RUnlock() + return calls +} + +// SetVgpuVersion calls SetVgpuVersionFunc. +func (mock *Interface) SetVgpuVersion(vgpuVersion *nvml.VgpuVersion) nvml.Return { + if mock.SetVgpuVersionFunc == nil { + panic("Interface.SetVgpuVersionFunc: method is nil but Interface.SetVgpuVersion was just called") + } + callInfo := struct { + VgpuVersion *nvml.VgpuVersion + }{ + VgpuVersion: vgpuVersion, + } + mock.lockSetVgpuVersion.Lock() + mock.calls.SetVgpuVersion = append(mock.calls.SetVgpuVersion, callInfo) + mock.lockSetVgpuVersion.Unlock() + return mock.SetVgpuVersionFunc(vgpuVersion) +} + +// SetVgpuVersionCalls gets all the calls that were made to SetVgpuVersion. +// Check the length with: +// +// len(mockedInterface.SetVgpuVersionCalls()) +func (mock *Interface) SetVgpuVersionCalls() []struct { + VgpuVersion *nvml.VgpuVersion +} { + var calls []struct { + VgpuVersion *nvml.VgpuVersion + } + mock.lockSetVgpuVersion.RLock() + calls = mock.calls.SetVgpuVersion + mock.lockSetVgpuVersion.RUnlock() + return calls +} + +// Shutdown calls ShutdownFunc. +func (mock *Interface) Shutdown() nvml.Return { + if mock.ShutdownFunc == nil { + panic("Interface.ShutdownFunc: method is nil but Interface.Shutdown was just called") + } + callInfo := struct { + }{} + mock.lockShutdown.Lock() + mock.calls.Shutdown = append(mock.calls.Shutdown, callInfo) + mock.lockShutdown.Unlock() + return mock.ShutdownFunc() +} + +// ShutdownCalls gets all the calls that were made to Shutdown. +// Check the length with: +// +// len(mockedInterface.ShutdownCalls()) +func (mock *Interface) ShutdownCalls() []struct { +} { + var calls []struct { + } + mock.lockShutdown.RLock() + calls = mock.calls.Shutdown + mock.lockShutdown.RUnlock() + return calls +} + +// SystemEventSetCreate calls SystemEventSetCreateFunc. +func (mock *Interface) SystemEventSetCreate(systemEventSetCreateRequest *nvml.SystemEventSetCreateRequest) nvml.Return { + if mock.SystemEventSetCreateFunc == nil { + panic("Interface.SystemEventSetCreateFunc: method is nil but Interface.SystemEventSetCreate was just called") + } + callInfo := struct { + SystemEventSetCreateRequest *nvml.SystemEventSetCreateRequest + }{ + SystemEventSetCreateRequest: systemEventSetCreateRequest, + } + mock.lockSystemEventSetCreate.Lock() + mock.calls.SystemEventSetCreate = append(mock.calls.SystemEventSetCreate, callInfo) + mock.lockSystemEventSetCreate.Unlock() + return mock.SystemEventSetCreateFunc(systemEventSetCreateRequest) +} + +// SystemEventSetCreateCalls gets all the calls that were made to SystemEventSetCreate. +// Check the length with: +// +// len(mockedInterface.SystemEventSetCreateCalls()) +func (mock *Interface) SystemEventSetCreateCalls() []struct { + SystemEventSetCreateRequest *nvml.SystemEventSetCreateRequest +} { + var calls []struct { + SystemEventSetCreateRequest *nvml.SystemEventSetCreateRequest + } + mock.lockSystemEventSetCreate.RLock() + calls = mock.calls.SystemEventSetCreate + mock.lockSystemEventSetCreate.RUnlock() + return calls +} + +// SystemEventSetFree calls SystemEventSetFreeFunc. +func (mock *Interface) SystemEventSetFree(systemEventSetFreeRequest *nvml.SystemEventSetFreeRequest) nvml.Return { + if mock.SystemEventSetFreeFunc == nil { + panic("Interface.SystemEventSetFreeFunc: method is nil but Interface.SystemEventSetFree was just called") + } + callInfo := struct { + SystemEventSetFreeRequest *nvml.SystemEventSetFreeRequest + }{ + SystemEventSetFreeRequest: systemEventSetFreeRequest, + } + mock.lockSystemEventSetFree.Lock() + mock.calls.SystemEventSetFree = append(mock.calls.SystemEventSetFree, callInfo) + mock.lockSystemEventSetFree.Unlock() + return mock.SystemEventSetFreeFunc(systemEventSetFreeRequest) +} + +// SystemEventSetFreeCalls gets all the calls that were made to SystemEventSetFree. +// Check the length with: +// +// len(mockedInterface.SystemEventSetFreeCalls()) +func (mock *Interface) SystemEventSetFreeCalls() []struct { + SystemEventSetFreeRequest *nvml.SystemEventSetFreeRequest +} { + var calls []struct { + SystemEventSetFreeRequest *nvml.SystemEventSetFreeRequest + } + mock.lockSystemEventSetFree.RLock() + calls = mock.calls.SystemEventSetFree + mock.lockSystemEventSetFree.RUnlock() + return calls +} + +// SystemEventSetWait calls SystemEventSetWaitFunc. +func (mock *Interface) SystemEventSetWait(systemEventSetWaitRequest *nvml.SystemEventSetWaitRequest) nvml.Return { + if mock.SystemEventSetWaitFunc == nil { + panic("Interface.SystemEventSetWaitFunc: method is nil but Interface.SystemEventSetWait was just called") + } + callInfo := struct { + SystemEventSetWaitRequest *nvml.SystemEventSetWaitRequest + }{ + SystemEventSetWaitRequest: systemEventSetWaitRequest, + } + mock.lockSystemEventSetWait.Lock() + mock.calls.SystemEventSetWait = append(mock.calls.SystemEventSetWait, callInfo) + mock.lockSystemEventSetWait.Unlock() + return mock.SystemEventSetWaitFunc(systemEventSetWaitRequest) +} + +// SystemEventSetWaitCalls gets all the calls that were made to SystemEventSetWait. +// Check the length with: +// +// len(mockedInterface.SystemEventSetWaitCalls()) +func (mock *Interface) SystemEventSetWaitCalls() []struct { + SystemEventSetWaitRequest *nvml.SystemEventSetWaitRequest +} { + var calls []struct { + SystemEventSetWaitRequest *nvml.SystemEventSetWaitRequest + } + mock.lockSystemEventSetWait.RLock() + calls = mock.calls.SystemEventSetWait + mock.lockSystemEventSetWait.RUnlock() + return calls +} + +// SystemGetConfComputeCapabilities calls SystemGetConfComputeCapabilitiesFunc. +func (mock *Interface) SystemGetConfComputeCapabilities() (nvml.ConfComputeSystemCaps, nvml.Return) { + if mock.SystemGetConfComputeCapabilitiesFunc == nil { + panic("Interface.SystemGetConfComputeCapabilitiesFunc: method is nil but Interface.SystemGetConfComputeCapabilities was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetConfComputeCapabilities.Lock() + mock.calls.SystemGetConfComputeCapabilities = append(mock.calls.SystemGetConfComputeCapabilities, callInfo) + mock.lockSystemGetConfComputeCapabilities.Unlock() + return mock.SystemGetConfComputeCapabilitiesFunc() +} + +// SystemGetConfComputeCapabilitiesCalls gets all the calls that were made to SystemGetConfComputeCapabilities. +// Check the length with: +// +// len(mockedInterface.SystemGetConfComputeCapabilitiesCalls()) +func (mock *Interface) SystemGetConfComputeCapabilitiesCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetConfComputeCapabilities.RLock() + calls = mock.calls.SystemGetConfComputeCapabilities + mock.lockSystemGetConfComputeCapabilities.RUnlock() + return calls +} + +// SystemGetConfComputeGpusReadyState calls SystemGetConfComputeGpusReadyStateFunc. +func (mock *Interface) SystemGetConfComputeGpusReadyState() (uint32, nvml.Return) { + if mock.SystemGetConfComputeGpusReadyStateFunc == nil { + panic("Interface.SystemGetConfComputeGpusReadyStateFunc: method is nil but Interface.SystemGetConfComputeGpusReadyState was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetConfComputeGpusReadyState.Lock() + mock.calls.SystemGetConfComputeGpusReadyState = append(mock.calls.SystemGetConfComputeGpusReadyState, callInfo) + mock.lockSystemGetConfComputeGpusReadyState.Unlock() + return mock.SystemGetConfComputeGpusReadyStateFunc() +} + +// SystemGetConfComputeGpusReadyStateCalls gets all the calls that were made to SystemGetConfComputeGpusReadyState. +// Check the length with: +// +// len(mockedInterface.SystemGetConfComputeGpusReadyStateCalls()) +func (mock *Interface) SystemGetConfComputeGpusReadyStateCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetConfComputeGpusReadyState.RLock() + calls = mock.calls.SystemGetConfComputeGpusReadyState + mock.lockSystemGetConfComputeGpusReadyState.RUnlock() + return calls +} + +// SystemGetConfComputeKeyRotationThresholdInfo calls SystemGetConfComputeKeyRotationThresholdInfoFunc. +func (mock *Interface) SystemGetConfComputeKeyRotationThresholdInfo() (nvml.ConfComputeGetKeyRotationThresholdInfo, nvml.Return) { + if mock.SystemGetConfComputeKeyRotationThresholdInfoFunc == nil { + panic("Interface.SystemGetConfComputeKeyRotationThresholdInfoFunc: method is nil but Interface.SystemGetConfComputeKeyRotationThresholdInfo was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetConfComputeKeyRotationThresholdInfo.Lock() + mock.calls.SystemGetConfComputeKeyRotationThresholdInfo = append(mock.calls.SystemGetConfComputeKeyRotationThresholdInfo, callInfo) + mock.lockSystemGetConfComputeKeyRotationThresholdInfo.Unlock() + return mock.SystemGetConfComputeKeyRotationThresholdInfoFunc() +} + +// SystemGetConfComputeKeyRotationThresholdInfoCalls gets all the calls that were made to SystemGetConfComputeKeyRotationThresholdInfo. +// Check the length with: +// +// len(mockedInterface.SystemGetConfComputeKeyRotationThresholdInfoCalls()) +func (mock *Interface) SystemGetConfComputeKeyRotationThresholdInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetConfComputeKeyRotationThresholdInfo.RLock() + calls = mock.calls.SystemGetConfComputeKeyRotationThresholdInfo + mock.lockSystemGetConfComputeKeyRotationThresholdInfo.RUnlock() + return calls +} + +// SystemGetConfComputeSettings calls SystemGetConfComputeSettingsFunc. +func (mock *Interface) SystemGetConfComputeSettings() (nvml.SystemConfComputeSettings, nvml.Return) { + if mock.SystemGetConfComputeSettingsFunc == nil { + panic("Interface.SystemGetConfComputeSettingsFunc: method is nil but Interface.SystemGetConfComputeSettings was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetConfComputeSettings.Lock() + mock.calls.SystemGetConfComputeSettings = append(mock.calls.SystemGetConfComputeSettings, callInfo) + mock.lockSystemGetConfComputeSettings.Unlock() + return mock.SystemGetConfComputeSettingsFunc() +} + +// SystemGetConfComputeSettingsCalls gets all the calls that were made to SystemGetConfComputeSettings. +// Check the length with: +// +// len(mockedInterface.SystemGetConfComputeSettingsCalls()) +func (mock *Interface) SystemGetConfComputeSettingsCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetConfComputeSettings.RLock() + calls = mock.calls.SystemGetConfComputeSettings + mock.lockSystemGetConfComputeSettings.RUnlock() + return calls +} + +// SystemGetConfComputeState calls SystemGetConfComputeStateFunc. +func (mock *Interface) SystemGetConfComputeState() (nvml.ConfComputeSystemState, nvml.Return) { + if mock.SystemGetConfComputeStateFunc == nil { + panic("Interface.SystemGetConfComputeStateFunc: method is nil but Interface.SystemGetConfComputeState was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetConfComputeState.Lock() + mock.calls.SystemGetConfComputeState = append(mock.calls.SystemGetConfComputeState, callInfo) + mock.lockSystemGetConfComputeState.Unlock() + return mock.SystemGetConfComputeStateFunc() +} + +// SystemGetConfComputeStateCalls gets all the calls that were made to SystemGetConfComputeState. +// Check the length with: +// +// len(mockedInterface.SystemGetConfComputeStateCalls()) +func (mock *Interface) SystemGetConfComputeStateCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetConfComputeState.RLock() + calls = mock.calls.SystemGetConfComputeState + mock.lockSystemGetConfComputeState.RUnlock() + return calls +} + +// SystemGetCudaDriverVersion calls SystemGetCudaDriverVersionFunc. +func (mock *Interface) SystemGetCudaDriverVersion() (int, nvml.Return) { + if mock.SystemGetCudaDriverVersionFunc == nil { + panic("Interface.SystemGetCudaDriverVersionFunc: method is nil but Interface.SystemGetCudaDriverVersion was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetCudaDriverVersion.Lock() + mock.calls.SystemGetCudaDriverVersion = append(mock.calls.SystemGetCudaDriverVersion, callInfo) + mock.lockSystemGetCudaDriverVersion.Unlock() + return mock.SystemGetCudaDriverVersionFunc() +} + +// SystemGetCudaDriverVersionCalls gets all the calls that were made to SystemGetCudaDriverVersion. +// Check the length with: +// +// len(mockedInterface.SystemGetCudaDriverVersionCalls()) +func (mock *Interface) SystemGetCudaDriverVersionCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetCudaDriverVersion.RLock() + calls = mock.calls.SystemGetCudaDriverVersion + mock.lockSystemGetCudaDriverVersion.RUnlock() + return calls +} + +// SystemGetCudaDriverVersion_v2 calls SystemGetCudaDriverVersion_v2Func. +func (mock *Interface) SystemGetCudaDriverVersion_v2() (int, nvml.Return) { + if mock.SystemGetCudaDriverVersion_v2Func == nil { + panic("Interface.SystemGetCudaDriverVersion_v2Func: method is nil but Interface.SystemGetCudaDriverVersion_v2 was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetCudaDriverVersion_v2.Lock() + mock.calls.SystemGetCudaDriverVersion_v2 = append(mock.calls.SystemGetCudaDriverVersion_v2, callInfo) + mock.lockSystemGetCudaDriverVersion_v2.Unlock() + return mock.SystemGetCudaDriverVersion_v2Func() +} + +// SystemGetCudaDriverVersion_v2Calls gets all the calls that were made to SystemGetCudaDriverVersion_v2. +// Check the length with: +// +// len(mockedInterface.SystemGetCudaDriverVersion_v2Calls()) +func (mock *Interface) SystemGetCudaDriverVersion_v2Calls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetCudaDriverVersion_v2.RLock() + calls = mock.calls.SystemGetCudaDriverVersion_v2 + mock.lockSystemGetCudaDriverVersion_v2.RUnlock() + return calls +} + +// SystemGetDriverBranch calls SystemGetDriverBranchFunc. +func (mock *Interface) SystemGetDriverBranch() (nvml.SystemDriverBranchInfo, nvml.Return) { + if mock.SystemGetDriverBranchFunc == nil { + panic("Interface.SystemGetDriverBranchFunc: method is nil but Interface.SystemGetDriverBranch was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetDriverBranch.Lock() + mock.calls.SystemGetDriverBranch = append(mock.calls.SystemGetDriverBranch, callInfo) + mock.lockSystemGetDriverBranch.Unlock() + return mock.SystemGetDriverBranchFunc() +} + +// SystemGetDriverBranchCalls gets all the calls that were made to SystemGetDriverBranch. +// Check the length with: +// +// len(mockedInterface.SystemGetDriverBranchCalls()) +func (mock *Interface) SystemGetDriverBranchCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetDriverBranch.RLock() + calls = mock.calls.SystemGetDriverBranch + mock.lockSystemGetDriverBranch.RUnlock() + return calls +} + +// SystemGetDriverVersion calls SystemGetDriverVersionFunc. +func (mock *Interface) SystemGetDriverVersion() (string, nvml.Return) { + if mock.SystemGetDriverVersionFunc == nil { + panic("Interface.SystemGetDriverVersionFunc: method is nil but Interface.SystemGetDriverVersion was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetDriverVersion.Lock() + mock.calls.SystemGetDriverVersion = append(mock.calls.SystemGetDriverVersion, callInfo) + mock.lockSystemGetDriverVersion.Unlock() + return mock.SystemGetDriverVersionFunc() +} + +// SystemGetDriverVersionCalls gets all the calls that were made to SystemGetDriverVersion. +// Check the length with: +// +// len(mockedInterface.SystemGetDriverVersionCalls()) +func (mock *Interface) SystemGetDriverVersionCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetDriverVersion.RLock() + calls = mock.calls.SystemGetDriverVersion + mock.lockSystemGetDriverVersion.RUnlock() + return calls +} + +// SystemGetHicVersion calls SystemGetHicVersionFunc. +func (mock *Interface) SystemGetHicVersion() ([]nvml.HwbcEntry, nvml.Return) { + if mock.SystemGetHicVersionFunc == nil { + panic("Interface.SystemGetHicVersionFunc: method is nil but Interface.SystemGetHicVersion was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetHicVersion.Lock() + mock.calls.SystemGetHicVersion = append(mock.calls.SystemGetHicVersion, callInfo) + mock.lockSystemGetHicVersion.Unlock() + return mock.SystemGetHicVersionFunc() +} + +// SystemGetHicVersionCalls gets all the calls that were made to SystemGetHicVersion. +// Check the length with: +// +// len(mockedInterface.SystemGetHicVersionCalls()) +func (mock *Interface) SystemGetHicVersionCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetHicVersion.RLock() + calls = mock.calls.SystemGetHicVersion + mock.lockSystemGetHicVersion.RUnlock() + return calls +} + +// SystemGetNVMLVersion calls SystemGetNVMLVersionFunc. +func (mock *Interface) SystemGetNVMLVersion() (string, nvml.Return) { + if mock.SystemGetNVMLVersionFunc == nil { + panic("Interface.SystemGetNVMLVersionFunc: method is nil but Interface.SystemGetNVMLVersion was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetNVMLVersion.Lock() + mock.calls.SystemGetNVMLVersion = append(mock.calls.SystemGetNVMLVersion, callInfo) + mock.lockSystemGetNVMLVersion.Unlock() + return mock.SystemGetNVMLVersionFunc() +} + +// SystemGetNVMLVersionCalls gets all the calls that were made to SystemGetNVMLVersion. +// Check the length with: +// +// len(mockedInterface.SystemGetNVMLVersionCalls()) +func (mock *Interface) SystemGetNVMLVersionCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetNVMLVersion.RLock() + calls = mock.calls.SystemGetNVMLVersion + mock.lockSystemGetNVMLVersion.RUnlock() + return calls +} + +// SystemGetNvlinkBwMode calls SystemGetNvlinkBwModeFunc. +func (mock *Interface) SystemGetNvlinkBwMode() (uint32, nvml.Return) { + if mock.SystemGetNvlinkBwModeFunc == nil { + panic("Interface.SystemGetNvlinkBwModeFunc: method is nil but Interface.SystemGetNvlinkBwMode was just called") + } + callInfo := struct { + }{} + mock.lockSystemGetNvlinkBwMode.Lock() + mock.calls.SystemGetNvlinkBwMode = append(mock.calls.SystemGetNvlinkBwMode, callInfo) + mock.lockSystemGetNvlinkBwMode.Unlock() + return mock.SystemGetNvlinkBwModeFunc() +} + +// SystemGetNvlinkBwModeCalls gets all the calls that were made to SystemGetNvlinkBwMode. +// Check the length with: +// +// len(mockedInterface.SystemGetNvlinkBwModeCalls()) +func (mock *Interface) SystemGetNvlinkBwModeCalls() []struct { +} { + var calls []struct { + } + mock.lockSystemGetNvlinkBwMode.RLock() + calls = mock.calls.SystemGetNvlinkBwMode + mock.lockSystemGetNvlinkBwMode.RUnlock() + return calls +} + +// SystemGetProcessName calls SystemGetProcessNameFunc. +func (mock *Interface) SystemGetProcessName(n int) (string, nvml.Return) { + if mock.SystemGetProcessNameFunc == nil { + panic("Interface.SystemGetProcessNameFunc: method is nil but Interface.SystemGetProcessName was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockSystemGetProcessName.Lock() + mock.calls.SystemGetProcessName = append(mock.calls.SystemGetProcessName, callInfo) + mock.lockSystemGetProcessName.Unlock() + return mock.SystemGetProcessNameFunc(n) +} + +// SystemGetProcessNameCalls gets all the calls that were made to SystemGetProcessName. +// Check the length with: +// +// len(mockedInterface.SystemGetProcessNameCalls()) +func (mock *Interface) SystemGetProcessNameCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockSystemGetProcessName.RLock() + calls = mock.calls.SystemGetProcessName + mock.lockSystemGetProcessName.RUnlock() + return calls +} + +// SystemGetTopologyGpuSet calls SystemGetTopologyGpuSetFunc. +func (mock *Interface) SystemGetTopologyGpuSet(n int) ([]nvml.Device, nvml.Return) { + if mock.SystemGetTopologyGpuSetFunc == nil { + panic("Interface.SystemGetTopologyGpuSetFunc: method is nil but Interface.SystemGetTopologyGpuSet was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockSystemGetTopologyGpuSet.Lock() + mock.calls.SystemGetTopologyGpuSet = append(mock.calls.SystemGetTopologyGpuSet, callInfo) + mock.lockSystemGetTopologyGpuSet.Unlock() + return mock.SystemGetTopologyGpuSetFunc(n) +} + +// SystemGetTopologyGpuSetCalls gets all the calls that were made to SystemGetTopologyGpuSet. +// Check the length with: +// +// len(mockedInterface.SystemGetTopologyGpuSetCalls()) +func (mock *Interface) SystemGetTopologyGpuSetCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockSystemGetTopologyGpuSet.RLock() + calls = mock.calls.SystemGetTopologyGpuSet + mock.lockSystemGetTopologyGpuSet.RUnlock() + return calls +} + +// SystemRegisterEvents calls SystemRegisterEventsFunc. +func (mock *Interface) SystemRegisterEvents(systemRegisterEventRequest *nvml.SystemRegisterEventRequest) nvml.Return { + if mock.SystemRegisterEventsFunc == nil { + panic("Interface.SystemRegisterEventsFunc: method is nil but Interface.SystemRegisterEvents was just called") + } + callInfo := struct { + SystemRegisterEventRequest *nvml.SystemRegisterEventRequest + }{ + SystemRegisterEventRequest: systemRegisterEventRequest, + } + mock.lockSystemRegisterEvents.Lock() + mock.calls.SystemRegisterEvents = append(mock.calls.SystemRegisterEvents, callInfo) + mock.lockSystemRegisterEvents.Unlock() + return mock.SystemRegisterEventsFunc(systemRegisterEventRequest) +} + +// SystemRegisterEventsCalls gets all the calls that were made to SystemRegisterEvents. +// Check the length with: +// +// len(mockedInterface.SystemRegisterEventsCalls()) +func (mock *Interface) SystemRegisterEventsCalls() []struct { + SystemRegisterEventRequest *nvml.SystemRegisterEventRequest +} { + var calls []struct { + SystemRegisterEventRequest *nvml.SystemRegisterEventRequest + } + mock.lockSystemRegisterEvents.RLock() + calls = mock.calls.SystemRegisterEvents + mock.lockSystemRegisterEvents.RUnlock() + return calls +} + +// SystemSetConfComputeGpusReadyState calls SystemSetConfComputeGpusReadyStateFunc. +func (mock *Interface) SystemSetConfComputeGpusReadyState(v uint32) nvml.Return { + if mock.SystemSetConfComputeGpusReadyStateFunc == nil { + panic("Interface.SystemSetConfComputeGpusReadyStateFunc: method is nil but Interface.SystemSetConfComputeGpusReadyState was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockSystemSetConfComputeGpusReadyState.Lock() + mock.calls.SystemSetConfComputeGpusReadyState = append(mock.calls.SystemSetConfComputeGpusReadyState, callInfo) + mock.lockSystemSetConfComputeGpusReadyState.Unlock() + return mock.SystemSetConfComputeGpusReadyStateFunc(v) +} + +// SystemSetConfComputeGpusReadyStateCalls gets all the calls that were made to SystemSetConfComputeGpusReadyState. +// Check the length with: +// +// len(mockedInterface.SystemSetConfComputeGpusReadyStateCalls()) +func (mock *Interface) SystemSetConfComputeGpusReadyStateCalls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockSystemSetConfComputeGpusReadyState.RLock() + calls = mock.calls.SystemSetConfComputeGpusReadyState + mock.lockSystemSetConfComputeGpusReadyState.RUnlock() + return calls +} + +// SystemSetConfComputeKeyRotationThresholdInfo calls SystemSetConfComputeKeyRotationThresholdInfoFunc. +func (mock *Interface) SystemSetConfComputeKeyRotationThresholdInfo(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) nvml.Return { + if mock.SystemSetConfComputeKeyRotationThresholdInfoFunc == nil { + panic("Interface.SystemSetConfComputeKeyRotationThresholdInfoFunc: method is nil but Interface.SystemSetConfComputeKeyRotationThresholdInfo was just called") + } + callInfo := struct { + ConfComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo + }{ + ConfComputeSetKeyRotationThresholdInfo: confComputeSetKeyRotationThresholdInfo, + } + mock.lockSystemSetConfComputeKeyRotationThresholdInfo.Lock() + mock.calls.SystemSetConfComputeKeyRotationThresholdInfo = append(mock.calls.SystemSetConfComputeKeyRotationThresholdInfo, callInfo) + mock.lockSystemSetConfComputeKeyRotationThresholdInfo.Unlock() + return mock.SystemSetConfComputeKeyRotationThresholdInfoFunc(confComputeSetKeyRotationThresholdInfo) +} + +// SystemSetConfComputeKeyRotationThresholdInfoCalls gets all the calls that were made to SystemSetConfComputeKeyRotationThresholdInfo. +// Check the length with: +// +// len(mockedInterface.SystemSetConfComputeKeyRotationThresholdInfoCalls()) +func (mock *Interface) SystemSetConfComputeKeyRotationThresholdInfoCalls() []struct { + ConfComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo +} { + var calls []struct { + ConfComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo + } + mock.lockSystemSetConfComputeKeyRotationThresholdInfo.RLock() + calls = mock.calls.SystemSetConfComputeKeyRotationThresholdInfo + mock.lockSystemSetConfComputeKeyRotationThresholdInfo.RUnlock() + return calls +} + +// SystemSetNvlinkBwMode calls SystemSetNvlinkBwModeFunc. +func (mock *Interface) SystemSetNvlinkBwMode(v uint32) nvml.Return { + if mock.SystemSetNvlinkBwModeFunc == nil { + panic("Interface.SystemSetNvlinkBwModeFunc: method is nil but Interface.SystemSetNvlinkBwMode was just called") + } + callInfo := struct { + V uint32 + }{ + V: v, + } + mock.lockSystemSetNvlinkBwMode.Lock() + mock.calls.SystemSetNvlinkBwMode = append(mock.calls.SystemSetNvlinkBwMode, callInfo) + mock.lockSystemSetNvlinkBwMode.Unlock() + return mock.SystemSetNvlinkBwModeFunc(v) +} + +// SystemSetNvlinkBwModeCalls gets all the calls that were made to SystemSetNvlinkBwMode. +// Check the length with: +// +// len(mockedInterface.SystemSetNvlinkBwModeCalls()) +func (mock *Interface) SystemSetNvlinkBwModeCalls() []struct { + V uint32 +} { + var calls []struct { + V uint32 + } + mock.lockSystemSetNvlinkBwMode.RLock() + calls = mock.calls.SystemSetNvlinkBwMode + mock.lockSystemSetNvlinkBwMode.RUnlock() + return calls +} + +// UnitGetCount calls UnitGetCountFunc. +func (mock *Interface) UnitGetCount() (int, nvml.Return) { + if mock.UnitGetCountFunc == nil { + panic("Interface.UnitGetCountFunc: method is nil but Interface.UnitGetCount was just called") + } + callInfo := struct { + }{} + mock.lockUnitGetCount.Lock() + mock.calls.UnitGetCount = append(mock.calls.UnitGetCount, callInfo) + mock.lockUnitGetCount.Unlock() + return mock.UnitGetCountFunc() +} + +// UnitGetCountCalls gets all the calls that were made to UnitGetCount. +// Check the length with: +// +// len(mockedInterface.UnitGetCountCalls()) +func (mock *Interface) UnitGetCountCalls() []struct { +} { + var calls []struct { + } + mock.lockUnitGetCount.RLock() + calls = mock.calls.UnitGetCount + mock.lockUnitGetCount.RUnlock() + return calls +} + +// UnitGetDevices calls UnitGetDevicesFunc. +func (mock *Interface) UnitGetDevices(unit nvml.Unit) ([]nvml.Device, nvml.Return) { + if mock.UnitGetDevicesFunc == nil { + panic("Interface.UnitGetDevicesFunc: method is nil but Interface.UnitGetDevices was just called") + } + callInfo := struct { + Unit nvml.Unit + }{ + Unit: unit, + } + mock.lockUnitGetDevices.Lock() + mock.calls.UnitGetDevices = append(mock.calls.UnitGetDevices, callInfo) + mock.lockUnitGetDevices.Unlock() + return mock.UnitGetDevicesFunc(unit) +} + +// UnitGetDevicesCalls gets all the calls that were made to UnitGetDevices. +// Check the length with: +// +// len(mockedInterface.UnitGetDevicesCalls()) +func (mock *Interface) UnitGetDevicesCalls() []struct { + Unit nvml.Unit +} { + var calls []struct { + Unit nvml.Unit + } + mock.lockUnitGetDevices.RLock() + calls = mock.calls.UnitGetDevices + mock.lockUnitGetDevices.RUnlock() + return calls +} + +// UnitGetFanSpeedInfo calls UnitGetFanSpeedInfoFunc. +func (mock *Interface) UnitGetFanSpeedInfo(unit nvml.Unit) (nvml.UnitFanSpeeds, nvml.Return) { + if mock.UnitGetFanSpeedInfoFunc == nil { + panic("Interface.UnitGetFanSpeedInfoFunc: method is nil but Interface.UnitGetFanSpeedInfo was just called") + } + callInfo := struct { + Unit nvml.Unit + }{ + Unit: unit, + } + mock.lockUnitGetFanSpeedInfo.Lock() + mock.calls.UnitGetFanSpeedInfo = append(mock.calls.UnitGetFanSpeedInfo, callInfo) + mock.lockUnitGetFanSpeedInfo.Unlock() + return mock.UnitGetFanSpeedInfoFunc(unit) +} + +// UnitGetFanSpeedInfoCalls gets all the calls that were made to UnitGetFanSpeedInfo. +// Check the length with: +// +// len(mockedInterface.UnitGetFanSpeedInfoCalls()) +func (mock *Interface) UnitGetFanSpeedInfoCalls() []struct { + Unit nvml.Unit +} { + var calls []struct { + Unit nvml.Unit + } + mock.lockUnitGetFanSpeedInfo.RLock() + calls = mock.calls.UnitGetFanSpeedInfo + mock.lockUnitGetFanSpeedInfo.RUnlock() + return calls +} + +// UnitGetHandleByIndex calls UnitGetHandleByIndexFunc. +func (mock *Interface) UnitGetHandleByIndex(n int) (nvml.Unit, nvml.Return) { + if mock.UnitGetHandleByIndexFunc == nil { + panic("Interface.UnitGetHandleByIndexFunc: method is nil but Interface.UnitGetHandleByIndex was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockUnitGetHandleByIndex.Lock() + mock.calls.UnitGetHandleByIndex = append(mock.calls.UnitGetHandleByIndex, callInfo) + mock.lockUnitGetHandleByIndex.Unlock() + return mock.UnitGetHandleByIndexFunc(n) +} + +// UnitGetHandleByIndexCalls gets all the calls that were made to UnitGetHandleByIndex. +// Check the length with: +// +// len(mockedInterface.UnitGetHandleByIndexCalls()) +func (mock *Interface) UnitGetHandleByIndexCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockUnitGetHandleByIndex.RLock() + calls = mock.calls.UnitGetHandleByIndex + mock.lockUnitGetHandleByIndex.RUnlock() + return calls +} + +// UnitGetLedState calls UnitGetLedStateFunc. +func (mock *Interface) UnitGetLedState(unit nvml.Unit) (nvml.LedState, nvml.Return) { + if mock.UnitGetLedStateFunc == nil { + panic("Interface.UnitGetLedStateFunc: method is nil but Interface.UnitGetLedState was just called") + } + callInfo := struct { + Unit nvml.Unit + }{ + Unit: unit, + } + mock.lockUnitGetLedState.Lock() + mock.calls.UnitGetLedState = append(mock.calls.UnitGetLedState, callInfo) + mock.lockUnitGetLedState.Unlock() + return mock.UnitGetLedStateFunc(unit) +} + +// UnitGetLedStateCalls gets all the calls that were made to UnitGetLedState. +// Check the length with: +// +// len(mockedInterface.UnitGetLedStateCalls()) +func (mock *Interface) UnitGetLedStateCalls() []struct { + Unit nvml.Unit +} { + var calls []struct { + Unit nvml.Unit + } + mock.lockUnitGetLedState.RLock() + calls = mock.calls.UnitGetLedState + mock.lockUnitGetLedState.RUnlock() + return calls +} + +// UnitGetPsuInfo calls UnitGetPsuInfoFunc. +func (mock *Interface) UnitGetPsuInfo(unit nvml.Unit) (nvml.PSUInfo, nvml.Return) { + if mock.UnitGetPsuInfoFunc == nil { + panic("Interface.UnitGetPsuInfoFunc: method is nil but Interface.UnitGetPsuInfo was just called") + } + callInfo := struct { + Unit nvml.Unit + }{ + Unit: unit, + } + mock.lockUnitGetPsuInfo.Lock() + mock.calls.UnitGetPsuInfo = append(mock.calls.UnitGetPsuInfo, callInfo) + mock.lockUnitGetPsuInfo.Unlock() + return mock.UnitGetPsuInfoFunc(unit) +} + +// UnitGetPsuInfoCalls gets all the calls that were made to UnitGetPsuInfo. +// Check the length with: +// +// len(mockedInterface.UnitGetPsuInfoCalls()) +func (mock *Interface) UnitGetPsuInfoCalls() []struct { + Unit nvml.Unit +} { + var calls []struct { + Unit nvml.Unit + } + mock.lockUnitGetPsuInfo.RLock() + calls = mock.calls.UnitGetPsuInfo + mock.lockUnitGetPsuInfo.RUnlock() + return calls +} + +// UnitGetTemperature calls UnitGetTemperatureFunc. +func (mock *Interface) UnitGetTemperature(unit nvml.Unit, n int) (uint32, nvml.Return) { + if mock.UnitGetTemperatureFunc == nil { + panic("Interface.UnitGetTemperatureFunc: method is nil but Interface.UnitGetTemperature was just called") + } + callInfo := struct { + Unit nvml.Unit + N int + }{ + Unit: unit, + N: n, + } + mock.lockUnitGetTemperature.Lock() + mock.calls.UnitGetTemperature = append(mock.calls.UnitGetTemperature, callInfo) + mock.lockUnitGetTemperature.Unlock() + return mock.UnitGetTemperatureFunc(unit, n) +} + +// UnitGetTemperatureCalls gets all the calls that were made to UnitGetTemperature. +// Check the length with: +// +// len(mockedInterface.UnitGetTemperatureCalls()) +func (mock *Interface) UnitGetTemperatureCalls() []struct { + Unit nvml.Unit + N int +} { + var calls []struct { + Unit nvml.Unit + N int + } + mock.lockUnitGetTemperature.RLock() + calls = mock.calls.UnitGetTemperature + mock.lockUnitGetTemperature.RUnlock() + return calls +} + +// UnitGetUnitInfo calls UnitGetUnitInfoFunc. +func (mock *Interface) UnitGetUnitInfo(unit nvml.Unit) (nvml.UnitInfo, nvml.Return) { + if mock.UnitGetUnitInfoFunc == nil { + panic("Interface.UnitGetUnitInfoFunc: method is nil but Interface.UnitGetUnitInfo was just called") + } + callInfo := struct { + Unit nvml.Unit + }{ + Unit: unit, + } + mock.lockUnitGetUnitInfo.Lock() + mock.calls.UnitGetUnitInfo = append(mock.calls.UnitGetUnitInfo, callInfo) + mock.lockUnitGetUnitInfo.Unlock() + return mock.UnitGetUnitInfoFunc(unit) +} + +// UnitGetUnitInfoCalls gets all the calls that were made to UnitGetUnitInfo. +// Check the length with: +// +// len(mockedInterface.UnitGetUnitInfoCalls()) +func (mock *Interface) UnitGetUnitInfoCalls() []struct { + Unit nvml.Unit +} { + var calls []struct { + Unit nvml.Unit + } + mock.lockUnitGetUnitInfo.RLock() + calls = mock.calls.UnitGetUnitInfo + mock.lockUnitGetUnitInfo.RUnlock() + return calls +} + +// UnitSetLedState calls UnitSetLedStateFunc. +func (mock *Interface) UnitSetLedState(unit nvml.Unit, ledColor nvml.LedColor) nvml.Return { + if mock.UnitSetLedStateFunc == nil { + panic("Interface.UnitSetLedStateFunc: method is nil but Interface.UnitSetLedState was just called") + } + callInfo := struct { + Unit nvml.Unit + LedColor nvml.LedColor + }{ + Unit: unit, + LedColor: ledColor, + } + mock.lockUnitSetLedState.Lock() + mock.calls.UnitSetLedState = append(mock.calls.UnitSetLedState, callInfo) + mock.lockUnitSetLedState.Unlock() + return mock.UnitSetLedStateFunc(unit, ledColor) +} + +// UnitSetLedStateCalls gets all the calls that were made to UnitSetLedState. +// Check the length with: +// +// len(mockedInterface.UnitSetLedStateCalls()) +func (mock *Interface) UnitSetLedStateCalls() []struct { + Unit nvml.Unit + LedColor nvml.LedColor +} { + var calls []struct { + Unit nvml.Unit + LedColor nvml.LedColor + } + mock.lockUnitSetLedState.RLock() + calls = mock.calls.UnitSetLedState + mock.lockUnitSetLedState.RUnlock() + return calls +} + +// VgpuInstanceClearAccountingPids calls VgpuInstanceClearAccountingPidsFunc. +func (mock *Interface) VgpuInstanceClearAccountingPids(vgpuInstance nvml.VgpuInstance) nvml.Return { + if mock.VgpuInstanceClearAccountingPidsFunc == nil { + panic("Interface.VgpuInstanceClearAccountingPidsFunc: method is nil but Interface.VgpuInstanceClearAccountingPids was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceClearAccountingPids.Lock() + mock.calls.VgpuInstanceClearAccountingPids = append(mock.calls.VgpuInstanceClearAccountingPids, callInfo) + mock.lockVgpuInstanceClearAccountingPids.Unlock() + return mock.VgpuInstanceClearAccountingPidsFunc(vgpuInstance) +} + +// VgpuInstanceClearAccountingPidsCalls gets all the calls that were made to VgpuInstanceClearAccountingPids. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceClearAccountingPidsCalls()) +func (mock *Interface) VgpuInstanceClearAccountingPidsCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceClearAccountingPids.RLock() + calls = mock.calls.VgpuInstanceClearAccountingPids + mock.lockVgpuInstanceClearAccountingPids.RUnlock() + return calls +} + +// VgpuInstanceGetAccountingMode calls VgpuInstanceGetAccountingModeFunc. +func (mock *Interface) VgpuInstanceGetAccountingMode(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) { + if mock.VgpuInstanceGetAccountingModeFunc == nil { + panic("Interface.VgpuInstanceGetAccountingModeFunc: method is nil but Interface.VgpuInstanceGetAccountingMode was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetAccountingMode.Lock() + mock.calls.VgpuInstanceGetAccountingMode = append(mock.calls.VgpuInstanceGetAccountingMode, callInfo) + mock.lockVgpuInstanceGetAccountingMode.Unlock() + return mock.VgpuInstanceGetAccountingModeFunc(vgpuInstance) +} + +// VgpuInstanceGetAccountingModeCalls gets all the calls that were made to VgpuInstanceGetAccountingMode. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetAccountingModeCalls()) +func (mock *Interface) VgpuInstanceGetAccountingModeCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetAccountingMode.RLock() + calls = mock.calls.VgpuInstanceGetAccountingMode + mock.lockVgpuInstanceGetAccountingMode.RUnlock() + return calls +} + +// VgpuInstanceGetAccountingPids calls VgpuInstanceGetAccountingPidsFunc. +func (mock *Interface) VgpuInstanceGetAccountingPids(vgpuInstance nvml.VgpuInstance) ([]int, nvml.Return) { + if mock.VgpuInstanceGetAccountingPidsFunc == nil { + panic("Interface.VgpuInstanceGetAccountingPidsFunc: method is nil but Interface.VgpuInstanceGetAccountingPids was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetAccountingPids.Lock() + mock.calls.VgpuInstanceGetAccountingPids = append(mock.calls.VgpuInstanceGetAccountingPids, callInfo) + mock.lockVgpuInstanceGetAccountingPids.Unlock() + return mock.VgpuInstanceGetAccountingPidsFunc(vgpuInstance) +} + +// VgpuInstanceGetAccountingPidsCalls gets all the calls that were made to VgpuInstanceGetAccountingPids. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetAccountingPidsCalls()) +func (mock *Interface) VgpuInstanceGetAccountingPidsCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetAccountingPids.RLock() + calls = mock.calls.VgpuInstanceGetAccountingPids + mock.lockVgpuInstanceGetAccountingPids.RUnlock() + return calls +} + +// VgpuInstanceGetAccountingStats calls VgpuInstanceGetAccountingStatsFunc. +func (mock *Interface) VgpuInstanceGetAccountingStats(vgpuInstance nvml.VgpuInstance, n int) (nvml.AccountingStats, nvml.Return) { + if mock.VgpuInstanceGetAccountingStatsFunc == nil { + panic("Interface.VgpuInstanceGetAccountingStatsFunc: method is nil but Interface.VgpuInstanceGetAccountingStats was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + N int + }{ + VgpuInstance: vgpuInstance, + N: n, + } + mock.lockVgpuInstanceGetAccountingStats.Lock() + mock.calls.VgpuInstanceGetAccountingStats = append(mock.calls.VgpuInstanceGetAccountingStats, callInfo) + mock.lockVgpuInstanceGetAccountingStats.Unlock() + return mock.VgpuInstanceGetAccountingStatsFunc(vgpuInstance, n) +} + +// VgpuInstanceGetAccountingStatsCalls gets all the calls that were made to VgpuInstanceGetAccountingStats. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetAccountingStatsCalls()) +func (mock *Interface) VgpuInstanceGetAccountingStatsCalls() []struct { + VgpuInstance nvml.VgpuInstance + N int +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + N int + } + mock.lockVgpuInstanceGetAccountingStats.RLock() + calls = mock.calls.VgpuInstanceGetAccountingStats + mock.lockVgpuInstanceGetAccountingStats.RUnlock() + return calls +} + +// VgpuInstanceGetEccMode calls VgpuInstanceGetEccModeFunc. +func (mock *Interface) VgpuInstanceGetEccMode(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) { + if mock.VgpuInstanceGetEccModeFunc == nil { + panic("Interface.VgpuInstanceGetEccModeFunc: method is nil but Interface.VgpuInstanceGetEccMode was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetEccMode.Lock() + mock.calls.VgpuInstanceGetEccMode = append(mock.calls.VgpuInstanceGetEccMode, callInfo) + mock.lockVgpuInstanceGetEccMode.Unlock() + return mock.VgpuInstanceGetEccModeFunc(vgpuInstance) +} + +// VgpuInstanceGetEccModeCalls gets all the calls that were made to VgpuInstanceGetEccMode. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetEccModeCalls()) +func (mock *Interface) VgpuInstanceGetEccModeCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetEccMode.RLock() + calls = mock.calls.VgpuInstanceGetEccMode + mock.lockVgpuInstanceGetEccMode.RUnlock() + return calls +} + +// VgpuInstanceGetEncoderCapacity calls VgpuInstanceGetEncoderCapacityFunc. +func (mock *Interface) VgpuInstanceGetEncoderCapacity(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { + if mock.VgpuInstanceGetEncoderCapacityFunc == nil { + panic("Interface.VgpuInstanceGetEncoderCapacityFunc: method is nil but Interface.VgpuInstanceGetEncoderCapacity was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetEncoderCapacity.Lock() + mock.calls.VgpuInstanceGetEncoderCapacity = append(mock.calls.VgpuInstanceGetEncoderCapacity, callInfo) + mock.lockVgpuInstanceGetEncoderCapacity.Unlock() + return mock.VgpuInstanceGetEncoderCapacityFunc(vgpuInstance) +} + +// VgpuInstanceGetEncoderCapacityCalls gets all the calls that were made to VgpuInstanceGetEncoderCapacity. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetEncoderCapacityCalls()) +func (mock *Interface) VgpuInstanceGetEncoderCapacityCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetEncoderCapacity.RLock() + calls = mock.calls.VgpuInstanceGetEncoderCapacity + mock.lockVgpuInstanceGetEncoderCapacity.RUnlock() + return calls +} + +// VgpuInstanceGetEncoderSessions calls VgpuInstanceGetEncoderSessionsFunc. +func (mock *Interface) VgpuInstanceGetEncoderSessions(vgpuInstance nvml.VgpuInstance) (int, nvml.EncoderSessionInfo, nvml.Return) { + if mock.VgpuInstanceGetEncoderSessionsFunc == nil { + panic("Interface.VgpuInstanceGetEncoderSessionsFunc: method is nil but Interface.VgpuInstanceGetEncoderSessions was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetEncoderSessions.Lock() + mock.calls.VgpuInstanceGetEncoderSessions = append(mock.calls.VgpuInstanceGetEncoderSessions, callInfo) + mock.lockVgpuInstanceGetEncoderSessions.Unlock() + return mock.VgpuInstanceGetEncoderSessionsFunc(vgpuInstance) +} + +// VgpuInstanceGetEncoderSessionsCalls gets all the calls that were made to VgpuInstanceGetEncoderSessions. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetEncoderSessionsCalls()) +func (mock *Interface) VgpuInstanceGetEncoderSessionsCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetEncoderSessions.RLock() + calls = mock.calls.VgpuInstanceGetEncoderSessions + mock.lockVgpuInstanceGetEncoderSessions.RUnlock() + return calls +} + +// VgpuInstanceGetEncoderStats calls VgpuInstanceGetEncoderStatsFunc. +func (mock *Interface) VgpuInstanceGetEncoderStats(vgpuInstance nvml.VgpuInstance) (int, uint32, uint32, nvml.Return) { + if mock.VgpuInstanceGetEncoderStatsFunc == nil { + panic("Interface.VgpuInstanceGetEncoderStatsFunc: method is nil but Interface.VgpuInstanceGetEncoderStats was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetEncoderStats.Lock() + mock.calls.VgpuInstanceGetEncoderStats = append(mock.calls.VgpuInstanceGetEncoderStats, callInfo) + mock.lockVgpuInstanceGetEncoderStats.Unlock() + return mock.VgpuInstanceGetEncoderStatsFunc(vgpuInstance) +} + +// VgpuInstanceGetEncoderStatsCalls gets all the calls that were made to VgpuInstanceGetEncoderStats. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetEncoderStatsCalls()) +func (mock *Interface) VgpuInstanceGetEncoderStatsCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetEncoderStats.RLock() + calls = mock.calls.VgpuInstanceGetEncoderStats + mock.lockVgpuInstanceGetEncoderStats.RUnlock() + return calls +} + +// VgpuInstanceGetFBCSessions calls VgpuInstanceGetFBCSessionsFunc. +func (mock *Interface) VgpuInstanceGetFBCSessions(vgpuInstance nvml.VgpuInstance) (int, nvml.FBCSessionInfo, nvml.Return) { + if mock.VgpuInstanceGetFBCSessionsFunc == nil { + panic("Interface.VgpuInstanceGetFBCSessionsFunc: method is nil but Interface.VgpuInstanceGetFBCSessions was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetFBCSessions.Lock() + mock.calls.VgpuInstanceGetFBCSessions = append(mock.calls.VgpuInstanceGetFBCSessions, callInfo) + mock.lockVgpuInstanceGetFBCSessions.Unlock() + return mock.VgpuInstanceGetFBCSessionsFunc(vgpuInstance) +} + +// VgpuInstanceGetFBCSessionsCalls gets all the calls that were made to VgpuInstanceGetFBCSessions. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetFBCSessionsCalls()) +func (mock *Interface) VgpuInstanceGetFBCSessionsCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetFBCSessions.RLock() + calls = mock.calls.VgpuInstanceGetFBCSessions + mock.lockVgpuInstanceGetFBCSessions.RUnlock() + return calls +} + +// VgpuInstanceGetFBCStats calls VgpuInstanceGetFBCStatsFunc. +func (mock *Interface) VgpuInstanceGetFBCStats(vgpuInstance nvml.VgpuInstance) (nvml.FBCStats, nvml.Return) { + if mock.VgpuInstanceGetFBCStatsFunc == nil { + panic("Interface.VgpuInstanceGetFBCStatsFunc: method is nil but Interface.VgpuInstanceGetFBCStats was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetFBCStats.Lock() + mock.calls.VgpuInstanceGetFBCStats = append(mock.calls.VgpuInstanceGetFBCStats, callInfo) + mock.lockVgpuInstanceGetFBCStats.Unlock() + return mock.VgpuInstanceGetFBCStatsFunc(vgpuInstance) +} + +// VgpuInstanceGetFBCStatsCalls gets all the calls that were made to VgpuInstanceGetFBCStats. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetFBCStatsCalls()) +func (mock *Interface) VgpuInstanceGetFBCStatsCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetFBCStats.RLock() + calls = mock.calls.VgpuInstanceGetFBCStats + mock.lockVgpuInstanceGetFBCStats.RUnlock() + return calls +} + +// VgpuInstanceGetFbUsage calls VgpuInstanceGetFbUsageFunc. +func (mock *Interface) VgpuInstanceGetFbUsage(vgpuInstance nvml.VgpuInstance) (uint64, nvml.Return) { + if mock.VgpuInstanceGetFbUsageFunc == nil { + panic("Interface.VgpuInstanceGetFbUsageFunc: method is nil but Interface.VgpuInstanceGetFbUsage was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetFbUsage.Lock() + mock.calls.VgpuInstanceGetFbUsage = append(mock.calls.VgpuInstanceGetFbUsage, callInfo) + mock.lockVgpuInstanceGetFbUsage.Unlock() + return mock.VgpuInstanceGetFbUsageFunc(vgpuInstance) +} + +// VgpuInstanceGetFbUsageCalls gets all the calls that were made to VgpuInstanceGetFbUsage. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetFbUsageCalls()) +func (mock *Interface) VgpuInstanceGetFbUsageCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetFbUsage.RLock() + calls = mock.calls.VgpuInstanceGetFbUsage + mock.lockVgpuInstanceGetFbUsage.RUnlock() + return calls +} + +// VgpuInstanceGetFrameRateLimit calls VgpuInstanceGetFrameRateLimitFunc. +func (mock *Interface) VgpuInstanceGetFrameRateLimit(vgpuInstance nvml.VgpuInstance) (uint32, nvml.Return) { + if mock.VgpuInstanceGetFrameRateLimitFunc == nil { + panic("Interface.VgpuInstanceGetFrameRateLimitFunc: method is nil but Interface.VgpuInstanceGetFrameRateLimit was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetFrameRateLimit.Lock() + mock.calls.VgpuInstanceGetFrameRateLimit = append(mock.calls.VgpuInstanceGetFrameRateLimit, callInfo) + mock.lockVgpuInstanceGetFrameRateLimit.Unlock() + return mock.VgpuInstanceGetFrameRateLimitFunc(vgpuInstance) +} + +// VgpuInstanceGetFrameRateLimitCalls gets all the calls that were made to VgpuInstanceGetFrameRateLimit. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetFrameRateLimitCalls()) +func (mock *Interface) VgpuInstanceGetFrameRateLimitCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetFrameRateLimit.RLock() + calls = mock.calls.VgpuInstanceGetFrameRateLimit + mock.lockVgpuInstanceGetFrameRateLimit.RUnlock() + return calls +} + +// VgpuInstanceGetGpuInstanceId calls VgpuInstanceGetGpuInstanceIdFunc. +func (mock *Interface) VgpuInstanceGetGpuInstanceId(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { + if mock.VgpuInstanceGetGpuInstanceIdFunc == nil { + panic("Interface.VgpuInstanceGetGpuInstanceIdFunc: method is nil but Interface.VgpuInstanceGetGpuInstanceId was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetGpuInstanceId.Lock() + mock.calls.VgpuInstanceGetGpuInstanceId = append(mock.calls.VgpuInstanceGetGpuInstanceId, callInfo) + mock.lockVgpuInstanceGetGpuInstanceId.Unlock() + return mock.VgpuInstanceGetGpuInstanceIdFunc(vgpuInstance) +} + +// VgpuInstanceGetGpuInstanceIdCalls gets all the calls that were made to VgpuInstanceGetGpuInstanceId. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetGpuInstanceIdCalls()) +func (mock *Interface) VgpuInstanceGetGpuInstanceIdCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetGpuInstanceId.RLock() + calls = mock.calls.VgpuInstanceGetGpuInstanceId + mock.lockVgpuInstanceGetGpuInstanceId.RUnlock() + return calls +} + +// VgpuInstanceGetGpuPciId calls VgpuInstanceGetGpuPciIdFunc. +func (mock *Interface) VgpuInstanceGetGpuPciId(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { + if mock.VgpuInstanceGetGpuPciIdFunc == nil { + panic("Interface.VgpuInstanceGetGpuPciIdFunc: method is nil but Interface.VgpuInstanceGetGpuPciId was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetGpuPciId.Lock() + mock.calls.VgpuInstanceGetGpuPciId = append(mock.calls.VgpuInstanceGetGpuPciId, callInfo) + mock.lockVgpuInstanceGetGpuPciId.Unlock() + return mock.VgpuInstanceGetGpuPciIdFunc(vgpuInstance) +} + +// VgpuInstanceGetGpuPciIdCalls gets all the calls that were made to VgpuInstanceGetGpuPciId. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetGpuPciIdCalls()) +func (mock *Interface) VgpuInstanceGetGpuPciIdCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetGpuPciId.RLock() + calls = mock.calls.VgpuInstanceGetGpuPciId + mock.lockVgpuInstanceGetGpuPciId.RUnlock() + return calls +} + +// VgpuInstanceGetLicenseInfo calls VgpuInstanceGetLicenseInfoFunc. +func (mock *Interface) VgpuInstanceGetLicenseInfo(vgpuInstance nvml.VgpuInstance) (nvml.VgpuLicenseInfo, nvml.Return) { + if mock.VgpuInstanceGetLicenseInfoFunc == nil { + panic("Interface.VgpuInstanceGetLicenseInfoFunc: method is nil but Interface.VgpuInstanceGetLicenseInfo was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetLicenseInfo.Lock() + mock.calls.VgpuInstanceGetLicenseInfo = append(mock.calls.VgpuInstanceGetLicenseInfo, callInfo) + mock.lockVgpuInstanceGetLicenseInfo.Unlock() + return mock.VgpuInstanceGetLicenseInfoFunc(vgpuInstance) +} + +// VgpuInstanceGetLicenseInfoCalls gets all the calls that were made to VgpuInstanceGetLicenseInfo. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetLicenseInfoCalls()) +func (mock *Interface) VgpuInstanceGetLicenseInfoCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetLicenseInfo.RLock() + calls = mock.calls.VgpuInstanceGetLicenseInfo + mock.lockVgpuInstanceGetLicenseInfo.RUnlock() + return calls +} + +// VgpuInstanceGetLicenseStatus calls VgpuInstanceGetLicenseStatusFunc. +func (mock *Interface) VgpuInstanceGetLicenseStatus(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { + if mock.VgpuInstanceGetLicenseStatusFunc == nil { + panic("Interface.VgpuInstanceGetLicenseStatusFunc: method is nil but Interface.VgpuInstanceGetLicenseStatus was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetLicenseStatus.Lock() + mock.calls.VgpuInstanceGetLicenseStatus = append(mock.calls.VgpuInstanceGetLicenseStatus, callInfo) + mock.lockVgpuInstanceGetLicenseStatus.Unlock() + return mock.VgpuInstanceGetLicenseStatusFunc(vgpuInstance) +} + +// VgpuInstanceGetLicenseStatusCalls gets all the calls that were made to VgpuInstanceGetLicenseStatus. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetLicenseStatusCalls()) +func (mock *Interface) VgpuInstanceGetLicenseStatusCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetLicenseStatus.RLock() + calls = mock.calls.VgpuInstanceGetLicenseStatus + mock.lockVgpuInstanceGetLicenseStatus.RUnlock() + return calls +} + +// VgpuInstanceGetMdevUUID calls VgpuInstanceGetMdevUUIDFunc. +func (mock *Interface) VgpuInstanceGetMdevUUID(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { + if mock.VgpuInstanceGetMdevUUIDFunc == nil { + panic("Interface.VgpuInstanceGetMdevUUIDFunc: method is nil but Interface.VgpuInstanceGetMdevUUID was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetMdevUUID.Lock() + mock.calls.VgpuInstanceGetMdevUUID = append(mock.calls.VgpuInstanceGetMdevUUID, callInfo) + mock.lockVgpuInstanceGetMdevUUID.Unlock() + return mock.VgpuInstanceGetMdevUUIDFunc(vgpuInstance) +} + +// VgpuInstanceGetMdevUUIDCalls gets all the calls that were made to VgpuInstanceGetMdevUUID. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetMdevUUIDCalls()) +func (mock *Interface) VgpuInstanceGetMdevUUIDCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetMdevUUID.RLock() + calls = mock.calls.VgpuInstanceGetMdevUUID + mock.lockVgpuInstanceGetMdevUUID.RUnlock() + return calls +} + +// VgpuInstanceGetMetadata calls VgpuInstanceGetMetadataFunc. +func (mock *Interface) VgpuInstanceGetMetadata(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, nvml.Return) { + if mock.VgpuInstanceGetMetadataFunc == nil { + panic("Interface.VgpuInstanceGetMetadataFunc: method is nil but Interface.VgpuInstanceGetMetadata was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetMetadata.Lock() + mock.calls.VgpuInstanceGetMetadata = append(mock.calls.VgpuInstanceGetMetadata, callInfo) + mock.lockVgpuInstanceGetMetadata.Unlock() + return mock.VgpuInstanceGetMetadataFunc(vgpuInstance) +} + +// VgpuInstanceGetMetadataCalls gets all the calls that were made to VgpuInstanceGetMetadata. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetMetadataCalls()) +func (mock *Interface) VgpuInstanceGetMetadataCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetMetadata.RLock() + calls = mock.calls.VgpuInstanceGetMetadata + mock.lockVgpuInstanceGetMetadata.RUnlock() + return calls +} + +// VgpuInstanceGetRuntimeStateSize calls VgpuInstanceGetRuntimeStateSizeFunc. +func (mock *Interface) VgpuInstanceGetRuntimeStateSize(vgpuInstance nvml.VgpuInstance) (nvml.VgpuRuntimeState, nvml.Return) { + if mock.VgpuInstanceGetRuntimeStateSizeFunc == nil { + panic("Interface.VgpuInstanceGetRuntimeStateSizeFunc: method is nil but Interface.VgpuInstanceGetRuntimeStateSize was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetRuntimeStateSize.Lock() + mock.calls.VgpuInstanceGetRuntimeStateSize = append(mock.calls.VgpuInstanceGetRuntimeStateSize, callInfo) + mock.lockVgpuInstanceGetRuntimeStateSize.Unlock() + return mock.VgpuInstanceGetRuntimeStateSizeFunc(vgpuInstance) +} + +// VgpuInstanceGetRuntimeStateSizeCalls gets all the calls that were made to VgpuInstanceGetRuntimeStateSize. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetRuntimeStateSizeCalls()) +func (mock *Interface) VgpuInstanceGetRuntimeStateSizeCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetRuntimeStateSize.RLock() + calls = mock.calls.VgpuInstanceGetRuntimeStateSize + mock.lockVgpuInstanceGetRuntimeStateSize.RUnlock() + return calls +} + +// VgpuInstanceGetType calls VgpuInstanceGetTypeFunc. +func (mock *Interface) VgpuInstanceGetType(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, nvml.Return) { + if mock.VgpuInstanceGetTypeFunc == nil { + panic("Interface.VgpuInstanceGetTypeFunc: method is nil but Interface.VgpuInstanceGetType was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetType.Lock() + mock.calls.VgpuInstanceGetType = append(mock.calls.VgpuInstanceGetType, callInfo) + mock.lockVgpuInstanceGetType.Unlock() + return mock.VgpuInstanceGetTypeFunc(vgpuInstance) +} + +// VgpuInstanceGetTypeCalls gets all the calls that were made to VgpuInstanceGetType. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetTypeCalls()) +func (mock *Interface) VgpuInstanceGetTypeCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetType.RLock() + calls = mock.calls.VgpuInstanceGetType + mock.lockVgpuInstanceGetType.RUnlock() + return calls +} + +// VgpuInstanceGetUUID calls VgpuInstanceGetUUIDFunc. +func (mock *Interface) VgpuInstanceGetUUID(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { + if mock.VgpuInstanceGetUUIDFunc == nil { + panic("Interface.VgpuInstanceGetUUIDFunc: method is nil but Interface.VgpuInstanceGetUUID was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetUUID.Lock() + mock.calls.VgpuInstanceGetUUID = append(mock.calls.VgpuInstanceGetUUID, callInfo) + mock.lockVgpuInstanceGetUUID.Unlock() + return mock.VgpuInstanceGetUUIDFunc(vgpuInstance) +} + +// VgpuInstanceGetUUIDCalls gets all the calls that were made to VgpuInstanceGetUUID. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetUUIDCalls()) +func (mock *Interface) VgpuInstanceGetUUIDCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetUUID.RLock() + calls = mock.calls.VgpuInstanceGetUUID + mock.lockVgpuInstanceGetUUID.RUnlock() + return calls +} + +// VgpuInstanceGetVmDriverVersion calls VgpuInstanceGetVmDriverVersionFunc. +func (mock *Interface) VgpuInstanceGetVmDriverVersion(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { + if mock.VgpuInstanceGetVmDriverVersionFunc == nil { + panic("Interface.VgpuInstanceGetVmDriverVersionFunc: method is nil but Interface.VgpuInstanceGetVmDriverVersion was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetVmDriverVersion.Lock() + mock.calls.VgpuInstanceGetVmDriverVersion = append(mock.calls.VgpuInstanceGetVmDriverVersion, callInfo) + mock.lockVgpuInstanceGetVmDriverVersion.Unlock() + return mock.VgpuInstanceGetVmDriverVersionFunc(vgpuInstance) +} + +// VgpuInstanceGetVmDriverVersionCalls gets all the calls that were made to VgpuInstanceGetVmDriverVersion. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetVmDriverVersionCalls()) +func (mock *Interface) VgpuInstanceGetVmDriverVersionCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetVmDriverVersion.RLock() + calls = mock.calls.VgpuInstanceGetVmDriverVersion + mock.lockVgpuInstanceGetVmDriverVersion.RUnlock() + return calls +} + +// VgpuInstanceGetVmID calls VgpuInstanceGetVmIDFunc. +func (mock *Interface) VgpuInstanceGetVmID(vgpuInstance nvml.VgpuInstance) (string, nvml.VgpuVmIdType, nvml.Return) { + if mock.VgpuInstanceGetVmIDFunc == nil { + panic("Interface.VgpuInstanceGetVmIDFunc: method is nil but Interface.VgpuInstanceGetVmID was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + }{ + VgpuInstance: vgpuInstance, + } + mock.lockVgpuInstanceGetVmID.Lock() + mock.calls.VgpuInstanceGetVmID = append(mock.calls.VgpuInstanceGetVmID, callInfo) + mock.lockVgpuInstanceGetVmID.Unlock() + return mock.VgpuInstanceGetVmIDFunc(vgpuInstance) +} + +// VgpuInstanceGetVmIDCalls gets all the calls that were made to VgpuInstanceGetVmID. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceGetVmIDCalls()) +func (mock *Interface) VgpuInstanceGetVmIDCalls() []struct { + VgpuInstance nvml.VgpuInstance +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + } + mock.lockVgpuInstanceGetVmID.RLock() + calls = mock.calls.VgpuInstanceGetVmID + mock.lockVgpuInstanceGetVmID.RUnlock() + return calls +} + +// VgpuInstanceSetEncoderCapacity calls VgpuInstanceSetEncoderCapacityFunc. +func (mock *Interface) VgpuInstanceSetEncoderCapacity(vgpuInstance nvml.VgpuInstance, n int) nvml.Return { + if mock.VgpuInstanceSetEncoderCapacityFunc == nil { + panic("Interface.VgpuInstanceSetEncoderCapacityFunc: method is nil but Interface.VgpuInstanceSetEncoderCapacity was just called") + } + callInfo := struct { + VgpuInstance nvml.VgpuInstance + N int + }{ + VgpuInstance: vgpuInstance, + N: n, + } + mock.lockVgpuInstanceSetEncoderCapacity.Lock() + mock.calls.VgpuInstanceSetEncoderCapacity = append(mock.calls.VgpuInstanceSetEncoderCapacity, callInfo) + mock.lockVgpuInstanceSetEncoderCapacity.Unlock() + return mock.VgpuInstanceSetEncoderCapacityFunc(vgpuInstance, n) +} + +// VgpuInstanceSetEncoderCapacityCalls gets all the calls that were made to VgpuInstanceSetEncoderCapacity. +// Check the length with: +// +// len(mockedInterface.VgpuInstanceSetEncoderCapacityCalls()) +func (mock *Interface) VgpuInstanceSetEncoderCapacityCalls() []struct { + VgpuInstance nvml.VgpuInstance + N int +} { + var calls []struct { + VgpuInstance nvml.VgpuInstance + N int + } + mock.lockVgpuInstanceSetEncoderCapacity.RLock() + calls = mock.calls.VgpuInstanceSetEncoderCapacity + mock.lockVgpuInstanceSetEncoderCapacity.RUnlock() + return calls +} + +// VgpuTypeGetBAR1Info calls VgpuTypeGetBAR1InfoFunc. +func (mock *Interface) VgpuTypeGetBAR1Info(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuTypeBar1Info, nvml.Return) { + if mock.VgpuTypeGetBAR1InfoFunc == nil { + panic("Interface.VgpuTypeGetBAR1InfoFunc: method is nil but Interface.VgpuTypeGetBAR1Info was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetBAR1Info.Lock() + mock.calls.VgpuTypeGetBAR1Info = append(mock.calls.VgpuTypeGetBAR1Info, callInfo) + mock.lockVgpuTypeGetBAR1Info.Unlock() + return mock.VgpuTypeGetBAR1InfoFunc(vgpuTypeId) +} + +// VgpuTypeGetBAR1InfoCalls gets all the calls that were made to VgpuTypeGetBAR1Info. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetBAR1InfoCalls()) +func (mock *Interface) VgpuTypeGetBAR1InfoCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetBAR1Info.RLock() + calls = mock.calls.VgpuTypeGetBAR1Info + mock.lockVgpuTypeGetBAR1Info.RUnlock() + return calls +} + +// VgpuTypeGetCapabilities calls VgpuTypeGetCapabilitiesFunc. +func (mock *Interface) VgpuTypeGetCapabilities(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { + if mock.VgpuTypeGetCapabilitiesFunc == nil { + panic("Interface.VgpuTypeGetCapabilitiesFunc: method is nil but Interface.VgpuTypeGetCapabilities was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + VgpuCapability nvml.VgpuCapability + }{ + VgpuTypeId: vgpuTypeId, + VgpuCapability: vgpuCapability, + } + mock.lockVgpuTypeGetCapabilities.Lock() + mock.calls.VgpuTypeGetCapabilities = append(mock.calls.VgpuTypeGetCapabilities, callInfo) + mock.lockVgpuTypeGetCapabilities.Unlock() + return mock.VgpuTypeGetCapabilitiesFunc(vgpuTypeId, vgpuCapability) +} + +// VgpuTypeGetCapabilitiesCalls gets all the calls that were made to VgpuTypeGetCapabilities. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetCapabilitiesCalls()) +func (mock *Interface) VgpuTypeGetCapabilitiesCalls() []struct { + VgpuTypeId nvml.VgpuTypeId + VgpuCapability nvml.VgpuCapability +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + VgpuCapability nvml.VgpuCapability + } + mock.lockVgpuTypeGetCapabilities.RLock() + calls = mock.calls.VgpuTypeGetCapabilities + mock.lockVgpuTypeGetCapabilities.RUnlock() + return calls +} + +// VgpuTypeGetClass calls VgpuTypeGetClassFunc. +func (mock *Interface) VgpuTypeGetClass(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { + if mock.VgpuTypeGetClassFunc == nil { + panic("Interface.VgpuTypeGetClassFunc: method is nil but Interface.VgpuTypeGetClass was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetClass.Lock() + mock.calls.VgpuTypeGetClass = append(mock.calls.VgpuTypeGetClass, callInfo) + mock.lockVgpuTypeGetClass.Unlock() + return mock.VgpuTypeGetClassFunc(vgpuTypeId) +} + +// VgpuTypeGetClassCalls gets all the calls that were made to VgpuTypeGetClass. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetClassCalls()) +func (mock *Interface) VgpuTypeGetClassCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetClass.RLock() + calls = mock.calls.VgpuTypeGetClass + mock.lockVgpuTypeGetClass.RUnlock() + return calls +} + +// VgpuTypeGetDeviceID calls VgpuTypeGetDeviceIDFunc. +func (mock *Interface) VgpuTypeGetDeviceID(vgpuTypeId nvml.VgpuTypeId) (uint64, uint64, nvml.Return) { + if mock.VgpuTypeGetDeviceIDFunc == nil { + panic("Interface.VgpuTypeGetDeviceIDFunc: method is nil but Interface.VgpuTypeGetDeviceID was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetDeviceID.Lock() + mock.calls.VgpuTypeGetDeviceID = append(mock.calls.VgpuTypeGetDeviceID, callInfo) + mock.lockVgpuTypeGetDeviceID.Unlock() + return mock.VgpuTypeGetDeviceIDFunc(vgpuTypeId) +} + +// VgpuTypeGetDeviceIDCalls gets all the calls that were made to VgpuTypeGetDeviceID. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetDeviceIDCalls()) +func (mock *Interface) VgpuTypeGetDeviceIDCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetDeviceID.RLock() + calls = mock.calls.VgpuTypeGetDeviceID + mock.lockVgpuTypeGetDeviceID.RUnlock() + return calls +} + +// VgpuTypeGetFrameRateLimit calls VgpuTypeGetFrameRateLimitFunc. +func (mock *Interface) VgpuTypeGetFrameRateLimit(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { + if mock.VgpuTypeGetFrameRateLimitFunc == nil { + panic("Interface.VgpuTypeGetFrameRateLimitFunc: method is nil but Interface.VgpuTypeGetFrameRateLimit was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetFrameRateLimit.Lock() + mock.calls.VgpuTypeGetFrameRateLimit = append(mock.calls.VgpuTypeGetFrameRateLimit, callInfo) + mock.lockVgpuTypeGetFrameRateLimit.Unlock() + return mock.VgpuTypeGetFrameRateLimitFunc(vgpuTypeId) +} + +// VgpuTypeGetFrameRateLimitCalls gets all the calls that were made to VgpuTypeGetFrameRateLimit. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetFrameRateLimitCalls()) +func (mock *Interface) VgpuTypeGetFrameRateLimitCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetFrameRateLimit.RLock() + calls = mock.calls.VgpuTypeGetFrameRateLimit + mock.lockVgpuTypeGetFrameRateLimit.RUnlock() + return calls +} + +// VgpuTypeGetFramebufferSize calls VgpuTypeGetFramebufferSizeFunc. +func (mock *Interface) VgpuTypeGetFramebufferSize(vgpuTypeId nvml.VgpuTypeId) (uint64, nvml.Return) { + if mock.VgpuTypeGetFramebufferSizeFunc == nil { + panic("Interface.VgpuTypeGetFramebufferSizeFunc: method is nil but Interface.VgpuTypeGetFramebufferSize was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetFramebufferSize.Lock() + mock.calls.VgpuTypeGetFramebufferSize = append(mock.calls.VgpuTypeGetFramebufferSize, callInfo) + mock.lockVgpuTypeGetFramebufferSize.Unlock() + return mock.VgpuTypeGetFramebufferSizeFunc(vgpuTypeId) +} + +// VgpuTypeGetFramebufferSizeCalls gets all the calls that were made to VgpuTypeGetFramebufferSize. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetFramebufferSizeCalls()) +func (mock *Interface) VgpuTypeGetFramebufferSizeCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetFramebufferSize.RLock() + calls = mock.calls.VgpuTypeGetFramebufferSize + mock.lockVgpuTypeGetFramebufferSize.RUnlock() + return calls +} + +// VgpuTypeGetGpuInstanceProfileId calls VgpuTypeGetGpuInstanceProfileIdFunc. +func (mock *Interface) VgpuTypeGetGpuInstanceProfileId(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { + if mock.VgpuTypeGetGpuInstanceProfileIdFunc == nil { + panic("Interface.VgpuTypeGetGpuInstanceProfileIdFunc: method is nil but Interface.VgpuTypeGetGpuInstanceProfileId was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetGpuInstanceProfileId.Lock() + mock.calls.VgpuTypeGetGpuInstanceProfileId = append(mock.calls.VgpuTypeGetGpuInstanceProfileId, callInfo) + mock.lockVgpuTypeGetGpuInstanceProfileId.Unlock() + return mock.VgpuTypeGetGpuInstanceProfileIdFunc(vgpuTypeId) +} + +// VgpuTypeGetGpuInstanceProfileIdCalls gets all the calls that were made to VgpuTypeGetGpuInstanceProfileId. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetGpuInstanceProfileIdCalls()) +func (mock *Interface) VgpuTypeGetGpuInstanceProfileIdCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetGpuInstanceProfileId.RLock() + calls = mock.calls.VgpuTypeGetGpuInstanceProfileId + mock.lockVgpuTypeGetGpuInstanceProfileId.RUnlock() + return calls +} + +// VgpuTypeGetLicense calls VgpuTypeGetLicenseFunc. +func (mock *Interface) VgpuTypeGetLicense(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { + if mock.VgpuTypeGetLicenseFunc == nil { + panic("Interface.VgpuTypeGetLicenseFunc: method is nil but Interface.VgpuTypeGetLicense was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetLicense.Lock() + mock.calls.VgpuTypeGetLicense = append(mock.calls.VgpuTypeGetLicense, callInfo) + mock.lockVgpuTypeGetLicense.Unlock() + return mock.VgpuTypeGetLicenseFunc(vgpuTypeId) +} + +// VgpuTypeGetLicenseCalls gets all the calls that were made to VgpuTypeGetLicense. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetLicenseCalls()) +func (mock *Interface) VgpuTypeGetLicenseCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetLicense.RLock() + calls = mock.calls.VgpuTypeGetLicense + mock.lockVgpuTypeGetLicense.RUnlock() + return calls +} + +// VgpuTypeGetMaxInstances calls VgpuTypeGetMaxInstancesFunc. +func (mock *Interface) VgpuTypeGetMaxInstances(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { + if mock.VgpuTypeGetMaxInstancesFunc == nil { + panic("Interface.VgpuTypeGetMaxInstancesFunc: method is nil but Interface.VgpuTypeGetMaxInstances was just called") + } + callInfo := struct { + Device nvml.Device + VgpuTypeId nvml.VgpuTypeId + }{ + Device: device, + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetMaxInstances.Lock() + mock.calls.VgpuTypeGetMaxInstances = append(mock.calls.VgpuTypeGetMaxInstances, callInfo) + mock.lockVgpuTypeGetMaxInstances.Unlock() + return mock.VgpuTypeGetMaxInstancesFunc(device, vgpuTypeId) +} + +// VgpuTypeGetMaxInstancesCalls gets all the calls that were made to VgpuTypeGetMaxInstances. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetMaxInstancesCalls()) +func (mock *Interface) VgpuTypeGetMaxInstancesCalls() []struct { + Device nvml.Device + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + Device nvml.Device + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetMaxInstances.RLock() + calls = mock.calls.VgpuTypeGetMaxInstances + mock.lockVgpuTypeGetMaxInstances.RUnlock() + return calls +} + +// VgpuTypeGetMaxInstancesPerGpuInstance calls VgpuTypeGetMaxInstancesPerGpuInstanceFunc. +func (mock *Interface) VgpuTypeGetMaxInstancesPerGpuInstance(vgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance) nvml.Return { + if mock.VgpuTypeGetMaxInstancesPerGpuInstanceFunc == nil { + panic("Interface.VgpuTypeGetMaxInstancesPerGpuInstanceFunc: method is nil but Interface.VgpuTypeGetMaxInstancesPerGpuInstance was just called") + } + callInfo := struct { + VgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance + }{ + VgpuTypeMaxInstance: vgpuTypeMaxInstance, + } + mock.lockVgpuTypeGetMaxInstancesPerGpuInstance.Lock() + mock.calls.VgpuTypeGetMaxInstancesPerGpuInstance = append(mock.calls.VgpuTypeGetMaxInstancesPerGpuInstance, callInfo) + mock.lockVgpuTypeGetMaxInstancesPerGpuInstance.Unlock() + return mock.VgpuTypeGetMaxInstancesPerGpuInstanceFunc(vgpuTypeMaxInstance) +} + +// VgpuTypeGetMaxInstancesPerGpuInstanceCalls gets all the calls that were made to VgpuTypeGetMaxInstancesPerGpuInstance. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetMaxInstancesPerGpuInstanceCalls()) +func (mock *Interface) VgpuTypeGetMaxInstancesPerGpuInstanceCalls() []struct { + VgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance +} { + var calls []struct { + VgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance + } + mock.lockVgpuTypeGetMaxInstancesPerGpuInstance.RLock() + calls = mock.calls.VgpuTypeGetMaxInstancesPerGpuInstance + mock.lockVgpuTypeGetMaxInstancesPerGpuInstance.RUnlock() + return calls +} + +// VgpuTypeGetMaxInstancesPerVm calls VgpuTypeGetMaxInstancesPerVmFunc. +func (mock *Interface) VgpuTypeGetMaxInstancesPerVm(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { + if mock.VgpuTypeGetMaxInstancesPerVmFunc == nil { + panic("Interface.VgpuTypeGetMaxInstancesPerVmFunc: method is nil but Interface.VgpuTypeGetMaxInstancesPerVm was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetMaxInstancesPerVm.Lock() + mock.calls.VgpuTypeGetMaxInstancesPerVm = append(mock.calls.VgpuTypeGetMaxInstancesPerVm, callInfo) + mock.lockVgpuTypeGetMaxInstancesPerVm.Unlock() + return mock.VgpuTypeGetMaxInstancesPerVmFunc(vgpuTypeId) +} + +// VgpuTypeGetMaxInstancesPerVmCalls gets all the calls that were made to VgpuTypeGetMaxInstancesPerVm. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetMaxInstancesPerVmCalls()) +func (mock *Interface) VgpuTypeGetMaxInstancesPerVmCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetMaxInstancesPerVm.RLock() + calls = mock.calls.VgpuTypeGetMaxInstancesPerVm + mock.lockVgpuTypeGetMaxInstancesPerVm.RUnlock() + return calls +} + +// VgpuTypeGetName calls VgpuTypeGetNameFunc. +func (mock *Interface) VgpuTypeGetName(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { + if mock.VgpuTypeGetNameFunc == nil { + panic("Interface.VgpuTypeGetNameFunc: method is nil but Interface.VgpuTypeGetName was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetName.Lock() + mock.calls.VgpuTypeGetName = append(mock.calls.VgpuTypeGetName, callInfo) + mock.lockVgpuTypeGetName.Unlock() + return mock.VgpuTypeGetNameFunc(vgpuTypeId) +} + +// VgpuTypeGetNameCalls gets all the calls that were made to VgpuTypeGetName. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetNameCalls()) +func (mock *Interface) VgpuTypeGetNameCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetName.RLock() + calls = mock.calls.VgpuTypeGetName + mock.lockVgpuTypeGetName.RUnlock() + return calls +} + +// VgpuTypeGetNumDisplayHeads calls VgpuTypeGetNumDisplayHeadsFunc. +func (mock *Interface) VgpuTypeGetNumDisplayHeads(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { + if mock.VgpuTypeGetNumDisplayHeadsFunc == nil { + panic("Interface.VgpuTypeGetNumDisplayHeadsFunc: method is nil but Interface.VgpuTypeGetNumDisplayHeads was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + }{ + VgpuTypeId: vgpuTypeId, + } + mock.lockVgpuTypeGetNumDisplayHeads.Lock() + mock.calls.VgpuTypeGetNumDisplayHeads = append(mock.calls.VgpuTypeGetNumDisplayHeads, callInfo) + mock.lockVgpuTypeGetNumDisplayHeads.Unlock() + return mock.VgpuTypeGetNumDisplayHeadsFunc(vgpuTypeId) +} + +// VgpuTypeGetNumDisplayHeadsCalls gets all the calls that were made to VgpuTypeGetNumDisplayHeads. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetNumDisplayHeadsCalls()) +func (mock *Interface) VgpuTypeGetNumDisplayHeadsCalls() []struct { + VgpuTypeId nvml.VgpuTypeId +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + } + mock.lockVgpuTypeGetNumDisplayHeads.RLock() + calls = mock.calls.VgpuTypeGetNumDisplayHeads + mock.lockVgpuTypeGetNumDisplayHeads.RUnlock() + return calls +} + +// VgpuTypeGetResolution calls VgpuTypeGetResolutionFunc. +func (mock *Interface) VgpuTypeGetResolution(vgpuTypeId nvml.VgpuTypeId, n int) (uint32, uint32, nvml.Return) { + if mock.VgpuTypeGetResolutionFunc == nil { + panic("Interface.VgpuTypeGetResolutionFunc: method is nil but Interface.VgpuTypeGetResolution was just called") + } + callInfo := struct { + VgpuTypeId nvml.VgpuTypeId + N int + }{ + VgpuTypeId: vgpuTypeId, + N: n, + } + mock.lockVgpuTypeGetResolution.Lock() + mock.calls.VgpuTypeGetResolution = append(mock.calls.VgpuTypeGetResolution, callInfo) + mock.lockVgpuTypeGetResolution.Unlock() + return mock.VgpuTypeGetResolutionFunc(vgpuTypeId, n) +} + +// VgpuTypeGetResolutionCalls gets all the calls that were made to VgpuTypeGetResolution. +// Check the length with: +// +// len(mockedInterface.VgpuTypeGetResolutionCalls()) +func (mock *Interface) VgpuTypeGetResolutionCalls() []struct { + VgpuTypeId nvml.VgpuTypeId + N int +} { + var calls []struct { + VgpuTypeId nvml.VgpuTypeId + N int + } + mock.lockVgpuTypeGetResolution.RLock() + calls = mock.calls.VgpuTypeGetResolution + mock.lockVgpuTypeGetResolution.RUnlock() + return calls +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/unit.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/unit.go new file mode 100644 index 000000000..64af542fd --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/unit.go @@ -0,0 +1,304 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package mock + +import ( + "github.com/NVIDIA/go-nvml/pkg/nvml" + "sync" +) + +// Ensure, that Unit does implement nvml.Unit. +// If this is not the case, regenerate this file with moq. +var _ nvml.Unit = &Unit{} + +// Unit is a mock implementation of nvml.Unit. +// +// func TestSomethingThatUsesUnit(t *testing.T) { +// +// // make and configure a mocked nvml.Unit +// mockedUnit := &Unit{ +// GetDevicesFunc: func() ([]nvml.Device, nvml.Return) { +// panic("mock out the GetDevices method") +// }, +// GetFanSpeedInfoFunc: func() (nvml.UnitFanSpeeds, nvml.Return) { +// panic("mock out the GetFanSpeedInfo method") +// }, +// GetLedStateFunc: func() (nvml.LedState, nvml.Return) { +// panic("mock out the GetLedState method") +// }, +// GetPsuInfoFunc: func() (nvml.PSUInfo, nvml.Return) { +// panic("mock out the GetPsuInfo method") +// }, +// GetTemperatureFunc: func(n int) (uint32, nvml.Return) { +// panic("mock out the GetTemperature method") +// }, +// GetUnitInfoFunc: func() (nvml.UnitInfo, nvml.Return) { +// panic("mock out the GetUnitInfo method") +// }, +// SetLedStateFunc: func(ledColor nvml.LedColor) nvml.Return { +// panic("mock out the SetLedState method") +// }, +// } +// +// // use mockedUnit in code that requires nvml.Unit +// // and then make assertions. +// +// } +type Unit struct { + // GetDevicesFunc mocks the GetDevices method. + GetDevicesFunc func() ([]nvml.Device, nvml.Return) + + // GetFanSpeedInfoFunc mocks the GetFanSpeedInfo method. + GetFanSpeedInfoFunc func() (nvml.UnitFanSpeeds, nvml.Return) + + // GetLedStateFunc mocks the GetLedState method. + GetLedStateFunc func() (nvml.LedState, nvml.Return) + + // GetPsuInfoFunc mocks the GetPsuInfo method. + GetPsuInfoFunc func() (nvml.PSUInfo, nvml.Return) + + // GetTemperatureFunc mocks the GetTemperature method. + GetTemperatureFunc func(n int) (uint32, nvml.Return) + + // GetUnitInfoFunc mocks the GetUnitInfo method. + GetUnitInfoFunc func() (nvml.UnitInfo, nvml.Return) + + // SetLedStateFunc mocks the SetLedState method. + SetLedStateFunc func(ledColor nvml.LedColor) nvml.Return + + // calls tracks calls to the methods. + calls struct { + // GetDevices holds details about calls to the GetDevices method. + GetDevices []struct { + } + // GetFanSpeedInfo holds details about calls to the GetFanSpeedInfo method. + GetFanSpeedInfo []struct { + } + // GetLedState holds details about calls to the GetLedState method. + GetLedState []struct { + } + // GetPsuInfo holds details about calls to the GetPsuInfo method. + GetPsuInfo []struct { + } + // GetTemperature holds details about calls to the GetTemperature method. + GetTemperature []struct { + // N is the n argument value. + N int + } + // GetUnitInfo holds details about calls to the GetUnitInfo method. + GetUnitInfo []struct { + } + // SetLedState holds details about calls to the SetLedState method. + SetLedState []struct { + // LedColor is the ledColor argument value. + LedColor nvml.LedColor + } + } + lockGetDevices sync.RWMutex + lockGetFanSpeedInfo sync.RWMutex + lockGetLedState sync.RWMutex + lockGetPsuInfo sync.RWMutex + lockGetTemperature sync.RWMutex + lockGetUnitInfo sync.RWMutex + lockSetLedState sync.RWMutex +} + +// GetDevices calls GetDevicesFunc. +func (mock *Unit) GetDevices() ([]nvml.Device, nvml.Return) { + if mock.GetDevicesFunc == nil { + panic("Unit.GetDevicesFunc: method is nil but Unit.GetDevices was just called") + } + callInfo := struct { + }{} + mock.lockGetDevices.Lock() + mock.calls.GetDevices = append(mock.calls.GetDevices, callInfo) + mock.lockGetDevices.Unlock() + return mock.GetDevicesFunc() +} + +// GetDevicesCalls gets all the calls that were made to GetDevices. +// Check the length with: +// +// len(mockedUnit.GetDevicesCalls()) +func (mock *Unit) GetDevicesCalls() []struct { +} { + var calls []struct { + } + mock.lockGetDevices.RLock() + calls = mock.calls.GetDevices + mock.lockGetDevices.RUnlock() + return calls +} + +// GetFanSpeedInfo calls GetFanSpeedInfoFunc. +func (mock *Unit) GetFanSpeedInfo() (nvml.UnitFanSpeeds, nvml.Return) { + if mock.GetFanSpeedInfoFunc == nil { + panic("Unit.GetFanSpeedInfoFunc: method is nil but Unit.GetFanSpeedInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetFanSpeedInfo.Lock() + mock.calls.GetFanSpeedInfo = append(mock.calls.GetFanSpeedInfo, callInfo) + mock.lockGetFanSpeedInfo.Unlock() + return mock.GetFanSpeedInfoFunc() +} + +// GetFanSpeedInfoCalls gets all the calls that were made to GetFanSpeedInfo. +// Check the length with: +// +// len(mockedUnit.GetFanSpeedInfoCalls()) +func (mock *Unit) GetFanSpeedInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFanSpeedInfo.RLock() + calls = mock.calls.GetFanSpeedInfo + mock.lockGetFanSpeedInfo.RUnlock() + return calls +} + +// GetLedState calls GetLedStateFunc. +func (mock *Unit) GetLedState() (nvml.LedState, nvml.Return) { + if mock.GetLedStateFunc == nil { + panic("Unit.GetLedStateFunc: method is nil but Unit.GetLedState was just called") + } + callInfo := struct { + }{} + mock.lockGetLedState.Lock() + mock.calls.GetLedState = append(mock.calls.GetLedState, callInfo) + mock.lockGetLedState.Unlock() + return mock.GetLedStateFunc() +} + +// GetLedStateCalls gets all the calls that were made to GetLedState. +// Check the length with: +// +// len(mockedUnit.GetLedStateCalls()) +func (mock *Unit) GetLedStateCalls() []struct { +} { + var calls []struct { + } + mock.lockGetLedState.RLock() + calls = mock.calls.GetLedState + mock.lockGetLedState.RUnlock() + return calls +} + +// GetPsuInfo calls GetPsuInfoFunc. +func (mock *Unit) GetPsuInfo() (nvml.PSUInfo, nvml.Return) { + if mock.GetPsuInfoFunc == nil { + panic("Unit.GetPsuInfoFunc: method is nil but Unit.GetPsuInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetPsuInfo.Lock() + mock.calls.GetPsuInfo = append(mock.calls.GetPsuInfo, callInfo) + mock.lockGetPsuInfo.Unlock() + return mock.GetPsuInfoFunc() +} + +// GetPsuInfoCalls gets all the calls that were made to GetPsuInfo. +// Check the length with: +// +// len(mockedUnit.GetPsuInfoCalls()) +func (mock *Unit) GetPsuInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetPsuInfo.RLock() + calls = mock.calls.GetPsuInfo + mock.lockGetPsuInfo.RUnlock() + return calls +} + +// GetTemperature calls GetTemperatureFunc. +func (mock *Unit) GetTemperature(n int) (uint32, nvml.Return) { + if mock.GetTemperatureFunc == nil { + panic("Unit.GetTemperatureFunc: method is nil but Unit.GetTemperature was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetTemperature.Lock() + mock.calls.GetTemperature = append(mock.calls.GetTemperature, callInfo) + mock.lockGetTemperature.Unlock() + return mock.GetTemperatureFunc(n) +} + +// GetTemperatureCalls gets all the calls that were made to GetTemperature. +// Check the length with: +// +// len(mockedUnit.GetTemperatureCalls()) +func (mock *Unit) GetTemperatureCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetTemperature.RLock() + calls = mock.calls.GetTemperature + mock.lockGetTemperature.RUnlock() + return calls +} + +// GetUnitInfo calls GetUnitInfoFunc. +func (mock *Unit) GetUnitInfo() (nvml.UnitInfo, nvml.Return) { + if mock.GetUnitInfoFunc == nil { + panic("Unit.GetUnitInfoFunc: method is nil but Unit.GetUnitInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetUnitInfo.Lock() + mock.calls.GetUnitInfo = append(mock.calls.GetUnitInfo, callInfo) + mock.lockGetUnitInfo.Unlock() + return mock.GetUnitInfoFunc() +} + +// GetUnitInfoCalls gets all the calls that were made to GetUnitInfo. +// Check the length with: +// +// len(mockedUnit.GetUnitInfoCalls()) +func (mock *Unit) GetUnitInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetUnitInfo.RLock() + calls = mock.calls.GetUnitInfo + mock.lockGetUnitInfo.RUnlock() + return calls +} + +// SetLedState calls SetLedStateFunc. +func (mock *Unit) SetLedState(ledColor nvml.LedColor) nvml.Return { + if mock.SetLedStateFunc == nil { + panic("Unit.SetLedStateFunc: method is nil but Unit.SetLedState was just called") + } + callInfo := struct { + LedColor nvml.LedColor + }{ + LedColor: ledColor, + } + mock.lockSetLedState.Lock() + mock.calls.SetLedState = append(mock.calls.SetLedState, callInfo) + mock.lockSetLedState.Unlock() + return mock.SetLedStateFunc(ledColor) +} + +// SetLedStateCalls gets all the calls that were made to SetLedState. +// Check the length with: +// +// len(mockedUnit.SetLedStateCalls()) +func (mock *Unit) SetLedStateCalls() []struct { + LedColor nvml.LedColor +} { + var calls []struct { + LedColor nvml.LedColor + } + mock.lockSetLedState.RLock() + calls = mock.calls.SetLedState + mock.lockSetLedState.RUnlock() + return calls +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go new file mode 100644 index 000000000..828f4233f --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go @@ -0,0 +1,933 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package mock + +import ( + "github.com/NVIDIA/go-nvml/pkg/nvml" + "sync" +) + +// Ensure, that VgpuInstance does implement nvml.VgpuInstance. +// If this is not the case, regenerate this file with moq. +var _ nvml.VgpuInstance = &VgpuInstance{} + +// VgpuInstance is a mock implementation of nvml.VgpuInstance. +// +// func TestSomethingThatUsesVgpuInstance(t *testing.T) { +// +// // make and configure a mocked nvml.VgpuInstance +// mockedVgpuInstance := &VgpuInstance{ +// ClearAccountingPidsFunc: func() nvml.Return { +// panic("mock out the ClearAccountingPids method") +// }, +// GetAccountingModeFunc: func() (nvml.EnableState, nvml.Return) { +// panic("mock out the GetAccountingMode method") +// }, +// GetAccountingPidsFunc: func() ([]int, nvml.Return) { +// panic("mock out the GetAccountingPids method") +// }, +// GetAccountingStatsFunc: func(n int) (nvml.AccountingStats, nvml.Return) { +// panic("mock out the GetAccountingStats method") +// }, +// GetEccModeFunc: func() (nvml.EnableState, nvml.Return) { +// panic("mock out the GetEccMode method") +// }, +// GetEncoderCapacityFunc: func() (int, nvml.Return) { +// panic("mock out the GetEncoderCapacity method") +// }, +// GetEncoderSessionsFunc: func() (int, nvml.EncoderSessionInfo, nvml.Return) { +// panic("mock out the GetEncoderSessions method") +// }, +// GetEncoderStatsFunc: func() (int, uint32, uint32, nvml.Return) { +// panic("mock out the GetEncoderStats method") +// }, +// GetFBCSessionsFunc: func() (int, nvml.FBCSessionInfo, nvml.Return) { +// panic("mock out the GetFBCSessions method") +// }, +// GetFBCStatsFunc: func() (nvml.FBCStats, nvml.Return) { +// panic("mock out the GetFBCStats method") +// }, +// GetFbUsageFunc: func() (uint64, nvml.Return) { +// panic("mock out the GetFbUsage method") +// }, +// GetFrameRateLimitFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetFrameRateLimit method") +// }, +// GetGpuInstanceIdFunc: func() (int, nvml.Return) { +// panic("mock out the GetGpuInstanceId method") +// }, +// GetGpuPciIdFunc: func() (string, nvml.Return) { +// panic("mock out the GetGpuPciId method") +// }, +// GetLicenseInfoFunc: func() (nvml.VgpuLicenseInfo, nvml.Return) { +// panic("mock out the GetLicenseInfo method") +// }, +// GetLicenseStatusFunc: func() (int, nvml.Return) { +// panic("mock out the GetLicenseStatus method") +// }, +// GetMdevUUIDFunc: func() (string, nvml.Return) { +// panic("mock out the GetMdevUUID method") +// }, +// GetMetadataFunc: func() (nvml.VgpuMetadata, nvml.Return) { +// panic("mock out the GetMetadata method") +// }, +// GetRuntimeStateSizeFunc: func() (nvml.VgpuRuntimeState, nvml.Return) { +// panic("mock out the GetRuntimeStateSize method") +// }, +// GetTypeFunc: func() (nvml.VgpuTypeId, nvml.Return) { +// panic("mock out the GetType method") +// }, +// GetUUIDFunc: func() (string, nvml.Return) { +// panic("mock out the GetUUID method") +// }, +// GetVmDriverVersionFunc: func() (string, nvml.Return) { +// panic("mock out the GetVmDriverVersion method") +// }, +// GetVmIDFunc: func() (string, nvml.VgpuVmIdType, nvml.Return) { +// panic("mock out the GetVmID method") +// }, +// SetEncoderCapacityFunc: func(n int) nvml.Return { +// panic("mock out the SetEncoderCapacity method") +// }, +// } +// +// // use mockedVgpuInstance in code that requires nvml.VgpuInstance +// // and then make assertions. +// +// } +type VgpuInstance struct { + // ClearAccountingPidsFunc mocks the ClearAccountingPids method. + ClearAccountingPidsFunc func() nvml.Return + + // GetAccountingModeFunc mocks the GetAccountingMode method. + GetAccountingModeFunc func() (nvml.EnableState, nvml.Return) + + // GetAccountingPidsFunc mocks the GetAccountingPids method. + GetAccountingPidsFunc func() ([]int, nvml.Return) + + // GetAccountingStatsFunc mocks the GetAccountingStats method. + GetAccountingStatsFunc func(n int) (nvml.AccountingStats, nvml.Return) + + // GetEccModeFunc mocks the GetEccMode method. + GetEccModeFunc func() (nvml.EnableState, nvml.Return) + + // GetEncoderCapacityFunc mocks the GetEncoderCapacity method. + GetEncoderCapacityFunc func() (int, nvml.Return) + + // GetEncoderSessionsFunc mocks the GetEncoderSessions method. + GetEncoderSessionsFunc func() (int, nvml.EncoderSessionInfo, nvml.Return) + + // GetEncoderStatsFunc mocks the GetEncoderStats method. + GetEncoderStatsFunc func() (int, uint32, uint32, nvml.Return) + + // GetFBCSessionsFunc mocks the GetFBCSessions method. + GetFBCSessionsFunc func() (int, nvml.FBCSessionInfo, nvml.Return) + + // GetFBCStatsFunc mocks the GetFBCStats method. + GetFBCStatsFunc func() (nvml.FBCStats, nvml.Return) + + // GetFbUsageFunc mocks the GetFbUsage method. + GetFbUsageFunc func() (uint64, nvml.Return) + + // GetFrameRateLimitFunc mocks the GetFrameRateLimit method. + GetFrameRateLimitFunc func() (uint32, nvml.Return) + + // GetGpuInstanceIdFunc mocks the GetGpuInstanceId method. + GetGpuInstanceIdFunc func() (int, nvml.Return) + + // GetGpuPciIdFunc mocks the GetGpuPciId method. + GetGpuPciIdFunc func() (string, nvml.Return) + + // GetLicenseInfoFunc mocks the GetLicenseInfo method. + GetLicenseInfoFunc func() (nvml.VgpuLicenseInfo, nvml.Return) + + // GetLicenseStatusFunc mocks the GetLicenseStatus method. + GetLicenseStatusFunc func() (int, nvml.Return) + + // GetMdevUUIDFunc mocks the GetMdevUUID method. + GetMdevUUIDFunc func() (string, nvml.Return) + + // GetMetadataFunc mocks the GetMetadata method. + GetMetadataFunc func() (nvml.VgpuMetadata, nvml.Return) + + // GetRuntimeStateSizeFunc mocks the GetRuntimeStateSize method. + GetRuntimeStateSizeFunc func() (nvml.VgpuRuntimeState, nvml.Return) + + // GetTypeFunc mocks the GetType method. + GetTypeFunc func() (nvml.VgpuTypeId, nvml.Return) + + // GetUUIDFunc mocks the GetUUID method. + GetUUIDFunc func() (string, nvml.Return) + + // GetVmDriverVersionFunc mocks the GetVmDriverVersion method. + GetVmDriverVersionFunc func() (string, nvml.Return) + + // GetVmIDFunc mocks the GetVmID method. + GetVmIDFunc func() (string, nvml.VgpuVmIdType, nvml.Return) + + // SetEncoderCapacityFunc mocks the SetEncoderCapacity method. + SetEncoderCapacityFunc func(n int) nvml.Return + + // calls tracks calls to the methods. + calls struct { + // ClearAccountingPids holds details about calls to the ClearAccountingPids method. + ClearAccountingPids []struct { + } + // GetAccountingMode holds details about calls to the GetAccountingMode method. + GetAccountingMode []struct { + } + // GetAccountingPids holds details about calls to the GetAccountingPids method. + GetAccountingPids []struct { + } + // GetAccountingStats holds details about calls to the GetAccountingStats method. + GetAccountingStats []struct { + // N is the n argument value. + N int + } + // GetEccMode holds details about calls to the GetEccMode method. + GetEccMode []struct { + } + // GetEncoderCapacity holds details about calls to the GetEncoderCapacity method. + GetEncoderCapacity []struct { + } + // GetEncoderSessions holds details about calls to the GetEncoderSessions method. + GetEncoderSessions []struct { + } + // GetEncoderStats holds details about calls to the GetEncoderStats method. + GetEncoderStats []struct { + } + // GetFBCSessions holds details about calls to the GetFBCSessions method. + GetFBCSessions []struct { + } + // GetFBCStats holds details about calls to the GetFBCStats method. + GetFBCStats []struct { + } + // GetFbUsage holds details about calls to the GetFbUsage method. + GetFbUsage []struct { + } + // GetFrameRateLimit holds details about calls to the GetFrameRateLimit method. + GetFrameRateLimit []struct { + } + // GetGpuInstanceId holds details about calls to the GetGpuInstanceId method. + GetGpuInstanceId []struct { + } + // GetGpuPciId holds details about calls to the GetGpuPciId method. + GetGpuPciId []struct { + } + // GetLicenseInfo holds details about calls to the GetLicenseInfo method. + GetLicenseInfo []struct { + } + // GetLicenseStatus holds details about calls to the GetLicenseStatus method. + GetLicenseStatus []struct { + } + // GetMdevUUID holds details about calls to the GetMdevUUID method. + GetMdevUUID []struct { + } + // GetMetadata holds details about calls to the GetMetadata method. + GetMetadata []struct { + } + // GetRuntimeStateSize holds details about calls to the GetRuntimeStateSize method. + GetRuntimeStateSize []struct { + } + // GetType holds details about calls to the GetType method. + GetType []struct { + } + // GetUUID holds details about calls to the GetUUID method. + GetUUID []struct { + } + // GetVmDriverVersion holds details about calls to the GetVmDriverVersion method. + GetVmDriverVersion []struct { + } + // GetVmID holds details about calls to the GetVmID method. + GetVmID []struct { + } + // SetEncoderCapacity holds details about calls to the SetEncoderCapacity method. + SetEncoderCapacity []struct { + // N is the n argument value. + N int + } + } + lockClearAccountingPids sync.RWMutex + lockGetAccountingMode sync.RWMutex + lockGetAccountingPids sync.RWMutex + lockGetAccountingStats sync.RWMutex + lockGetEccMode sync.RWMutex + lockGetEncoderCapacity sync.RWMutex + lockGetEncoderSessions sync.RWMutex + lockGetEncoderStats sync.RWMutex + lockGetFBCSessions sync.RWMutex + lockGetFBCStats sync.RWMutex + lockGetFbUsage sync.RWMutex + lockGetFrameRateLimit sync.RWMutex + lockGetGpuInstanceId sync.RWMutex + lockGetGpuPciId sync.RWMutex + lockGetLicenseInfo sync.RWMutex + lockGetLicenseStatus sync.RWMutex + lockGetMdevUUID sync.RWMutex + lockGetMetadata sync.RWMutex + lockGetRuntimeStateSize sync.RWMutex + lockGetType sync.RWMutex + lockGetUUID sync.RWMutex + lockGetVmDriverVersion sync.RWMutex + lockGetVmID sync.RWMutex + lockSetEncoderCapacity sync.RWMutex +} + +// ClearAccountingPids calls ClearAccountingPidsFunc. +func (mock *VgpuInstance) ClearAccountingPids() nvml.Return { + if mock.ClearAccountingPidsFunc == nil { + panic("VgpuInstance.ClearAccountingPidsFunc: method is nil but VgpuInstance.ClearAccountingPids was just called") + } + callInfo := struct { + }{} + mock.lockClearAccountingPids.Lock() + mock.calls.ClearAccountingPids = append(mock.calls.ClearAccountingPids, callInfo) + mock.lockClearAccountingPids.Unlock() + return mock.ClearAccountingPidsFunc() +} + +// ClearAccountingPidsCalls gets all the calls that were made to ClearAccountingPids. +// Check the length with: +// +// len(mockedVgpuInstance.ClearAccountingPidsCalls()) +func (mock *VgpuInstance) ClearAccountingPidsCalls() []struct { +} { + var calls []struct { + } + mock.lockClearAccountingPids.RLock() + calls = mock.calls.ClearAccountingPids + mock.lockClearAccountingPids.RUnlock() + return calls +} + +// GetAccountingMode calls GetAccountingModeFunc. +func (mock *VgpuInstance) GetAccountingMode() (nvml.EnableState, nvml.Return) { + if mock.GetAccountingModeFunc == nil { + panic("VgpuInstance.GetAccountingModeFunc: method is nil but VgpuInstance.GetAccountingMode was just called") + } + callInfo := struct { + }{} + mock.lockGetAccountingMode.Lock() + mock.calls.GetAccountingMode = append(mock.calls.GetAccountingMode, callInfo) + mock.lockGetAccountingMode.Unlock() + return mock.GetAccountingModeFunc() +} + +// GetAccountingModeCalls gets all the calls that were made to GetAccountingMode. +// Check the length with: +// +// len(mockedVgpuInstance.GetAccountingModeCalls()) +func (mock *VgpuInstance) GetAccountingModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetAccountingMode.RLock() + calls = mock.calls.GetAccountingMode + mock.lockGetAccountingMode.RUnlock() + return calls +} + +// GetAccountingPids calls GetAccountingPidsFunc. +func (mock *VgpuInstance) GetAccountingPids() ([]int, nvml.Return) { + if mock.GetAccountingPidsFunc == nil { + panic("VgpuInstance.GetAccountingPidsFunc: method is nil but VgpuInstance.GetAccountingPids was just called") + } + callInfo := struct { + }{} + mock.lockGetAccountingPids.Lock() + mock.calls.GetAccountingPids = append(mock.calls.GetAccountingPids, callInfo) + mock.lockGetAccountingPids.Unlock() + return mock.GetAccountingPidsFunc() +} + +// GetAccountingPidsCalls gets all the calls that were made to GetAccountingPids. +// Check the length with: +// +// len(mockedVgpuInstance.GetAccountingPidsCalls()) +func (mock *VgpuInstance) GetAccountingPidsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetAccountingPids.RLock() + calls = mock.calls.GetAccountingPids + mock.lockGetAccountingPids.RUnlock() + return calls +} + +// GetAccountingStats calls GetAccountingStatsFunc. +func (mock *VgpuInstance) GetAccountingStats(n int) (nvml.AccountingStats, nvml.Return) { + if mock.GetAccountingStatsFunc == nil { + panic("VgpuInstance.GetAccountingStatsFunc: method is nil but VgpuInstance.GetAccountingStats was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetAccountingStats.Lock() + mock.calls.GetAccountingStats = append(mock.calls.GetAccountingStats, callInfo) + mock.lockGetAccountingStats.Unlock() + return mock.GetAccountingStatsFunc(n) +} + +// GetAccountingStatsCalls gets all the calls that were made to GetAccountingStats. +// Check the length with: +// +// len(mockedVgpuInstance.GetAccountingStatsCalls()) +func (mock *VgpuInstance) GetAccountingStatsCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetAccountingStats.RLock() + calls = mock.calls.GetAccountingStats + mock.lockGetAccountingStats.RUnlock() + return calls +} + +// GetEccMode calls GetEccModeFunc. +func (mock *VgpuInstance) GetEccMode() (nvml.EnableState, nvml.Return) { + if mock.GetEccModeFunc == nil { + panic("VgpuInstance.GetEccModeFunc: method is nil but VgpuInstance.GetEccMode was just called") + } + callInfo := struct { + }{} + mock.lockGetEccMode.Lock() + mock.calls.GetEccMode = append(mock.calls.GetEccMode, callInfo) + mock.lockGetEccMode.Unlock() + return mock.GetEccModeFunc() +} + +// GetEccModeCalls gets all the calls that were made to GetEccMode. +// Check the length with: +// +// len(mockedVgpuInstance.GetEccModeCalls()) +func (mock *VgpuInstance) GetEccModeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetEccMode.RLock() + calls = mock.calls.GetEccMode + mock.lockGetEccMode.RUnlock() + return calls +} + +// GetEncoderCapacity calls GetEncoderCapacityFunc. +func (mock *VgpuInstance) GetEncoderCapacity() (int, nvml.Return) { + if mock.GetEncoderCapacityFunc == nil { + panic("VgpuInstance.GetEncoderCapacityFunc: method is nil but VgpuInstance.GetEncoderCapacity was just called") + } + callInfo := struct { + }{} + mock.lockGetEncoderCapacity.Lock() + mock.calls.GetEncoderCapacity = append(mock.calls.GetEncoderCapacity, callInfo) + mock.lockGetEncoderCapacity.Unlock() + return mock.GetEncoderCapacityFunc() +} + +// GetEncoderCapacityCalls gets all the calls that were made to GetEncoderCapacity. +// Check the length with: +// +// len(mockedVgpuInstance.GetEncoderCapacityCalls()) +func (mock *VgpuInstance) GetEncoderCapacityCalls() []struct { +} { + var calls []struct { + } + mock.lockGetEncoderCapacity.RLock() + calls = mock.calls.GetEncoderCapacity + mock.lockGetEncoderCapacity.RUnlock() + return calls +} + +// GetEncoderSessions calls GetEncoderSessionsFunc. +func (mock *VgpuInstance) GetEncoderSessions() (int, nvml.EncoderSessionInfo, nvml.Return) { + if mock.GetEncoderSessionsFunc == nil { + panic("VgpuInstance.GetEncoderSessionsFunc: method is nil but VgpuInstance.GetEncoderSessions was just called") + } + callInfo := struct { + }{} + mock.lockGetEncoderSessions.Lock() + mock.calls.GetEncoderSessions = append(mock.calls.GetEncoderSessions, callInfo) + mock.lockGetEncoderSessions.Unlock() + return mock.GetEncoderSessionsFunc() +} + +// GetEncoderSessionsCalls gets all the calls that were made to GetEncoderSessions. +// Check the length with: +// +// len(mockedVgpuInstance.GetEncoderSessionsCalls()) +func (mock *VgpuInstance) GetEncoderSessionsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetEncoderSessions.RLock() + calls = mock.calls.GetEncoderSessions + mock.lockGetEncoderSessions.RUnlock() + return calls +} + +// GetEncoderStats calls GetEncoderStatsFunc. +func (mock *VgpuInstance) GetEncoderStats() (int, uint32, uint32, nvml.Return) { + if mock.GetEncoderStatsFunc == nil { + panic("VgpuInstance.GetEncoderStatsFunc: method is nil but VgpuInstance.GetEncoderStats was just called") + } + callInfo := struct { + }{} + mock.lockGetEncoderStats.Lock() + mock.calls.GetEncoderStats = append(mock.calls.GetEncoderStats, callInfo) + mock.lockGetEncoderStats.Unlock() + return mock.GetEncoderStatsFunc() +} + +// GetEncoderStatsCalls gets all the calls that were made to GetEncoderStats. +// Check the length with: +// +// len(mockedVgpuInstance.GetEncoderStatsCalls()) +func (mock *VgpuInstance) GetEncoderStatsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetEncoderStats.RLock() + calls = mock.calls.GetEncoderStats + mock.lockGetEncoderStats.RUnlock() + return calls +} + +// GetFBCSessions calls GetFBCSessionsFunc. +func (mock *VgpuInstance) GetFBCSessions() (int, nvml.FBCSessionInfo, nvml.Return) { + if mock.GetFBCSessionsFunc == nil { + panic("VgpuInstance.GetFBCSessionsFunc: method is nil but VgpuInstance.GetFBCSessions was just called") + } + callInfo := struct { + }{} + mock.lockGetFBCSessions.Lock() + mock.calls.GetFBCSessions = append(mock.calls.GetFBCSessions, callInfo) + mock.lockGetFBCSessions.Unlock() + return mock.GetFBCSessionsFunc() +} + +// GetFBCSessionsCalls gets all the calls that were made to GetFBCSessions. +// Check the length with: +// +// len(mockedVgpuInstance.GetFBCSessionsCalls()) +func (mock *VgpuInstance) GetFBCSessionsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFBCSessions.RLock() + calls = mock.calls.GetFBCSessions + mock.lockGetFBCSessions.RUnlock() + return calls +} + +// GetFBCStats calls GetFBCStatsFunc. +func (mock *VgpuInstance) GetFBCStats() (nvml.FBCStats, nvml.Return) { + if mock.GetFBCStatsFunc == nil { + panic("VgpuInstance.GetFBCStatsFunc: method is nil but VgpuInstance.GetFBCStats was just called") + } + callInfo := struct { + }{} + mock.lockGetFBCStats.Lock() + mock.calls.GetFBCStats = append(mock.calls.GetFBCStats, callInfo) + mock.lockGetFBCStats.Unlock() + return mock.GetFBCStatsFunc() +} + +// GetFBCStatsCalls gets all the calls that were made to GetFBCStats. +// Check the length with: +// +// len(mockedVgpuInstance.GetFBCStatsCalls()) +func (mock *VgpuInstance) GetFBCStatsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFBCStats.RLock() + calls = mock.calls.GetFBCStats + mock.lockGetFBCStats.RUnlock() + return calls +} + +// GetFbUsage calls GetFbUsageFunc. +func (mock *VgpuInstance) GetFbUsage() (uint64, nvml.Return) { + if mock.GetFbUsageFunc == nil { + panic("VgpuInstance.GetFbUsageFunc: method is nil but VgpuInstance.GetFbUsage was just called") + } + callInfo := struct { + }{} + mock.lockGetFbUsage.Lock() + mock.calls.GetFbUsage = append(mock.calls.GetFbUsage, callInfo) + mock.lockGetFbUsage.Unlock() + return mock.GetFbUsageFunc() +} + +// GetFbUsageCalls gets all the calls that were made to GetFbUsage. +// Check the length with: +// +// len(mockedVgpuInstance.GetFbUsageCalls()) +func (mock *VgpuInstance) GetFbUsageCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFbUsage.RLock() + calls = mock.calls.GetFbUsage + mock.lockGetFbUsage.RUnlock() + return calls +} + +// GetFrameRateLimit calls GetFrameRateLimitFunc. +func (mock *VgpuInstance) GetFrameRateLimit() (uint32, nvml.Return) { + if mock.GetFrameRateLimitFunc == nil { + panic("VgpuInstance.GetFrameRateLimitFunc: method is nil but VgpuInstance.GetFrameRateLimit was just called") + } + callInfo := struct { + }{} + mock.lockGetFrameRateLimit.Lock() + mock.calls.GetFrameRateLimit = append(mock.calls.GetFrameRateLimit, callInfo) + mock.lockGetFrameRateLimit.Unlock() + return mock.GetFrameRateLimitFunc() +} + +// GetFrameRateLimitCalls gets all the calls that were made to GetFrameRateLimit. +// Check the length with: +// +// len(mockedVgpuInstance.GetFrameRateLimitCalls()) +func (mock *VgpuInstance) GetFrameRateLimitCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFrameRateLimit.RLock() + calls = mock.calls.GetFrameRateLimit + mock.lockGetFrameRateLimit.RUnlock() + return calls +} + +// GetGpuInstanceId calls GetGpuInstanceIdFunc. +func (mock *VgpuInstance) GetGpuInstanceId() (int, nvml.Return) { + if mock.GetGpuInstanceIdFunc == nil { + panic("VgpuInstance.GetGpuInstanceIdFunc: method is nil but VgpuInstance.GetGpuInstanceId was just called") + } + callInfo := struct { + }{} + mock.lockGetGpuInstanceId.Lock() + mock.calls.GetGpuInstanceId = append(mock.calls.GetGpuInstanceId, callInfo) + mock.lockGetGpuInstanceId.Unlock() + return mock.GetGpuInstanceIdFunc() +} + +// GetGpuInstanceIdCalls gets all the calls that were made to GetGpuInstanceId. +// Check the length with: +// +// len(mockedVgpuInstance.GetGpuInstanceIdCalls()) +func (mock *VgpuInstance) GetGpuInstanceIdCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGpuInstanceId.RLock() + calls = mock.calls.GetGpuInstanceId + mock.lockGetGpuInstanceId.RUnlock() + return calls +} + +// GetGpuPciId calls GetGpuPciIdFunc. +func (mock *VgpuInstance) GetGpuPciId() (string, nvml.Return) { + if mock.GetGpuPciIdFunc == nil { + panic("VgpuInstance.GetGpuPciIdFunc: method is nil but VgpuInstance.GetGpuPciId was just called") + } + callInfo := struct { + }{} + mock.lockGetGpuPciId.Lock() + mock.calls.GetGpuPciId = append(mock.calls.GetGpuPciId, callInfo) + mock.lockGetGpuPciId.Unlock() + return mock.GetGpuPciIdFunc() +} + +// GetGpuPciIdCalls gets all the calls that were made to GetGpuPciId. +// Check the length with: +// +// len(mockedVgpuInstance.GetGpuPciIdCalls()) +func (mock *VgpuInstance) GetGpuPciIdCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGpuPciId.RLock() + calls = mock.calls.GetGpuPciId + mock.lockGetGpuPciId.RUnlock() + return calls +} + +// GetLicenseInfo calls GetLicenseInfoFunc. +func (mock *VgpuInstance) GetLicenseInfo() (nvml.VgpuLicenseInfo, nvml.Return) { + if mock.GetLicenseInfoFunc == nil { + panic("VgpuInstance.GetLicenseInfoFunc: method is nil but VgpuInstance.GetLicenseInfo was just called") + } + callInfo := struct { + }{} + mock.lockGetLicenseInfo.Lock() + mock.calls.GetLicenseInfo = append(mock.calls.GetLicenseInfo, callInfo) + mock.lockGetLicenseInfo.Unlock() + return mock.GetLicenseInfoFunc() +} + +// GetLicenseInfoCalls gets all the calls that were made to GetLicenseInfo. +// Check the length with: +// +// len(mockedVgpuInstance.GetLicenseInfoCalls()) +func (mock *VgpuInstance) GetLicenseInfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetLicenseInfo.RLock() + calls = mock.calls.GetLicenseInfo + mock.lockGetLicenseInfo.RUnlock() + return calls +} + +// GetLicenseStatus calls GetLicenseStatusFunc. +func (mock *VgpuInstance) GetLicenseStatus() (int, nvml.Return) { + if mock.GetLicenseStatusFunc == nil { + panic("VgpuInstance.GetLicenseStatusFunc: method is nil but VgpuInstance.GetLicenseStatus was just called") + } + callInfo := struct { + }{} + mock.lockGetLicenseStatus.Lock() + mock.calls.GetLicenseStatus = append(mock.calls.GetLicenseStatus, callInfo) + mock.lockGetLicenseStatus.Unlock() + return mock.GetLicenseStatusFunc() +} + +// GetLicenseStatusCalls gets all the calls that were made to GetLicenseStatus. +// Check the length with: +// +// len(mockedVgpuInstance.GetLicenseStatusCalls()) +func (mock *VgpuInstance) GetLicenseStatusCalls() []struct { +} { + var calls []struct { + } + mock.lockGetLicenseStatus.RLock() + calls = mock.calls.GetLicenseStatus + mock.lockGetLicenseStatus.RUnlock() + return calls +} + +// GetMdevUUID calls GetMdevUUIDFunc. +func (mock *VgpuInstance) GetMdevUUID() (string, nvml.Return) { + if mock.GetMdevUUIDFunc == nil { + panic("VgpuInstance.GetMdevUUIDFunc: method is nil but VgpuInstance.GetMdevUUID was just called") + } + callInfo := struct { + }{} + mock.lockGetMdevUUID.Lock() + mock.calls.GetMdevUUID = append(mock.calls.GetMdevUUID, callInfo) + mock.lockGetMdevUUID.Unlock() + return mock.GetMdevUUIDFunc() +} + +// GetMdevUUIDCalls gets all the calls that were made to GetMdevUUID. +// Check the length with: +// +// len(mockedVgpuInstance.GetMdevUUIDCalls()) +func (mock *VgpuInstance) GetMdevUUIDCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMdevUUID.RLock() + calls = mock.calls.GetMdevUUID + mock.lockGetMdevUUID.RUnlock() + return calls +} + +// GetMetadata calls GetMetadataFunc. +func (mock *VgpuInstance) GetMetadata() (nvml.VgpuMetadata, nvml.Return) { + if mock.GetMetadataFunc == nil { + panic("VgpuInstance.GetMetadataFunc: method is nil but VgpuInstance.GetMetadata was just called") + } + callInfo := struct { + }{} + mock.lockGetMetadata.Lock() + mock.calls.GetMetadata = append(mock.calls.GetMetadata, callInfo) + mock.lockGetMetadata.Unlock() + return mock.GetMetadataFunc() +} + +// GetMetadataCalls gets all the calls that were made to GetMetadata. +// Check the length with: +// +// len(mockedVgpuInstance.GetMetadataCalls()) +func (mock *VgpuInstance) GetMetadataCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMetadata.RLock() + calls = mock.calls.GetMetadata + mock.lockGetMetadata.RUnlock() + return calls +} + +// GetRuntimeStateSize calls GetRuntimeStateSizeFunc. +func (mock *VgpuInstance) GetRuntimeStateSize() (nvml.VgpuRuntimeState, nvml.Return) { + if mock.GetRuntimeStateSizeFunc == nil { + panic("VgpuInstance.GetRuntimeStateSizeFunc: method is nil but VgpuInstance.GetRuntimeStateSize was just called") + } + callInfo := struct { + }{} + mock.lockGetRuntimeStateSize.Lock() + mock.calls.GetRuntimeStateSize = append(mock.calls.GetRuntimeStateSize, callInfo) + mock.lockGetRuntimeStateSize.Unlock() + return mock.GetRuntimeStateSizeFunc() +} + +// GetRuntimeStateSizeCalls gets all the calls that were made to GetRuntimeStateSize. +// Check the length with: +// +// len(mockedVgpuInstance.GetRuntimeStateSizeCalls()) +func (mock *VgpuInstance) GetRuntimeStateSizeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetRuntimeStateSize.RLock() + calls = mock.calls.GetRuntimeStateSize + mock.lockGetRuntimeStateSize.RUnlock() + return calls +} + +// GetType calls GetTypeFunc. +func (mock *VgpuInstance) GetType() (nvml.VgpuTypeId, nvml.Return) { + if mock.GetTypeFunc == nil { + panic("VgpuInstance.GetTypeFunc: method is nil but VgpuInstance.GetType was just called") + } + callInfo := struct { + }{} + mock.lockGetType.Lock() + mock.calls.GetType = append(mock.calls.GetType, callInfo) + mock.lockGetType.Unlock() + return mock.GetTypeFunc() +} + +// GetTypeCalls gets all the calls that were made to GetType. +// Check the length with: +// +// len(mockedVgpuInstance.GetTypeCalls()) +func (mock *VgpuInstance) GetTypeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetType.RLock() + calls = mock.calls.GetType + mock.lockGetType.RUnlock() + return calls +} + +// GetUUID calls GetUUIDFunc. +func (mock *VgpuInstance) GetUUID() (string, nvml.Return) { + if mock.GetUUIDFunc == nil { + panic("VgpuInstance.GetUUIDFunc: method is nil but VgpuInstance.GetUUID was just called") + } + callInfo := struct { + }{} + mock.lockGetUUID.Lock() + mock.calls.GetUUID = append(mock.calls.GetUUID, callInfo) + mock.lockGetUUID.Unlock() + return mock.GetUUIDFunc() +} + +// GetUUIDCalls gets all the calls that were made to GetUUID. +// Check the length with: +// +// len(mockedVgpuInstance.GetUUIDCalls()) +func (mock *VgpuInstance) GetUUIDCalls() []struct { +} { + var calls []struct { + } + mock.lockGetUUID.RLock() + calls = mock.calls.GetUUID + mock.lockGetUUID.RUnlock() + return calls +} + +// GetVmDriverVersion calls GetVmDriverVersionFunc. +func (mock *VgpuInstance) GetVmDriverVersion() (string, nvml.Return) { + if mock.GetVmDriverVersionFunc == nil { + panic("VgpuInstance.GetVmDriverVersionFunc: method is nil but VgpuInstance.GetVmDriverVersion was just called") + } + callInfo := struct { + }{} + mock.lockGetVmDriverVersion.Lock() + mock.calls.GetVmDriverVersion = append(mock.calls.GetVmDriverVersion, callInfo) + mock.lockGetVmDriverVersion.Unlock() + return mock.GetVmDriverVersionFunc() +} + +// GetVmDriverVersionCalls gets all the calls that were made to GetVmDriverVersion. +// Check the length with: +// +// len(mockedVgpuInstance.GetVmDriverVersionCalls()) +func (mock *VgpuInstance) GetVmDriverVersionCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVmDriverVersion.RLock() + calls = mock.calls.GetVmDriverVersion + mock.lockGetVmDriverVersion.RUnlock() + return calls +} + +// GetVmID calls GetVmIDFunc. +func (mock *VgpuInstance) GetVmID() (string, nvml.VgpuVmIdType, nvml.Return) { + if mock.GetVmIDFunc == nil { + panic("VgpuInstance.GetVmIDFunc: method is nil but VgpuInstance.GetVmID was just called") + } + callInfo := struct { + }{} + mock.lockGetVmID.Lock() + mock.calls.GetVmID = append(mock.calls.GetVmID, callInfo) + mock.lockGetVmID.Unlock() + return mock.GetVmIDFunc() +} + +// GetVmIDCalls gets all the calls that were made to GetVmID. +// Check the length with: +// +// len(mockedVgpuInstance.GetVmIDCalls()) +func (mock *VgpuInstance) GetVmIDCalls() []struct { +} { + var calls []struct { + } + mock.lockGetVmID.RLock() + calls = mock.calls.GetVmID + mock.lockGetVmID.RUnlock() + return calls +} + +// SetEncoderCapacity calls SetEncoderCapacityFunc. +func (mock *VgpuInstance) SetEncoderCapacity(n int) nvml.Return { + if mock.SetEncoderCapacityFunc == nil { + panic("VgpuInstance.SetEncoderCapacityFunc: method is nil but VgpuInstance.SetEncoderCapacity was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockSetEncoderCapacity.Lock() + mock.calls.SetEncoderCapacity = append(mock.calls.SetEncoderCapacity, callInfo) + mock.lockSetEncoderCapacity.Unlock() + return mock.SetEncoderCapacityFunc(n) +} + +// SetEncoderCapacityCalls gets all the calls that were made to SetEncoderCapacity. +// Check the length with: +// +// len(mockedVgpuInstance.SetEncoderCapacityCalls()) +func (mock *VgpuInstance) SetEncoderCapacityCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockSetEncoderCapacity.RLock() + calls = mock.calls.SetEncoderCapacity + mock.lockSetEncoderCapacity.RUnlock() + return calls +} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgputypeid.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgputypeid.go new file mode 100644 index 000000000..467d7468b --- /dev/null +++ b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgputypeid.go @@ -0,0 +1,621 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package mock + +import ( + "github.com/NVIDIA/go-nvml/pkg/nvml" + "sync" +) + +// Ensure, that VgpuTypeId does implement nvml.VgpuTypeId. +// If this is not the case, regenerate this file with moq. +var _ nvml.VgpuTypeId = &VgpuTypeId{} + +// VgpuTypeId is a mock implementation of nvml.VgpuTypeId. +// +// func TestSomethingThatUsesVgpuTypeId(t *testing.T) { +// +// // make and configure a mocked nvml.VgpuTypeId +// mockedVgpuTypeId := &VgpuTypeId{ +// GetBAR1InfoFunc: func() (nvml.VgpuTypeBar1Info, nvml.Return) { +// panic("mock out the GetBAR1Info method") +// }, +// GetCapabilitiesFunc: func(vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { +// panic("mock out the GetCapabilities method") +// }, +// GetClassFunc: func() (string, nvml.Return) { +// panic("mock out the GetClass method") +// }, +// GetCreatablePlacementsFunc: func(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) { +// panic("mock out the GetCreatablePlacements method") +// }, +// GetDeviceIDFunc: func() (uint64, uint64, nvml.Return) { +// panic("mock out the GetDeviceID method") +// }, +// GetFrameRateLimitFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetFrameRateLimit method") +// }, +// GetFramebufferSizeFunc: func() (uint64, nvml.Return) { +// panic("mock out the GetFramebufferSize method") +// }, +// GetGpuInstanceProfileIdFunc: func() (uint32, nvml.Return) { +// panic("mock out the GetGpuInstanceProfileId method") +// }, +// GetLicenseFunc: func() (string, nvml.Return) { +// panic("mock out the GetLicense method") +// }, +// GetMaxInstancesFunc: func(device nvml.Device) (int, nvml.Return) { +// panic("mock out the GetMaxInstances method") +// }, +// GetMaxInstancesPerVmFunc: func() (int, nvml.Return) { +// panic("mock out the GetMaxInstancesPerVm method") +// }, +// GetNameFunc: func() (string, nvml.Return) { +// panic("mock out the GetName method") +// }, +// GetNumDisplayHeadsFunc: func() (int, nvml.Return) { +// panic("mock out the GetNumDisplayHeads method") +// }, +// GetResolutionFunc: func(n int) (uint32, uint32, nvml.Return) { +// panic("mock out the GetResolution method") +// }, +// GetSupportedPlacementsFunc: func(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) { +// panic("mock out the GetSupportedPlacements method") +// }, +// } +// +// // use mockedVgpuTypeId in code that requires nvml.VgpuTypeId +// // and then make assertions. +// +// } +type VgpuTypeId struct { + // GetBAR1InfoFunc mocks the GetBAR1Info method. + GetBAR1InfoFunc func() (nvml.VgpuTypeBar1Info, nvml.Return) + + // GetCapabilitiesFunc mocks the GetCapabilities method. + GetCapabilitiesFunc func(vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) + + // GetClassFunc mocks the GetClass method. + GetClassFunc func() (string, nvml.Return) + + // GetCreatablePlacementsFunc mocks the GetCreatablePlacements method. + GetCreatablePlacementsFunc func(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) + + // GetDeviceIDFunc mocks the GetDeviceID method. + GetDeviceIDFunc func() (uint64, uint64, nvml.Return) + + // GetFrameRateLimitFunc mocks the GetFrameRateLimit method. + GetFrameRateLimitFunc func() (uint32, nvml.Return) + + // GetFramebufferSizeFunc mocks the GetFramebufferSize method. + GetFramebufferSizeFunc func() (uint64, nvml.Return) + + // GetGpuInstanceProfileIdFunc mocks the GetGpuInstanceProfileId method. + GetGpuInstanceProfileIdFunc func() (uint32, nvml.Return) + + // GetLicenseFunc mocks the GetLicense method. + GetLicenseFunc func() (string, nvml.Return) + + // GetMaxInstancesFunc mocks the GetMaxInstances method. + GetMaxInstancesFunc func(device nvml.Device) (int, nvml.Return) + + // GetMaxInstancesPerVmFunc mocks the GetMaxInstancesPerVm method. + GetMaxInstancesPerVmFunc func() (int, nvml.Return) + + // GetNameFunc mocks the GetName method. + GetNameFunc func() (string, nvml.Return) + + // GetNumDisplayHeadsFunc mocks the GetNumDisplayHeads method. + GetNumDisplayHeadsFunc func() (int, nvml.Return) + + // GetResolutionFunc mocks the GetResolution method. + GetResolutionFunc func(n int) (uint32, uint32, nvml.Return) + + // GetSupportedPlacementsFunc mocks the GetSupportedPlacements method. + GetSupportedPlacementsFunc func(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) + + // calls tracks calls to the methods. + calls struct { + // GetBAR1Info holds details about calls to the GetBAR1Info method. + GetBAR1Info []struct { + } + // GetCapabilities holds details about calls to the GetCapabilities method. + GetCapabilities []struct { + // VgpuCapability is the vgpuCapability argument value. + VgpuCapability nvml.VgpuCapability + } + // GetClass holds details about calls to the GetClass method. + GetClass []struct { + } + // GetCreatablePlacements holds details about calls to the GetCreatablePlacements method. + GetCreatablePlacements []struct { + // Device is the device argument value. + Device nvml.Device + } + // GetDeviceID holds details about calls to the GetDeviceID method. + GetDeviceID []struct { + } + // GetFrameRateLimit holds details about calls to the GetFrameRateLimit method. + GetFrameRateLimit []struct { + } + // GetFramebufferSize holds details about calls to the GetFramebufferSize method. + GetFramebufferSize []struct { + } + // GetGpuInstanceProfileId holds details about calls to the GetGpuInstanceProfileId method. + GetGpuInstanceProfileId []struct { + } + // GetLicense holds details about calls to the GetLicense method. + GetLicense []struct { + } + // GetMaxInstances holds details about calls to the GetMaxInstances method. + GetMaxInstances []struct { + // Device is the device argument value. + Device nvml.Device + } + // GetMaxInstancesPerVm holds details about calls to the GetMaxInstancesPerVm method. + GetMaxInstancesPerVm []struct { + } + // GetName holds details about calls to the GetName method. + GetName []struct { + } + // GetNumDisplayHeads holds details about calls to the GetNumDisplayHeads method. + GetNumDisplayHeads []struct { + } + // GetResolution holds details about calls to the GetResolution method. + GetResolution []struct { + // N is the n argument value. + N int + } + // GetSupportedPlacements holds details about calls to the GetSupportedPlacements method. + GetSupportedPlacements []struct { + // Device is the device argument value. + Device nvml.Device + } + } + lockGetBAR1Info sync.RWMutex + lockGetCapabilities sync.RWMutex + lockGetClass sync.RWMutex + lockGetCreatablePlacements sync.RWMutex + lockGetDeviceID sync.RWMutex + lockGetFrameRateLimit sync.RWMutex + lockGetFramebufferSize sync.RWMutex + lockGetGpuInstanceProfileId sync.RWMutex + lockGetLicense sync.RWMutex + lockGetMaxInstances sync.RWMutex + lockGetMaxInstancesPerVm sync.RWMutex + lockGetName sync.RWMutex + lockGetNumDisplayHeads sync.RWMutex + lockGetResolution sync.RWMutex + lockGetSupportedPlacements sync.RWMutex +} + +// GetBAR1Info calls GetBAR1InfoFunc. +func (mock *VgpuTypeId) GetBAR1Info() (nvml.VgpuTypeBar1Info, nvml.Return) { + if mock.GetBAR1InfoFunc == nil { + panic("VgpuTypeId.GetBAR1InfoFunc: method is nil but VgpuTypeId.GetBAR1Info was just called") + } + callInfo := struct { + }{} + mock.lockGetBAR1Info.Lock() + mock.calls.GetBAR1Info = append(mock.calls.GetBAR1Info, callInfo) + mock.lockGetBAR1Info.Unlock() + return mock.GetBAR1InfoFunc() +} + +// GetBAR1InfoCalls gets all the calls that were made to GetBAR1Info. +// Check the length with: +// +// len(mockedVgpuTypeId.GetBAR1InfoCalls()) +func (mock *VgpuTypeId) GetBAR1InfoCalls() []struct { +} { + var calls []struct { + } + mock.lockGetBAR1Info.RLock() + calls = mock.calls.GetBAR1Info + mock.lockGetBAR1Info.RUnlock() + return calls +} + +// GetCapabilities calls GetCapabilitiesFunc. +func (mock *VgpuTypeId) GetCapabilities(vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { + if mock.GetCapabilitiesFunc == nil { + panic("VgpuTypeId.GetCapabilitiesFunc: method is nil but VgpuTypeId.GetCapabilities was just called") + } + callInfo := struct { + VgpuCapability nvml.VgpuCapability + }{ + VgpuCapability: vgpuCapability, + } + mock.lockGetCapabilities.Lock() + mock.calls.GetCapabilities = append(mock.calls.GetCapabilities, callInfo) + mock.lockGetCapabilities.Unlock() + return mock.GetCapabilitiesFunc(vgpuCapability) +} + +// GetCapabilitiesCalls gets all the calls that were made to GetCapabilities. +// Check the length with: +// +// len(mockedVgpuTypeId.GetCapabilitiesCalls()) +func (mock *VgpuTypeId) GetCapabilitiesCalls() []struct { + VgpuCapability nvml.VgpuCapability +} { + var calls []struct { + VgpuCapability nvml.VgpuCapability + } + mock.lockGetCapabilities.RLock() + calls = mock.calls.GetCapabilities + mock.lockGetCapabilities.RUnlock() + return calls +} + +// GetClass calls GetClassFunc. +func (mock *VgpuTypeId) GetClass() (string, nvml.Return) { + if mock.GetClassFunc == nil { + panic("VgpuTypeId.GetClassFunc: method is nil but VgpuTypeId.GetClass was just called") + } + callInfo := struct { + }{} + mock.lockGetClass.Lock() + mock.calls.GetClass = append(mock.calls.GetClass, callInfo) + mock.lockGetClass.Unlock() + return mock.GetClassFunc() +} + +// GetClassCalls gets all the calls that were made to GetClass. +// Check the length with: +// +// len(mockedVgpuTypeId.GetClassCalls()) +func (mock *VgpuTypeId) GetClassCalls() []struct { +} { + var calls []struct { + } + mock.lockGetClass.RLock() + calls = mock.calls.GetClass + mock.lockGetClass.RUnlock() + return calls +} + +// GetCreatablePlacements calls GetCreatablePlacementsFunc. +func (mock *VgpuTypeId) GetCreatablePlacements(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) { + if mock.GetCreatablePlacementsFunc == nil { + panic("VgpuTypeId.GetCreatablePlacementsFunc: method is nil but VgpuTypeId.GetCreatablePlacements was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockGetCreatablePlacements.Lock() + mock.calls.GetCreatablePlacements = append(mock.calls.GetCreatablePlacements, callInfo) + mock.lockGetCreatablePlacements.Unlock() + return mock.GetCreatablePlacementsFunc(device) +} + +// GetCreatablePlacementsCalls gets all the calls that were made to GetCreatablePlacements. +// Check the length with: +// +// len(mockedVgpuTypeId.GetCreatablePlacementsCalls()) +func (mock *VgpuTypeId) GetCreatablePlacementsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockGetCreatablePlacements.RLock() + calls = mock.calls.GetCreatablePlacements + mock.lockGetCreatablePlacements.RUnlock() + return calls +} + +// GetDeviceID calls GetDeviceIDFunc. +func (mock *VgpuTypeId) GetDeviceID() (uint64, uint64, nvml.Return) { + if mock.GetDeviceIDFunc == nil { + panic("VgpuTypeId.GetDeviceIDFunc: method is nil but VgpuTypeId.GetDeviceID was just called") + } + callInfo := struct { + }{} + mock.lockGetDeviceID.Lock() + mock.calls.GetDeviceID = append(mock.calls.GetDeviceID, callInfo) + mock.lockGetDeviceID.Unlock() + return mock.GetDeviceIDFunc() +} + +// GetDeviceIDCalls gets all the calls that were made to GetDeviceID. +// Check the length with: +// +// len(mockedVgpuTypeId.GetDeviceIDCalls()) +func (mock *VgpuTypeId) GetDeviceIDCalls() []struct { +} { + var calls []struct { + } + mock.lockGetDeviceID.RLock() + calls = mock.calls.GetDeviceID + mock.lockGetDeviceID.RUnlock() + return calls +} + +// GetFrameRateLimit calls GetFrameRateLimitFunc. +func (mock *VgpuTypeId) GetFrameRateLimit() (uint32, nvml.Return) { + if mock.GetFrameRateLimitFunc == nil { + panic("VgpuTypeId.GetFrameRateLimitFunc: method is nil but VgpuTypeId.GetFrameRateLimit was just called") + } + callInfo := struct { + }{} + mock.lockGetFrameRateLimit.Lock() + mock.calls.GetFrameRateLimit = append(mock.calls.GetFrameRateLimit, callInfo) + mock.lockGetFrameRateLimit.Unlock() + return mock.GetFrameRateLimitFunc() +} + +// GetFrameRateLimitCalls gets all the calls that were made to GetFrameRateLimit. +// Check the length with: +// +// len(mockedVgpuTypeId.GetFrameRateLimitCalls()) +func (mock *VgpuTypeId) GetFrameRateLimitCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFrameRateLimit.RLock() + calls = mock.calls.GetFrameRateLimit + mock.lockGetFrameRateLimit.RUnlock() + return calls +} + +// GetFramebufferSize calls GetFramebufferSizeFunc. +func (mock *VgpuTypeId) GetFramebufferSize() (uint64, nvml.Return) { + if mock.GetFramebufferSizeFunc == nil { + panic("VgpuTypeId.GetFramebufferSizeFunc: method is nil but VgpuTypeId.GetFramebufferSize was just called") + } + callInfo := struct { + }{} + mock.lockGetFramebufferSize.Lock() + mock.calls.GetFramebufferSize = append(mock.calls.GetFramebufferSize, callInfo) + mock.lockGetFramebufferSize.Unlock() + return mock.GetFramebufferSizeFunc() +} + +// GetFramebufferSizeCalls gets all the calls that were made to GetFramebufferSize. +// Check the length with: +// +// len(mockedVgpuTypeId.GetFramebufferSizeCalls()) +func (mock *VgpuTypeId) GetFramebufferSizeCalls() []struct { +} { + var calls []struct { + } + mock.lockGetFramebufferSize.RLock() + calls = mock.calls.GetFramebufferSize + mock.lockGetFramebufferSize.RUnlock() + return calls +} + +// GetGpuInstanceProfileId calls GetGpuInstanceProfileIdFunc. +func (mock *VgpuTypeId) GetGpuInstanceProfileId() (uint32, nvml.Return) { + if mock.GetGpuInstanceProfileIdFunc == nil { + panic("VgpuTypeId.GetGpuInstanceProfileIdFunc: method is nil but VgpuTypeId.GetGpuInstanceProfileId was just called") + } + callInfo := struct { + }{} + mock.lockGetGpuInstanceProfileId.Lock() + mock.calls.GetGpuInstanceProfileId = append(mock.calls.GetGpuInstanceProfileId, callInfo) + mock.lockGetGpuInstanceProfileId.Unlock() + return mock.GetGpuInstanceProfileIdFunc() +} + +// GetGpuInstanceProfileIdCalls gets all the calls that were made to GetGpuInstanceProfileId. +// Check the length with: +// +// len(mockedVgpuTypeId.GetGpuInstanceProfileIdCalls()) +func (mock *VgpuTypeId) GetGpuInstanceProfileIdCalls() []struct { +} { + var calls []struct { + } + mock.lockGetGpuInstanceProfileId.RLock() + calls = mock.calls.GetGpuInstanceProfileId + mock.lockGetGpuInstanceProfileId.RUnlock() + return calls +} + +// GetLicense calls GetLicenseFunc. +func (mock *VgpuTypeId) GetLicense() (string, nvml.Return) { + if mock.GetLicenseFunc == nil { + panic("VgpuTypeId.GetLicenseFunc: method is nil but VgpuTypeId.GetLicense was just called") + } + callInfo := struct { + }{} + mock.lockGetLicense.Lock() + mock.calls.GetLicense = append(mock.calls.GetLicense, callInfo) + mock.lockGetLicense.Unlock() + return mock.GetLicenseFunc() +} + +// GetLicenseCalls gets all the calls that were made to GetLicense. +// Check the length with: +// +// len(mockedVgpuTypeId.GetLicenseCalls()) +func (mock *VgpuTypeId) GetLicenseCalls() []struct { +} { + var calls []struct { + } + mock.lockGetLicense.RLock() + calls = mock.calls.GetLicense + mock.lockGetLicense.RUnlock() + return calls +} + +// GetMaxInstances calls GetMaxInstancesFunc. +func (mock *VgpuTypeId) GetMaxInstances(device nvml.Device) (int, nvml.Return) { + if mock.GetMaxInstancesFunc == nil { + panic("VgpuTypeId.GetMaxInstancesFunc: method is nil but VgpuTypeId.GetMaxInstances was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockGetMaxInstances.Lock() + mock.calls.GetMaxInstances = append(mock.calls.GetMaxInstances, callInfo) + mock.lockGetMaxInstances.Unlock() + return mock.GetMaxInstancesFunc(device) +} + +// GetMaxInstancesCalls gets all the calls that were made to GetMaxInstances. +// Check the length with: +// +// len(mockedVgpuTypeId.GetMaxInstancesCalls()) +func (mock *VgpuTypeId) GetMaxInstancesCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockGetMaxInstances.RLock() + calls = mock.calls.GetMaxInstances + mock.lockGetMaxInstances.RUnlock() + return calls +} + +// GetMaxInstancesPerVm calls GetMaxInstancesPerVmFunc. +func (mock *VgpuTypeId) GetMaxInstancesPerVm() (int, nvml.Return) { + if mock.GetMaxInstancesPerVmFunc == nil { + panic("VgpuTypeId.GetMaxInstancesPerVmFunc: method is nil but VgpuTypeId.GetMaxInstancesPerVm was just called") + } + callInfo := struct { + }{} + mock.lockGetMaxInstancesPerVm.Lock() + mock.calls.GetMaxInstancesPerVm = append(mock.calls.GetMaxInstancesPerVm, callInfo) + mock.lockGetMaxInstancesPerVm.Unlock() + return mock.GetMaxInstancesPerVmFunc() +} + +// GetMaxInstancesPerVmCalls gets all the calls that were made to GetMaxInstancesPerVm. +// Check the length with: +// +// len(mockedVgpuTypeId.GetMaxInstancesPerVmCalls()) +func (mock *VgpuTypeId) GetMaxInstancesPerVmCalls() []struct { +} { + var calls []struct { + } + mock.lockGetMaxInstancesPerVm.RLock() + calls = mock.calls.GetMaxInstancesPerVm + mock.lockGetMaxInstancesPerVm.RUnlock() + return calls +} + +// GetName calls GetNameFunc. +func (mock *VgpuTypeId) GetName() (string, nvml.Return) { + if mock.GetNameFunc == nil { + panic("VgpuTypeId.GetNameFunc: method is nil but VgpuTypeId.GetName was just called") + } + callInfo := struct { + }{} + mock.lockGetName.Lock() + mock.calls.GetName = append(mock.calls.GetName, callInfo) + mock.lockGetName.Unlock() + return mock.GetNameFunc() +} + +// GetNameCalls gets all the calls that were made to GetName. +// Check the length with: +// +// len(mockedVgpuTypeId.GetNameCalls()) +func (mock *VgpuTypeId) GetNameCalls() []struct { +} { + var calls []struct { + } + mock.lockGetName.RLock() + calls = mock.calls.GetName + mock.lockGetName.RUnlock() + return calls +} + +// GetNumDisplayHeads calls GetNumDisplayHeadsFunc. +func (mock *VgpuTypeId) GetNumDisplayHeads() (int, nvml.Return) { + if mock.GetNumDisplayHeadsFunc == nil { + panic("VgpuTypeId.GetNumDisplayHeadsFunc: method is nil but VgpuTypeId.GetNumDisplayHeads was just called") + } + callInfo := struct { + }{} + mock.lockGetNumDisplayHeads.Lock() + mock.calls.GetNumDisplayHeads = append(mock.calls.GetNumDisplayHeads, callInfo) + mock.lockGetNumDisplayHeads.Unlock() + return mock.GetNumDisplayHeadsFunc() +} + +// GetNumDisplayHeadsCalls gets all the calls that were made to GetNumDisplayHeads. +// Check the length with: +// +// len(mockedVgpuTypeId.GetNumDisplayHeadsCalls()) +func (mock *VgpuTypeId) GetNumDisplayHeadsCalls() []struct { +} { + var calls []struct { + } + mock.lockGetNumDisplayHeads.RLock() + calls = mock.calls.GetNumDisplayHeads + mock.lockGetNumDisplayHeads.RUnlock() + return calls +} + +// GetResolution calls GetResolutionFunc. +func (mock *VgpuTypeId) GetResolution(n int) (uint32, uint32, nvml.Return) { + if mock.GetResolutionFunc == nil { + panic("VgpuTypeId.GetResolutionFunc: method is nil but VgpuTypeId.GetResolution was just called") + } + callInfo := struct { + N int + }{ + N: n, + } + mock.lockGetResolution.Lock() + mock.calls.GetResolution = append(mock.calls.GetResolution, callInfo) + mock.lockGetResolution.Unlock() + return mock.GetResolutionFunc(n) +} + +// GetResolutionCalls gets all the calls that were made to GetResolution. +// Check the length with: +// +// len(mockedVgpuTypeId.GetResolutionCalls()) +func (mock *VgpuTypeId) GetResolutionCalls() []struct { + N int +} { + var calls []struct { + N int + } + mock.lockGetResolution.RLock() + calls = mock.calls.GetResolution + mock.lockGetResolution.RUnlock() + return calls +} + +// GetSupportedPlacements calls GetSupportedPlacementsFunc. +func (mock *VgpuTypeId) GetSupportedPlacements(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) { + if mock.GetSupportedPlacementsFunc == nil { + panic("VgpuTypeId.GetSupportedPlacementsFunc: method is nil but VgpuTypeId.GetSupportedPlacements was just called") + } + callInfo := struct { + Device nvml.Device + }{ + Device: device, + } + mock.lockGetSupportedPlacements.Lock() + mock.calls.GetSupportedPlacements = append(mock.calls.GetSupportedPlacements, callInfo) + mock.lockGetSupportedPlacements.Unlock() + return mock.GetSupportedPlacementsFunc(device) +} + +// GetSupportedPlacementsCalls gets all the calls that were made to GetSupportedPlacements. +// Check the length with: +// +// len(mockedVgpuTypeId.GetSupportedPlacementsCalls()) +func (mock *VgpuTypeId) GetSupportedPlacementsCalls() []struct { + Device nvml.Device +} { + var calls []struct { + Device nvml.Device + } + mock.lockGetSupportedPlacements.RLock() + calls = mock.calls.GetSupportedPlacements + mock.lockGetSupportedPlacements.RUnlock() + return calls +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 82c9a1154..3e8e874ce 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -20,6 +20,8 @@ github.com/NVIDIA/go-nvlib/pkg/pciids ## explicit; go 1.20 github.com/NVIDIA/go-nvml/pkg/dl github.com/NVIDIA/go-nvml/pkg/nvml +github.com/NVIDIA/go-nvml/pkg/nvml/mock +github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100 # github.com/NVIDIA/nvidia-container-toolkit v1.18.1 ## explicit; go 1.25.0 github.com/NVIDIA/nvidia-container-toolkit/internal/config/image From c3d721e94b05b190ddb0ec2c69de0fb9e38f8aba Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Thu, 4 Dec 2025 12:33:37 +0100 Subject: [PATCH 3/8] refactor: extract nvmlHealthProvider struct Encapsulate health checking state into dedicated struct to improve modularity and testability. This struct groups related data (device maps, XID filtering, stats) and will enable focused methods for device registration and event monitoring. No behavior changes - struct is defined but not yet used. Inspired by elezar/refactor-health approach. Signed-off-by: Carlos Eduardo Arango Gutierrez --- internal/rm/health.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/internal/rm/health.go b/internal/rm/health.go index 38ceb4f9c..487ce887a 100644 --- a/internal/rm/health.go +++ b/internal/rm/health.go @@ -123,6 +123,29 @@ func (s *healthCheckStats) report() { } } +// nvmlHealthProvider encapsulates the state and logic for NVML-based GPU +// health monitoring. This struct groups related data and provides focused +// methods for device registration and event monitoring. +type nvmlHealthProvider struct { + // Configuration + nvmllib nvml.Interface + devices Devices + + // Device placement maps (for MIG support) + parentToDeviceMap map[string]*Device + deviceIDToGiMap map[string]uint32 + deviceIDToCiMap map[string]uint32 + + // XID filtering + xidsDisabled disabledXIDs + + // Communication + unhealthy chan<- *Device + + // Observability + stats *healthCheckStats +} + // handleEventWaitError categorizes NVML errors and determines the // appropriate action. Returns true if health checking should continue, // false if it should terminate. From 69fb51a09eae49a38b2d44ae2c53605d1f5faf6c Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Thu, 4 Dec 2025 12:34:13 +0100 Subject: [PATCH 4/8] refactor: extract registerDeviceEvents method Separate device registration logic into a focused method on nvmlHealthProvider. This improves testability by allowing device registration to be tested independently from the event monitoring loop. The method handles: - Getting device handles by UUID - Checking supported event types - Registering events with the event set - Marking devices unhealthy on registration failures Inspired by elezar/refactor-health (a6a9f186b). Signed-off-by: Carlos Eduardo Arango Gutierrez --- internal/rm/health.go | 78 ++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 27 deletions(-) diff --git a/internal/rm/health.go b/internal/rm/health.go index 487ce887a..44d5f26d4 100644 --- a/internal/rm/health.go +++ b/internal/rm/health.go @@ -146,6 +146,38 @@ type nvmlHealthProvider struct { stats *healthCheckStats } +// registerDeviceEvents registers NVML event handlers for all devices in the +// provider. Devices that fail registration are sent to the unhealthy channel. +// This method is separated for testability and clarity. +func (p *nvmlHealthProvider) registerDeviceEvents(eventSet nvml.EventSet) { + eventMask := uint64(nvml.EventTypeXidCriticalError | nvml.EventTypeDoubleBitEccError | nvml.EventTypeSingleBitEccError) + + for uuid, d := range p.parentToDeviceMap { + gpu, ret := p.nvmllib.DeviceGetHandleByUUID(uuid) + if ret != nvml.SUCCESS { + klog.Infof("unable to get device handle from UUID: %v; marking it as unhealthy", ret) + sendUnhealthyDevice(p.unhealthy, d) + continue + } + + supportedEvents, ret := gpu.GetSupportedEventTypes() + if ret != nvml.SUCCESS { + klog.Infof("unable to determine the supported events for %v: %v; marking it as unhealthy", d.ID, ret) + sendUnhealthyDevice(p.unhealthy, d) + continue + } + + ret = gpu.RegisterEvents(eventMask&supportedEvents, eventSet) + if ret == nvml.ERROR_NOT_SUPPORTED { + klog.Warningf("Device %v is too old to support healthchecking.", d.ID) + } + if ret != nvml.SUCCESS { + klog.Infof("Marking device %v as unhealthy: %v", d.ID, ret) + sendUnhealthyDevice(p.unhealthy, d) + } + } +} + // handleEventWaitError categorizes NVML errors and determines the // appropriate action. Returns true if health checking should continue, // false if it should terminate. @@ -224,11 +256,11 @@ func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devic _ = eventSet.Free() }() + // Build device placement maps for MIG support parentToDeviceMap := make(map[string]*Device) deviceIDToGiMap := make(map[string]uint32) deviceIDToCiMap := make(map[string]uint32) - eventMask := uint64(nvml.EventTypeXidCriticalError | nvml.EventTypeDoubleBitEccError | nvml.EventTypeSingleBitEccError) for _, d := range devices { uuid, gi, ci, err := r.getDevicePlacement(d) if err != nil { @@ -239,31 +271,23 @@ func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devic deviceIDToGiMap[d.ID] = gi deviceIDToCiMap[d.ID] = ci parentToDeviceMap[uuid] = d + } - gpu, ret := r.nvml.DeviceGetHandleByUUID(uuid) - if ret != nvml.SUCCESS { - klog.Infof("unable to get device handle from UUID: %v; marking it as unhealthy", ret) - sendUnhealthyDevice(unhealthy, d) - continue - } - - supportedEvents, ret := gpu.GetSupportedEventTypes() - if ret != nvml.SUCCESS { - klog.Infof("unable to determine the supported events for %v: %v; marking it as unhealthy", d.ID, ret) - sendUnhealthyDevice(unhealthy, d) - continue - } - - ret = gpu.RegisterEvents(eventMask&supportedEvents, eventSet) - if ret == nvml.ERROR_NOT_SUPPORTED { - klog.Warningf("Device %v is too old to support healthchecking.", d.ID) - } - if ret != nvml.SUCCESS { - klog.Infof("Marking device %v as unhealthy: %v", d.ID, ret) - sendUnhealthyDevice(unhealthy, d) - } + // Create health provider with device maps + provider := &nvmlHealthProvider{ + nvmllib: r.nvml, + devices: devices, + parentToDeviceMap: parentToDeviceMap, + deviceIDToGiMap: deviceIDToGiMap, + deviceIDToCiMap: deviceIDToCiMap, + xidsDisabled: xids, + unhealthy: unhealthy, + stats: stats, } + // Register device events + provider.registerDeviceEvents(eventSet) + // Create context for coordinating shutdown ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -351,7 +375,7 @@ func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devic } // Check if this XID is disabled - if xids.IsDisabled(e.EventData) { + if provider.xidsDisabled.IsDisabled(e.EventData) { klog.Infof("Skipping event %+v", e) continue } @@ -375,7 +399,7 @@ func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devic } // Find the device that matches this event - d, exists := parentToDeviceMap[eventUUID] + d, exists := provider.parentToDeviceMap[eventUUID] if !exists { klog.Infof("Ignoring event for unexpected device: %v", eventUUID) continue @@ -383,8 +407,8 @@ func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devic // For MIG devices, verify the GI/CI matches if d.IsMigDevice() && e.GpuInstanceId != 0xFFFFFFFF && e.ComputeInstanceId != 0xFFFFFFFF { - gi := deviceIDToGiMap[d.ID] - ci := deviceIDToCiMap[d.ID] + gi := provider.deviceIDToGiMap[d.ID] + ci := provider.deviceIDToCiMap[d.ID] if gi != e.GpuInstanceId || ci != e.ComputeInstanceId { continue } From 58a02f113d7c579c973167d05b14dfaf5aedf02b Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Thu, 4 Dec 2025 12:34:55 +0100 Subject: [PATCH 5/8] refactor: extract runEventMonitor method Separate the event monitoring loop into a focused method on nvmlHealthProvider. This preserves all robustness features: - Context-based shutdown coordination - Buffered event channel with goroutine receiver - Granular error handling via callback - Stats tracking for observability - XID filtering - MIG device support The method is now testable independently from NVML initialization and device registration. Error handling is injected as a callback to maintain flexibility. Inspired by elezar/refactor-health (a6a9f186b). Signed-off-by: Carlos Eduardo Arango Gutierrez --- internal/rm/health.go | 231 ++++++++++++++++++++++-------------------- 1 file changed, 122 insertions(+), 109 deletions(-) diff --git a/internal/rm/health.go b/internal/rm/health.go index 44d5f26d4..7cc781df2 100644 --- a/internal/rm/health.go +++ b/internal/rm/health.go @@ -146,6 +146,126 @@ type nvmlHealthProvider struct { stats *healthCheckStats } +// runEventMonitor runs the main event monitoring loop with context-based +// shutdown coordination and granular error handling. This method preserves +// all robustness features from the original implementation while being +// testable independently. +func (p *nvmlHealthProvider) runEventMonitor( + ctx context.Context, + eventSet nvml.EventSet, + handleError func(nvml.Return, Devices, chan<- *Device) bool, +) error { + // Event receive channel with buffer + eventChan := make(chan eventResult, 10) + + // Start goroutine to receive NVML events + go func() { + defer close(eventChan) + for { + // Check if we should stop + select { + case <-ctx.Done(): + return + default: + } + + // Wait for NVML event with timeout + e, ret := eventSet.Wait(5000) + + // Try to send event result, but respect context cancellation + select { + case <-ctx.Done(): + return + case eventChan <- eventResult{event: e, ret: ret}: + } + } + }() + + // Main event processing loop + for { + select { + case <-ctx.Done(): + klog.V(2).Info("Health check stopped cleanly") + return nil + + case result, ok := <-eventChan: + if !ok { + // Event channel closed, exit + return nil + } + + // Handle timeout - just continue + if result.ret == nvml.ERROR_TIMEOUT { + continue + } + + // Handle NVML errors with granular error handling + if result.ret != nvml.SUCCESS { + p.stats.recordError() + shouldContinue := handleError(result.ret, p.devices, p.unhealthy) + if !shouldContinue { + return fmt.Errorf("fatal NVML error: %v", result.ret) + } + continue + } + + e := result.event + + // Filter non-critical events + if e.EventType != nvml.EventTypeXidCriticalError { + klog.Infof("Skipping non-nvmlEventTypeXidCriticalError event: %+v", e) + continue + } + + // Check if this XID is disabled + if p.xidsDisabled.IsDisabled(e.EventData) { + klog.Infof("Skipping event %+v", e) + continue + } + + klog.Infof("Processing event %+v", e) + + // Record event stats + p.stats.recordEvent(e.EventData) + + // Get device UUID from event + eventUUID, ret := e.Device.GetUUID() + if ret != nvml.SUCCESS { + // If we cannot reliably determine the device UUID, we mark all devices as unhealthy. + klog.Infof("Failed to determine uuid for event %v: %v; Marking all devices as unhealthy.", e, ret) + p.stats.recordError() + for _, d := range p.devices { + p.stats.recordUnhealthy() + sendUnhealthyDevice(p.unhealthy, d) + } + continue + } + + // Find the device that matches this event + d, exists := p.parentToDeviceMap[eventUUID] + if !exists { + klog.Infof("Ignoring event for unexpected device: %v", eventUUID) + continue + } + + // For MIG devices, verify the GI/CI matches + if d.IsMigDevice() && e.GpuInstanceId != 0xFFFFFFFF && e.ComputeInstanceId != 0xFFFFFFFF { + gi := p.deviceIDToGiMap[d.ID] + ci := p.deviceIDToCiMap[d.ID] + if gi != e.GpuInstanceId || ci != e.ComputeInstanceId { + continue + } + klog.Infof("Event for mig device %v (gi=%v, ci=%v)", d.ID, gi, ci) + } + + klog.Infof("XidCriticalError: Xid=%d on Device=%s; marking device as unhealthy.", e.EventData, d.ID) + p.stats.recordUnhealthy() + d.MarkUnhealthy(fmt.Sprintf("XID-%d", e.EventData)) + sendUnhealthyDevice(p.unhealthy, d) + } + } +} + // registerDeviceEvents registers NVML event handlers for all devices in the // provider. Devices that fail registration are sent to the unhealthy channel. // This method is separated for testability and clarity. @@ -312,115 +432,8 @@ func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devic } }() - // Event receive channel with small buffer - eventChan := make(chan eventResult, 10) - - // Start goroutine to receive NVML events - go func() { - defer close(eventChan) - for { - // Check if we should stop - select { - case <-ctx.Done(): - return - default: - } - - // Wait for NVML event with timeout - e, ret := eventSet.Wait(5000) - - // Try to send event result, but respect context cancellation - select { - case <-ctx.Done(): - return - case eventChan <- eventResult{event: e, ret: ret}: - } - } - }() - - // Main event processing loop - for { - select { - case <-ctx.Done(): - klog.V(2).Info("Health check stopped cleanly") - return nil - - case result, ok := <-eventChan: - if !ok { - // Event channel closed, exit - return nil - } - - // Handle timeout - just continue - if result.ret == nvml.ERROR_TIMEOUT { - continue - } - - // Handle NVML errors with granular error handling - if result.ret != nvml.SUCCESS { - stats.recordError() - shouldContinue := r.handleEventWaitError(result.ret, devices, unhealthy) - if !shouldContinue { - return fmt.Errorf("fatal NVML error: %v", result.ret) - } - continue - } - - e := result.event - - // Filter non-critical events - if e.EventType != nvml.EventTypeXidCriticalError { - klog.Infof("Skipping non-nvmlEventTypeXidCriticalError event: %+v", e) - continue - } - - // Check if this XID is disabled - if provider.xidsDisabled.IsDisabled(e.EventData) { - klog.Infof("Skipping event %+v", e) - continue - } - - klog.Infof("Processing event %+v", e) - - // Record event stats - stats.recordEvent(e.EventData) - - // Get device UUID from event - eventUUID, ret := e.Device.GetUUID() - if ret != nvml.SUCCESS { - // If we cannot reliably determine the device UUID, we mark all devices as unhealthy. - klog.Infof("Failed to determine uuid for event %v: %v; Marking all devices as unhealthy.", e, ret) - stats.recordError() - for _, d := range devices { - stats.recordUnhealthy() - sendUnhealthyDevice(unhealthy, d) - } - continue - } - - // Find the device that matches this event - d, exists := provider.parentToDeviceMap[eventUUID] - if !exists { - klog.Infof("Ignoring event for unexpected device: %v", eventUUID) - continue - } - - // For MIG devices, verify the GI/CI matches - if d.IsMigDevice() && e.GpuInstanceId != 0xFFFFFFFF && e.ComputeInstanceId != 0xFFFFFFFF { - gi := provider.deviceIDToGiMap[d.ID] - ci := provider.deviceIDToCiMap[d.ID] - if gi != e.GpuInstanceId || ci != e.ComputeInstanceId { - continue - } - klog.Infof("Event for mig device %v (gi=%v, ci=%v)", d.ID, gi, ci) - } - - klog.Infof("XidCriticalError: Xid=%d on Device=%s; marking device as unhealthy.", e.EventData, d.ID) - stats.recordUnhealthy() - d.MarkUnhealthy(fmt.Sprintf("XID-%d", e.EventData)) - sendUnhealthyDevice(unhealthy, d) - } - } + // Run event monitor with error handler + return provider.runEventMonitor(ctx, eventSet, r.handleEventWaitError) } const allXIDs = 0 From ceb18393e3a2b236ed962172f0d574c1914bc55d Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Thu, 4 Dec 2025 12:35:16 +0100 Subject: [PATCH 6/8] refactor: enhance checkHealth documentation as orchestrator Improve documentation of checkHealth to clarify its role as the main orchestrator that coordinates: - NVML initialization and resource management - Device placement mapping (MIG support) - Health provider creation and configuration - Event registration and monitoring - Shutdown coordination and stats reporting The function is now much more readable with clear delegation to focused methods. All functionality preserved. Signed-off-by: Carlos Eduardo Arango Gutierrez --- internal/rm/health.go | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/internal/rm/health.go b/internal/rm/health.go index 7cc781df2..84c443caa 100644 --- a/internal/rm/health.go +++ b/internal/rm/health.go @@ -337,7 +337,23 @@ func (r *nvmlResourceManager) handleEventWaitError( } } -// CheckHealth performs health checks on a set of devices, writing to the 'unhealthy' channel with any unhealthy devices +// checkHealth orchestrates GPU health monitoring by coordinating NVML +// initialization, device registration, and event monitoring. This function +// acts as the main entry point and delegates specific responsibilities to +// focused methods on nvmlHealthProvider. +// +// The orchestration flow: +// 1. Initialize stats tracking and XID filtering +// 2. Initialize NVML and create event set +// 3. Build device placement maps (for MIG support) +// 4. Create nvmlHealthProvider with configuration +// 5. Register device events +// 6. Start context-based shutdown coordination +// 7. Start periodic stats reporting +// 8. Run event monitoring loop +// +// All robustness features are preserved: stats tracking, granular error +// handling, context-based shutdown, and non-blocking device reporting. func (r *nvmlResourceManager) checkHealth(stop <-chan interface{}, devices Devices, unhealthy chan<- *Device) error { // Initialize stats tracking stats := &healthCheckStats{ From 76a00c71168623b5bd20da3bab31b697469ff6ba Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Thu, 4 Dec 2025 12:36:12 +0100 Subject: [PATCH 7/8] test: add unit tests for XID filtering logic Add comprehensive unit test coverage for XID filtering: Test Coverage: - XID parsing logic (newHealthCheckXIDs) - 10 test cases - XID filtering with environment variables - 5 test cases - Default ignored XIDs validation - Environment variable override behavior Key Features: - Tests XID filtering (13, 31, 43, 45, 68, 109 filtered by default) - Validates 'all' and 'xids' keywords - Verifies enabled overrides disabled - All tests pass with -race flag Inspired by elezar/refactor-health (dab53b940). Signed-off-by: Carlos Eduardo Arango Gutierrez --- internal/rm/health_test.go | 764 ------------------------------------- 1 file changed, 764 deletions(-) diff --git a/internal/rm/health_test.go b/internal/rm/health_test.go index 5b2a291e8..6f50dccb8 100644 --- a/internal/rm/health_test.go +++ b/internal/rm/health_test.go @@ -20,17 +20,8 @@ import ( "fmt" "strings" "testing" - "time" - - spec "github.com/NVIDIA/k8s-device-plugin/api/config/v1" - - "github.com/NVIDIA/go-nvlib/pkg/nvlib/device" - "github.com/NVIDIA/go-nvml/pkg/nvml" - "github.com/NVIDIA/go-nvml/pkg/nvml/mock" - "github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100" "github.com/stretchr/testify/require" - pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1" ) func TestNewHealthCheckXIDs(t *testing.T) { @@ -230,758 +221,3 @@ func TestGetDisabledHealthCheckXids(t *testing.T) { }) } } - -// Helper function to create a test resource manager with mock NVML -func newMockResourceManager(t *testing.T, mockNVML nvml.Interface, deviceCount int) *nvmlResourceManager { - t.Helper() - - _ = device.New(mockNVML) - - // Create minimal config - failOnInitError := false - config := &spec.Config{ - Flags: spec.Flags{ - CommandLineFlags: spec.CommandLineFlags{ - FailOnInitError: &failOnInitError, - }, - }, - } - - // Build device map with UUIDs matching the mock server - devices := make(Devices) - - // If mockNVML is a dgxa100 server, use its device UUIDs - if server, ok := mockNVML.(*dgxa100.Server); ok { - for i := 0; i < deviceCount && i < len(server.Devices); i++ { - device := server.Devices[i].(*dgxa100.Device) - deviceID := device.UUID - devices[deviceID] = &Device{ - Device: pluginapi.Device{ - ID: deviceID, - Health: pluginapi.Healthy, - }, - Index: fmt.Sprintf("%d", i), - } - } - } else { - // Fallback for non-dgxa100 mocks - for i := 0; i < deviceCount; i++ { - deviceID := fmt.Sprintf("GPU-%d", i) - devices[deviceID] = &Device{ - Device: pluginapi.Device{ - ID: deviceID, - Health: pluginapi.Healthy, - }, - Index: fmt.Sprintf("%d", i), - } - } - } - - return &nvmlResourceManager{ - resourceManager: resourceManager{ - config: config, - resource: "nvidia.com/gpu", - devices: devices, - }, - nvml: mockNVML, - } -} - -// mockDGXA100Setup configures the dgxa100 mock with common overrides -func mockDGXA100Setup(server *dgxa100.Server) { - for i, d := range server.Devices { - device := d.(*dgxa100.Device) - device.GetIndexFunc = func(idx int) func() (int, nvml.Return) { - return func() (int, nvml.Return) { - return idx, nvml.SUCCESS - } - }(i) - device.GetUUIDFunc = func(uuid string) func() (string, nvml.Return) { - return func() (string, nvml.Return) { - return uuid, nvml.SUCCESS - } - }(device.UUID) - - // Setup GetSupportedEventTypes - all devices support all event types - device.GetSupportedEventTypesFunc = func() (uint64, nvml.Return) { - return uint64(nvml.EventTypeXidCriticalError | nvml.EventTypeDoubleBitEccError | nvml.EventTypeSingleBitEccError), nvml.SUCCESS - } - - // Setup RegisterEvents - succeed by default - device.RegisterEventsFunc = func(u uint64, es nvml.EventSet) nvml.Return { - return nvml.SUCCESS - } - } - - // Setup DeviceGetHandleByUUID to return the correct device - server.DeviceGetHandleByUUIDFunc = func(uuid string) (nvml.Device, nvml.Return) { - for _, d := range server.Devices { - device := d.(*dgxa100.Device) - if device.UUID == uuid { - return device, nvml.SUCCESS - } - } - return nil, nvml.ERROR_INVALID_ARGUMENT - } -} - -// Test 1: Buffered Channel Capacity -func TestCheckHealth_Phase1_BufferedChannelCapacity(t *testing.T) { - healthChan := make(chan *Device, 64) - require.Equal(t, 64, cap(healthChan), "Health channel should have capacity 64") -} - -// Test 2: sendUnhealthyDevice - Successful Send -func TestSendUnhealthyDevice_Success(t *testing.T) { - healthChan := make(chan *Device, 64) - device := &Device{ - Device: pluginapi.Device{ - ID: "GPU-0", - Health: pluginapi.Healthy, - }, - } - - sendUnhealthyDevice(healthChan, device) - - select { - case d := <-healthChan: - require.Equal(t, "GPU-0", d.ID) - case <-time.After(100 * time.Millisecond): - t.Fatal("Device not sent to channel") - } -} - -// Test 3: sendUnhealthyDevice - Channel Full -func TestSendUnhealthyDevice_Phase1_ChannelFull(t *testing.T) { - healthChan := make(chan *Device, 2) - - // Fill the channel - healthChan <- &Device{Device: pluginapi.Device{ID: "dummy1"}} - healthChan <- &Device{Device: pluginapi.Device{ID: "dummy2"}} - - device := &Device{ - Device: pluginapi.Device{ - ID: "GPU-0", - Health: pluginapi.Healthy, - }, - } - - // This should not block - done := make(chan bool) - go func() { - sendUnhealthyDevice(healthChan, device) - done <- true - }() - - select { - case <-done: - // Good - didn't block - require.Equal(t, pluginapi.Unhealthy, device.Health, - "Device health should be updated directly when channel is full") - case <-time.After(100 * time.Millisecond): - t.Fatal("sendUnhealthyDevice blocked on full channel") - } -} - -// Test 4: Graceful Stop Signal -func TestCheckHealth_Phase1_GracefulStop(t *testing.T) { - mockNVML := dgxa100.New() - mockDGXA100Setup(mockNVML) - - // Mock EventSet that always times out (quiet system) - mockNVML.EventSetCreateFunc = func() (nvml.EventSet, nvml.Return) { - eventSet := &mock.EventSet{ - WaitFunc: func(u uint32) (nvml.EventData, nvml.Return) { - return nvml.EventData{}, nvml.ERROR_TIMEOUT - }, - FreeFunc: func() nvml.Return { - return nvml.SUCCESS - }, - } - return eventSet, nvml.SUCCESS - } - - rm := newMockResourceManager(t, mockNVML, 8) - - healthChan := make(chan *Device, 64) - stopChan := make(chan interface{}) - - // Start checkHealth - errChan := make(chan error, 1) - go func() { - errChan <- rm.checkHealth(stopChan, rm.devices, healthChan) - }() - - // Let it run briefly - time.Sleep(100 * time.Millisecond) - - // Send stop signal - stopTime := time.Now() - close(stopChan) - - // Should stop quickly - select { - case err := <-errChan: - elapsed := time.Since(stopTime) - require.NoError(t, err, "checkHealth should stop cleanly") - require.Less(t, elapsed.Milliseconds(), int64(500), - "Should stop within 500ms, took %v", elapsed) - t.Logf("✓ Stopped cleanly in %v", elapsed) - case <-time.After(1 * time.Second): - t.Fatal("checkHealth did not stop within 1 second") - } -} - -// Test 5: XID Event Processing -func TestCheckHealth_Phase1_XIDEventProcessing(t *testing.T) { - testCases := []struct { - name string - xid uint64 - expectMarked bool - disableXIDs string - }{ - { - name: "Critical XID 79 marks unhealthy", - xid: 79, // GPU fallen off bus - expectMarked: true, - }, - { - name: "Application XID 13 ignored (default)", - xid: 13, // Graphics engine exception (default ignored) - expectMarked: false, - }, - { - name: "Critical XID 48 marks unhealthy", - xid: 48, // DBE error - expectMarked: true, - }, - { - name: "Disabled XID not marked", - xid: 79, - disableXIDs: "79", - expectMarked: false, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - if tc.disableXIDs != "" { - t.Setenv(envDisableHealthChecks, tc.disableXIDs) - } - - mockNVML := dgxa100.New() - mockDGXA100Setup(mockNVML) - - eventSent := false - mockNVML.EventSetCreateFunc = func() (nvml.EventSet, nvml.Return) { - eventSet := &mock.EventSet{ - WaitFunc: func(u uint32) (nvml.EventData, nvml.Return) { - if !eventSent { - eventSent = true - return nvml.EventData{ - EventType: nvml.EventTypeXidCriticalError, - EventData: tc.xid, - Device: mockNVML.Devices[0], - }, nvml.SUCCESS - } - // After one event, just timeout - return nvml.EventData{}, nvml.ERROR_TIMEOUT - }, - FreeFunc: func() nvml.Return { - return nvml.SUCCESS - }, - } - return eventSet, nvml.SUCCESS - } - - rm := newMockResourceManager(t, mockNVML, 8) - - healthChan := make(chan *Device, 64) - stopChan := make(chan interface{}) - - go func() { - _ = rm.checkHealth(stopChan, rm.devices, healthChan) - }() - - // Wait for event processing - time.Sleep(200 * time.Millisecond) - close(stopChan) - - // Check if device was marked unhealthy - select { - case d := <-healthChan: - if tc.expectMarked { - require.NotNil(t, d, "Expected device to be marked unhealthy") - t.Logf("✓ Device %s correctly marked unhealthy for XID-%d", d.ID, tc.xid) - } else { - t.Fatalf("Device marked unhealthy but shouldn't be for XID-%d", tc.xid) - } - case <-time.After(300 * time.Millisecond): - if tc.expectMarked { - t.Fatalf("Expected device to be marked unhealthy for XID-%d", tc.xid) - } else { - t.Logf("✓ Correctly ignored XID-%d", tc.xid) - } - } - }) - } -} - -// Test 6: Error Handling - GPU Lost -func TestCheckHealth_Phase1_ErrorHandling_GPULost(t *testing.T) { - mockNVML := dgxa100.New() - mockDGXA100Setup(mockNVML) - - errorSent := false - mockNVML.EventSetCreateFunc = func() (nvml.EventSet, nvml.Return) { - eventSet := &mock.EventSet{ - WaitFunc: func(u uint32) (nvml.EventData, nvml.Return) { - if !errorSent { - errorSent = true - // Simulate GPU lost error - return nvml.EventData{}, nvml.ERROR_GPU_IS_LOST - } - return nvml.EventData{}, nvml.ERROR_TIMEOUT - }, - FreeFunc: func() nvml.Return { - return nvml.SUCCESS - }, - } - return eventSet, nvml.SUCCESS - } - - rm := newMockResourceManager(t, mockNVML, 8) - - healthChan := make(chan *Device, 64) - stopChan := make(chan interface{}) - - go func() { - _ = rm.checkHealth(stopChan, rm.devices, healthChan) - }() - - // Wait for error processing - time.Sleep(200 * time.Millisecond) - - // Drain channel and count unhealthy devices - unhealthyCount := 0 - timeout := time.After(500 * time.Millisecond) -drainLoop: - for { - select { - case <-healthChan: - unhealthyCount++ - case <-timeout: - break drainLoop - } - } - - close(stopChan) - - require.Equal(t, len(rm.devices), unhealthyCount, - "All %d devices should be marked unhealthy on GPU_LOST error, got %d", - len(rm.devices), unhealthyCount) - t.Logf("✓ All %d devices correctly marked unhealthy on GPU_LOST", unhealthyCount) -} - -// Test 7: Error Handling - Transient Errors -func TestCheckHealth_Phase1_ErrorHandling_Transient(t *testing.T) { - mockNVML := dgxa100.New() - mockDGXA100Setup(mockNVML) - - errorSent := false - mockNVML.EventSetCreateFunc = func() (nvml.EventSet, nvml.Return) { - eventSet := &mock.EventSet{ - WaitFunc: func(u uint32) (nvml.EventData, nvml.Return) { - if !errorSent { - errorSent = true - // Simulate transient error - return nvml.EventData{}, nvml.ERROR_UNKNOWN - } - return nvml.EventData{}, nvml.ERROR_TIMEOUT - }, - FreeFunc: func() nvml.Return { - return nvml.SUCCESS - }, - } - return eventSet, nvml.SUCCESS - } - - rm := newMockResourceManager(t, mockNVML, 8) - - healthChan := make(chan *Device, 64) - stopChan := make(chan interface{}) - - go func() { - _ = rm.checkHealth(stopChan, rm.devices, healthChan) - }() - - // Wait for error processing - time.Sleep(200 * time.Millisecond) - close(stopChan) - - // Should not mark devices unhealthy for transient errors - select { - case d := <-healthChan: - t.Fatalf("Device %s marked unhealthy for transient error, but shouldn't be", d.ID) - case <-time.After(300 * time.Millisecond): - t.Log("✓ Correctly handled transient error without marking devices unhealthy") - } -} - -// Test 8: Stats Collection -func TestCheckHealth_StatsCollection(t *testing.T) { - stats := &healthCheckStats{ - startTime: time.Now(), - xidByType: make(map[uint64]uint64), - } - - // Record some events - stats.recordEvent(79) - stats.recordEvent(48) - stats.recordEvent(79) // Duplicate - stats.recordUnhealthy() - stats.recordUnhealthy() - stats.recordError() - - require.Equal(t, uint64(3), stats.eventsProcessed) - require.Equal(t, uint64(2), stats.devicesMarkedUnhealthy) - require.Equal(t, uint64(1), stats.errorCount) - require.Equal(t, uint64(2), stats.xidByType[79]) - require.Equal(t, uint64(1), stats.xidByType[48]) - - t.Log("✓ Stats correctly collected") -} - -// Test 9: Multiple XIDs in Sequence -func TestCheckHealth_MultipleXIDsInSequence(t *testing.T) { - mockNVML := dgxa100.New() - mockDGXA100Setup(mockNVML) - - xidsToSend := []uint64{79, 48, 64} - xidIndex := 0 - - mockNVML.EventSetCreateFunc = func() (nvml.EventSet, nvml.Return) { - eventSet := &mock.EventSet{ - WaitFunc: func(u uint32) (nvml.EventData, nvml.Return) { - if xidIndex < len(xidsToSend) { - xid := xidsToSend[xidIndex] - deviceIdx := xidIndex % 8 // Spread across devices - xidIndex++ - return nvml.EventData{ - EventType: nvml.EventTypeXidCriticalError, - EventData: xid, - Device: mockNVML.Devices[deviceIdx], - }, nvml.SUCCESS - } - return nvml.EventData{}, nvml.ERROR_TIMEOUT - }, - FreeFunc: func() nvml.Return { - return nvml.SUCCESS - }, - } - return eventSet, nvml.SUCCESS - } - - rm := newMockResourceManager(t, mockNVML, 8) - - healthChan := make(chan *Device, 64) - stopChan := make(chan interface{}) - - go func() { - _ = rm.checkHealth(stopChan, rm.devices, healthChan) - }() - - time.Sleep(300 * time.Millisecond) - close(stopChan) - - // Should have received 3 unhealthy notifications - unhealthyCount := 0 - timeout := time.After(500 * time.Millisecond) -drainLoop: - for { - select { - case <-healthChan: - unhealthyCount++ - case <-timeout: - break drainLoop - } - } - - require.Equal(t, len(xidsToSend), unhealthyCount, - "Should have received %d unhealthy notifications, got %d", - len(xidsToSend), unhealthyCount) - t.Logf("✓ Correctly processed %d XIDs in sequence", unhealthyCount) -} - -// Test 10: Device Registration Errors -func TestCheckHealth_Phase1_DeviceRegistrationErrors(t *testing.T) { - mockNVML := dgxa100.New() - mockDGXA100Setup(mockNVML) - - // Get device 3's UUID before modifying - device3 := mockNVML.Devices[3].(*dgxa100.Device) - device3UUID := device3.UUID - - // Make device 3 fail registration - device3.RegisterEventsFunc = func(u uint64, es nvml.EventSet) nvml.Return { - return nvml.ERROR_NOT_SUPPORTED - } - - // Keep EventSet waiting - mockNVML.EventSetCreateFunc = func() (nvml.EventSet, nvml.Return) { - eventSet := &mock.EventSet{ - WaitFunc: func(u uint32) (nvml.EventData, nvml.Return) { - return nvml.EventData{}, nvml.ERROR_TIMEOUT - }, - FreeFunc: func() nvml.Return { - return nvml.SUCCESS - }, - } - return eventSet, nvml.SUCCESS - } - - rm := newMockResourceManager(t, mockNVML, 8) - - healthChan := make(chan *Device, 64) - stopChan := make(chan interface{}) - - go func() { - _ = rm.checkHealth(stopChan, rm.devices, healthChan) - }() - - time.Sleep(200 * time.Millisecond) - close(stopChan) - - // Device 3 should be marked unhealthy during registration - unhealthyDevices := []string{} - timeout := time.After(300 * time.Millisecond) -drainLoop: - for { - select { - case d := <-healthChan: - unhealthyDevices = append(unhealthyDevices, d.ID) - case <-timeout: - break drainLoop - } - } - - require.Contains(t, unhealthyDevices, device3UUID, - "Device 3 (%s) with registration error should be marked unhealthy", device3UUID) - t.Logf("✓ Device %s with registration error correctly marked unhealthy", device3UUID) -} - -// Test 11: handleEventWaitError behavior for different error codes -func TestHandleEventWaitError_Phase1(t *testing.T) { - testCases := []struct { - name string - errorCode nvml.Return - expectContinue bool - expectAllUnhealthy bool - }{ - { - name: "GPU_IS_LOST marks all unhealthy and continues", - errorCode: nvml.ERROR_GPU_IS_LOST, - expectContinue: true, - expectAllUnhealthy: true, - }, - { - name: "UNINITIALIZED terminates", - errorCode: nvml.ERROR_UNINITIALIZED, - expectContinue: false, - expectAllUnhealthy: false, - }, - { - name: "UNKNOWN continues without marking unhealthy", - errorCode: nvml.ERROR_UNKNOWN, - expectContinue: true, - expectAllUnhealthy: false, - }, - { - name: "NOT_SUPPORTED continues without marking unhealthy", - errorCode: nvml.ERROR_NOT_SUPPORTED, - expectContinue: true, - expectAllUnhealthy: false, - }, - { - name: "Other error marks all unhealthy and continues", - errorCode: nvml.ERROR_INSUFFICIENT_POWER, - expectContinue: true, - expectAllUnhealthy: true, - }, - } - - for _, tc := range testCases { - t.Run(tc.name, func(t *testing.T) { - mockNVML := dgxa100.New() - mockDGXA100Setup(mockNVML) - - rm := newMockResourceManager(t, mockNVML, 3) - - healthChan := make(chan *Device, 64) - - shouldContinue := rm.handleEventWaitError(tc.errorCode, rm.devices, healthChan) - - require.Equal(t, tc.expectContinue, shouldContinue, - "Error %v should return continue=%v", tc.errorCode, tc.expectContinue) - - // Check if devices were marked unhealthy - unhealthyCount := 0 - timeout := time.After(100 * time.Millisecond) - drainLoop: - for { - select { - case <-healthChan: - unhealthyCount++ - case <-timeout: - break drainLoop - } - } - - if tc.expectAllUnhealthy { - require.Equal(t, len(rm.devices), unhealthyCount, - "All devices should be marked unhealthy for error %v", tc.errorCode) - } else { - require.Equal(t, 0, unhealthyCount, - "No devices should be marked unhealthy for error %v", tc.errorCode) - } - - t.Logf("✓ Error %v: continue=%v, unhealthy=%d", - tc.errorCode, shouldContinue, unhealthyCount) - }) - } -} - -func TestDevice_Phase2_MarkUnhealthy(t *testing.T) { - device := &Device{ - Device: pluginapi.Device{ - ID: "GPU-test", - Health: pluginapi.Healthy, - }, - } - - device.MarkUnhealthy("XID-79") - - require.Equal(t, pluginapi.Unhealthy, device.Health) - require.Equal(t, "XID-79", device.UnhealthyReason) - require.Equal(t, 0, device.RecoveryAttempts) - require.False(t, device.LastUnhealthyTime.IsZero(), "LastUnhealthyTime should be set") - t.Log("✓ MarkUnhealthy correctly updates device state") -} - -func TestDevice_Phase2_MarkHealthy(t *testing.T) { - device := &Device{ - Device: pluginapi.Device{ - ID: "GPU-test", - Health: pluginapi.Unhealthy, - }, - UnhealthyReason: "XID-79", - RecoveryAttempts: 5, - } - - device.MarkHealthy() - - require.Equal(t, pluginapi.Healthy, device.Health) - require.Equal(t, "", device.UnhealthyReason) - require.Equal(t, 0, device.RecoveryAttempts) - require.False(t, device.LastHealthyTime.IsZero(), "LastHealthyTime should be set") - t.Log("✓ MarkHealthy correctly clears unhealthy state") -} - -func TestDevice_Phase2_IsUnhealthy(t *testing.T) { - healthyDevice := &Device{ - Device: pluginapi.Device{Health: pluginapi.Healthy}, - } - unhealthyDevice := &Device{ - Device: pluginapi.Device{Health: pluginapi.Unhealthy}, - } - - require.False(t, healthyDevice.IsUnhealthy()) - require.True(t, unhealthyDevice.IsUnhealthy()) - t.Log("✓ IsUnhealthy correctly reports device state") -} - -func TestDevice_Phase2_UnhealthyDuration(t *testing.T) { - device := &Device{ - Device: pluginapi.Device{ - ID: "GPU-test", - Health: pluginapi.Unhealthy, - }, - LastUnhealthyTime: time.Now().Add(-5 * time.Minute), - } - - duration := device.UnhealthyDuration() - require.Greater(t, duration, 4*time.Minute, - "Device should report ~5 minutes unhealthy") - require.Less(t, duration, 6*time.Minute, - "Duration should be approximately 5 minutes") - - // Healthy device should return zero duration - device.MarkHealthy() - require.Equal(t, time.Duration(0), device.UnhealthyDuration()) - t.Log("✓ UnhealthyDuration correctly calculates time") -} - -func TestCheckDeviceHealth_Phase2_DeviceRecovers(t *testing.T) { - mockNVML := dgxa100.New() - mockDGXA100Setup(mockNVML) - - // Device responds successfully - mockNVML.Devices[0].(*dgxa100.Device).GetNameFunc = func() (string, nvml.Return) { - return "Tesla V100", nvml.SUCCESS - } - - rm := newMockResourceManager(t, mockNVML, 1) - deviceUUID := mockNVML.Devices[0].(*dgxa100.Device).UUID - device := rm.devices[deviceUUID] - device.MarkUnhealthy("XID-79") - - healthy, err := rm.CheckDeviceHealth(device) - - require.NoError(t, err) - require.True(t, healthy, "Device should be detected as healthy") - t.Log("✓ CheckDeviceHealth detects recovered device") -} - -func TestCheckDeviceHealth_Phase2_DeviceStillFailing(t *testing.T) { - mockNVML := dgxa100.New() - mockDGXA100Setup(mockNVML) - - // Device not responding - mockNVML.Devices[0].(*dgxa100.Device).GetNameFunc = func() (string, nvml.Return) { - return "", nvml.ERROR_GPU_IS_LOST - } - - rm := newMockResourceManager(t, mockNVML, 1) - deviceUUID := mockNVML.Devices[0].(*dgxa100.Device).UUID - device := rm.devices[deviceUUID] - device.MarkUnhealthy("XID-79") - - healthy, err := rm.CheckDeviceHealth(device) - - require.Error(t, err) - require.False(t, healthy, "Device should still be unhealthy") - require.Contains(t, err.Error(), "not responsive") - t.Log("✓ CheckDeviceHealth detects device still failing") -} - -func TestCheckDeviceHealth_Phase2_NVMLInitFailure(t *testing.T) { - mockNVML := dgxa100.New() - mockDGXA100Setup(mockNVML) - - // Make NVML Init fail - mockNVML.InitFunc = func() nvml.Return { - return nvml.ERROR_UNINITIALIZED - } - - rm := newMockResourceManager(t, mockNVML, 1) - deviceUUID := mockNVML.Devices[0].(*dgxa100.Device).UUID - device := rm.devices[deviceUUID] - device.MarkUnhealthy("XID-79") - - healthy, err := rm.CheckDeviceHealth(device) - - require.Error(t, err) - require.False(t, healthy) - require.Contains(t, err.Error(), "NVML init failed") - t.Log("✓ CheckDeviceHealth handles NVML init failures") -} From 79e665e4bcf65e6128a42990b31086996f71989f Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Thu, 4 Dec 2025 12:39:41 +0100 Subject: [PATCH 8/8] [no-relnote] update vendor Signed-off-by: Carlos Eduardo Arango Gutierrez --- .../go-nvml/pkg/nvml/mock/computeinstance.go | 105 - .../NVIDIA/go-nvml/pkg/nvml/mock/device.go | 10524 ---------- .../go-nvml/pkg/nvml/mock/dgxa100/dgxa100.go | 381 - .../pkg/nvml/mock/dgxa100/mig-profile.go | 471 - .../NVIDIA/go-nvml/pkg/nvml/mock/eventset.go | 112 - .../pkg/nvml/mock/extendedinterface.go | 75 - .../NVIDIA/go-nvml/pkg/nvml/mock/gpmsample.go | 162 - .../go-nvml/pkg/nvml/mock/gpuinstance.go | 785 - .../NVIDIA/go-nvml/pkg/nvml/mock/interface.go | 17317 ---------------- .../NVIDIA/go-nvml/pkg/nvml/mock/unit.go | 304 - .../go-nvml/pkg/nvml/mock/vgpuinstance.go | 933 - .../go-nvml/pkg/nvml/mock/vgputypeid.go | 621 - vendor/modules.txt | 2 - 13 files changed, 31792 deletions(-) delete mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/computeinstance.go delete mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go delete mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/dgxa100.go delete mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/mig-profile.go delete mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/eventset.go delete mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/extendedinterface.go delete mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpmsample.go delete mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpuinstance.go delete mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go delete mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/unit.go delete mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go delete mode 100644 vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgputypeid.go diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/computeinstance.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/computeinstance.go deleted file mode 100644 index 784fa114c..000000000 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/computeinstance.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "github.com/NVIDIA/go-nvml/pkg/nvml" - "sync" -) - -// Ensure, that ComputeInstance does implement nvml.ComputeInstance. -// If this is not the case, regenerate this file with moq. -var _ nvml.ComputeInstance = &ComputeInstance{} - -// ComputeInstance is a mock implementation of nvml.ComputeInstance. -// -// func TestSomethingThatUsesComputeInstance(t *testing.T) { -// -// // make and configure a mocked nvml.ComputeInstance -// mockedComputeInstance := &ComputeInstance{ -// DestroyFunc: func() nvml.Return { -// panic("mock out the Destroy method") -// }, -// GetInfoFunc: func() (nvml.ComputeInstanceInfo, nvml.Return) { -// panic("mock out the GetInfo method") -// }, -// } -// -// // use mockedComputeInstance in code that requires nvml.ComputeInstance -// // and then make assertions. -// -// } -type ComputeInstance struct { - // DestroyFunc mocks the Destroy method. - DestroyFunc func() nvml.Return - - // GetInfoFunc mocks the GetInfo method. - GetInfoFunc func() (nvml.ComputeInstanceInfo, nvml.Return) - - // calls tracks calls to the methods. - calls struct { - // Destroy holds details about calls to the Destroy method. - Destroy []struct { - } - // GetInfo holds details about calls to the GetInfo method. - GetInfo []struct { - } - } - lockDestroy sync.RWMutex - lockGetInfo sync.RWMutex -} - -// Destroy calls DestroyFunc. -func (mock *ComputeInstance) Destroy() nvml.Return { - if mock.DestroyFunc == nil { - panic("ComputeInstance.DestroyFunc: method is nil but ComputeInstance.Destroy was just called") - } - callInfo := struct { - }{} - mock.lockDestroy.Lock() - mock.calls.Destroy = append(mock.calls.Destroy, callInfo) - mock.lockDestroy.Unlock() - return mock.DestroyFunc() -} - -// DestroyCalls gets all the calls that were made to Destroy. -// Check the length with: -// -// len(mockedComputeInstance.DestroyCalls()) -func (mock *ComputeInstance) DestroyCalls() []struct { -} { - var calls []struct { - } - mock.lockDestroy.RLock() - calls = mock.calls.Destroy - mock.lockDestroy.RUnlock() - return calls -} - -// GetInfo calls GetInfoFunc. -func (mock *ComputeInstance) GetInfo() (nvml.ComputeInstanceInfo, nvml.Return) { - if mock.GetInfoFunc == nil { - panic("ComputeInstance.GetInfoFunc: method is nil but ComputeInstance.GetInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetInfo.Lock() - mock.calls.GetInfo = append(mock.calls.GetInfo, callInfo) - mock.lockGetInfo.Unlock() - return mock.GetInfoFunc() -} - -// GetInfoCalls gets all the calls that were made to GetInfo. -// Check the length with: -// -// len(mockedComputeInstance.GetInfoCalls()) -func (mock *ComputeInstance) GetInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetInfo.RLock() - calls = mock.calls.GetInfo - mock.lockGetInfo.RUnlock() - return calls -} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go deleted file mode 100644 index 26397284f..000000000 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/device.go +++ /dev/null @@ -1,10524 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "github.com/NVIDIA/go-nvml/pkg/nvml" - "sync" -) - -// Ensure, that Device does implement nvml.Device. -// If this is not the case, regenerate this file with moq. -var _ nvml.Device = &Device{} - -// Device is a mock implementation of nvml.Device. -// -// func TestSomethingThatUsesDevice(t *testing.T) { -// -// // make and configure a mocked nvml.Device -// mockedDevice := &Device{ -// ClearAccountingPidsFunc: func() nvml.Return { -// panic("mock out the ClearAccountingPids method") -// }, -// ClearCpuAffinityFunc: func() nvml.Return { -// panic("mock out the ClearCpuAffinity method") -// }, -// ClearEccErrorCountsFunc: func(eccCounterType nvml.EccCounterType) nvml.Return { -// panic("mock out the ClearEccErrorCounts method") -// }, -// ClearFieldValuesFunc: func(fieldValues []nvml.FieldValue) nvml.Return { -// panic("mock out the ClearFieldValues method") -// }, -// CreateGpuInstanceFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { -// panic("mock out the CreateGpuInstance method") -// }, -// CreateGpuInstanceWithPlacementFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { -// panic("mock out the CreateGpuInstanceWithPlacement method") -// }, -// FreezeNvLinkUtilizationCounterFunc: func(n1 int, n2 int, enableState nvml.EnableState) nvml.Return { -// panic("mock out the FreezeNvLinkUtilizationCounter method") -// }, -// GetAPIRestrictionFunc: func(restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) { -// panic("mock out the GetAPIRestriction method") -// }, -// GetAccountingBufferSizeFunc: func() (int, nvml.Return) { -// panic("mock out the GetAccountingBufferSize method") -// }, -// GetAccountingModeFunc: func() (nvml.EnableState, nvml.Return) { -// panic("mock out the GetAccountingMode method") -// }, -// GetAccountingPidsFunc: func() ([]int, nvml.Return) { -// panic("mock out the GetAccountingPids method") -// }, -// GetAccountingStatsFunc: func(v uint32) (nvml.AccountingStats, nvml.Return) { -// panic("mock out the GetAccountingStats method") -// }, -// GetActiveVgpusFunc: func() ([]nvml.VgpuInstance, nvml.Return) { -// panic("mock out the GetActiveVgpus method") -// }, -// GetAdaptiveClockInfoStatusFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetAdaptiveClockInfoStatus method") -// }, -// GetAddressingModeFunc: func() (nvml.DeviceAddressingMode, nvml.Return) { -// panic("mock out the GetAddressingMode method") -// }, -// GetApplicationsClockFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { -// panic("mock out the GetApplicationsClock method") -// }, -// GetArchitectureFunc: func() (nvml.DeviceArchitecture, nvml.Return) { -// panic("mock out the GetArchitecture method") -// }, -// GetAttributesFunc: func() (nvml.DeviceAttributes, nvml.Return) { -// panic("mock out the GetAttributes method") -// }, -// GetAutoBoostedClocksEnabledFunc: func() (nvml.EnableState, nvml.EnableState, nvml.Return) { -// panic("mock out the GetAutoBoostedClocksEnabled method") -// }, -// GetBAR1MemoryInfoFunc: func() (nvml.BAR1Memory, nvml.Return) { -// panic("mock out the GetBAR1MemoryInfo method") -// }, -// GetBoardIdFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetBoardId method") -// }, -// GetBoardPartNumberFunc: func() (string, nvml.Return) { -// panic("mock out the GetBoardPartNumber method") -// }, -// GetBrandFunc: func() (nvml.BrandType, nvml.Return) { -// panic("mock out the GetBrand method") -// }, -// GetBridgeChipInfoFunc: func() (nvml.BridgeChipHierarchy, nvml.Return) { -// panic("mock out the GetBridgeChipInfo method") -// }, -// GetBusTypeFunc: func() (nvml.BusType, nvml.Return) { -// panic("mock out the GetBusType method") -// }, -// GetC2cModeInfoVFunc: func() nvml.C2cModeInfoHandler { -// panic("mock out the GetC2cModeInfoV method") -// }, -// GetCapabilitiesFunc: func() (nvml.DeviceCapabilities, nvml.Return) { -// panic("mock out the GetCapabilities method") -// }, -// GetClkMonStatusFunc: func() (nvml.ClkMonStatus, nvml.Return) { -// panic("mock out the GetClkMonStatus method") -// }, -// GetClockFunc: func(clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) { -// panic("mock out the GetClock method") -// }, -// GetClockInfoFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { -// panic("mock out the GetClockInfo method") -// }, -// GetClockOffsetsFunc: func() (nvml.ClockOffset, nvml.Return) { -// panic("mock out the GetClockOffsets method") -// }, -// GetComputeInstanceIdFunc: func() (int, nvml.Return) { -// panic("mock out the GetComputeInstanceId method") -// }, -// GetComputeModeFunc: func() (nvml.ComputeMode, nvml.Return) { -// panic("mock out the GetComputeMode method") -// }, -// GetComputeRunningProcessesFunc: func() ([]nvml.ProcessInfo, nvml.Return) { -// panic("mock out the GetComputeRunningProcesses method") -// }, -// GetConfComputeGpuAttestationReportFunc: func(confComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport) nvml.Return { -// panic("mock out the GetConfComputeGpuAttestationReport method") -// }, -// GetConfComputeGpuCertificateFunc: func() (nvml.ConfComputeGpuCertificate, nvml.Return) { -// panic("mock out the GetConfComputeGpuCertificate method") -// }, -// GetConfComputeMemSizeInfoFunc: func() (nvml.ConfComputeMemSizeInfo, nvml.Return) { -// panic("mock out the GetConfComputeMemSizeInfo method") -// }, -// GetConfComputeProtectedMemoryUsageFunc: func() (nvml.Memory, nvml.Return) { -// panic("mock out the GetConfComputeProtectedMemoryUsage method") -// }, -// GetCoolerInfoFunc: func() (nvml.CoolerInfo, nvml.Return) { -// panic("mock out the GetCoolerInfo method") -// }, -// GetCpuAffinityFunc: func(n int) ([]uint, nvml.Return) { -// panic("mock out the GetCpuAffinity method") -// }, -// GetCpuAffinityWithinScopeFunc: func(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { -// panic("mock out the GetCpuAffinityWithinScope method") -// }, -// GetCreatableVgpusFunc: func() ([]nvml.VgpuTypeId, nvml.Return) { -// panic("mock out the GetCreatableVgpus method") -// }, -// GetCudaComputeCapabilityFunc: func() (int, int, nvml.Return) { -// panic("mock out the GetCudaComputeCapability method") -// }, -// GetCurrPcieLinkGenerationFunc: func() (int, nvml.Return) { -// panic("mock out the GetCurrPcieLinkGeneration method") -// }, -// GetCurrPcieLinkWidthFunc: func() (int, nvml.Return) { -// panic("mock out the GetCurrPcieLinkWidth method") -// }, -// GetCurrentClockFreqsFunc: func() (nvml.DeviceCurrentClockFreqs, nvml.Return) { -// panic("mock out the GetCurrentClockFreqs method") -// }, -// GetCurrentClocksEventReasonsFunc: func() (uint64, nvml.Return) { -// panic("mock out the GetCurrentClocksEventReasons method") -// }, -// GetCurrentClocksThrottleReasonsFunc: func() (uint64, nvml.Return) { -// panic("mock out the GetCurrentClocksThrottleReasons method") -// }, -// GetDecoderUtilizationFunc: func() (uint32, uint32, nvml.Return) { -// panic("mock out the GetDecoderUtilization method") -// }, -// GetDefaultApplicationsClockFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { -// panic("mock out the GetDefaultApplicationsClock method") -// }, -// GetDefaultEccModeFunc: func() (nvml.EnableState, nvml.Return) { -// panic("mock out the GetDefaultEccMode method") -// }, -// GetDetailedEccErrorsFunc: func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) { -// panic("mock out the GetDetailedEccErrors method") -// }, -// GetDeviceHandleFromMigDeviceHandleFunc: func() (nvml.Device, nvml.Return) { -// panic("mock out the GetDeviceHandleFromMigDeviceHandle method") -// }, -// GetDisplayActiveFunc: func() (nvml.EnableState, nvml.Return) { -// panic("mock out the GetDisplayActive method") -// }, -// GetDisplayModeFunc: func() (nvml.EnableState, nvml.Return) { -// panic("mock out the GetDisplayMode method") -// }, -// GetDramEncryptionModeFunc: func() (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) { -// panic("mock out the GetDramEncryptionMode method") -// }, -// GetDriverModelFunc: func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { -// panic("mock out the GetDriverModel method") -// }, -// GetDriverModel_v2Func: func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { -// panic("mock out the GetDriverModel_v2 method") -// }, -// GetDynamicPstatesInfoFunc: func() (nvml.GpuDynamicPstatesInfo, nvml.Return) { -// panic("mock out the GetDynamicPstatesInfo method") -// }, -// GetEccModeFunc: func() (nvml.EnableState, nvml.EnableState, nvml.Return) { -// panic("mock out the GetEccMode method") -// }, -// GetEncoderCapacityFunc: func(encoderType nvml.EncoderType) (int, nvml.Return) { -// panic("mock out the GetEncoderCapacity method") -// }, -// GetEncoderSessionsFunc: func() ([]nvml.EncoderSessionInfo, nvml.Return) { -// panic("mock out the GetEncoderSessions method") -// }, -// GetEncoderStatsFunc: func() (int, uint32, uint32, nvml.Return) { -// panic("mock out the GetEncoderStats method") -// }, -// GetEncoderUtilizationFunc: func() (uint32, uint32, nvml.Return) { -// panic("mock out the GetEncoderUtilization method") -// }, -// GetEnforcedPowerLimitFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetEnforcedPowerLimit method") -// }, -// GetFBCSessionsFunc: func() ([]nvml.FBCSessionInfo, nvml.Return) { -// panic("mock out the GetFBCSessions method") -// }, -// GetFBCStatsFunc: func() (nvml.FBCStats, nvml.Return) { -// panic("mock out the GetFBCStats method") -// }, -// GetFanControlPolicy_v2Func: func(n int) (nvml.FanControlPolicy, nvml.Return) { -// panic("mock out the GetFanControlPolicy_v2 method") -// }, -// GetFanSpeedFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetFanSpeed method") -// }, -// GetFanSpeedRPMFunc: func() (nvml.FanSpeedInfo, nvml.Return) { -// panic("mock out the GetFanSpeedRPM method") -// }, -// GetFanSpeed_v2Func: func(n int) (uint32, nvml.Return) { -// panic("mock out the GetFanSpeed_v2 method") -// }, -// GetFieldValuesFunc: func(fieldValues []nvml.FieldValue) nvml.Return { -// panic("mock out the GetFieldValues method") -// }, -// GetGpcClkMinMaxVfOffsetFunc: func() (int, int, nvml.Return) { -// panic("mock out the GetGpcClkMinMaxVfOffset method") -// }, -// GetGpcClkVfOffsetFunc: func() (int, nvml.Return) { -// panic("mock out the GetGpcClkVfOffset method") -// }, -// GetGpuFabricInfoFunc: func() (nvml.GpuFabricInfo, nvml.Return) { -// panic("mock out the GetGpuFabricInfo method") -// }, -// GetGpuFabricInfoVFunc: func() nvml.GpuFabricInfoHandler { -// panic("mock out the GetGpuFabricInfoV method") -// }, -// GetGpuInstanceByIdFunc: func(n int) (nvml.GpuInstance, nvml.Return) { -// panic("mock out the GetGpuInstanceById method") -// }, -// GetGpuInstanceIdFunc: func() (int, nvml.Return) { -// panic("mock out the GetGpuInstanceId method") -// }, -// GetGpuInstancePossiblePlacementsFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { -// panic("mock out the GetGpuInstancePossiblePlacements method") -// }, -// GetGpuInstanceProfileInfoFunc: func(n int) (nvml.GpuInstanceProfileInfo, nvml.Return) { -// panic("mock out the GetGpuInstanceProfileInfo method") -// }, -// GetGpuInstanceProfileInfoByIdVFunc: func(n int) nvml.GpuInstanceProfileInfoByIdHandler { -// panic("mock out the GetGpuInstanceProfileInfoByIdV method") -// }, -// GetGpuInstanceProfileInfoVFunc: func(n int) nvml.GpuInstanceProfileInfoHandler { -// panic("mock out the GetGpuInstanceProfileInfoV method") -// }, -// GetGpuInstanceRemainingCapacityFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) { -// panic("mock out the GetGpuInstanceRemainingCapacity method") -// }, -// GetGpuInstancesFunc: func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { -// panic("mock out the GetGpuInstances method") -// }, -// GetGpuMaxPcieLinkGenerationFunc: func() (int, nvml.Return) { -// panic("mock out the GetGpuMaxPcieLinkGeneration method") -// }, -// GetGpuOperationModeFunc: func() (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { -// panic("mock out the GetGpuOperationMode method") -// }, -// GetGraphicsRunningProcessesFunc: func() ([]nvml.ProcessInfo, nvml.Return) { -// panic("mock out the GetGraphicsRunningProcesses method") -// }, -// GetGridLicensableFeaturesFunc: func() (nvml.GridLicensableFeatures, nvml.Return) { -// panic("mock out the GetGridLicensableFeatures method") -// }, -// GetGspFirmwareModeFunc: func() (bool, bool, nvml.Return) { -// panic("mock out the GetGspFirmwareMode method") -// }, -// GetGspFirmwareVersionFunc: func() (string, nvml.Return) { -// panic("mock out the GetGspFirmwareVersion method") -// }, -// GetHostVgpuModeFunc: func() (nvml.HostVgpuMode, nvml.Return) { -// panic("mock out the GetHostVgpuMode method") -// }, -// GetIndexFunc: func() (int, nvml.Return) { -// panic("mock out the GetIndex method") -// }, -// GetInforomConfigurationChecksumFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetInforomConfigurationChecksum method") -// }, -// GetInforomImageVersionFunc: func() (string, nvml.Return) { -// panic("mock out the GetInforomImageVersion method") -// }, -// GetInforomVersionFunc: func(inforomObject nvml.InforomObject) (string, nvml.Return) { -// panic("mock out the GetInforomVersion method") -// }, -// GetIrqNumFunc: func() (int, nvml.Return) { -// panic("mock out the GetIrqNum method") -// }, -// GetJpgUtilizationFunc: func() (uint32, uint32, nvml.Return) { -// panic("mock out the GetJpgUtilization method") -// }, -// GetLastBBXFlushTimeFunc: func() (uint64, uint, nvml.Return) { -// panic("mock out the GetLastBBXFlushTime method") -// }, -// GetMPSComputeRunningProcessesFunc: func() ([]nvml.ProcessInfo, nvml.Return) { -// panic("mock out the GetMPSComputeRunningProcesses method") -// }, -// GetMarginTemperatureFunc: func() (nvml.MarginTemperature, nvml.Return) { -// panic("mock out the GetMarginTemperature method") -// }, -// GetMaxClockInfoFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { -// panic("mock out the GetMaxClockInfo method") -// }, -// GetMaxCustomerBoostClockFunc: func(clockType nvml.ClockType) (uint32, nvml.Return) { -// panic("mock out the GetMaxCustomerBoostClock method") -// }, -// GetMaxMigDeviceCountFunc: func() (int, nvml.Return) { -// panic("mock out the GetMaxMigDeviceCount method") -// }, -// GetMaxPcieLinkGenerationFunc: func() (int, nvml.Return) { -// panic("mock out the GetMaxPcieLinkGeneration method") -// }, -// GetMaxPcieLinkWidthFunc: func() (int, nvml.Return) { -// panic("mock out the GetMaxPcieLinkWidth method") -// }, -// GetMemClkMinMaxVfOffsetFunc: func() (int, int, nvml.Return) { -// panic("mock out the GetMemClkMinMaxVfOffset method") -// }, -// GetMemClkVfOffsetFunc: func() (int, nvml.Return) { -// panic("mock out the GetMemClkVfOffset method") -// }, -// GetMemoryAffinityFunc: func(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { -// panic("mock out the GetMemoryAffinity method") -// }, -// GetMemoryBusWidthFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetMemoryBusWidth method") -// }, -// GetMemoryErrorCounterFunc: func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) { -// panic("mock out the GetMemoryErrorCounter method") -// }, -// GetMemoryInfoFunc: func() (nvml.Memory, nvml.Return) { -// panic("mock out the GetMemoryInfo method") -// }, -// GetMemoryInfo_v2Func: func() (nvml.Memory_v2, nvml.Return) { -// panic("mock out the GetMemoryInfo_v2 method") -// }, -// GetMigDeviceHandleByIndexFunc: func(n int) (nvml.Device, nvml.Return) { -// panic("mock out the GetMigDeviceHandleByIndex method") -// }, -// GetMigModeFunc: func() (int, int, nvml.Return) { -// panic("mock out the GetMigMode method") -// }, -// GetMinMaxClockOfPStateFunc: func(clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) { -// panic("mock out the GetMinMaxClockOfPState method") -// }, -// GetMinMaxFanSpeedFunc: func() (int, int, nvml.Return) { -// panic("mock out the GetMinMaxFanSpeed method") -// }, -// GetMinorNumberFunc: func() (int, nvml.Return) { -// panic("mock out the GetMinorNumber method") -// }, -// GetModuleIdFunc: func() (int, nvml.Return) { -// panic("mock out the GetModuleId method") -// }, -// GetMultiGpuBoardFunc: func() (int, nvml.Return) { -// panic("mock out the GetMultiGpuBoard method") -// }, -// GetNameFunc: func() (string, nvml.Return) { -// panic("mock out the GetName method") -// }, -// GetNumFansFunc: func() (int, nvml.Return) { -// panic("mock out the GetNumFans method") -// }, -// GetNumGpuCoresFunc: func() (int, nvml.Return) { -// panic("mock out the GetNumGpuCores method") -// }, -// GetNumaNodeIdFunc: func() (int, nvml.Return) { -// panic("mock out the GetNumaNodeId method") -// }, -// GetNvLinkCapabilityFunc: func(n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) { -// panic("mock out the GetNvLinkCapability method") -// }, -// GetNvLinkErrorCounterFunc: func(n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) { -// panic("mock out the GetNvLinkErrorCounter method") -// }, -// GetNvLinkInfoFunc: func() nvml.NvLinkInfoHandler { -// panic("mock out the GetNvLinkInfo method") -// }, -// GetNvLinkRemoteDeviceTypeFunc: func(n int) (nvml.IntNvLinkDeviceType, nvml.Return) { -// panic("mock out the GetNvLinkRemoteDeviceType method") -// }, -// GetNvLinkRemotePciInfoFunc: func(n int) (nvml.PciInfo, nvml.Return) { -// panic("mock out the GetNvLinkRemotePciInfo method") -// }, -// GetNvLinkStateFunc: func(n int) (nvml.EnableState, nvml.Return) { -// panic("mock out the GetNvLinkState method") -// }, -// GetNvLinkUtilizationControlFunc: func(n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { -// panic("mock out the GetNvLinkUtilizationControl method") -// }, -// GetNvLinkUtilizationCounterFunc: func(n1 int, n2 int) (uint64, uint64, nvml.Return) { -// panic("mock out the GetNvLinkUtilizationCounter method") -// }, -// GetNvLinkVersionFunc: func(n int) (uint32, nvml.Return) { -// panic("mock out the GetNvLinkVersion method") -// }, -// GetNvlinkBwModeFunc: func() (nvml.NvlinkGetBwMode, nvml.Return) { -// panic("mock out the GetNvlinkBwMode method") -// }, -// GetNvlinkSupportedBwModesFunc: func() (nvml.NvlinkSupportedBwModes, nvml.Return) { -// panic("mock out the GetNvlinkSupportedBwModes method") -// }, -// GetOfaUtilizationFunc: func() (uint32, uint32, nvml.Return) { -// panic("mock out the GetOfaUtilization method") -// }, -// GetP2PStatusFunc: func(device nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) { -// panic("mock out the GetP2PStatus method") -// }, -// GetPciInfoFunc: func() (nvml.PciInfo, nvml.Return) { -// panic("mock out the GetPciInfo method") -// }, -// GetPciInfoExtFunc: func() (nvml.PciInfoExt, nvml.Return) { -// panic("mock out the GetPciInfoExt method") -// }, -// GetPcieLinkMaxSpeedFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetPcieLinkMaxSpeed method") -// }, -// GetPcieReplayCounterFunc: func() (int, nvml.Return) { -// panic("mock out the GetPcieReplayCounter method") -// }, -// GetPcieSpeedFunc: func() (int, nvml.Return) { -// panic("mock out the GetPcieSpeed method") -// }, -// GetPcieThroughputFunc: func(pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { -// panic("mock out the GetPcieThroughput method") -// }, -// GetPdiFunc: func() (nvml.Pdi, nvml.Return) { -// panic("mock out the GetPdi method") -// }, -// GetPerformanceModesFunc: func() (nvml.DevicePerfModes, nvml.Return) { -// panic("mock out the GetPerformanceModes method") -// }, -// GetPerformanceStateFunc: func() (nvml.Pstates, nvml.Return) { -// panic("mock out the GetPerformanceState method") -// }, -// GetPersistenceModeFunc: func() (nvml.EnableState, nvml.Return) { -// panic("mock out the GetPersistenceMode method") -// }, -// GetPgpuMetadataStringFunc: func() (string, nvml.Return) { -// panic("mock out the GetPgpuMetadataString method") -// }, -// GetPlatformInfoFunc: func() (nvml.PlatformInfo, nvml.Return) { -// panic("mock out the GetPlatformInfo method") -// }, -// GetPowerManagementDefaultLimitFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetPowerManagementDefaultLimit method") -// }, -// GetPowerManagementLimitFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetPowerManagementLimit method") -// }, -// GetPowerManagementLimitConstraintsFunc: func() (uint32, uint32, nvml.Return) { -// panic("mock out the GetPowerManagementLimitConstraints method") -// }, -// GetPowerManagementModeFunc: func() (nvml.EnableState, nvml.Return) { -// panic("mock out the GetPowerManagementMode method") -// }, -// GetPowerMizerMode_v1Func: func() (nvml.DevicePowerMizerModes_v1, nvml.Return) { -// panic("mock out the GetPowerMizerMode_v1 method") -// }, -// GetPowerSourceFunc: func() (nvml.PowerSource, nvml.Return) { -// panic("mock out the GetPowerSource method") -// }, -// GetPowerStateFunc: func() (nvml.Pstates, nvml.Return) { -// panic("mock out the GetPowerState method") -// }, -// GetPowerUsageFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetPowerUsage method") -// }, -// GetProcessUtilizationFunc: func(v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) { -// panic("mock out the GetProcessUtilization method") -// }, -// GetProcessesUtilizationInfoFunc: func() (nvml.ProcessesUtilizationInfo, nvml.Return) { -// panic("mock out the GetProcessesUtilizationInfo method") -// }, -// GetRemappedRowsFunc: func() (int, int, bool, bool, nvml.Return) { -// panic("mock out the GetRemappedRows method") -// }, -// GetRepairStatusFunc: func() (nvml.RepairStatus, nvml.Return) { -// panic("mock out the GetRepairStatus method") -// }, -// GetRetiredPagesFunc: func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) { -// panic("mock out the GetRetiredPages method") -// }, -// GetRetiredPagesPendingStatusFunc: func() (nvml.EnableState, nvml.Return) { -// panic("mock out the GetRetiredPagesPendingStatus method") -// }, -// GetRetiredPages_v2Func: func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) { -// panic("mock out the GetRetiredPages_v2 method") -// }, -// GetRowRemapperHistogramFunc: func() (nvml.RowRemapperHistogramValues, nvml.Return) { -// panic("mock out the GetRowRemapperHistogram method") -// }, -// GetRunningProcessDetailListFunc: func() (nvml.ProcessDetailList, nvml.Return) { -// panic("mock out the GetRunningProcessDetailList method") -// }, -// GetSamplesFunc: func(samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) { -// panic("mock out the GetSamples method") -// }, -// GetSerialFunc: func() (string, nvml.Return) { -// panic("mock out the GetSerial method") -// }, -// GetSramEccErrorStatusFunc: func() (nvml.EccSramErrorStatus, nvml.Return) { -// panic("mock out the GetSramEccErrorStatus method") -// }, -// GetSramUniqueUncorrectedEccErrorCountsFunc: func(eccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts) nvml.Return { -// panic("mock out the GetSramUniqueUncorrectedEccErrorCounts method") -// }, -// GetSupportedClocksEventReasonsFunc: func() (uint64, nvml.Return) { -// panic("mock out the GetSupportedClocksEventReasons method") -// }, -// GetSupportedClocksThrottleReasonsFunc: func() (uint64, nvml.Return) { -// panic("mock out the GetSupportedClocksThrottleReasons method") -// }, -// GetSupportedEventTypesFunc: func() (uint64, nvml.Return) { -// panic("mock out the GetSupportedEventTypes method") -// }, -// GetSupportedGraphicsClocksFunc: func(n int) (int, uint32, nvml.Return) { -// panic("mock out the GetSupportedGraphicsClocks method") -// }, -// GetSupportedMemoryClocksFunc: func() (int, uint32, nvml.Return) { -// panic("mock out the GetSupportedMemoryClocks method") -// }, -// GetSupportedPerformanceStatesFunc: func() ([]nvml.Pstates, nvml.Return) { -// panic("mock out the GetSupportedPerformanceStates method") -// }, -// GetSupportedVgpusFunc: func() ([]nvml.VgpuTypeId, nvml.Return) { -// panic("mock out the GetSupportedVgpus method") -// }, -// GetTargetFanSpeedFunc: func(n int) (int, nvml.Return) { -// panic("mock out the GetTargetFanSpeed method") -// }, -// GetTemperatureFunc: func(temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) { -// panic("mock out the GetTemperature method") -// }, -// GetTemperatureThresholdFunc: func(temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { -// panic("mock out the GetTemperatureThreshold method") -// }, -// GetTemperatureVFunc: func() nvml.TemperatureHandler { -// panic("mock out the GetTemperatureV method") -// }, -// GetThermalSettingsFunc: func(v uint32) (nvml.GpuThermalSettings, nvml.Return) { -// panic("mock out the GetThermalSettings method") -// }, -// GetTopologyCommonAncestorFunc: func(device nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) { -// panic("mock out the GetTopologyCommonAncestor method") -// }, -// GetTopologyNearestGpusFunc: func(gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) { -// panic("mock out the GetTopologyNearestGpus method") -// }, -// GetTotalEccErrorsFunc: func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) { -// panic("mock out the GetTotalEccErrors method") -// }, -// GetTotalEnergyConsumptionFunc: func() (uint64, nvml.Return) { -// panic("mock out the GetTotalEnergyConsumption method") -// }, -// GetUUIDFunc: func() (string, nvml.Return) { -// panic("mock out the GetUUID method") -// }, -// GetUtilizationRatesFunc: func() (nvml.Utilization, nvml.Return) { -// panic("mock out the GetUtilizationRates method") -// }, -// GetVbiosVersionFunc: func() (string, nvml.Return) { -// panic("mock out the GetVbiosVersion method") -// }, -// GetVgpuCapabilitiesFunc: func(deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) { -// panic("mock out the GetVgpuCapabilities method") -// }, -// GetVgpuHeterogeneousModeFunc: func() (nvml.VgpuHeterogeneousMode, nvml.Return) { -// panic("mock out the GetVgpuHeterogeneousMode method") -// }, -// GetVgpuInstancesUtilizationInfoFunc: func() (nvml.VgpuInstancesUtilizationInfo, nvml.Return) { -// panic("mock out the GetVgpuInstancesUtilizationInfo method") -// }, -// GetVgpuMetadataFunc: func() (nvml.VgpuPgpuMetadata, nvml.Return) { -// panic("mock out the GetVgpuMetadata method") -// }, -// GetVgpuProcessUtilizationFunc: func(v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) { -// panic("mock out the GetVgpuProcessUtilization method") -// }, -// GetVgpuProcessesUtilizationInfoFunc: func() (nvml.VgpuProcessesUtilizationInfo, nvml.Return) { -// panic("mock out the GetVgpuProcessesUtilizationInfo method") -// }, -// GetVgpuSchedulerCapabilitiesFunc: func() (nvml.VgpuSchedulerCapabilities, nvml.Return) { -// panic("mock out the GetVgpuSchedulerCapabilities method") -// }, -// GetVgpuSchedulerLogFunc: func() (nvml.VgpuSchedulerLog, nvml.Return) { -// panic("mock out the GetVgpuSchedulerLog method") -// }, -// GetVgpuSchedulerStateFunc: func() (nvml.VgpuSchedulerGetState, nvml.Return) { -// panic("mock out the GetVgpuSchedulerState method") -// }, -// GetVgpuTypeCreatablePlacementsFunc: func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { -// panic("mock out the GetVgpuTypeCreatablePlacements method") -// }, -// GetVgpuTypeSupportedPlacementsFunc: func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { -// panic("mock out the GetVgpuTypeSupportedPlacements method") -// }, -// GetVgpuUtilizationFunc: func(v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) { -// panic("mock out the GetVgpuUtilization method") -// }, -// GetViolationStatusFunc: func(perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) { -// panic("mock out the GetViolationStatus method") -// }, -// GetVirtualizationModeFunc: func() (nvml.GpuVirtualizationMode, nvml.Return) { -// panic("mock out the GetVirtualizationMode method") -// }, -// GpmMigSampleGetFunc: func(n int, gpmSample nvml.GpmSample) nvml.Return { -// panic("mock out the GpmMigSampleGet method") -// }, -// GpmQueryDeviceSupportFunc: func() (nvml.GpmSupport, nvml.Return) { -// panic("mock out the GpmQueryDeviceSupport method") -// }, -// GpmQueryDeviceSupportVFunc: func() nvml.GpmSupportV { -// panic("mock out the GpmQueryDeviceSupportV method") -// }, -// GpmQueryIfStreamingEnabledFunc: func() (uint32, nvml.Return) { -// panic("mock out the GpmQueryIfStreamingEnabled method") -// }, -// GpmSampleGetFunc: func(gpmSample nvml.GpmSample) nvml.Return { -// panic("mock out the GpmSampleGet method") -// }, -// GpmSetStreamingEnabledFunc: func(v uint32) nvml.Return { -// panic("mock out the GpmSetStreamingEnabled method") -// }, -// IsMigDeviceHandleFunc: func() (bool, nvml.Return) { -// panic("mock out the IsMigDeviceHandle method") -// }, -// OnSameBoardFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the OnSameBoard method") -// }, -// PowerSmoothingActivatePresetProfileFunc: func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { -// panic("mock out the PowerSmoothingActivatePresetProfile method") -// }, -// PowerSmoothingSetStateFunc: func(powerSmoothingState *nvml.PowerSmoothingState) nvml.Return { -// panic("mock out the PowerSmoothingSetState method") -// }, -// PowerSmoothingUpdatePresetProfileParamFunc: func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { -// panic("mock out the PowerSmoothingUpdatePresetProfileParam method") -// }, -// ReadWritePRM_v1Func: func(pRMTLV_v1 *nvml.PRMTLV_v1) nvml.Return { -// panic("mock out the ReadWritePRM_v1 method") -// }, -// RegisterEventsFunc: func(v uint64, eventSet nvml.EventSet) nvml.Return { -// panic("mock out the RegisterEvents method") -// }, -// ResetApplicationsClocksFunc: func() nvml.Return { -// panic("mock out the ResetApplicationsClocks method") -// }, -// ResetGpuLockedClocksFunc: func() nvml.Return { -// panic("mock out the ResetGpuLockedClocks method") -// }, -// ResetMemoryLockedClocksFunc: func() nvml.Return { -// panic("mock out the ResetMemoryLockedClocks method") -// }, -// ResetNvLinkErrorCountersFunc: func(n int) nvml.Return { -// panic("mock out the ResetNvLinkErrorCounters method") -// }, -// ResetNvLinkUtilizationCounterFunc: func(n1 int, n2 int) nvml.Return { -// panic("mock out the ResetNvLinkUtilizationCounter method") -// }, -// SetAPIRestrictionFunc: func(restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return { -// panic("mock out the SetAPIRestriction method") -// }, -// SetAccountingModeFunc: func(enableState nvml.EnableState) nvml.Return { -// panic("mock out the SetAccountingMode method") -// }, -// SetApplicationsClocksFunc: func(v1 uint32, v2 uint32) nvml.Return { -// panic("mock out the SetApplicationsClocks method") -// }, -// SetAutoBoostedClocksEnabledFunc: func(enableState nvml.EnableState) nvml.Return { -// panic("mock out the SetAutoBoostedClocksEnabled method") -// }, -// SetClockOffsetsFunc: func(clockOffset nvml.ClockOffset) nvml.Return { -// panic("mock out the SetClockOffsets method") -// }, -// SetComputeModeFunc: func(computeMode nvml.ComputeMode) nvml.Return { -// panic("mock out the SetComputeMode method") -// }, -// SetConfComputeUnprotectedMemSizeFunc: func(v uint64) nvml.Return { -// panic("mock out the SetConfComputeUnprotectedMemSize method") -// }, -// SetCpuAffinityFunc: func() nvml.Return { -// panic("mock out the SetCpuAffinity method") -// }, -// SetDefaultAutoBoostedClocksEnabledFunc: func(enableState nvml.EnableState, v uint32) nvml.Return { -// panic("mock out the SetDefaultAutoBoostedClocksEnabled method") -// }, -// SetDefaultFanSpeed_v2Func: func(n int) nvml.Return { -// panic("mock out the SetDefaultFanSpeed_v2 method") -// }, -// SetDramEncryptionModeFunc: func(dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return { -// panic("mock out the SetDramEncryptionMode method") -// }, -// SetDriverModelFunc: func(driverModel nvml.DriverModel, v uint32) nvml.Return { -// panic("mock out the SetDriverModel method") -// }, -// SetEccModeFunc: func(enableState nvml.EnableState) nvml.Return { -// panic("mock out the SetEccMode method") -// }, -// SetFanControlPolicyFunc: func(n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return { -// panic("mock out the SetFanControlPolicy method") -// }, -// SetFanSpeed_v2Func: func(n1 int, n2 int) nvml.Return { -// panic("mock out the SetFanSpeed_v2 method") -// }, -// SetGpcClkVfOffsetFunc: func(n int) nvml.Return { -// panic("mock out the SetGpcClkVfOffset method") -// }, -// SetGpuLockedClocksFunc: func(v1 uint32, v2 uint32) nvml.Return { -// panic("mock out the SetGpuLockedClocks method") -// }, -// SetGpuOperationModeFunc: func(gpuOperationMode nvml.GpuOperationMode) nvml.Return { -// panic("mock out the SetGpuOperationMode method") -// }, -// SetMemClkVfOffsetFunc: func(n int) nvml.Return { -// panic("mock out the SetMemClkVfOffset method") -// }, -// SetMemoryLockedClocksFunc: func(v1 uint32, v2 uint32) nvml.Return { -// panic("mock out the SetMemoryLockedClocks method") -// }, -// SetMigModeFunc: func(n int) (nvml.Return, nvml.Return) { -// panic("mock out the SetMigMode method") -// }, -// SetNvLinkDeviceLowPowerThresholdFunc: func(nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return { -// panic("mock out the SetNvLinkDeviceLowPowerThreshold method") -// }, -// SetNvLinkUtilizationControlFunc: func(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { -// panic("mock out the SetNvLinkUtilizationControl method") -// }, -// SetNvlinkBwModeFunc: func(nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { -// panic("mock out the SetNvlinkBwMode method") -// }, -// SetPersistenceModeFunc: func(enableState nvml.EnableState) nvml.Return { -// panic("mock out the SetPersistenceMode method") -// }, -// SetPowerManagementLimitFunc: func(v uint32) nvml.Return { -// panic("mock out the SetPowerManagementLimit method") -// }, -// SetPowerManagementLimit_v2Func: func(powerValue_v2 *nvml.PowerValue_v2) nvml.Return { -// panic("mock out the SetPowerManagementLimit_v2 method") -// }, -// SetTemperatureThresholdFunc: func(temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return { -// panic("mock out the SetTemperatureThreshold method") -// }, -// SetVgpuCapabilitiesFunc: func(deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return { -// panic("mock out the SetVgpuCapabilities method") -// }, -// SetVgpuHeterogeneousModeFunc: func(vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return { -// panic("mock out the SetVgpuHeterogeneousMode method") -// }, -// SetVgpuSchedulerStateFunc: func(vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return { -// panic("mock out the SetVgpuSchedulerState method") -// }, -// SetVirtualizationModeFunc: func(gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { -// panic("mock out the SetVirtualizationMode method") -// }, -// ValidateInforomFunc: func() nvml.Return { -// panic("mock out the ValidateInforom method") -// }, -// VgpuTypeGetMaxInstancesFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { -// panic("mock out the VgpuTypeGetMaxInstances method") -// }, -// WorkloadPowerProfileClearRequestedProfilesFunc: func(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { -// panic("mock out the WorkloadPowerProfileClearRequestedProfiles method") -// }, -// WorkloadPowerProfileGetCurrentProfilesFunc: func() (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) { -// panic("mock out the WorkloadPowerProfileGetCurrentProfiles method") -// }, -// WorkloadPowerProfileGetProfilesInfoFunc: func() (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) { -// panic("mock out the WorkloadPowerProfileGetProfilesInfo method") -// }, -// WorkloadPowerProfileSetRequestedProfilesFunc: func(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { -// panic("mock out the WorkloadPowerProfileSetRequestedProfiles method") -// }, -// } -// -// // use mockedDevice in code that requires nvml.Device -// // and then make assertions. -// -// } -type Device struct { - // ClearAccountingPidsFunc mocks the ClearAccountingPids method. - ClearAccountingPidsFunc func() nvml.Return - - // ClearCpuAffinityFunc mocks the ClearCpuAffinity method. - ClearCpuAffinityFunc func() nvml.Return - - // ClearEccErrorCountsFunc mocks the ClearEccErrorCounts method. - ClearEccErrorCountsFunc func(eccCounterType nvml.EccCounterType) nvml.Return - - // ClearFieldValuesFunc mocks the ClearFieldValues method. - ClearFieldValuesFunc func(fieldValues []nvml.FieldValue) nvml.Return - - // CreateGpuInstanceFunc mocks the CreateGpuInstance method. - CreateGpuInstanceFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) - - // CreateGpuInstanceWithPlacementFunc mocks the CreateGpuInstanceWithPlacement method. - CreateGpuInstanceWithPlacementFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) - - // FreezeNvLinkUtilizationCounterFunc mocks the FreezeNvLinkUtilizationCounter method. - FreezeNvLinkUtilizationCounterFunc func(n1 int, n2 int, enableState nvml.EnableState) nvml.Return - - // GetAPIRestrictionFunc mocks the GetAPIRestriction method. - GetAPIRestrictionFunc func(restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) - - // GetAccountingBufferSizeFunc mocks the GetAccountingBufferSize method. - GetAccountingBufferSizeFunc func() (int, nvml.Return) - - // GetAccountingModeFunc mocks the GetAccountingMode method. - GetAccountingModeFunc func() (nvml.EnableState, nvml.Return) - - // GetAccountingPidsFunc mocks the GetAccountingPids method. - GetAccountingPidsFunc func() ([]int, nvml.Return) - - // GetAccountingStatsFunc mocks the GetAccountingStats method. - GetAccountingStatsFunc func(v uint32) (nvml.AccountingStats, nvml.Return) - - // GetActiveVgpusFunc mocks the GetActiveVgpus method. - GetActiveVgpusFunc func() ([]nvml.VgpuInstance, nvml.Return) - - // GetAdaptiveClockInfoStatusFunc mocks the GetAdaptiveClockInfoStatus method. - GetAdaptiveClockInfoStatusFunc func() (uint32, nvml.Return) - - // GetAddressingModeFunc mocks the GetAddressingMode method. - GetAddressingModeFunc func() (nvml.DeviceAddressingMode, nvml.Return) - - // GetApplicationsClockFunc mocks the GetApplicationsClock method. - GetApplicationsClockFunc func(clockType nvml.ClockType) (uint32, nvml.Return) - - // GetArchitectureFunc mocks the GetArchitecture method. - GetArchitectureFunc func() (nvml.DeviceArchitecture, nvml.Return) - - // GetAttributesFunc mocks the GetAttributes method. - GetAttributesFunc func() (nvml.DeviceAttributes, nvml.Return) - - // GetAutoBoostedClocksEnabledFunc mocks the GetAutoBoostedClocksEnabled method. - GetAutoBoostedClocksEnabledFunc func() (nvml.EnableState, nvml.EnableState, nvml.Return) - - // GetBAR1MemoryInfoFunc mocks the GetBAR1MemoryInfo method. - GetBAR1MemoryInfoFunc func() (nvml.BAR1Memory, nvml.Return) - - // GetBoardIdFunc mocks the GetBoardId method. - GetBoardIdFunc func() (uint32, nvml.Return) - - // GetBoardPartNumberFunc mocks the GetBoardPartNumber method. - GetBoardPartNumberFunc func() (string, nvml.Return) - - // GetBrandFunc mocks the GetBrand method. - GetBrandFunc func() (nvml.BrandType, nvml.Return) - - // GetBridgeChipInfoFunc mocks the GetBridgeChipInfo method. - GetBridgeChipInfoFunc func() (nvml.BridgeChipHierarchy, nvml.Return) - - // GetBusTypeFunc mocks the GetBusType method. - GetBusTypeFunc func() (nvml.BusType, nvml.Return) - - // GetC2cModeInfoVFunc mocks the GetC2cModeInfoV method. - GetC2cModeInfoVFunc func() nvml.C2cModeInfoHandler - - // GetCapabilitiesFunc mocks the GetCapabilities method. - GetCapabilitiesFunc func() (nvml.DeviceCapabilities, nvml.Return) - - // GetClkMonStatusFunc mocks the GetClkMonStatus method. - GetClkMonStatusFunc func() (nvml.ClkMonStatus, nvml.Return) - - // GetClockFunc mocks the GetClock method. - GetClockFunc func(clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) - - // GetClockInfoFunc mocks the GetClockInfo method. - GetClockInfoFunc func(clockType nvml.ClockType) (uint32, nvml.Return) - - // GetClockOffsetsFunc mocks the GetClockOffsets method. - GetClockOffsetsFunc func() (nvml.ClockOffset, nvml.Return) - - // GetComputeInstanceIdFunc mocks the GetComputeInstanceId method. - GetComputeInstanceIdFunc func() (int, nvml.Return) - - // GetComputeModeFunc mocks the GetComputeMode method. - GetComputeModeFunc func() (nvml.ComputeMode, nvml.Return) - - // GetComputeRunningProcessesFunc mocks the GetComputeRunningProcesses method. - GetComputeRunningProcessesFunc func() ([]nvml.ProcessInfo, nvml.Return) - - // GetConfComputeGpuAttestationReportFunc mocks the GetConfComputeGpuAttestationReport method. - GetConfComputeGpuAttestationReportFunc func(confComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport) nvml.Return - - // GetConfComputeGpuCertificateFunc mocks the GetConfComputeGpuCertificate method. - GetConfComputeGpuCertificateFunc func() (nvml.ConfComputeGpuCertificate, nvml.Return) - - // GetConfComputeMemSizeInfoFunc mocks the GetConfComputeMemSizeInfo method. - GetConfComputeMemSizeInfoFunc func() (nvml.ConfComputeMemSizeInfo, nvml.Return) - - // GetConfComputeProtectedMemoryUsageFunc mocks the GetConfComputeProtectedMemoryUsage method. - GetConfComputeProtectedMemoryUsageFunc func() (nvml.Memory, nvml.Return) - - // GetCoolerInfoFunc mocks the GetCoolerInfo method. - GetCoolerInfoFunc func() (nvml.CoolerInfo, nvml.Return) - - // GetCpuAffinityFunc mocks the GetCpuAffinity method. - GetCpuAffinityFunc func(n int) ([]uint, nvml.Return) - - // GetCpuAffinityWithinScopeFunc mocks the GetCpuAffinityWithinScope method. - GetCpuAffinityWithinScopeFunc func(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) - - // GetCreatableVgpusFunc mocks the GetCreatableVgpus method. - GetCreatableVgpusFunc func() ([]nvml.VgpuTypeId, nvml.Return) - - // GetCudaComputeCapabilityFunc mocks the GetCudaComputeCapability method. - GetCudaComputeCapabilityFunc func() (int, int, nvml.Return) - - // GetCurrPcieLinkGenerationFunc mocks the GetCurrPcieLinkGeneration method. - GetCurrPcieLinkGenerationFunc func() (int, nvml.Return) - - // GetCurrPcieLinkWidthFunc mocks the GetCurrPcieLinkWidth method. - GetCurrPcieLinkWidthFunc func() (int, nvml.Return) - - // GetCurrentClockFreqsFunc mocks the GetCurrentClockFreqs method. - GetCurrentClockFreqsFunc func() (nvml.DeviceCurrentClockFreqs, nvml.Return) - - // GetCurrentClocksEventReasonsFunc mocks the GetCurrentClocksEventReasons method. - GetCurrentClocksEventReasonsFunc func() (uint64, nvml.Return) - - // GetCurrentClocksThrottleReasonsFunc mocks the GetCurrentClocksThrottleReasons method. - GetCurrentClocksThrottleReasonsFunc func() (uint64, nvml.Return) - - // GetDecoderUtilizationFunc mocks the GetDecoderUtilization method. - GetDecoderUtilizationFunc func() (uint32, uint32, nvml.Return) - - // GetDefaultApplicationsClockFunc mocks the GetDefaultApplicationsClock method. - GetDefaultApplicationsClockFunc func(clockType nvml.ClockType) (uint32, nvml.Return) - - // GetDefaultEccModeFunc mocks the GetDefaultEccMode method. - GetDefaultEccModeFunc func() (nvml.EnableState, nvml.Return) - - // GetDetailedEccErrorsFunc mocks the GetDetailedEccErrors method. - GetDetailedEccErrorsFunc func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) - - // GetDeviceHandleFromMigDeviceHandleFunc mocks the GetDeviceHandleFromMigDeviceHandle method. - GetDeviceHandleFromMigDeviceHandleFunc func() (nvml.Device, nvml.Return) - - // GetDisplayActiveFunc mocks the GetDisplayActive method. - GetDisplayActiveFunc func() (nvml.EnableState, nvml.Return) - - // GetDisplayModeFunc mocks the GetDisplayMode method. - GetDisplayModeFunc func() (nvml.EnableState, nvml.Return) - - // GetDramEncryptionModeFunc mocks the GetDramEncryptionMode method. - GetDramEncryptionModeFunc func() (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) - - // GetDriverModelFunc mocks the GetDriverModel method. - GetDriverModelFunc func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) - - // GetDriverModel_v2Func mocks the GetDriverModel_v2 method. - GetDriverModel_v2Func func() (nvml.DriverModel, nvml.DriverModel, nvml.Return) - - // GetDynamicPstatesInfoFunc mocks the GetDynamicPstatesInfo method. - GetDynamicPstatesInfoFunc func() (nvml.GpuDynamicPstatesInfo, nvml.Return) - - // GetEccModeFunc mocks the GetEccMode method. - GetEccModeFunc func() (nvml.EnableState, nvml.EnableState, nvml.Return) - - // GetEncoderCapacityFunc mocks the GetEncoderCapacity method. - GetEncoderCapacityFunc func(encoderType nvml.EncoderType) (int, nvml.Return) - - // GetEncoderSessionsFunc mocks the GetEncoderSessions method. - GetEncoderSessionsFunc func() ([]nvml.EncoderSessionInfo, nvml.Return) - - // GetEncoderStatsFunc mocks the GetEncoderStats method. - GetEncoderStatsFunc func() (int, uint32, uint32, nvml.Return) - - // GetEncoderUtilizationFunc mocks the GetEncoderUtilization method. - GetEncoderUtilizationFunc func() (uint32, uint32, nvml.Return) - - // GetEnforcedPowerLimitFunc mocks the GetEnforcedPowerLimit method. - GetEnforcedPowerLimitFunc func() (uint32, nvml.Return) - - // GetFBCSessionsFunc mocks the GetFBCSessions method. - GetFBCSessionsFunc func() ([]nvml.FBCSessionInfo, nvml.Return) - - // GetFBCStatsFunc mocks the GetFBCStats method. - GetFBCStatsFunc func() (nvml.FBCStats, nvml.Return) - - // GetFanControlPolicy_v2Func mocks the GetFanControlPolicy_v2 method. - GetFanControlPolicy_v2Func func(n int) (nvml.FanControlPolicy, nvml.Return) - - // GetFanSpeedFunc mocks the GetFanSpeed method. - GetFanSpeedFunc func() (uint32, nvml.Return) - - // GetFanSpeedRPMFunc mocks the GetFanSpeedRPM method. - GetFanSpeedRPMFunc func() (nvml.FanSpeedInfo, nvml.Return) - - // GetFanSpeed_v2Func mocks the GetFanSpeed_v2 method. - GetFanSpeed_v2Func func(n int) (uint32, nvml.Return) - - // GetFieldValuesFunc mocks the GetFieldValues method. - GetFieldValuesFunc func(fieldValues []nvml.FieldValue) nvml.Return - - // GetGpcClkMinMaxVfOffsetFunc mocks the GetGpcClkMinMaxVfOffset method. - GetGpcClkMinMaxVfOffsetFunc func() (int, int, nvml.Return) - - // GetGpcClkVfOffsetFunc mocks the GetGpcClkVfOffset method. - GetGpcClkVfOffsetFunc func() (int, nvml.Return) - - // GetGpuFabricInfoFunc mocks the GetGpuFabricInfo method. - GetGpuFabricInfoFunc func() (nvml.GpuFabricInfo, nvml.Return) - - // GetGpuFabricInfoVFunc mocks the GetGpuFabricInfoV method. - GetGpuFabricInfoVFunc func() nvml.GpuFabricInfoHandler - - // GetGpuInstanceByIdFunc mocks the GetGpuInstanceById method. - GetGpuInstanceByIdFunc func(n int) (nvml.GpuInstance, nvml.Return) - - // GetGpuInstanceIdFunc mocks the GetGpuInstanceId method. - GetGpuInstanceIdFunc func() (int, nvml.Return) - - // GetGpuInstancePossiblePlacementsFunc mocks the GetGpuInstancePossiblePlacements method. - GetGpuInstancePossiblePlacementsFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) - - // GetGpuInstanceProfileInfoFunc mocks the GetGpuInstanceProfileInfo method. - GetGpuInstanceProfileInfoFunc func(n int) (nvml.GpuInstanceProfileInfo, nvml.Return) - - // GetGpuInstanceProfileInfoByIdVFunc mocks the GetGpuInstanceProfileInfoByIdV method. - GetGpuInstanceProfileInfoByIdVFunc func(n int) nvml.GpuInstanceProfileInfoByIdHandler - - // GetGpuInstanceProfileInfoVFunc mocks the GetGpuInstanceProfileInfoV method. - GetGpuInstanceProfileInfoVFunc func(n int) nvml.GpuInstanceProfileInfoHandler - - // GetGpuInstanceRemainingCapacityFunc mocks the GetGpuInstanceRemainingCapacity method. - GetGpuInstanceRemainingCapacityFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) - - // GetGpuInstancesFunc mocks the GetGpuInstances method. - GetGpuInstancesFunc func(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) - - // GetGpuMaxPcieLinkGenerationFunc mocks the GetGpuMaxPcieLinkGeneration method. - GetGpuMaxPcieLinkGenerationFunc func() (int, nvml.Return) - - // GetGpuOperationModeFunc mocks the GetGpuOperationMode method. - GetGpuOperationModeFunc func() (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) - - // GetGraphicsRunningProcessesFunc mocks the GetGraphicsRunningProcesses method. - GetGraphicsRunningProcessesFunc func() ([]nvml.ProcessInfo, nvml.Return) - - // GetGridLicensableFeaturesFunc mocks the GetGridLicensableFeatures method. - GetGridLicensableFeaturesFunc func() (nvml.GridLicensableFeatures, nvml.Return) - - // GetGspFirmwareModeFunc mocks the GetGspFirmwareMode method. - GetGspFirmwareModeFunc func() (bool, bool, nvml.Return) - - // GetGspFirmwareVersionFunc mocks the GetGspFirmwareVersion method. - GetGspFirmwareVersionFunc func() (string, nvml.Return) - - // GetHostVgpuModeFunc mocks the GetHostVgpuMode method. - GetHostVgpuModeFunc func() (nvml.HostVgpuMode, nvml.Return) - - // GetIndexFunc mocks the GetIndex method. - GetIndexFunc func() (int, nvml.Return) - - // GetInforomConfigurationChecksumFunc mocks the GetInforomConfigurationChecksum method. - GetInforomConfigurationChecksumFunc func() (uint32, nvml.Return) - - // GetInforomImageVersionFunc mocks the GetInforomImageVersion method. - GetInforomImageVersionFunc func() (string, nvml.Return) - - // GetInforomVersionFunc mocks the GetInforomVersion method. - GetInforomVersionFunc func(inforomObject nvml.InforomObject) (string, nvml.Return) - - // GetIrqNumFunc mocks the GetIrqNum method. - GetIrqNumFunc func() (int, nvml.Return) - - // GetJpgUtilizationFunc mocks the GetJpgUtilization method. - GetJpgUtilizationFunc func() (uint32, uint32, nvml.Return) - - // GetLastBBXFlushTimeFunc mocks the GetLastBBXFlushTime method. - GetLastBBXFlushTimeFunc func() (uint64, uint, nvml.Return) - - // GetMPSComputeRunningProcessesFunc mocks the GetMPSComputeRunningProcesses method. - GetMPSComputeRunningProcessesFunc func() ([]nvml.ProcessInfo, nvml.Return) - - // GetMarginTemperatureFunc mocks the GetMarginTemperature method. - GetMarginTemperatureFunc func() (nvml.MarginTemperature, nvml.Return) - - // GetMaxClockInfoFunc mocks the GetMaxClockInfo method. - GetMaxClockInfoFunc func(clockType nvml.ClockType) (uint32, nvml.Return) - - // GetMaxCustomerBoostClockFunc mocks the GetMaxCustomerBoostClock method. - GetMaxCustomerBoostClockFunc func(clockType nvml.ClockType) (uint32, nvml.Return) - - // GetMaxMigDeviceCountFunc mocks the GetMaxMigDeviceCount method. - GetMaxMigDeviceCountFunc func() (int, nvml.Return) - - // GetMaxPcieLinkGenerationFunc mocks the GetMaxPcieLinkGeneration method. - GetMaxPcieLinkGenerationFunc func() (int, nvml.Return) - - // GetMaxPcieLinkWidthFunc mocks the GetMaxPcieLinkWidth method. - GetMaxPcieLinkWidthFunc func() (int, nvml.Return) - - // GetMemClkMinMaxVfOffsetFunc mocks the GetMemClkMinMaxVfOffset method. - GetMemClkMinMaxVfOffsetFunc func() (int, int, nvml.Return) - - // GetMemClkVfOffsetFunc mocks the GetMemClkVfOffset method. - GetMemClkVfOffsetFunc func() (int, nvml.Return) - - // GetMemoryAffinityFunc mocks the GetMemoryAffinity method. - GetMemoryAffinityFunc func(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) - - // GetMemoryBusWidthFunc mocks the GetMemoryBusWidth method. - GetMemoryBusWidthFunc func() (uint32, nvml.Return) - - // GetMemoryErrorCounterFunc mocks the GetMemoryErrorCounter method. - GetMemoryErrorCounterFunc func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) - - // GetMemoryInfoFunc mocks the GetMemoryInfo method. - GetMemoryInfoFunc func() (nvml.Memory, nvml.Return) - - // GetMemoryInfo_v2Func mocks the GetMemoryInfo_v2 method. - GetMemoryInfo_v2Func func() (nvml.Memory_v2, nvml.Return) - - // GetMigDeviceHandleByIndexFunc mocks the GetMigDeviceHandleByIndex method. - GetMigDeviceHandleByIndexFunc func(n int) (nvml.Device, nvml.Return) - - // GetMigModeFunc mocks the GetMigMode method. - GetMigModeFunc func() (int, int, nvml.Return) - - // GetMinMaxClockOfPStateFunc mocks the GetMinMaxClockOfPState method. - GetMinMaxClockOfPStateFunc func(clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) - - // GetMinMaxFanSpeedFunc mocks the GetMinMaxFanSpeed method. - GetMinMaxFanSpeedFunc func() (int, int, nvml.Return) - - // GetMinorNumberFunc mocks the GetMinorNumber method. - GetMinorNumberFunc func() (int, nvml.Return) - - // GetModuleIdFunc mocks the GetModuleId method. - GetModuleIdFunc func() (int, nvml.Return) - - // GetMultiGpuBoardFunc mocks the GetMultiGpuBoard method. - GetMultiGpuBoardFunc func() (int, nvml.Return) - - // GetNameFunc mocks the GetName method. - GetNameFunc func() (string, nvml.Return) - - // GetNumFansFunc mocks the GetNumFans method. - GetNumFansFunc func() (int, nvml.Return) - - // GetNumGpuCoresFunc mocks the GetNumGpuCores method. - GetNumGpuCoresFunc func() (int, nvml.Return) - - // GetNumaNodeIdFunc mocks the GetNumaNodeId method. - GetNumaNodeIdFunc func() (int, nvml.Return) - - // GetNvLinkCapabilityFunc mocks the GetNvLinkCapability method. - GetNvLinkCapabilityFunc func(n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) - - // GetNvLinkErrorCounterFunc mocks the GetNvLinkErrorCounter method. - GetNvLinkErrorCounterFunc func(n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) - - // GetNvLinkInfoFunc mocks the GetNvLinkInfo method. - GetNvLinkInfoFunc func() nvml.NvLinkInfoHandler - - // GetNvLinkRemoteDeviceTypeFunc mocks the GetNvLinkRemoteDeviceType method. - GetNvLinkRemoteDeviceTypeFunc func(n int) (nvml.IntNvLinkDeviceType, nvml.Return) - - // GetNvLinkRemotePciInfoFunc mocks the GetNvLinkRemotePciInfo method. - GetNvLinkRemotePciInfoFunc func(n int) (nvml.PciInfo, nvml.Return) - - // GetNvLinkStateFunc mocks the GetNvLinkState method. - GetNvLinkStateFunc func(n int) (nvml.EnableState, nvml.Return) - - // GetNvLinkUtilizationControlFunc mocks the GetNvLinkUtilizationControl method. - GetNvLinkUtilizationControlFunc func(n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) - - // GetNvLinkUtilizationCounterFunc mocks the GetNvLinkUtilizationCounter method. - GetNvLinkUtilizationCounterFunc func(n1 int, n2 int) (uint64, uint64, nvml.Return) - - // GetNvLinkVersionFunc mocks the GetNvLinkVersion method. - GetNvLinkVersionFunc func(n int) (uint32, nvml.Return) - - // GetNvlinkBwModeFunc mocks the GetNvlinkBwMode method. - GetNvlinkBwModeFunc func() (nvml.NvlinkGetBwMode, nvml.Return) - - // GetNvlinkSupportedBwModesFunc mocks the GetNvlinkSupportedBwModes method. - GetNvlinkSupportedBwModesFunc func() (nvml.NvlinkSupportedBwModes, nvml.Return) - - // GetOfaUtilizationFunc mocks the GetOfaUtilization method. - GetOfaUtilizationFunc func() (uint32, uint32, nvml.Return) - - // GetP2PStatusFunc mocks the GetP2PStatus method. - GetP2PStatusFunc func(device nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) - - // GetPciInfoFunc mocks the GetPciInfo method. - GetPciInfoFunc func() (nvml.PciInfo, nvml.Return) - - // GetPciInfoExtFunc mocks the GetPciInfoExt method. - GetPciInfoExtFunc func() (nvml.PciInfoExt, nvml.Return) - - // GetPcieLinkMaxSpeedFunc mocks the GetPcieLinkMaxSpeed method. - GetPcieLinkMaxSpeedFunc func() (uint32, nvml.Return) - - // GetPcieReplayCounterFunc mocks the GetPcieReplayCounter method. - GetPcieReplayCounterFunc func() (int, nvml.Return) - - // GetPcieSpeedFunc mocks the GetPcieSpeed method. - GetPcieSpeedFunc func() (int, nvml.Return) - - // GetPcieThroughputFunc mocks the GetPcieThroughput method. - GetPcieThroughputFunc func(pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) - - // GetPdiFunc mocks the GetPdi method. - GetPdiFunc func() (nvml.Pdi, nvml.Return) - - // GetPerformanceModesFunc mocks the GetPerformanceModes method. - GetPerformanceModesFunc func() (nvml.DevicePerfModes, nvml.Return) - - // GetPerformanceStateFunc mocks the GetPerformanceState method. - GetPerformanceStateFunc func() (nvml.Pstates, nvml.Return) - - // GetPersistenceModeFunc mocks the GetPersistenceMode method. - GetPersistenceModeFunc func() (nvml.EnableState, nvml.Return) - - // GetPgpuMetadataStringFunc mocks the GetPgpuMetadataString method. - GetPgpuMetadataStringFunc func() (string, nvml.Return) - - // GetPlatformInfoFunc mocks the GetPlatformInfo method. - GetPlatformInfoFunc func() (nvml.PlatformInfo, nvml.Return) - - // GetPowerManagementDefaultLimitFunc mocks the GetPowerManagementDefaultLimit method. - GetPowerManagementDefaultLimitFunc func() (uint32, nvml.Return) - - // GetPowerManagementLimitFunc mocks the GetPowerManagementLimit method. - GetPowerManagementLimitFunc func() (uint32, nvml.Return) - - // GetPowerManagementLimitConstraintsFunc mocks the GetPowerManagementLimitConstraints method. - GetPowerManagementLimitConstraintsFunc func() (uint32, uint32, nvml.Return) - - // GetPowerManagementModeFunc mocks the GetPowerManagementMode method. - GetPowerManagementModeFunc func() (nvml.EnableState, nvml.Return) - - // GetPowerMizerMode_v1Func mocks the GetPowerMizerMode_v1 method. - GetPowerMizerMode_v1Func func() (nvml.DevicePowerMizerModes_v1, nvml.Return) - - // GetPowerSourceFunc mocks the GetPowerSource method. - GetPowerSourceFunc func() (nvml.PowerSource, nvml.Return) - - // GetPowerStateFunc mocks the GetPowerState method. - GetPowerStateFunc func() (nvml.Pstates, nvml.Return) - - // GetPowerUsageFunc mocks the GetPowerUsage method. - GetPowerUsageFunc func() (uint32, nvml.Return) - - // GetProcessUtilizationFunc mocks the GetProcessUtilization method. - GetProcessUtilizationFunc func(v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) - - // GetProcessesUtilizationInfoFunc mocks the GetProcessesUtilizationInfo method. - GetProcessesUtilizationInfoFunc func() (nvml.ProcessesUtilizationInfo, nvml.Return) - - // GetRemappedRowsFunc mocks the GetRemappedRows method. - GetRemappedRowsFunc func() (int, int, bool, bool, nvml.Return) - - // GetRepairStatusFunc mocks the GetRepairStatus method. - GetRepairStatusFunc func() (nvml.RepairStatus, nvml.Return) - - // GetRetiredPagesFunc mocks the GetRetiredPages method. - GetRetiredPagesFunc func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) - - // GetRetiredPagesPendingStatusFunc mocks the GetRetiredPagesPendingStatus method. - GetRetiredPagesPendingStatusFunc func() (nvml.EnableState, nvml.Return) - - // GetRetiredPages_v2Func mocks the GetRetiredPages_v2 method. - GetRetiredPages_v2Func func(pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) - - // GetRowRemapperHistogramFunc mocks the GetRowRemapperHistogram method. - GetRowRemapperHistogramFunc func() (nvml.RowRemapperHistogramValues, nvml.Return) - - // GetRunningProcessDetailListFunc mocks the GetRunningProcessDetailList method. - GetRunningProcessDetailListFunc func() (nvml.ProcessDetailList, nvml.Return) - - // GetSamplesFunc mocks the GetSamples method. - GetSamplesFunc func(samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) - - // GetSerialFunc mocks the GetSerial method. - GetSerialFunc func() (string, nvml.Return) - - // GetSramEccErrorStatusFunc mocks the GetSramEccErrorStatus method. - GetSramEccErrorStatusFunc func() (nvml.EccSramErrorStatus, nvml.Return) - - // GetSramUniqueUncorrectedEccErrorCountsFunc mocks the GetSramUniqueUncorrectedEccErrorCounts method. - GetSramUniqueUncorrectedEccErrorCountsFunc func(eccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts) nvml.Return - - // GetSupportedClocksEventReasonsFunc mocks the GetSupportedClocksEventReasons method. - GetSupportedClocksEventReasonsFunc func() (uint64, nvml.Return) - - // GetSupportedClocksThrottleReasonsFunc mocks the GetSupportedClocksThrottleReasons method. - GetSupportedClocksThrottleReasonsFunc func() (uint64, nvml.Return) - - // GetSupportedEventTypesFunc mocks the GetSupportedEventTypes method. - GetSupportedEventTypesFunc func() (uint64, nvml.Return) - - // GetSupportedGraphicsClocksFunc mocks the GetSupportedGraphicsClocks method. - GetSupportedGraphicsClocksFunc func(n int) (int, uint32, nvml.Return) - - // GetSupportedMemoryClocksFunc mocks the GetSupportedMemoryClocks method. - GetSupportedMemoryClocksFunc func() (int, uint32, nvml.Return) - - // GetSupportedPerformanceStatesFunc mocks the GetSupportedPerformanceStates method. - GetSupportedPerformanceStatesFunc func() ([]nvml.Pstates, nvml.Return) - - // GetSupportedVgpusFunc mocks the GetSupportedVgpus method. - GetSupportedVgpusFunc func() ([]nvml.VgpuTypeId, nvml.Return) - - // GetTargetFanSpeedFunc mocks the GetTargetFanSpeed method. - GetTargetFanSpeedFunc func(n int) (int, nvml.Return) - - // GetTemperatureFunc mocks the GetTemperature method. - GetTemperatureFunc func(temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) - - // GetTemperatureThresholdFunc mocks the GetTemperatureThreshold method. - GetTemperatureThresholdFunc func(temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) - - // GetTemperatureVFunc mocks the GetTemperatureV method. - GetTemperatureVFunc func() nvml.TemperatureHandler - - // GetThermalSettingsFunc mocks the GetThermalSettings method. - GetThermalSettingsFunc func(v uint32) (nvml.GpuThermalSettings, nvml.Return) - - // GetTopologyCommonAncestorFunc mocks the GetTopologyCommonAncestor method. - GetTopologyCommonAncestorFunc func(device nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) - - // GetTopologyNearestGpusFunc mocks the GetTopologyNearestGpus method. - GetTopologyNearestGpusFunc func(gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) - - // GetTotalEccErrorsFunc mocks the GetTotalEccErrors method. - GetTotalEccErrorsFunc func(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) - - // GetTotalEnergyConsumptionFunc mocks the GetTotalEnergyConsumption method. - GetTotalEnergyConsumptionFunc func() (uint64, nvml.Return) - - // GetUUIDFunc mocks the GetUUID method. - GetUUIDFunc func() (string, nvml.Return) - - // GetUtilizationRatesFunc mocks the GetUtilizationRates method. - GetUtilizationRatesFunc func() (nvml.Utilization, nvml.Return) - - // GetVbiosVersionFunc mocks the GetVbiosVersion method. - GetVbiosVersionFunc func() (string, nvml.Return) - - // GetVgpuCapabilitiesFunc mocks the GetVgpuCapabilities method. - GetVgpuCapabilitiesFunc func(deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) - - // GetVgpuHeterogeneousModeFunc mocks the GetVgpuHeterogeneousMode method. - GetVgpuHeterogeneousModeFunc func() (nvml.VgpuHeterogeneousMode, nvml.Return) - - // GetVgpuInstancesUtilizationInfoFunc mocks the GetVgpuInstancesUtilizationInfo method. - GetVgpuInstancesUtilizationInfoFunc func() (nvml.VgpuInstancesUtilizationInfo, nvml.Return) - - // GetVgpuMetadataFunc mocks the GetVgpuMetadata method. - GetVgpuMetadataFunc func() (nvml.VgpuPgpuMetadata, nvml.Return) - - // GetVgpuProcessUtilizationFunc mocks the GetVgpuProcessUtilization method. - GetVgpuProcessUtilizationFunc func(v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) - - // GetVgpuProcessesUtilizationInfoFunc mocks the GetVgpuProcessesUtilizationInfo method. - GetVgpuProcessesUtilizationInfoFunc func() (nvml.VgpuProcessesUtilizationInfo, nvml.Return) - - // GetVgpuSchedulerCapabilitiesFunc mocks the GetVgpuSchedulerCapabilities method. - GetVgpuSchedulerCapabilitiesFunc func() (nvml.VgpuSchedulerCapabilities, nvml.Return) - - // GetVgpuSchedulerLogFunc mocks the GetVgpuSchedulerLog method. - GetVgpuSchedulerLogFunc func() (nvml.VgpuSchedulerLog, nvml.Return) - - // GetVgpuSchedulerStateFunc mocks the GetVgpuSchedulerState method. - GetVgpuSchedulerStateFunc func() (nvml.VgpuSchedulerGetState, nvml.Return) - - // GetVgpuTypeCreatablePlacementsFunc mocks the GetVgpuTypeCreatablePlacements method. - GetVgpuTypeCreatablePlacementsFunc func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) - - // GetVgpuTypeSupportedPlacementsFunc mocks the GetVgpuTypeSupportedPlacements method. - GetVgpuTypeSupportedPlacementsFunc func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) - - // GetVgpuUtilizationFunc mocks the GetVgpuUtilization method. - GetVgpuUtilizationFunc func(v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) - - // GetViolationStatusFunc mocks the GetViolationStatus method. - GetViolationStatusFunc func(perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) - - // GetVirtualizationModeFunc mocks the GetVirtualizationMode method. - GetVirtualizationModeFunc func() (nvml.GpuVirtualizationMode, nvml.Return) - - // GpmMigSampleGetFunc mocks the GpmMigSampleGet method. - GpmMigSampleGetFunc func(n int, gpmSample nvml.GpmSample) nvml.Return - - // GpmQueryDeviceSupportFunc mocks the GpmQueryDeviceSupport method. - GpmQueryDeviceSupportFunc func() (nvml.GpmSupport, nvml.Return) - - // GpmQueryDeviceSupportVFunc mocks the GpmQueryDeviceSupportV method. - GpmQueryDeviceSupportVFunc func() nvml.GpmSupportV - - // GpmQueryIfStreamingEnabledFunc mocks the GpmQueryIfStreamingEnabled method. - GpmQueryIfStreamingEnabledFunc func() (uint32, nvml.Return) - - // GpmSampleGetFunc mocks the GpmSampleGet method. - GpmSampleGetFunc func(gpmSample nvml.GpmSample) nvml.Return - - // GpmSetStreamingEnabledFunc mocks the GpmSetStreamingEnabled method. - GpmSetStreamingEnabledFunc func(v uint32) nvml.Return - - // IsMigDeviceHandleFunc mocks the IsMigDeviceHandle method. - IsMigDeviceHandleFunc func() (bool, nvml.Return) - - // OnSameBoardFunc mocks the OnSameBoard method. - OnSameBoardFunc func(device nvml.Device) (int, nvml.Return) - - // PowerSmoothingActivatePresetProfileFunc mocks the PowerSmoothingActivatePresetProfile method. - PowerSmoothingActivatePresetProfileFunc func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return - - // PowerSmoothingSetStateFunc mocks the PowerSmoothingSetState method. - PowerSmoothingSetStateFunc func(powerSmoothingState *nvml.PowerSmoothingState) nvml.Return - - // PowerSmoothingUpdatePresetProfileParamFunc mocks the PowerSmoothingUpdatePresetProfileParam method. - PowerSmoothingUpdatePresetProfileParamFunc func(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return - - // ReadWritePRM_v1Func mocks the ReadWritePRM_v1 method. - ReadWritePRM_v1Func func(pRMTLV_v1 *nvml.PRMTLV_v1) nvml.Return - - // RegisterEventsFunc mocks the RegisterEvents method. - RegisterEventsFunc func(v uint64, eventSet nvml.EventSet) nvml.Return - - // ResetApplicationsClocksFunc mocks the ResetApplicationsClocks method. - ResetApplicationsClocksFunc func() nvml.Return - - // ResetGpuLockedClocksFunc mocks the ResetGpuLockedClocks method. - ResetGpuLockedClocksFunc func() nvml.Return - - // ResetMemoryLockedClocksFunc mocks the ResetMemoryLockedClocks method. - ResetMemoryLockedClocksFunc func() nvml.Return - - // ResetNvLinkErrorCountersFunc mocks the ResetNvLinkErrorCounters method. - ResetNvLinkErrorCountersFunc func(n int) nvml.Return - - // ResetNvLinkUtilizationCounterFunc mocks the ResetNvLinkUtilizationCounter method. - ResetNvLinkUtilizationCounterFunc func(n1 int, n2 int) nvml.Return - - // SetAPIRestrictionFunc mocks the SetAPIRestriction method. - SetAPIRestrictionFunc func(restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return - - // SetAccountingModeFunc mocks the SetAccountingMode method. - SetAccountingModeFunc func(enableState nvml.EnableState) nvml.Return - - // SetApplicationsClocksFunc mocks the SetApplicationsClocks method. - SetApplicationsClocksFunc func(v1 uint32, v2 uint32) nvml.Return - - // SetAutoBoostedClocksEnabledFunc mocks the SetAutoBoostedClocksEnabled method. - SetAutoBoostedClocksEnabledFunc func(enableState nvml.EnableState) nvml.Return - - // SetClockOffsetsFunc mocks the SetClockOffsets method. - SetClockOffsetsFunc func(clockOffset nvml.ClockOffset) nvml.Return - - // SetComputeModeFunc mocks the SetComputeMode method. - SetComputeModeFunc func(computeMode nvml.ComputeMode) nvml.Return - - // SetConfComputeUnprotectedMemSizeFunc mocks the SetConfComputeUnprotectedMemSize method. - SetConfComputeUnprotectedMemSizeFunc func(v uint64) nvml.Return - - // SetCpuAffinityFunc mocks the SetCpuAffinity method. - SetCpuAffinityFunc func() nvml.Return - - // SetDefaultAutoBoostedClocksEnabledFunc mocks the SetDefaultAutoBoostedClocksEnabled method. - SetDefaultAutoBoostedClocksEnabledFunc func(enableState nvml.EnableState, v uint32) nvml.Return - - // SetDefaultFanSpeed_v2Func mocks the SetDefaultFanSpeed_v2 method. - SetDefaultFanSpeed_v2Func func(n int) nvml.Return - - // SetDramEncryptionModeFunc mocks the SetDramEncryptionMode method. - SetDramEncryptionModeFunc func(dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return - - // SetDriverModelFunc mocks the SetDriverModel method. - SetDriverModelFunc func(driverModel nvml.DriverModel, v uint32) nvml.Return - - // SetEccModeFunc mocks the SetEccMode method. - SetEccModeFunc func(enableState nvml.EnableState) nvml.Return - - // SetFanControlPolicyFunc mocks the SetFanControlPolicy method. - SetFanControlPolicyFunc func(n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return - - // SetFanSpeed_v2Func mocks the SetFanSpeed_v2 method. - SetFanSpeed_v2Func func(n1 int, n2 int) nvml.Return - - // SetGpcClkVfOffsetFunc mocks the SetGpcClkVfOffset method. - SetGpcClkVfOffsetFunc func(n int) nvml.Return - - // SetGpuLockedClocksFunc mocks the SetGpuLockedClocks method. - SetGpuLockedClocksFunc func(v1 uint32, v2 uint32) nvml.Return - - // SetGpuOperationModeFunc mocks the SetGpuOperationMode method. - SetGpuOperationModeFunc func(gpuOperationMode nvml.GpuOperationMode) nvml.Return - - // SetMemClkVfOffsetFunc mocks the SetMemClkVfOffset method. - SetMemClkVfOffsetFunc func(n int) nvml.Return - - // SetMemoryLockedClocksFunc mocks the SetMemoryLockedClocks method. - SetMemoryLockedClocksFunc func(v1 uint32, v2 uint32) nvml.Return - - // SetMigModeFunc mocks the SetMigMode method. - SetMigModeFunc func(n int) (nvml.Return, nvml.Return) - - // SetNvLinkDeviceLowPowerThresholdFunc mocks the SetNvLinkDeviceLowPowerThreshold method. - SetNvLinkDeviceLowPowerThresholdFunc func(nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return - - // SetNvLinkUtilizationControlFunc mocks the SetNvLinkUtilizationControl method. - SetNvLinkUtilizationControlFunc func(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return - - // SetNvlinkBwModeFunc mocks the SetNvlinkBwMode method. - SetNvlinkBwModeFunc func(nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return - - // SetPersistenceModeFunc mocks the SetPersistenceMode method. - SetPersistenceModeFunc func(enableState nvml.EnableState) nvml.Return - - // SetPowerManagementLimitFunc mocks the SetPowerManagementLimit method. - SetPowerManagementLimitFunc func(v uint32) nvml.Return - - // SetPowerManagementLimit_v2Func mocks the SetPowerManagementLimit_v2 method. - SetPowerManagementLimit_v2Func func(powerValue_v2 *nvml.PowerValue_v2) nvml.Return - - // SetTemperatureThresholdFunc mocks the SetTemperatureThreshold method. - SetTemperatureThresholdFunc func(temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return - - // SetVgpuCapabilitiesFunc mocks the SetVgpuCapabilities method. - SetVgpuCapabilitiesFunc func(deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return - - // SetVgpuHeterogeneousModeFunc mocks the SetVgpuHeterogeneousMode method. - SetVgpuHeterogeneousModeFunc func(vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return - - // SetVgpuSchedulerStateFunc mocks the SetVgpuSchedulerState method. - SetVgpuSchedulerStateFunc func(vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return - - // SetVirtualizationModeFunc mocks the SetVirtualizationMode method. - SetVirtualizationModeFunc func(gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return - - // ValidateInforomFunc mocks the ValidateInforom method. - ValidateInforomFunc func() nvml.Return - - // VgpuTypeGetMaxInstancesFunc mocks the VgpuTypeGetMaxInstances method. - VgpuTypeGetMaxInstancesFunc func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) - - // WorkloadPowerProfileClearRequestedProfilesFunc mocks the WorkloadPowerProfileClearRequestedProfiles method. - WorkloadPowerProfileClearRequestedProfilesFunc func(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return - - // WorkloadPowerProfileGetCurrentProfilesFunc mocks the WorkloadPowerProfileGetCurrentProfiles method. - WorkloadPowerProfileGetCurrentProfilesFunc func() (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) - - // WorkloadPowerProfileGetProfilesInfoFunc mocks the WorkloadPowerProfileGetProfilesInfo method. - WorkloadPowerProfileGetProfilesInfoFunc func() (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) - - // WorkloadPowerProfileSetRequestedProfilesFunc mocks the WorkloadPowerProfileSetRequestedProfiles method. - WorkloadPowerProfileSetRequestedProfilesFunc func(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return - - // calls tracks calls to the methods. - calls struct { - // ClearAccountingPids holds details about calls to the ClearAccountingPids method. - ClearAccountingPids []struct { - } - // ClearCpuAffinity holds details about calls to the ClearCpuAffinity method. - ClearCpuAffinity []struct { - } - // ClearEccErrorCounts holds details about calls to the ClearEccErrorCounts method. - ClearEccErrorCounts []struct { - // EccCounterType is the eccCounterType argument value. - EccCounterType nvml.EccCounterType - } - // ClearFieldValues holds details about calls to the ClearFieldValues method. - ClearFieldValues []struct { - // FieldValues is the fieldValues argument value. - FieldValues []nvml.FieldValue - } - // CreateGpuInstance holds details about calls to the CreateGpuInstance method. - CreateGpuInstance []struct { - // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - // CreateGpuInstanceWithPlacement holds details about calls to the CreateGpuInstanceWithPlacement method. - CreateGpuInstanceWithPlacement []struct { - // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - // GpuInstancePlacement is the gpuInstancePlacement argument value. - GpuInstancePlacement *nvml.GpuInstancePlacement - } - // FreezeNvLinkUtilizationCounter holds details about calls to the FreezeNvLinkUtilizationCounter method. - FreezeNvLinkUtilizationCounter []struct { - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // GetAPIRestriction holds details about calls to the GetAPIRestriction method. - GetAPIRestriction []struct { - // RestrictedAPI is the restrictedAPI argument value. - RestrictedAPI nvml.RestrictedAPI - } - // GetAccountingBufferSize holds details about calls to the GetAccountingBufferSize method. - GetAccountingBufferSize []struct { - } - // GetAccountingMode holds details about calls to the GetAccountingMode method. - GetAccountingMode []struct { - } - // GetAccountingPids holds details about calls to the GetAccountingPids method. - GetAccountingPids []struct { - } - // GetAccountingStats holds details about calls to the GetAccountingStats method. - GetAccountingStats []struct { - // V is the v argument value. - V uint32 - } - // GetActiveVgpus holds details about calls to the GetActiveVgpus method. - GetActiveVgpus []struct { - } - // GetAdaptiveClockInfoStatus holds details about calls to the GetAdaptiveClockInfoStatus method. - GetAdaptiveClockInfoStatus []struct { - } - // GetAddressingMode holds details about calls to the GetAddressingMode method. - GetAddressingMode []struct { - } - // GetApplicationsClock holds details about calls to the GetApplicationsClock method. - GetApplicationsClock []struct { - // ClockType is the clockType argument value. - ClockType nvml.ClockType - } - // GetArchitecture holds details about calls to the GetArchitecture method. - GetArchitecture []struct { - } - // GetAttributes holds details about calls to the GetAttributes method. - GetAttributes []struct { - } - // GetAutoBoostedClocksEnabled holds details about calls to the GetAutoBoostedClocksEnabled method. - GetAutoBoostedClocksEnabled []struct { - } - // GetBAR1MemoryInfo holds details about calls to the GetBAR1MemoryInfo method. - GetBAR1MemoryInfo []struct { - } - // GetBoardId holds details about calls to the GetBoardId method. - GetBoardId []struct { - } - // GetBoardPartNumber holds details about calls to the GetBoardPartNumber method. - GetBoardPartNumber []struct { - } - // GetBrand holds details about calls to the GetBrand method. - GetBrand []struct { - } - // GetBridgeChipInfo holds details about calls to the GetBridgeChipInfo method. - GetBridgeChipInfo []struct { - } - // GetBusType holds details about calls to the GetBusType method. - GetBusType []struct { - } - // GetC2cModeInfoV holds details about calls to the GetC2cModeInfoV method. - GetC2cModeInfoV []struct { - } - // GetCapabilities holds details about calls to the GetCapabilities method. - GetCapabilities []struct { - } - // GetClkMonStatus holds details about calls to the GetClkMonStatus method. - GetClkMonStatus []struct { - } - // GetClock holds details about calls to the GetClock method. - GetClock []struct { - // ClockType is the clockType argument value. - ClockType nvml.ClockType - // ClockId is the clockId argument value. - ClockId nvml.ClockId - } - // GetClockInfo holds details about calls to the GetClockInfo method. - GetClockInfo []struct { - // ClockType is the clockType argument value. - ClockType nvml.ClockType - } - // GetClockOffsets holds details about calls to the GetClockOffsets method. - GetClockOffsets []struct { - } - // GetComputeInstanceId holds details about calls to the GetComputeInstanceId method. - GetComputeInstanceId []struct { - } - // GetComputeMode holds details about calls to the GetComputeMode method. - GetComputeMode []struct { - } - // GetComputeRunningProcesses holds details about calls to the GetComputeRunningProcesses method. - GetComputeRunningProcesses []struct { - } - // GetConfComputeGpuAttestationReport holds details about calls to the GetConfComputeGpuAttestationReport method. - GetConfComputeGpuAttestationReport []struct { - // ConfComputeGpuAttestationReport is the confComputeGpuAttestationReport argument value. - ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport - } - // GetConfComputeGpuCertificate holds details about calls to the GetConfComputeGpuCertificate method. - GetConfComputeGpuCertificate []struct { - } - // GetConfComputeMemSizeInfo holds details about calls to the GetConfComputeMemSizeInfo method. - GetConfComputeMemSizeInfo []struct { - } - // GetConfComputeProtectedMemoryUsage holds details about calls to the GetConfComputeProtectedMemoryUsage method. - GetConfComputeProtectedMemoryUsage []struct { - } - // GetCoolerInfo holds details about calls to the GetCoolerInfo method. - GetCoolerInfo []struct { - } - // GetCpuAffinity holds details about calls to the GetCpuAffinity method. - GetCpuAffinity []struct { - // N is the n argument value. - N int - } - // GetCpuAffinityWithinScope holds details about calls to the GetCpuAffinityWithinScope method. - GetCpuAffinityWithinScope []struct { - // N is the n argument value. - N int - // AffinityScope is the affinityScope argument value. - AffinityScope nvml.AffinityScope - } - // GetCreatableVgpus holds details about calls to the GetCreatableVgpus method. - GetCreatableVgpus []struct { - } - // GetCudaComputeCapability holds details about calls to the GetCudaComputeCapability method. - GetCudaComputeCapability []struct { - } - // GetCurrPcieLinkGeneration holds details about calls to the GetCurrPcieLinkGeneration method. - GetCurrPcieLinkGeneration []struct { - } - // GetCurrPcieLinkWidth holds details about calls to the GetCurrPcieLinkWidth method. - GetCurrPcieLinkWidth []struct { - } - // GetCurrentClockFreqs holds details about calls to the GetCurrentClockFreqs method. - GetCurrentClockFreqs []struct { - } - // GetCurrentClocksEventReasons holds details about calls to the GetCurrentClocksEventReasons method. - GetCurrentClocksEventReasons []struct { - } - // GetCurrentClocksThrottleReasons holds details about calls to the GetCurrentClocksThrottleReasons method. - GetCurrentClocksThrottleReasons []struct { - } - // GetDecoderUtilization holds details about calls to the GetDecoderUtilization method. - GetDecoderUtilization []struct { - } - // GetDefaultApplicationsClock holds details about calls to the GetDefaultApplicationsClock method. - GetDefaultApplicationsClock []struct { - // ClockType is the clockType argument value. - ClockType nvml.ClockType - } - // GetDefaultEccMode holds details about calls to the GetDefaultEccMode method. - GetDefaultEccMode []struct { - } - // GetDetailedEccErrors holds details about calls to the GetDetailedEccErrors method. - GetDetailedEccErrors []struct { - // MemoryErrorType is the memoryErrorType argument value. - MemoryErrorType nvml.MemoryErrorType - // EccCounterType is the eccCounterType argument value. - EccCounterType nvml.EccCounterType - } - // GetDeviceHandleFromMigDeviceHandle holds details about calls to the GetDeviceHandleFromMigDeviceHandle method. - GetDeviceHandleFromMigDeviceHandle []struct { - } - // GetDisplayActive holds details about calls to the GetDisplayActive method. - GetDisplayActive []struct { - } - // GetDisplayMode holds details about calls to the GetDisplayMode method. - GetDisplayMode []struct { - } - // GetDramEncryptionMode holds details about calls to the GetDramEncryptionMode method. - GetDramEncryptionMode []struct { - } - // GetDriverModel holds details about calls to the GetDriverModel method. - GetDriverModel []struct { - } - // GetDriverModel_v2 holds details about calls to the GetDriverModel_v2 method. - GetDriverModel_v2 []struct { - } - // GetDynamicPstatesInfo holds details about calls to the GetDynamicPstatesInfo method. - GetDynamicPstatesInfo []struct { - } - // GetEccMode holds details about calls to the GetEccMode method. - GetEccMode []struct { - } - // GetEncoderCapacity holds details about calls to the GetEncoderCapacity method. - GetEncoderCapacity []struct { - // EncoderType is the encoderType argument value. - EncoderType nvml.EncoderType - } - // GetEncoderSessions holds details about calls to the GetEncoderSessions method. - GetEncoderSessions []struct { - } - // GetEncoderStats holds details about calls to the GetEncoderStats method. - GetEncoderStats []struct { - } - // GetEncoderUtilization holds details about calls to the GetEncoderUtilization method. - GetEncoderUtilization []struct { - } - // GetEnforcedPowerLimit holds details about calls to the GetEnforcedPowerLimit method. - GetEnforcedPowerLimit []struct { - } - // GetFBCSessions holds details about calls to the GetFBCSessions method. - GetFBCSessions []struct { - } - // GetFBCStats holds details about calls to the GetFBCStats method. - GetFBCStats []struct { - } - // GetFanControlPolicy_v2 holds details about calls to the GetFanControlPolicy_v2 method. - GetFanControlPolicy_v2 []struct { - // N is the n argument value. - N int - } - // GetFanSpeed holds details about calls to the GetFanSpeed method. - GetFanSpeed []struct { - } - // GetFanSpeedRPM holds details about calls to the GetFanSpeedRPM method. - GetFanSpeedRPM []struct { - } - // GetFanSpeed_v2 holds details about calls to the GetFanSpeed_v2 method. - GetFanSpeed_v2 []struct { - // N is the n argument value. - N int - } - // GetFieldValues holds details about calls to the GetFieldValues method. - GetFieldValues []struct { - // FieldValues is the fieldValues argument value. - FieldValues []nvml.FieldValue - } - // GetGpcClkMinMaxVfOffset holds details about calls to the GetGpcClkMinMaxVfOffset method. - GetGpcClkMinMaxVfOffset []struct { - } - // GetGpcClkVfOffset holds details about calls to the GetGpcClkVfOffset method. - GetGpcClkVfOffset []struct { - } - // GetGpuFabricInfo holds details about calls to the GetGpuFabricInfo method. - GetGpuFabricInfo []struct { - } - // GetGpuFabricInfoV holds details about calls to the GetGpuFabricInfoV method. - GetGpuFabricInfoV []struct { - } - // GetGpuInstanceById holds details about calls to the GetGpuInstanceById method. - GetGpuInstanceById []struct { - // N is the n argument value. - N int - } - // GetGpuInstanceId holds details about calls to the GetGpuInstanceId method. - GetGpuInstanceId []struct { - } - // GetGpuInstancePossiblePlacements holds details about calls to the GetGpuInstancePossiblePlacements method. - GetGpuInstancePossiblePlacements []struct { - // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - // GetGpuInstanceProfileInfo holds details about calls to the GetGpuInstanceProfileInfo method. - GetGpuInstanceProfileInfo []struct { - // N is the n argument value. - N int - } - // GetGpuInstanceProfileInfoByIdV holds details about calls to the GetGpuInstanceProfileInfoByIdV method. - GetGpuInstanceProfileInfoByIdV []struct { - // N is the n argument value. - N int - } - // GetGpuInstanceProfileInfoV holds details about calls to the GetGpuInstanceProfileInfoV method. - GetGpuInstanceProfileInfoV []struct { - // N is the n argument value. - N int - } - // GetGpuInstanceRemainingCapacity holds details about calls to the GetGpuInstanceRemainingCapacity method. - GetGpuInstanceRemainingCapacity []struct { - // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - // GetGpuInstances holds details about calls to the GetGpuInstances method. - GetGpuInstances []struct { - // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - // GetGpuMaxPcieLinkGeneration holds details about calls to the GetGpuMaxPcieLinkGeneration method. - GetGpuMaxPcieLinkGeneration []struct { - } - // GetGpuOperationMode holds details about calls to the GetGpuOperationMode method. - GetGpuOperationMode []struct { - } - // GetGraphicsRunningProcesses holds details about calls to the GetGraphicsRunningProcesses method. - GetGraphicsRunningProcesses []struct { - } - // GetGridLicensableFeatures holds details about calls to the GetGridLicensableFeatures method. - GetGridLicensableFeatures []struct { - } - // GetGspFirmwareMode holds details about calls to the GetGspFirmwareMode method. - GetGspFirmwareMode []struct { - } - // GetGspFirmwareVersion holds details about calls to the GetGspFirmwareVersion method. - GetGspFirmwareVersion []struct { - } - // GetHostVgpuMode holds details about calls to the GetHostVgpuMode method. - GetHostVgpuMode []struct { - } - // GetIndex holds details about calls to the GetIndex method. - GetIndex []struct { - } - // GetInforomConfigurationChecksum holds details about calls to the GetInforomConfigurationChecksum method. - GetInforomConfigurationChecksum []struct { - } - // GetInforomImageVersion holds details about calls to the GetInforomImageVersion method. - GetInforomImageVersion []struct { - } - // GetInforomVersion holds details about calls to the GetInforomVersion method. - GetInforomVersion []struct { - // InforomObject is the inforomObject argument value. - InforomObject nvml.InforomObject - } - // GetIrqNum holds details about calls to the GetIrqNum method. - GetIrqNum []struct { - } - // GetJpgUtilization holds details about calls to the GetJpgUtilization method. - GetJpgUtilization []struct { - } - // GetLastBBXFlushTime holds details about calls to the GetLastBBXFlushTime method. - GetLastBBXFlushTime []struct { - } - // GetMPSComputeRunningProcesses holds details about calls to the GetMPSComputeRunningProcesses method. - GetMPSComputeRunningProcesses []struct { - } - // GetMarginTemperature holds details about calls to the GetMarginTemperature method. - GetMarginTemperature []struct { - } - // GetMaxClockInfo holds details about calls to the GetMaxClockInfo method. - GetMaxClockInfo []struct { - // ClockType is the clockType argument value. - ClockType nvml.ClockType - } - // GetMaxCustomerBoostClock holds details about calls to the GetMaxCustomerBoostClock method. - GetMaxCustomerBoostClock []struct { - // ClockType is the clockType argument value. - ClockType nvml.ClockType - } - // GetMaxMigDeviceCount holds details about calls to the GetMaxMigDeviceCount method. - GetMaxMigDeviceCount []struct { - } - // GetMaxPcieLinkGeneration holds details about calls to the GetMaxPcieLinkGeneration method. - GetMaxPcieLinkGeneration []struct { - } - // GetMaxPcieLinkWidth holds details about calls to the GetMaxPcieLinkWidth method. - GetMaxPcieLinkWidth []struct { - } - // GetMemClkMinMaxVfOffset holds details about calls to the GetMemClkMinMaxVfOffset method. - GetMemClkMinMaxVfOffset []struct { - } - // GetMemClkVfOffset holds details about calls to the GetMemClkVfOffset method. - GetMemClkVfOffset []struct { - } - // GetMemoryAffinity holds details about calls to the GetMemoryAffinity method. - GetMemoryAffinity []struct { - // N is the n argument value. - N int - // AffinityScope is the affinityScope argument value. - AffinityScope nvml.AffinityScope - } - // GetMemoryBusWidth holds details about calls to the GetMemoryBusWidth method. - GetMemoryBusWidth []struct { - } - // GetMemoryErrorCounter holds details about calls to the GetMemoryErrorCounter method. - GetMemoryErrorCounter []struct { - // MemoryErrorType is the memoryErrorType argument value. - MemoryErrorType nvml.MemoryErrorType - // EccCounterType is the eccCounterType argument value. - EccCounterType nvml.EccCounterType - // MemoryLocation is the memoryLocation argument value. - MemoryLocation nvml.MemoryLocation - } - // GetMemoryInfo holds details about calls to the GetMemoryInfo method. - GetMemoryInfo []struct { - } - // GetMemoryInfo_v2 holds details about calls to the GetMemoryInfo_v2 method. - GetMemoryInfo_v2 []struct { - } - // GetMigDeviceHandleByIndex holds details about calls to the GetMigDeviceHandleByIndex method. - GetMigDeviceHandleByIndex []struct { - // N is the n argument value. - N int - } - // GetMigMode holds details about calls to the GetMigMode method. - GetMigMode []struct { - } - // GetMinMaxClockOfPState holds details about calls to the GetMinMaxClockOfPState method. - GetMinMaxClockOfPState []struct { - // ClockType is the clockType argument value. - ClockType nvml.ClockType - // Pstates is the pstates argument value. - Pstates nvml.Pstates - } - // GetMinMaxFanSpeed holds details about calls to the GetMinMaxFanSpeed method. - GetMinMaxFanSpeed []struct { - } - // GetMinorNumber holds details about calls to the GetMinorNumber method. - GetMinorNumber []struct { - } - // GetModuleId holds details about calls to the GetModuleId method. - GetModuleId []struct { - } - // GetMultiGpuBoard holds details about calls to the GetMultiGpuBoard method. - GetMultiGpuBoard []struct { - } - // GetName holds details about calls to the GetName method. - GetName []struct { - } - // GetNumFans holds details about calls to the GetNumFans method. - GetNumFans []struct { - } - // GetNumGpuCores holds details about calls to the GetNumGpuCores method. - GetNumGpuCores []struct { - } - // GetNumaNodeId holds details about calls to the GetNumaNodeId method. - GetNumaNodeId []struct { - } - // GetNvLinkCapability holds details about calls to the GetNvLinkCapability method. - GetNvLinkCapability []struct { - // N is the n argument value. - N int - // NvLinkCapability is the nvLinkCapability argument value. - NvLinkCapability nvml.NvLinkCapability - } - // GetNvLinkErrorCounter holds details about calls to the GetNvLinkErrorCounter method. - GetNvLinkErrorCounter []struct { - // N is the n argument value. - N int - // NvLinkErrorCounter is the nvLinkErrorCounter argument value. - NvLinkErrorCounter nvml.NvLinkErrorCounter - } - // GetNvLinkInfo holds details about calls to the GetNvLinkInfo method. - GetNvLinkInfo []struct { - } - // GetNvLinkRemoteDeviceType holds details about calls to the GetNvLinkRemoteDeviceType method. - GetNvLinkRemoteDeviceType []struct { - // N is the n argument value. - N int - } - // GetNvLinkRemotePciInfo holds details about calls to the GetNvLinkRemotePciInfo method. - GetNvLinkRemotePciInfo []struct { - // N is the n argument value. - N int - } - // GetNvLinkState holds details about calls to the GetNvLinkState method. - GetNvLinkState []struct { - // N is the n argument value. - N int - } - // GetNvLinkUtilizationControl holds details about calls to the GetNvLinkUtilizationControl method. - GetNvLinkUtilizationControl []struct { - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - } - // GetNvLinkUtilizationCounter holds details about calls to the GetNvLinkUtilizationCounter method. - GetNvLinkUtilizationCounter []struct { - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - } - // GetNvLinkVersion holds details about calls to the GetNvLinkVersion method. - GetNvLinkVersion []struct { - // N is the n argument value. - N int - } - // GetNvlinkBwMode holds details about calls to the GetNvlinkBwMode method. - GetNvlinkBwMode []struct { - } - // GetNvlinkSupportedBwModes holds details about calls to the GetNvlinkSupportedBwModes method. - GetNvlinkSupportedBwModes []struct { - } - // GetOfaUtilization holds details about calls to the GetOfaUtilization method. - GetOfaUtilization []struct { - } - // GetP2PStatus holds details about calls to the GetP2PStatus method. - GetP2PStatus []struct { - // Device is the device argument value. - Device nvml.Device - // GpuP2PCapsIndex is the gpuP2PCapsIndex argument value. - GpuP2PCapsIndex nvml.GpuP2PCapsIndex - } - // GetPciInfo holds details about calls to the GetPciInfo method. - GetPciInfo []struct { - } - // GetPciInfoExt holds details about calls to the GetPciInfoExt method. - GetPciInfoExt []struct { - } - // GetPcieLinkMaxSpeed holds details about calls to the GetPcieLinkMaxSpeed method. - GetPcieLinkMaxSpeed []struct { - } - // GetPcieReplayCounter holds details about calls to the GetPcieReplayCounter method. - GetPcieReplayCounter []struct { - } - // GetPcieSpeed holds details about calls to the GetPcieSpeed method. - GetPcieSpeed []struct { - } - // GetPcieThroughput holds details about calls to the GetPcieThroughput method. - GetPcieThroughput []struct { - // PcieUtilCounter is the pcieUtilCounter argument value. - PcieUtilCounter nvml.PcieUtilCounter - } - // GetPdi holds details about calls to the GetPdi method. - GetPdi []struct { - } - // GetPerformanceModes holds details about calls to the GetPerformanceModes method. - GetPerformanceModes []struct { - } - // GetPerformanceState holds details about calls to the GetPerformanceState method. - GetPerformanceState []struct { - } - // GetPersistenceMode holds details about calls to the GetPersistenceMode method. - GetPersistenceMode []struct { - } - // GetPgpuMetadataString holds details about calls to the GetPgpuMetadataString method. - GetPgpuMetadataString []struct { - } - // GetPlatformInfo holds details about calls to the GetPlatformInfo method. - GetPlatformInfo []struct { - } - // GetPowerManagementDefaultLimit holds details about calls to the GetPowerManagementDefaultLimit method. - GetPowerManagementDefaultLimit []struct { - } - // GetPowerManagementLimit holds details about calls to the GetPowerManagementLimit method. - GetPowerManagementLimit []struct { - } - // GetPowerManagementLimitConstraints holds details about calls to the GetPowerManagementLimitConstraints method. - GetPowerManagementLimitConstraints []struct { - } - // GetPowerManagementMode holds details about calls to the GetPowerManagementMode method. - GetPowerManagementMode []struct { - } - // GetPowerMizerMode_v1 holds details about calls to the GetPowerMizerMode_v1 method. - GetPowerMizerMode_v1 []struct { - } - // GetPowerSource holds details about calls to the GetPowerSource method. - GetPowerSource []struct { - } - // GetPowerState holds details about calls to the GetPowerState method. - GetPowerState []struct { - } - // GetPowerUsage holds details about calls to the GetPowerUsage method. - GetPowerUsage []struct { - } - // GetProcessUtilization holds details about calls to the GetProcessUtilization method. - GetProcessUtilization []struct { - // V is the v argument value. - V uint64 - } - // GetProcessesUtilizationInfo holds details about calls to the GetProcessesUtilizationInfo method. - GetProcessesUtilizationInfo []struct { - } - // GetRemappedRows holds details about calls to the GetRemappedRows method. - GetRemappedRows []struct { - } - // GetRepairStatus holds details about calls to the GetRepairStatus method. - GetRepairStatus []struct { - } - // GetRetiredPages holds details about calls to the GetRetiredPages method. - GetRetiredPages []struct { - // PageRetirementCause is the pageRetirementCause argument value. - PageRetirementCause nvml.PageRetirementCause - } - // GetRetiredPagesPendingStatus holds details about calls to the GetRetiredPagesPendingStatus method. - GetRetiredPagesPendingStatus []struct { - } - // GetRetiredPages_v2 holds details about calls to the GetRetiredPages_v2 method. - GetRetiredPages_v2 []struct { - // PageRetirementCause is the pageRetirementCause argument value. - PageRetirementCause nvml.PageRetirementCause - } - // GetRowRemapperHistogram holds details about calls to the GetRowRemapperHistogram method. - GetRowRemapperHistogram []struct { - } - // GetRunningProcessDetailList holds details about calls to the GetRunningProcessDetailList method. - GetRunningProcessDetailList []struct { - } - // GetSamples holds details about calls to the GetSamples method. - GetSamples []struct { - // SamplingType is the samplingType argument value. - SamplingType nvml.SamplingType - // V is the v argument value. - V uint64 - } - // GetSerial holds details about calls to the GetSerial method. - GetSerial []struct { - } - // GetSramEccErrorStatus holds details about calls to the GetSramEccErrorStatus method. - GetSramEccErrorStatus []struct { - } - // GetSramUniqueUncorrectedEccErrorCounts holds details about calls to the GetSramUniqueUncorrectedEccErrorCounts method. - GetSramUniqueUncorrectedEccErrorCounts []struct { - // EccSramUniqueUncorrectedErrorCounts is the eccSramUniqueUncorrectedErrorCounts argument value. - EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts - } - // GetSupportedClocksEventReasons holds details about calls to the GetSupportedClocksEventReasons method. - GetSupportedClocksEventReasons []struct { - } - // GetSupportedClocksThrottleReasons holds details about calls to the GetSupportedClocksThrottleReasons method. - GetSupportedClocksThrottleReasons []struct { - } - // GetSupportedEventTypes holds details about calls to the GetSupportedEventTypes method. - GetSupportedEventTypes []struct { - } - // GetSupportedGraphicsClocks holds details about calls to the GetSupportedGraphicsClocks method. - GetSupportedGraphicsClocks []struct { - // N is the n argument value. - N int - } - // GetSupportedMemoryClocks holds details about calls to the GetSupportedMemoryClocks method. - GetSupportedMemoryClocks []struct { - } - // GetSupportedPerformanceStates holds details about calls to the GetSupportedPerformanceStates method. - GetSupportedPerformanceStates []struct { - } - // GetSupportedVgpus holds details about calls to the GetSupportedVgpus method. - GetSupportedVgpus []struct { - } - // GetTargetFanSpeed holds details about calls to the GetTargetFanSpeed method. - GetTargetFanSpeed []struct { - // N is the n argument value. - N int - } - // GetTemperature holds details about calls to the GetTemperature method. - GetTemperature []struct { - // TemperatureSensors is the temperatureSensors argument value. - TemperatureSensors nvml.TemperatureSensors - } - // GetTemperatureThreshold holds details about calls to the GetTemperatureThreshold method. - GetTemperatureThreshold []struct { - // TemperatureThresholds is the temperatureThresholds argument value. - TemperatureThresholds nvml.TemperatureThresholds - } - // GetTemperatureV holds details about calls to the GetTemperatureV method. - GetTemperatureV []struct { - } - // GetThermalSettings holds details about calls to the GetThermalSettings method. - GetThermalSettings []struct { - // V is the v argument value. - V uint32 - } - // GetTopologyCommonAncestor holds details about calls to the GetTopologyCommonAncestor method. - GetTopologyCommonAncestor []struct { - // Device is the device argument value. - Device nvml.Device - } - // GetTopologyNearestGpus holds details about calls to the GetTopologyNearestGpus method. - GetTopologyNearestGpus []struct { - // GpuTopologyLevel is the gpuTopologyLevel argument value. - GpuTopologyLevel nvml.GpuTopologyLevel - } - // GetTotalEccErrors holds details about calls to the GetTotalEccErrors method. - GetTotalEccErrors []struct { - // MemoryErrorType is the memoryErrorType argument value. - MemoryErrorType nvml.MemoryErrorType - // EccCounterType is the eccCounterType argument value. - EccCounterType nvml.EccCounterType - } - // GetTotalEnergyConsumption holds details about calls to the GetTotalEnergyConsumption method. - GetTotalEnergyConsumption []struct { - } - // GetUUID holds details about calls to the GetUUID method. - GetUUID []struct { - } - // GetUtilizationRates holds details about calls to the GetUtilizationRates method. - GetUtilizationRates []struct { - } - // GetVbiosVersion holds details about calls to the GetVbiosVersion method. - GetVbiosVersion []struct { - } - // GetVgpuCapabilities holds details about calls to the GetVgpuCapabilities method. - GetVgpuCapabilities []struct { - // DeviceVgpuCapability is the deviceVgpuCapability argument value. - DeviceVgpuCapability nvml.DeviceVgpuCapability - } - // GetVgpuHeterogeneousMode holds details about calls to the GetVgpuHeterogeneousMode method. - GetVgpuHeterogeneousMode []struct { - } - // GetVgpuInstancesUtilizationInfo holds details about calls to the GetVgpuInstancesUtilizationInfo method. - GetVgpuInstancesUtilizationInfo []struct { - } - // GetVgpuMetadata holds details about calls to the GetVgpuMetadata method. - GetVgpuMetadata []struct { - } - // GetVgpuProcessUtilization holds details about calls to the GetVgpuProcessUtilization method. - GetVgpuProcessUtilization []struct { - // V is the v argument value. - V uint64 - } - // GetVgpuProcessesUtilizationInfo holds details about calls to the GetVgpuProcessesUtilizationInfo method. - GetVgpuProcessesUtilizationInfo []struct { - } - // GetVgpuSchedulerCapabilities holds details about calls to the GetVgpuSchedulerCapabilities method. - GetVgpuSchedulerCapabilities []struct { - } - // GetVgpuSchedulerLog holds details about calls to the GetVgpuSchedulerLog method. - GetVgpuSchedulerLog []struct { - } - // GetVgpuSchedulerState holds details about calls to the GetVgpuSchedulerState method. - GetVgpuSchedulerState []struct { - } - // GetVgpuTypeCreatablePlacements holds details about calls to the GetVgpuTypeCreatablePlacements method. - GetVgpuTypeCreatablePlacements []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // GetVgpuTypeSupportedPlacements holds details about calls to the GetVgpuTypeSupportedPlacements method. - GetVgpuTypeSupportedPlacements []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // GetVgpuUtilization holds details about calls to the GetVgpuUtilization method. - GetVgpuUtilization []struct { - // V is the v argument value. - V uint64 - } - // GetViolationStatus holds details about calls to the GetViolationStatus method. - GetViolationStatus []struct { - // PerfPolicyType is the perfPolicyType argument value. - PerfPolicyType nvml.PerfPolicyType - } - // GetVirtualizationMode holds details about calls to the GetVirtualizationMode method. - GetVirtualizationMode []struct { - } - // GpmMigSampleGet holds details about calls to the GpmMigSampleGet method. - GpmMigSampleGet []struct { - // N is the n argument value. - N int - // GpmSample is the gpmSample argument value. - GpmSample nvml.GpmSample - } - // GpmQueryDeviceSupport holds details about calls to the GpmQueryDeviceSupport method. - GpmQueryDeviceSupport []struct { - } - // GpmQueryDeviceSupportV holds details about calls to the GpmQueryDeviceSupportV method. - GpmQueryDeviceSupportV []struct { - } - // GpmQueryIfStreamingEnabled holds details about calls to the GpmQueryIfStreamingEnabled method. - GpmQueryIfStreamingEnabled []struct { - } - // GpmSampleGet holds details about calls to the GpmSampleGet method. - GpmSampleGet []struct { - // GpmSample is the gpmSample argument value. - GpmSample nvml.GpmSample - } - // GpmSetStreamingEnabled holds details about calls to the GpmSetStreamingEnabled method. - GpmSetStreamingEnabled []struct { - // V is the v argument value. - V uint32 - } - // IsMigDeviceHandle holds details about calls to the IsMigDeviceHandle method. - IsMigDeviceHandle []struct { - } - // OnSameBoard holds details about calls to the OnSameBoard method. - OnSameBoard []struct { - // Device is the device argument value. - Device nvml.Device - } - // PowerSmoothingActivatePresetProfile holds details about calls to the PowerSmoothingActivatePresetProfile method. - PowerSmoothingActivatePresetProfile []struct { - // PowerSmoothingProfile is the powerSmoothingProfile argument value. - PowerSmoothingProfile *nvml.PowerSmoothingProfile - } - // PowerSmoothingSetState holds details about calls to the PowerSmoothingSetState method. - PowerSmoothingSetState []struct { - // PowerSmoothingState is the powerSmoothingState argument value. - PowerSmoothingState *nvml.PowerSmoothingState - } - // PowerSmoothingUpdatePresetProfileParam holds details about calls to the PowerSmoothingUpdatePresetProfileParam method. - PowerSmoothingUpdatePresetProfileParam []struct { - // PowerSmoothingProfile is the powerSmoothingProfile argument value. - PowerSmoothingProfile *nvml.PowerSmoothingProfile - } - // ReadWritePRM_v1 holds details about calls to the ReadWritePRM_v1 method. - ReadWritePRM_v1 []struct { - // PRMTLV_v1 is the pRMTLV_v1 argument value. - PRMTLV_v1 *nvml.PRMTLV_v1 - } - // RegisterEvents holds details about calls to the RegisterEvents method. - RegisterEvents []struct { - // V is the v argument value. - V uint64 - // EventSet is the eventSet argument value. - EventSet nvml.EventSet - } - // ResetApplicationsClocks holds details about calls to the ResetApplicationsClocks method. - ResetApplicationsClocks []struct { - } - // ResetGpuLockedClocks holds details about calls to the ResetGpuLockedClocks method. - ResetGpuLockedClocks []struct { - } - // ResetMemoryLockedClocks holds details about calls to the ResetMemoryLockedClocks method. - ResetMemoryLockedClocks []struct { - } - // ResetNvLinkErrorCounters holds details about calls to the ResetNvLinkErrorCounters method. - ResetNvLinkErrorCounters []struct { - // N is the n argument value. - N int - } - // ResetNvLinkUtilizationCounter holds details about calls to the ResetNvLinkUtilizationCounter method. - ResetNvLinkUtilizationCounter []struct { - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - } - // SetAPIRestriction holds details about calls to the SetAPIRestriction method. - SetAPIRestriction []struct { - // RestrictedAPI is the restrictedAPI argument value. - RestrictedAPI nvml.RestrictedAPI - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // SetAccountingMode holds details about calls to the SetAccountingMode method. - SetAccountingMode []struct { - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // SetApplicationsClocks holds details about calls to the SetApplicationsClocks method. - SetApplicationsClocks []struct { - // V1 is the v1 argument value. - V1 uint32 - // V2 is the v2 argument value. - V2 uint32 - } - // SetAutoBoostedClocksEnabled holds details about calls to the SetAutoBoostedClocksEnabled method. - SetAutoBoostedClocksEnabled []struct { - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // SetClockOffsets holds details about calls to the SetClockOffsets method. - SetClockOffsets []struct { - // ClockOffset is the clockOffset argument value. - ClockOffset nvml.ClockOffset - } - // SetComputeMode holds details about calls to the SetComputeMode method. - SetComputeMode []struct { - // ComputeMode is the computeMode argument value. - ComputeMode nvml.ComputeMode - } - // SetConfComputeUnprotectedMemSize holds details about calls to the SetConfComputeUnprotectedMemSize method. - SetConfComputeUnprotectedMemSize []struct { - // V is the v argument value. - V uint64 - } - // SetCpuAffinity holds details about calls to the SetCpuAffinity method. - SetCpuAffinity []struct { - } - // SetDefaultAutoBoostedClocksEnabled holds details about calls to the SetDefaultAutoBoostedClocksEnabled method. - SetDefaultAutoBoostedClocksEnabled []struct { - // EnableState is the enableState argument value. - EnableState nvml.EnableState - // V is the v argument value. - V uint32 - } - // SetDefaultFanSpeed_v2 holds details about calls to the SetDefaultFanSpeed_v2 method. - SetDefaultFanSpeed_v2 []struct { - // N is the n argument value. - N int - } - // SetDramEncryptionMode holds details about calls to the SetDramEncryptionMode method. - SetDramEncryptionMode []struct { - // DramEncryptionInfo is the dramEncryptionInfo argument value. - DramEncryptionInfo *nvml.DramEncryptionInfo - } - // SetDriverModel holds details about calls to the SetDriverModel method. - SetDriverModel []struct { - // DriverModel is the driverModel argument value. - DriverModel nvml.DriverModel - // V is the v argument value. - V uint32 - } - // SetEccMode holds details about calls to the SetEccMode method. - SetEccMode []struct { - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // SetFanControlPolicy holds details about calls to the SetFanControlPolicy method. - SetFanControlPolicy []struct { - // N is the n argument value. - N int - // FanControlPolicy is the fanControlPolicy argument value. - FanControlPolicy nvml.FanControlPolicy - } - // SetFanSpeed_v2 holds details about calls to the SetFanSpeed_v2 method. - SetFanSpeed_v2 []struct { - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - } - // SetGpcClkVfOffset holds details about calls to the SetGpcClkVfOffset method. - SetGpcClkVfOffset []struct { - // N is the n argument value. - N int - } - // SetGpuLockedClocks holds details about calls to the SetGpuLockedClocks method. - SetGpuLockedClocks []struct { - // V1 is the v1 argument value. - V1 uint32 - // V2 is the v2 argument value. - V2 uint32 - } - // SetGpuOperationMode holds details about calls to the SetGpuOperationMode method. - SetGpuOperationMode []struct { - // GpuOperationMode is the gpuOperationMode argument value. - GpuOperationMode nvml.GpuOperationMode - } - // SetMemClkVfOffset holds details about calls to the SetMemClkVfOffset method. - SetMemClkVfOffset []struct { - // N is the n argument value. - N int - } - // SetMemoryLockedClocks holds details about calls to the SetMemoryLockedClocks method. - SetMemoryLockedClocks []struct { - // V1 is the v1 argument value. - V1 uint32 - // V2 is the v2 argument value. - V2 uint32 - } - // SetMigMode holds details about calls to the SetMigMode method. - SetMigMode []struct { - // N is the n argument value. - N int - } - // SetNvLinkDeviceLowPowerThreshold holds details about calls to the SetNvLinkDeviceLowPowerThreshold method. - SetNvLinkDeviceLowPowerThreshold []struct { - // NvLinkPowerThres is the nvLinkPowerThres argument value. - NvLinkPowerThres *nvml.NvLinkPowerThres - } - // SetNvLinkUtilizationControl holds details about calls to the SetNvLinkUtilizationControl method. - SetNvLinkUtilizationControl []struct { - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - // NvLinkUtilizationControl is the nvLinkUtilizationControl argument value. - NvLinkUtilizationControl *nvml.NvLinkUtilizationControl - // B is the b argument value. - B bool - } - // SetNvlinkBwMode holds details about calls to the SetNvlinkBwMode method. - SetNvlinkBwMode []struct { - // NvlinkSetBwMode is the nvlinkSetBwMode argument value. - NvlinkSetBwMode *nvml.NvlinkSetBwMode - } - // SetPersistenceMode holds details about calls to the SetPersistenceMode method. - SetPersistenceMode []struct { - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // SetPowerManagementLimit holds details about calls to the SetPowerManagementLimit method. - SetPowerManagementLimit []struct { - // V is the v argument value. - V uint32 - } - // SetPowerManagementLimit_v2 holds details about calls to the SetPowerManagementLimit_v2 method. - SetPowerManagementLimit_v2 []struct { - // PowerValue_v2 is the powerValue_v2 argument value. - PowerValue_v2 *nvml.PowerValue_v2 - } - // SetTemperatureThreshold holds details about calls to the SetTemperatureThreshold method. - SetTemperatureThreshold []struct { - // TemperatureThresholds is the temperatureThresholds argument value. - TemperatureThresholds nvml.TemperatureThresholds - // N is the n argument value. - N int - } - // SetVgpuCapabilities holds details about calls to the SetVgpuCapabilities method. - SetVgpuCapabilities []struct { - // DeviceVgpuCapability is the deviceVgpuCapability argument value. - DeviceVgpuCapability nvml.DeviceVgpuCapability - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // SetVgpuHeterogeneousMode holds details about calls to the SetVgpuHeterogeneousMode method. - SetVgpuHeterogeneousMode []struct { - // VgpuHeterogeneousMode is the vgpuHeterogeneousMode argument value. - VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode - } - // SetVgpuSchedulerState holds details about calls to the SetVgpuSchedulerState method. - SetVgpuSchedulerState []struct { - // VgpuSchedulerSetState is the vgpuSchedulerSetState argument value. - VgpuSchedulerSetState *nvml.VgpuSchedulerSetState - } - // SetVirtualizationMode holds details about calls to the SetVirtualizationMode method. - SetVirtualizationMode []struct { - // GpuVirtualizationMode is the gpuVirtualizationMode argument value. - GpuVirtualizationMode nvml.GpuVirtualizationMode - } - // ValidateInforom holds details about calls to the ValidateInforom method. - ValidateInforom []struct { - } - // VgpuTypeGetMaxInstances holds details about calls to the VgpuTypeGetMaxInstances method. - VgpuTypeGetMaxInstances []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // WorkloadPowerProfileClearRequestedProfiles holds details about calls to the WorkloadPowerProfileClearRequestedProfiles method. - WorkloadPowerProfileClearRequestedProfiles []struct { - // WorkloadPowerProfileRequestedProfiles is the workloadPowerProfileRequestedProfiles argument value. - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles - } - // WorkloadPowerProfileGetCurrentProfiles holds details about calls to the WorkloadPowerProfileGetCurrentProfiles method. - WorkloadPowerProfileGetCurrentProfiles []struct { - } - // WorkloadPowerProfileGetProfilesInfo holds details about calls to the WorkloadPowerProfileGetProfilesInfo method. - WorkloadPowerProfileGetProfilesInfo []struct { - } - // WorkloadPowerProfileSetRequestedProfiles holds details about calls to the WorkloadPowerProfileSetRequestedProfiles method. - WorkloadPowerProfileSetRequestedProfiles []struct { - // WorkloadPowerProfileRequestedProfiles is the workloadPowerProfileRequestedProfiles argument value. - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles - } - } - lockClearAccountingPids sync.RWMutex - lockClearCpuAffinity sync.RWMutex - lockClearEccErrorCounts sync.RWMutex - lockClearFieldValues sync.RWMutex - lockCreateGpuInstance sync.RWMutex - lockCreateGpuInstanceWithPlacement sync.RWMutex - lockFreezeNvLinkUtilizationCounter sync.RWMutex - lockGetAPIRestriction sync.RWMutex - lockGetAccountingBufferSize sync.RWMutex - lockGetAccountingMode sync.RWMutex - lockGetAccountingPids sync.RWMutex - lockGetAccountingStats sync.RWMutex - lockGetActiveVgpus sync.RWMutex - lockGetAdaptiveClockInfoStatus sync.RWMutex - lockGetAddressingMode sync.RWMutex - lockGetApplicationsClock sync.RWMutex - lockGetArchitecture sync.RWMutex - lockGetAttributes sync.RWMutex - lockGetAutoBoostedClocksEnabled sync.RWMutex - lockGetBAR1MemoryInfo sync.RWMutex - lockGetBoardId sync.RWMutex - lockGetBoardPartNumber sync.RWMutex - lockGetBrand sync.RWMutex - lockGetBridgeChipInfo sync.RWMutex - lockGetBusType sync.RWMutex - lockGetC2cModeInfoV sync.RWMutex - lockGetCapabilities sync.RWMutex - lockGetClkMonStatus sync.RWMutex - lockGetClock sync.RWMutex - lockGetClockInfo sync.RWMutex - lockGetClockOffsets sync.RWMutex - lockGetComputeInstanceId sync.RWMutex - lockGetComputeMode sync.RWMutex - lockGetComputeRunningProcesses sync.RWMutex - lockGetConfComputeGpuAttestationReport sync.RWMutex - lockGetConfComputeGpuCertificate sync.RWMutex - lockGetConfComputeMemSizeInfo sync.RWMutex - lockGetConfComputeProtectedMemoryUsage sync.RWMutex - lockGetCoolerInfo sync.RWMutex - lockGetCpuAffinity sync.RWMutex - lockGetCpuAffinityWithinScope sync.RWMutex - lockGetCreatableVgpus sync.RWMutex - lockGetCudaComputeCapability sync.RWMutex - lockGetCurrPcieLinkGeneration sync.RWMutex - lockGetCurrPcieLinkWidth sync.RWMutex - lockGetCurrentClockFreqs sync.RWMutex - lockGetCurrentClocksEventReasons sync.RWMutex - lockGetCurrentClocksThrottleReasons sync.RWMutex - lockGetDecoderUtilization sync.RWMutex - lockGetDefaultApplicationsClock sync.RWMutex - lockGetDefaultEccMode sync.RWMutex - lockGetDetailedEccErrors sync.RWMutex - lockGetDeviceHandleFromMigDeviceHandle sync.RWMutex - lockGetDisplayActive sync.RWMutex - lockGetDisplayMode sync.RWMutex - lockGetDramEncryptionMode sync.RWMutex - lockGetDriverModel sync.RWMutex - lockGetDriverModel_v2 sync.RWMutex - lockGetDynamicPstatesInfo sync.RWMutex - lockGetEccMode sync.RWMutex - lockGetEncoderCapacity sync.RWMutex - lockGetEncoderSessions sync.RWMutex - lockGetEncoderStats sync.RWMutex - lockGetEncoderUtilization sync.RWMutex - lockGetEnforcedPowerLimit sync.RWMutex - lockGetFBCSessions sync.RWMutex - lockGetFBCStats sync.RWMutex - lockGetFanControlPolicy_v2 sync.RWMutex - lockGetFanSpeed sync.RWMutex - lockGetFanSpeedRPM sync.RWMutex - lockGetFanSpeed_v2 sync.RWMutex - lockGetFieldValues sync.RWMutex - lockGetGpcClkMinMaxVfOffset sync.RWMutex - lockGetGpcClkVfOffset sync.RWMutex - lockGetGpuFabricInfo sync.RWMutex - lockGetGpuFabricInfoV sync.RWMutex - lockGetGpuInstanceById sync.RWMutex - lockGetGpuInstanceId sync.RWMutex - lockGetGpuInstancePossiblePlacements sync.RWMutex - lockGetGpuInstanceProfileInfo sync.RWMutex - lockGetGpuInstanceProfileInfoByIdV sync.RWMutex - lockGetGpuInstanceProfileInfoV sync.RWMutex - lockGetGpuInstanceRemainingCapacity sync.RWMutex - lockGetGpuInstances sync.RWMutex - lockGetGpuMaxPcieLinkGeneration sync.RWMutex - lockGetGpuOperationMode sync.RWMutex - lockGetGraphicsRunningProcesses sync.RWMutex - lockGetGridLicensableFeatures sync.RWMutex - lockGetGspFirmwareMode sync.RWMutex - lockGetGspFirmwareVersion sync.RWMutex - lockGetHostVgpuMode sync.RWMutex - lockGetIndex sync.RWMutex - lockGetInforomConfigurationChecksum sync.RWMutex - lockGetInforomImageVersion sync.RWMutex - lockGetInforomVersion sync.RWMutex - lockGetIrqNum sync.RWMutex - lockGetJpgUtilization sync.RWMutex - lockGetLastBBXFlushTime sync.RWMutex - lockGetMPSComputeRunningProcesses sync.RWMutex - lockGetMarginTemperature sync.RWMutex - lockGetMaxClockInfo sync.RWMutex - lockGetMaxCustomerBoostClock sync.RWMutex - lockGetMaxMigDeviceCount sync.RWMutex - lockGetMaxPcieLinkGeneration sync.RWMutex - lockGetMaxPcieLinkWidth sync.RWMutex - lockGetMemClkMinMaxVfOffset sync.RWMutex - lockGetMemClkVfOffset sync.RWMutex - lockGetMemoryAffinity sync.RWMutex - lockGetMemoryBusWidth sync.RWMutex - lockGetMemoryErrorCounter sync.RWMutex - lockGetMemoryInfo sync.RWMutex - lockGetMemoryInfo_v2 sync.RWMutex - lockGetMigDeviceHandleByIndex sync.RWMutex - lockGetMigMode sync.RWMutex - lockGetMinMaxClockOfPState sync.RWMutex - lockGetMinMaxFanSpeed sync.RWMutex - lockGetMinorNumber sync.RWMutex - lockGetModuleId sync.RWMutex - lockGetMultiGpuBoard sync.RWMutex - lockGetName sync.RWMutex - lockGetNumFans sync.RWMutex - lockGetNumGpuCores sync.RWMutex - lockGetNumaNodeId sync.RWMutex - lockGetNvLinkCapability sync.RWMutex - lockGetNvLinkErrorCounter sync.RWMutex - lockGetNvLinkInfo sync.RWMutex - lockGetNvLinkRemoteDeviceType sync.RWMutex - lockGetNvLinkRemotePciInfo sync.RWMutex - lockGetNvLinkState sync.RWMutex - lockGetNvLinkUtilizationControl sync.RWMutex - lockGetNvLinkUtilizationCounter sync.RWMutex - lockGetNvLinkVersion sync.RWMutex - lockGetNvlinkBwMode sync.RWMutex - lockGetNvlinkSupportedBwModes sync.RWMutex - lockGetOfaUtilization sync.RWMutex - lockGetP2PStatus sync.RWMutex - lockGetPciInfo sync.RWMutex - lockGetPciInfoExt sync.RWMutex - lockGetPcieLinkMaxSpeed sync.RWMutex - lockGetPcieReplayCounter sync.RWMutex - lockGetPcieSpeed sync.RWMutex - lockGetPcieThroughput sync.RWMutex - lockGetPdi sync.RWMutex - lockGetPerformanceModes sync.RWMutex - lockGetPerformanceState sync.RWMutex - lockGetPersistenceMode sync.RWMutex - lockGetPgpuMetadataString sync.RWMutex - lockGetPlatformInfo sync.RWMutex - lockGetPowerManagementDefaultLimit sync.RWMutex - lockGetPowerManagementLimit sync.RWMutex - lockGetPowerManagementLimitConstraints sync.RWMutex - lockGetPowerManagementMode sync.RWMutex - lockGetPowerMizerMode_v1 sync.RWMutex - lockGetPowerSource sync.RWMutex - lockGetPowerState sync.RWMutex - lockGetPowerUsage sync.RWMutex - lockGetProcessUtilization sync.RWMutex - lockGetProcessesUtilizationInfo sync.RWMutex - lockGetRemappedRows sync.RWMutex - lockGetRepairStatus sync.RWMutex - lockGetRetiredPages sync.RWMutex - lockGetRetiredPagesPendingStatus sync.RWMutex - lockGetRetiredPages_v2 sync.RWMutex - lockGetRowRemapperHistogram sync.RWMutex - lockGetRunningProcessDetailList sync.RWMutex - lockGetSamples sync.RWMutex - lockGetSerial sync.RWMutex - lockGetSramEccErrorStatus sync.RWMutex - lockGetSramUniqueUncorrectedEccErrorCounts sync.RWMutex - lockGetSupportedClocksEventReasons sync.RWMutex - lockGetSupportedClocksThrottleReasons sync.RWMutex - lockGetSupportedEventTypes sync.RWMutex - lockGetSupportedGraphicsClocks sync.RWMutex - lockGetSupportedMemoryClocks sync.RWMutex - lockGetSupportedPerformanceStates sync.RWMutex - lockGetSupportedVgpus sync.RWMutex - lockGetTargetFanSpeed sync.RWMutex - lockGetTemperature sync.RWMutex - lockGetTemperatureThreshold sync.RWMutex - lockGetTemperatureV sync.RWMutex - lockGetThermalSettings sync.RWMutex - lockGetTopologyCommonAncestor sync.RWMutex - lockGetTopologyNearestGpus sync.RWMutex - lockGetTotalEccErrors sync.RWMutex - lockGetTotalEnergyConsumption sync.RWMutex - lockGetUUID sync.RWMutex - lockGetUtilizationRates sync.RWMutex - lockGetVbiosVersion sync.RWMutex - lockGetVgpuCapabilities sync.RWMutex - lockGetVgpuHeterogeneousMode sync.RWMutex - lockGetVgpuInstancesUtilizationInfo sync.RWMutex - lockGetVgpuMetadata sync.RWMutex - lockGetVgpuProcessUtilization sync.RWMutex - lockGetVgpuProcessesUtilizationInfo sync.RWMutex - lockGetVgpuSchedulerCapabilities sync.RWMutex - lockGetVgpuSchedulerLog sync.RWMutex - lockGetVgpuSchedulerState sync.RWMutex - lockGetVgpuTypeCreatablePlacements sync.RWMutex - lockGetVgpuTypeSupportedPlacements sync.RWMutex - lockGetVgpuUtilization sync.RWMutex - lockGetViolationStatus sync.RWMutex - lockGetVirtualizationMode sync.RWMutex - lockGpmMigSampleGet sync.RWMutex - lockGpmQueryDeviceSupport sync.RWMutex - lockGpmQueryDeviceSupportV sync.RWMutex - lockGpmQueryIfStreamingEnabled sync.RWMutex - lockGpmSampleGet sync.RWMutex - lockGpmSetStreamingEnabled sync.RWMutex - lockIsMigDeviceHandle sync.RWMutex - lockOnSameBoard sync.RWMutex - lockPowerSmoothingActivatePresetProfile sync.RWMutex - lockPowerSmoothingSetState sync.RWMutex - lockPowerSmoothingUpdatePresetProfileParam sync.RWMutex - lockReadWritePRM_v1 sync.RWMutex - lockRegisterEvents sync.RWMutex - lockResetApplicationsClocks sync.RWMutex - lockResetGpuLockedClocks sync.RWMutex - lockResetMemoryLockedClocks sync.RWMutex - lockResetNvLinkErrorCounters sync.RWMutex - lockResetNvLinkUtilizationCounter sync.RWMutex - lockSetAPIRestriction sync.RWMutex - lockSetAccountingMode sync.RWMutex - lockSetApplicationsClocks sync.RWMutex - lockSetAutoBoostedClocksEnabled sync.RWMutex - lockSetClockOffsets sync.RWMutex - lockSetComputeMode sync.RWMutex - lockSetConfComputeUnprotectedMemSize sync.RWMutex - lockSetCpuAffinity sync.RWMutex - lockSetDefaultAutoBoostedClocksEnabled sync.RWMutex - lockSetDefaultFanSpeed_v2 sync.RWMutex - lockSetDramEncryptionMode sync.RWMutex - lockSetDriverModel sync.RWMutex - lockSetEccMode sync.RWMutex - lockSetFanControlPolicy sync.RWMutex - lockSetFanSpeed_v2 sync.RWMutex - lockSetGpcClkVfOffset sync.RWMutex - lockSetGpuLockedClocks sync.RWMutex - lockSetGpuOperationMode sync.RWMutex - lockSetMemClkVfOffset sync.RWMutex - lockSetMemoryLockedClocks sync.RWMutex - lockSetMigMode sync.RWMutex - lockSetNvLinkDeviceLowPowerThreshold sync.RWMutex - lockSetNvLinkUtilizationControl sync.RWMutex - lockSetNvlinkBwMode sync.RWMutex - lockSetPersistenceMode sync.RWMutex - lockSetPowerManagementLimit sync.RWMutex - lockSetPowerManagementLimit_v2 sync.RWMutex - lockSetTemperatureThreshold sync.RWMutex - lockSetVgpuCapabilities sync.RWMutex - lockSetVgpuHeterogeneousMode sync.RWMutex - lockSetVgpuSchedulerState sync.RWMutex - lockSetVirtualizationMode sync.RWMutex - lockValidateInforom sync.RWMutex - lockVgpuTypeGetMaxInstances sync.RWMutex - lockWorkloadPowerProfileClearRequestedProfiles sync.RWMutex - lockWorkloadPowerProfileGetCurrentProfiles sync.RWMutex - lockWorkloadPowerProfileGetProfilesInfo sync.RWMutex - lockWorkloadPowerProfileSetRequestedProfiles sync.RWMutex -} - -// ClearAccountingPids calls ClearAccountingPidsFunc. -func (mock *Device) ClearAccountingPids() nvml.Return { - if mock.ClearAccountingPidsFunc == nil { - panic("Device.ClearAccountingPidsFunc: method is nil but Device.ClearAccountingPids was just called") - } - callInfo := struct { - }{} - mock.lockClearAccountingPids.Lock() - mock.calls.ClearAccountingPids = append(mock.calls.ClearAccountingPids, callInfo) - mock.lockClearAccountingPids.Unlock() - return mock.ClearAccountingPidsFunc() -} - -// ClearAccountingPidsCalls gets all the calls that were made to ClearAccountingPids. -// Check the length with: -// -// len(mockedDevice.ClearAccountingPidsCalls()) -func (mock *Device) ClearAccountingPidsCalls() []struct { -} { - var calls []struct { - } - mock.lockClearAccountingPids.RLock() - calls = mock.calls.ClearAccountingPids - mock.lockClearAccountingPids.RUnlock() - return calls -} - -// ClearCpuAffinity calls ClearCpuAffinityFunc. -func (mock *Device) ClearCpuAffinity() nvml.Return { - if mock.ClearCpuAffinityFunc == nil { - panic("Device.ClearCpuAffinityFunc: method is nil but Device.ClearCpuAffinity was just called") - } - callInfo := struct { - }{} - mock.lockClearCpuAffinity.Lock() - mock.calls.ClearCpuAffinity = append(mock.calls.ClearCpuAffinity, callInfo) - mock.lockClearCpuAffinity.Unlock() - return mock.ClearCpuAffinityFunc() -} - -// ClearCpuAffinityCalls gets all the calls that were made to ClearCpuAffinity. -// Check the length with: -// -// len(mockedDevice.ClearCpuAffinityCalls()) -func (mock *Device) ClearCpuAffinityCalls() []struct { -} { - var calls []struct { - } - mock.lockClearCpuAffinity.RLock() - calls = mock.calls.ClearCpuAffinity - mock.lockClearCpuAffinity.RUnlock() - return calls -} - -// ClearEccErrorCounts calls ClearEccErrorCountsFunc. -func (mock *Device) ClearEccErrorCounts(eccCounterType nvml.EccCounterType) nvml.Return { - if mock.ClearEccErrorCountsFunc == nil { - panic("Device.ClearEccErrorCountsFunc: method is nil but Device.ClearEccErrorCounts was just called") - } - callInfo := struct { - EccCounterType nvml.EccCounterType - }{ - EccCounterType: eccCounterType, - } - mock.lockClearEccErrorCounts.Lock() - mock.calls.ClearEccErrorCounts = append(mock.calls.ClearEccErrorCounts, callInfo) - mock.lockClearEccErrorCounts.Unlock() - return mock.ClearEccErrorCountsFunc(eccCounterType) -} - -// ClearEccErrorCountsCalls gets all the calls that were made to ClearEccErrorCounts. -// Check the length with: -// -// len(mockedDevice.ClearEccErrorCountsCalls()) -func (mock *Device) ClearEccErrorCountsCalls() []struct { - EccCounterType nvml.EccCounterType -} { - var calls []struct { - EccCounterType nvml.EccCounterType - } - mock.lockClearEccErrorCounts.RLock() - calls = mock.calls.ClearEccErrorCounts - mock.lockClearEccErrorCounts.RUnlock() - return calls -} - -// ClearFieldValues calls ClearFieldValuesFunc. -func (mock *Device) ClearFieldValues(fieldValues []nvml.FieldValue) nvml.Return { - if mock.ClearFieldValuesFunc == nil { - panic("Device.ClearFieldValuesFunc: method is nil but Device.ClearFieldValues was just called") - } - callInfo := struct { - FieldValues []nvml.FieldValue - }{ - FieldValues: fieldValues, - } - mock.lockClearFieldValues.Lock() - mock.calls.ClearFieldValues = append(mock.calls.ClearFieldValues, callInfo) - mock.lockClearFieldValues.Unlock() - return mock.ClearFieldValuesFunc(fieldValues) -} - -// ClearFieldValuesCalls gets all the calls that were made to ClearFieldValues. -// Check the length with: -// -// len(mockedDevice.ClearFieldValuesCalls()) -func (mock *Device) ClearFieldValuesCalls() []struct { - FieldValues []nvml.FieldValue -} { - var calls []struct { - FieldValues []nvml.FieldValue - } - mock.lockClearFieldValues.RLock() - calls = mock.calls.ClearFieldValues - mock.lockClearFieldValues.RUnlock() - return calls -} - -// CreateGpuInstance calls CreateGpuInstanceFunc. -func (mock *Device) CreateGpuInstance(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { - if mock.CreateGpuInstanceFunc == nil { - panic("Device.CreateGpuInstanceFunc: method is nil but Device.CreateGpuInstance was just called") - } - callInfo := struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - }{ - GpuInstanceProfileInfo: gpuInstanceProfileInfo, - } - mock.lockCreateGpuInstance.Lock() - mock.calls.CreateGpuInstance = append(mock.calls.CreateGpuInstance, callInfo) - mock.lockCreateGpuInstance.Unlock() - return mock.CreateGpuInstanceFunc(gpuInstanceProfileInfo) -} - -// CreateGpuInstanceCalls gets all the calls that were made to CreateGpuInstance. -// Check the length with: -// -// len(mockedDevice.CreateGpuInstanceCalls()) -func (mock *Device) CreateGpuInstanceCalls() []struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo -} { - var calls []struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - mock.lockCreateGpuInstance.RLock() - calls = mock.calls.CreateGpuInstance - mock.lockCreateGpuInstance.RUnlock() - return calls -} - -// CreateGpuInstanceWithPlacement calls CreateGpuInstanceWithPlacementFunc. -func (mock *Device) CreateGpuInstanceWithPlacement(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { - if mock.CreateGpuInstanceWithPlacementFunc == nil { - panic("Device.CreateGpuInstanceWithPlacementFunc: method is nil but Device.CreateGpuInstanceWithPlacement was just called") - } - callInfo := struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - GpuInstancePlacement *nvml.GpuInstancePlacement - }{ - GpuInstanceProfileInfo: gpuInstanceProfileInfo, - GpuInstancePlacement: gpuInstancePlacement, - } - mock.lockCreateGpuInstanceWithPlacement.Lock() - mock.calls.CreateGpuInstanceWithPlacement = append(mock.calls.CreateGpuInstanceWithPlacement, callInfo) - mock.lockCreateGpuInstanceWithPlacement.Unlock() - return mock.CreateGpuInstanceWithPlacementFunc(gpuInstanceProfileInfo, gpuInstancePlacement) -} - -// CreateGpuInstanceWithPlacementCalls gets all the calls that were made to CreateGpuInstanceWithPlacement. -// Check the length with: -// -// len(mockedDevice.CreateGpuInstanceWithPlacementCalls()) -func (mock *Device) CreateGpuInstanceWithPlacementCalls() []struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - GpuInstancePlacement *nvml.GpuInstancePlacement -} { - var calls []struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - GpuInstancePlacement *nvml.GpuInstancePlacement - } - mock.lockCreateGpuInstanceWithPlacement.RLock() - calls = mock.calls.CreateGpuInstanceWithPlacement - mock.lockCreateGpuInstanceWithPlacement.RUnlock() - return calls -} - -// FreezeNvLinkUtilizationCounter calls FreezeNvLinkUtilizationCounterFunc. -func (mock *Device) FreezeNvLinkUtilizationCounter(n1 int, n2 int, enableState nvml.EnableState) nvml.Return { - if mock.FreezeNvLinkUtilizationCounterFunc == nil { - panic("Device.FreezeNvLinkUtilizationCounterFunc: method is nil but Device.FreezeNvLinkUtilizationCounter was just called") - } - callInfo := struct { - N1 int - N2 int - EnableState nvml.EnableState - }{ - N1: n1, - N2: n2, - EnableState: enableState, - } - mock.lockFreezeNvLinkUtilizationCounter.Lock() - mock.calls.FreezeNvLinkUtilizationCounter = append(mock.calls.FreezeNvLinkUtilizationCounter, callInfo) - mock.lockFreezeNvLinkUtilizationCounter.Unlock() - return mock.FreezeNvLinkUtilizationCounterFunc(n1, n2, enableState) -} - -// FreezeNvLinkUtilizationCounterCalls gets all the calls that were made to FreezeNvLinkUtilizationCounter. -// Check the length with: -// -// len(mockedDevice.FreezeNvLinkUtilizationCounterCalls()) -func (mock *Device) FreezeNvLinkUtilizationCounterCalls() []struct { - N1 int - N2 int - EnableState nvml.EnableState -} { - var calls []struct { - N1 int - N2 int - EnableState nvml.EnableState - } - mock.lockFreezeNvLinkUtilizationCounter.RLock() - calls = mock.calls.FreezeNvLinkUtilizationCounter - mock.lockFreezeNvLinkUtilizationCounter.RUnlock() - return calls -} - -// GetAPIRestriction calls GetAPIRestrictionFunc. -func (mock *Device) GetAPIRestriction(restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) { - if mock.GetAPIRestrictionFunc == nil { - panic("Device.GetAPIRestrictionFunc: method is nil but Device.GetAPIRestriction was just called") - } - callInfo := struct { - RestrictedAPI nvml.RestrictedAPI - }{ - RestrictedAPI: restrictedAPI, - } - mock.lockGetAPIRestriction.Lock() - mock.calls.GetAPIRestriction = append(mock.calls.GetAPIRestriction, callInfo) - mock.lockGetAPIRestriction.Unlock() - return mock.GetAPIRestrictionFunc(restrictedAPI) -} - -// GetAPIRestrictionCalls gets all the calls that were made to GetAPIRestriction. -// Check the length with: -// -// len(mockedDevice.GetAPIRestrictionCalls()) -func (mock *Device) GetAPIRestrictionCalls() []struct { - RestrictedAPI nvml.RestrictedAPI -} { - var calls []struct { - RestrictedAPI nvml.RestrictedAPI - } - mock.lockGetAPIRestriction.RLock() - calls = mock.calls.GetAPIRestriction - mock.lockGetAPIRestriction.RUnlock() - return calls -} - -// GetAccountingBufferSize calls GetAccountingBufferSizeFunc. -func (mock *Device) GetAccountingBufferSize() (int, nvml.Return) { - if mock.GetAccountingBufferSizeFunc == nil { - panic("Device.GetAccountingBufferSizeFunc: method is nil but Device.GetAccountingBufferSize was just called") - } - callInfo := struct { - }{} - mock.lockGetAccountingBufferSize.Lock() - mock.calls.GetAccountingBufferSize = append(mock.calls.GetAccountingBufferSize, callInfo) - mock.lockGetAccountingBufferSize.Unlock() - return mock.GetAccountingBufferSizeFunc() -} - -// GetAccountingBufferSizeCalls gets all the calls that were made to GetAccountingBufferSize. -// Check the length with: -// -// len(mockedDevice.GetAccountingBufferSizeCalls()) -func (mock *Device) GetAccountingBufferSizeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetAccountingBufferSize.RLock() - calls = mock.calls.GetAccountingBufferSize - mock.lockGetAccountingBufferSize.RUnlock() - return calls -} - -// GetAccountingMode calls GetAccountingModeFunc. -func (mock *Device) GetAccountingMode() (nvml.EnableState, nvml.Return) { - if mock.GetAccountingModeFunc == nil { - panic("Device.GetAccountingModeFunc: method is nil but Device.GetAccountingMode was just called") - } - callInfo := struct { - }{} - mock.lockGetAccountingMode.Lock() - mock.calls.GetAccountingMode = append(mock.calls.GetAccountingMode, callInfo) - mock.lockGetAccountingMode.Unlock() - return mock.GetAccountingModeFunc() -} - -// GetAccountingModeCalls gets all the calls that were made to GetAccountingMode. -// Check the length with: -// -// len(mockedDevice.GetAccountingModeCalls()) -func (mock *Device) GetAccountingModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetAccountingMode.RLock() - calls = mock.calls.GetAccountingMode - mock.lockGetAccountingMode.RUnlock() - return calls -} - -// GetAccountingPids calls GetAccountingPidsFunc. -func (mock *Device) GetAccountingPids() ([]int, nvml.Return) { - if mock.GetAccountingPidsFunc == nil { - panic("Device.GetAccountingPidsFunc: method is nil but Device.GetAccountingPids was just called") - } - callInfo := struct { - }{} - mock.lockGetAccountingPids.Lock() - mock.calls.GetAccountingPids = append(mock.calls.GetAccountingPids, callInfo) - mock.lockGetAccountingPids.Unlock() - return mock.GetAccountingPidsFunc() -} - -// GetAccountingPidsCalls gets all the calls that were made to GetAccountingPids. -// Check the length with: -// -// len(mockedDevice.GetAccountingPidsCalls()) -func (mock *Device) GetAccountingPidsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetAccountingPids.RLock() - calls = mock.calls.GetAccountingPids - mock.lockGetAccountingPids.RUnlock() - return calls -} - -// GetAccountingStats calls GetAccountingStatsFunc. -func (mock *Device) GetAccountingStats(v uint32) (nvml.AccountingStats, nvml.Return) { - if mock.GetAccountingStatsFunc == nil { - panic("Device.GetAccountingStatsFunc: method is nil but Device.GetAccountingStats was just called") - } - callInfo := struct { - V uint32 - }{ - V: v, - } - mock.lockGetAccountingStats.Lock() - mock.calls.GetAccountingStats = append(mock.calls.GetAccountingStats, callInfo) - mock.lockGetAccountingStats.Unlock() - return mock.GetAccountingStatsFunc(v) -} - -// GetAccountingStatsCalls gets all the calls that were made to GetAccountingStats. -// Check the length with: -// -// len(mockedDevice.GetAccountingStatsCalls()) -func (mock *Device) GetAccountingStatsCalls() []struct { - V uint32 -} { - var calls []struct { - V uint32 - } - mock.lockGetAccountingStats.RLock() - calls = mock.calls.GetAccountingStats - mock.lockGetAccountingStats.RUnlock() - return calls -} - -// GetActiveVgpus calls GetActiveVgpusFunc. -func (mock *Device) GetActiveVgpus() ([]nvml.VgpuInstance, nvml.Return) { - if mock.GetActiveVgpusFunc == nil { - panic("Device.GetActiveVgpusFunc: method is nil but Device.GetActiveVgpus was just called") - } - callInfo := struct { - }{} - mock.lockGetActiveVgpus.Lock() - mock.calls.GetActiveVgpus = append(mock.calls.GetActiveVgpus, callInfo) - mock.lockGetActiveVgpus.Unlock() - return mock.GetActiveVgpusFunc() -} - -// GetActiveVgpusCalls gets all the calls that were made to GetActiveVgpus. -// Check the length with: -// -// len(mockedDevice.GetActiveVgpusCalls()) -func (mock *Device) GetActiveVgpusCalls() []struct { -} { - var calls []struct { - } - mock.lockGetActiveVgpus.RLock() - calls = mock.calls.GetActiveVgpus - mock.lockGetActiveVgpus.RUnlock() - return calls -} - -// GetAdaptiveClockInfoStatus calls GetAdaptiveClockInfoStatusFunc. -func (mock *Device) GetAdaptiveClockInfoStatus() (uint32, nvml.Return) { - if mock.GetAdaptiveClockInfoStatusFunc == nil { - panic("Device.GetAdaptiveClockInfoStatusFunc: method is nil but Device.GetAdaptiveClockInfoStatus was just called") - } - callInfo := struct { - }{} - mock.lockGetAdaptiveClockInfoStatus.Lock() - mock.calls.GetAdaptiveClockInfoStatus = append(mock.calls.GetAdaptiveClockInfoStatus, callInfo) - mock.lockGetAdaptiveClockInfoStatus.Unlock() - return mock.GetAdaptiveClockInfoStatusFunc() -} - -// GetAdaptiveClockInfoStatusCalls gets all the calls that were made to GetAdaptiveClockInfoStatus. -// Check the length with: -// -// len(mockedDevice.GetAdaptiveClockInfoStatusCalls()) -func (mock *Device) GetAdaptiveClockInfoStatusCalls() []struct { -} { - var calls []struct { - } - mock.lockGetAdaptiveClockInfoStatus.RLock() - calls = mock.calls.GetAdaptiveClockInfoStatus - mock.lockGetAdaptiveClockInfoStatus.RUnlock() - return calls -} - -// GetAddressingMode calls GetAddressingModeFunc. -func (mock *Device) GetAddressingMode() (nvml.DeviceAddressingMode, nvml.Return) { - if mock.GetAddressingModeFunc == nil { - panic("Device.GetAddressingModeFunc: method is nil but Device.GetAddressingMode was just called") - } - callInfo := struct { - }{} - mock.lockGetAddressingMode.Lock() - mock.calls.GetAddressingMode = append(mock.calls.GetAddressingMode, callInfo) - mock.lockGetAddressingMode.Unlock() - return mock.GetAddressingModeFunc() -} - -// GetAddressingModeCalls gets all the calls that were made to GetAddressingMode. -// Check the length with: -// -// len(mockedDevice.GetAddressingModeCalls()) -func (mock *Device) GetAddressingModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetAddressingMode.RLock() - calls = mock.calls.GetAddressingMode - mock.lockGetAddressingMode.RUnlock() - return calls -} - -// GetApplicationsClock calls GetApplicationsClockFunc. -func (mock *Device) GetApplicationsClock(clockType nvml.ClockType) (uint32, nvml.Return) { - if mock.GetApplicationsClockFunc == nil { - panic("Device.GetApplicationsClockFunc: method is nil but Device.GetApplicationsClock was just called") - } - callInfo := struct { - ClockType nvml.ClockType - }{ - ClockType: clockType, - } - mock.lockGetApplicationsClock.Lock() - mock.calls.GetApplicationsClock = append(mock.calls.GetApplicationsClock, callInfo) - mock.lockGetApplicationsClock.Unlock() - return mock.GetApplicationsClockFunc(clockType) -} - -// GetApplicationsClockCalls gets all the calls that were made to GetApplicationsClock. -// Check the length with: -// -// len(mockedDevice.GetApplicationsClockCalls()) -func (mock *Device) GetApplicationsClockCalls() []struct { - ClockType nvml.ClockType -} { - var calls []struct { - ClockType nvml.ClockType - } - mock.lockGetApplicationsClock.RLock() - calls = mock.calls.GetApplicationsClock - mock.lockGetApplicationsClock.RUnlock() - return calls -} - -// GetArchitecture calls GetArchitectureFunc. -func (mock *Device) GetArchitecture() (nvml.DeviceArchitecture, nvml.Return) { - if mock.GetArchitectureFunc == nil { - panic("Device.GetArchitectureFunc: method is nil but Device.GetArchitecture was just called") - } - callInfo := struct { - }{} - mock.lockGetArchitecture.Lock() - mock.calls.GetArchitecture = append(mock.calls.GetArchitecture, callInfo) - mock.lockGetArchitecture.Unlock() - return mock.GetArchitectureFunc() -} - -// GetArchitectureCalls gets all the calls that were made to GetArchitecture. -// Check the length with: -// -// len(mockedDevice.GetArchitectureCalls()) -func (mock *Device) GetArchitectureCalls() []struct { -} { - var calls []struct { - } - mock.lockGetArchitecture.RLock() - calls = mock.calls.GetArchitecture - mock.lockGetArchitecture.RUnlock() - return calls -} - -// GetAttributes calls GetAttributesFunc. -func (mock *Device) GetAttributes() (nvml.DeviceAttributes, nvml.Return) { - if mock.GetAttributesFunc == nil { - panic("Device.GetAttributesFunc: method is nil but Device.GetAttributes was just called") - } - callInfo := struct { - }{} - mock.lockGetAttributes.Lock() - mock.calls.GetAttributes = append(mock.calls.GetAttributes, callInfo) - mock.lockGetAttributes.Unlock() - return mock.GetAttributesFunc() -} - -// GetAttributesCalls gets all the calls that were made to GetAttributes. -// Check the length with: -// -// len(mockedDevice.GetAttributesCalls()) -func (mock *Device) GetAttributesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetAttributes.RLock() - calls = mock.calls.GetAttributes - mock.lockGetAttributes.RUnlock() - return calls -} - -// GetAutoBoostedClocksEnabled calls GetAutoBoostedClocksEnabledFunc. -func (mock *Device) GetAutoBoostedClocksEnabled() (nvml.EnableState, nvml.EnableState, nvml.Return) { - if mock.GetAutoBoostedClocksEnabledFunc == nil { - panic("Device.GetAutoBoostedClocksEnabledFunc: method is nil but Device.GetAutoBoostedClocksEnabled was just called") - } - callInfo := struct { - }{} - mock.lockGetAutoBoostedClocksEnabled.Lock() - mock.calls.GetAutoBoostedClocksEnabled = append(mock.calls.GetAutoBoostedClocksEnabled, callInfo) - mock.lockGetAutoBoostedClocksEnabled.Unlock() - return mock.GetAutoBoostedClocksEnabledFunc() -} - -// GetAutoBoostedClocksEnabledCalls gets all the calls that were made to GetAutoBoostedClocksEnabled. -// Check the length with: -// -// len(mockedDevice.GetAutoBoostedClocksEnabledCalls()) -func (mock *Device) GetAutoBoostedClocksEnabledCalls() []struct { -} { - var calls []struct { - } - mock.lockGetAutoBoostedClocksEnabled.RLock() - calls = mock.calls.GetAutoBoostedClocksEnabled - mock.lockGetAutoBoostedClocksEnabled.RUnlock() - return calls -} - -// GetBAR1MemoryInfo calls GetBAR1MemoryInfoFunc. -func (mock *Device) GetBAR1MemoryInfo() (nvml.BAR1Memory, nvml.Return) { - if mock.GetBAR1MemoryInfoFunc == nil { - panic("Device.GetBAR1MemoryInfoFunc: method is nil but Device.GetBAR1MemoryInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetBAR1MemoryInfo.Lock() - mock.calls.GetBAR1MemoryInfo = append(mock.calls.GetBAR1MemoryInfo, callInfo) - mock.lockGetBAR1MemoryInfo.Unlock() - return mock.GetBAR1MemoryInfoFunc() -} - -// GetBAR1MemoryInfoCalls gets all the calls that were made to GetBAR1MemoryInfo. -// Check the length with: -// -// len(mockedDevice.GetBAR1MemoryInfoCalls()) -func (mock *Device) GetBAR1MemoryInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetBAR1MemoryInfo.RLock() - calls = mock.calls.GetBAR1MemoryInfo - mock.lockGetBAR1MemoryInfo.RUnlock() - return calls -} - -// GetBoardId calls GetBoardIdFunc. -func (mock *Device) GetBoardId() (uint32, nvml.Return) { - if mock.GetBoardIdFunc == nil { - panic("Device.GetBoardIdFunc: method is nil but Device.GetBoardId was just called") - } - callInfo := struct { - }{} - mock.lockGetBoardId.Lock() - mock.calls.GetBoardId = append(mock.calls.GetBoardId, callInfo) - mock.lockGetBoardId.Unlock() - return mock.GetBoardIdFunc() -} - -// GetBoardIdCalls gets all the calls that were made to GetBoardId. -// Check the length with: -// -// len(mockedDevice.GetBoardIdCalls()) -func (mock *Device) GetBoardIdCalls() []struct { -} { - var calls []struct { - } - mock.lockGetBoardId.RLock() - calls = mock.calls.GetBoardId - mock.lockGetBoardId.RUnlock() - return calls -} - -// GetBoardPartNumber calls GetBoardPartNumberFunc. -func (mock *Device) GetBoardPartNumber() (string, nvml.Return) { - if mock.GetBoardPartNumberFunc == nil { - panic("Device.GetBoardPartNumberFunc: method is nil but Device.GetBoardPartNumber was just called") - } - callInfo := struct { - }{} - mock.lockGetBoardPartNumber.Lock() - mock.calls.GetBoardPartNumber = append(mock.calls.GetBoardPartNumber, callInfo) - mock.lockGetBoardPartNumber.Unlock() - return mock.GetBoardPartNumberFunc() -} - -// GetBoardPartNumberCalls gets all the calls that were made to GetBoardPartNumber. -// Check the length with: -// -// len(mockedDevice.GetBoardPartNumberCalls()) -func (mock *Device) GetBoardPartNumberCalls() []struct { -} { - var calls []struct { - } - mock.lockGetBoardPartNumber.RLock() - calls = mock.calls.GetBoardPartNumber - mock.lockGetBoardPartNumber.RUnlock() - return calls -} - -// GetBrand calls GetBrandFunc. -func (mock *Device) GetBrand() (nvml.BrandType, nvml.Return) { - if mock.GetBrandFunc == nil { - panic("Device.GetBrandFunc: method is nil but Device.GetBrand was just called") - } - callInfo := struct { - }{} - mock.lockGetBrand.Lock() - mock.calls.GetBrand = append(mock.calls.GetBrand, callInfo) - mock.lockGetBrand.Unlock() - return mock.GetBrandFunc() -} - -// GetBrandCalls gets all the calls that were made to GetBrand. -// Check the length with: -// -// len(mockedDevice.GetBrandCalls()) -func (mock *Device) GetBrandCalls() []struct { -} { - var calls []struct { - } - mock.lockGetBrand.RLock() - calls = mock.calls.GetBrand - mock.lockGetBrand.RUnlock() - return calls -} - -// GetBridgeChipInfo calls GetBridgeChipInfoFunc. -func (mock *Device) GetBridgeChipInfo() (nvml.BridgeChipHierarchy, nvml.Return) { - if mock.GetBridgeChipInfoFunc == nil { - panic("Device.GetBridgeChipInfoFunc: method is nil but Device.GetBridgeChipInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetBridgeChipInfo.Lock() - mock.calls.GetBridgeChipInfo = append(mock.calls.GetBridgeChipInfo, callInfo) - mock.lockGetBridgeChipInfo.Unlock() - return mock.GetBridgeChipInfoFunc() -} - -// GetBridgeChipInfoCalls gets all the calls that were made to GetBridgeChipInfo. -// Check the length with: -// -// len(mockedDevice.GetBridgeChipInfoCalls()) -func (mock *Device) GetBridgeChipInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetBridgeChipInfo.RLock() - calls = mock.calls.GetBridgeChipInfo - mock.lockGetBridgeChipInfo.RUnlock() - return calls -} - -// GetBusType calls GetBusTypeFunc. -func (mock *Device) GetBusType() (nvml.BusType, nvml.Return) { - if mock.GetBusTypeFunc == nil { - panic("Device.GetBusTypeFunc: method is nil but Device.GetBusType was just called") - } - callInfo := struct { - }{} - mock.lockGetBusType.Lock() - mock.calls.GetBusType = append(mock.calls.GetBusType, callInfo) - mock.lockGetBusType.Unlock() - return mock.GetBusTypeFunc() -} - -// GetBusTypeCalls gets all the calls that were made to GetBusType. -// Check the length with: -// -// len(mockedDevice.GetBusTypeCalls()) -func (mock *Device) GetBusTypeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetBusType.RLock() - calls = mock.calls.GetBusType - mock.lockGetBusType.RUnlock() - return calls -} - -// GetC2cModeInfoV calls GetC2cModeInfoVFunc. -func (mock *Device) GetC2cModeInfoV() nvml.C2cModeInfoHandler { - if mock.GetC2cModeInfoVFunc == nil { - panic("Device.GetC2cModeInfoVFunc: method is nil but Device.GetC2cModeInfoV was just called") - } - callInfo := struct { - }{} - mock.lockGetC2cModeInfoV.Lock() - mock.calls.GetC2cModeInfoV = append(mock.calls.GetC2cModeInfoV, callInfo) - mock.lockGetC2cModeInfoV.Unlock() - return mock.GetC2cModeInfoVFunc() -} - -// GetC2cModeInfoVCalls gets all the calls that were made to GetC2cModeInfoV. -// Check the length with: -// -// len(mockedDevice.GetC2cModeInfoVCalls()) -func (mock *Device) GetC2cModeInfoVCalls() []struct { -} { - var calls []struct { - } - mock.lockGetC2cModeInfoV.RLock() - calls = mock.calls.GetC2cModeInfoV - mock.lockGetC2cModeInfoV.RUnlock() - return calls -} - -// GetCapabilities calls GetCapabilitiesFunc. -func (mock *Device) GetCapabilities() (nvml.DeviceCapabilities, nvml.Return) { - if mock.GetCapabilitiesFunc == nil { - panic("Device.GetCapabilitiesFunc: method is nil but Device.GetCapabilities was just called") - } - callInfo := struct { - }{} - mock.lockGetCapabilities.Lock() - mock.calls.GetCapabilities = append(mock.calls.GetCapabilities, callInfo) - mock.lockGetCapabilities.Unlock() - return mock.GetCapabilitiesFunc() -} - -// GetCapabilitiesCalls gets all the calls that were made to GetCapabilities. -// Check the length with: -// -// len(mockedDevice.GetCapabilitiesCalls()) -func (mock *Device) GetCapabilitiesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetCapabilities.RLock() - calls = mock.calls.GetCapabilities - mock.lockGetCapabilities.RUnlock() - return calls -} - -// GetClkMonStatus calls GetClkMonStatusFunc. -func (mock *Device) GetClkMonStatus() (nvml.ClkMonStatus, nvml.Return) { - if mock.GetClkMonStatusFunc == nil { - panic("Device.GetClkMonStatusFunc: method is nil but Device.GetClkMonStatus was just called") - } - callInfo := struct { - }{} - mock.lockGetClkMonStatus.Lock() - mock.calls.GetClkMonStatus = append(mock.calls.GetClkMonStatus, callInfo) - mock.lockGetClkMonStatus.Unlock() - return mock.GetClkMonStatusFunc() -} - -// GetClkMonStatusCalls gets all the calls that were made to GetClkMonStatus. -// Check the length with: -// -// len(mockedDevice.GetClkMonStatusCalls()) -func (mock *Device) GetClkMonStatusCalls() []struct { -} { - var calls []struct { - } - mock.lockGetClkMonStatus.RLock() - calls = mock.calls.GetClkMonStatus - mock.lockGetClkMonStatus.RUnlock() - return calls -} - -// GetClock calls GetClockFunc. -func (mock *Device) GetClock(clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) { - if mock.GetClockFunc == nil { - panic("Device.GetClockFunc: method is nil but Device.GetClock was just called") - } - callInfo := struct { - ClockType nvml.ClockType - ClockId nvml.ClockId - }{ - ClockType: clockType, - ClockId: clockId, - } - mock.lockGetClock.Lock() - mock.calls.GetClock = append(mock.calls.GetClock, callInfo) - mock.lockGetClock.Unlock() - return mock.GetClockFunc(clockType, clockId) -} - -// GetClockCalls gets all the calls that were made to GetClock. -// Check the length with: -// -// len(mockedDevice.GetClockCalls()) -func (mock *Device) GetClockCalls() []struct { - ClockType nvml.ClockType - ClockId nvml.ClockId -} { - var calls []struct { - ClockType nvml.ClockType - ClockId nvml.ClockId - } - mock.lockGetClock.RLock() - calls = mock.calls.GetClock - mock.lockGetClock.RUnlock() - return calls -} - -// GetClockInfo calls GetClockInfoFunc. -func (mock *Device) GetClockInfo(clockType nvml.ClockType) (uint32, nvml.Return) { - if mock.GetClockInfoFunc == nil { - panic("Device.GetClockInfoFunc: method is nil but Device.GetClockInfo was just called") - } - callInfo := struct { - ClockType nvml.ClockType - }{ - ClockType: clockType, - } - mock.lockGetClockInfo.Lock() - mock.calls.GetClockInfo = append(mock.calls.GetClockInfo, callInfo) - mock.lockGetClockInfo.Unlock() - return mock.GetClockInfoFunc(clockType) -} - -// GetClockInfoCalls gets all the calls that were made to GetClockInfo. -// Check the length with: -// -// len(mockedDevice.GetClockInfoCalls()) -func (mock *Device) GetClockInfoCalls() []struct { - ClockType nvml.ClockType -} { - var calls []struct { - ClockType nvml.ClockType - } - mock.lockGetClockInfo.RLock() - calls = mock.calls.GetClockInfo - mock.lockGetClockInfo.RUnlock() - return calls -} - -// GetClockOffsets calls GetClockOffsetsFunc. -func (mock *Device) GetClockOffsets() (nvml.ClockOffset, nvml.Return) { - if mock.GetClockOffsetsFunc == nil { - panic("Device.GetClockOffsetsFunc: method is nil but Device.GetClockOffsets was just called") - } - callInfo := struct { - }{} - mock.lockGetClockOffsets.Lock() - mock.calls.GetClockOffsets = append(mock.calls.GetClockOffsets, callInfo) - mock.lockGetClockOffsets.Unlock() - return mock.GetClockOffsetsFunc() -} - -// GetClockOffsetsCalls gets all the calls that were made to GetClockOffsets. -// Check the length with: -// -// len(mockedDevice.GetClockOffsetsCalls()) -func (mock *Device) GetClockOffsetsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetClockOffsets.RLock() - calls = mock.calls.GetClockOffsets - mock.lockGetClockOffsets.RUnlock() - return calls -} - -// GetComputeInstanceId calls GetComputeInstanceIdFunc. -func (mock *Device) GetComputeInstanceId() (int, nvml.Return) { - if mock.GetComputeInstanceIdFunc == nil { - panic("Device.GetComputeInstanceIdFunc: method is nil but Device.GetComputeInstanceId was just called") - } - callInfo := struct { - }{} - mock.lockGetComputeInstanceId.Lock() - mock.calls.GetComputeInstanceId = append(mock.calls.GetComputeInstanceId, callInfo) - mock.lockGetComputeInstanceId.Unlock() - return mock.GetComputeInstanceIdFunc() -} - -// GetComputeInstanceIdCalls gets all the calls that were made to GetComputeInstanceId. -// Check the length with: -// -// len(mockedDevice.GetComputeInstanceIdCalls()) -func (mock *Device) GetComputeInstanceIdCalls() []struct { -} { - var calls []struct { - } - mock.lockGetComputeInstanceId.RLock() - calls = mock.calls.GetComputeInstanceId - mock.lockGetComputeInstanceId.RUnlock() - return calls -} - -// GetComputeMode calls GetComputeModeFunc. -func (mock *Device) GetComputeMode() (nvml.ComputeMode, nvml.Return) { - if mock.GetComputeModeFunc == nil { - panic("Device.GetComputeModeFunc: method is nil but Device.GetComputeMode was just called") - } - callInfo := struct { - }{} - mock.lockGetComputeMode.Lock() - mock.calls.GetComputeMode = append(mock.calls.GetComputeMode, callInfo) - mock.lockGetComputeMode.Unlock() - return mock.GetComputeModeFunc() -} - -// GetComputeModeCalls gets all the calls that were made to GetComputeMode. -// Check the length with: -// -// len(mockedDevice.GetComputeModeCalls()) -func (mock *Device) GetComputeModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetComputeMode.RLock() - calls = mock.calls.GetComputeMode - mock.lockGetComputeMode.RUnlock() - return calls -} - -// GetComputeRunningProcesses calls GetComputeRunningProcessesFunc. -func (mock *Device) GetComputeRunningProcesses() ([]nvml.ProcessInfo, nvml.Return) { - if mock.GetComputeRunningProcessesFunc == nil { - panic("Device.GetComputeRunningProcessesFunc: method is nil but Device.GetComputeRunningProcesses was just called") - } - callInfo := struct { - }{} - mock.lockGetComputeRunningProcesses.Lock() - mock.calls.GetComputeRunningProcesses = append(mock.calls.GetComputeRunningProcesses, callInfo) - mock.lockGetComputeRunningProcesses.Unlock() - return mock.GetComputeRunningProcessesFunc() -} - -// GetComputeRunningProcessesCalls gets all the calls that were made to GetComputeRunningProcesses. -// Check the length with: -// -// len(mockedDevice.GetComputeRunningProcessesCalls()) -func (mock *Device) GetComputeRunningProcessesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetComputeRunningProcesses.RLock() - calls = mock.calls.GetComputeRunningProcesses - mock.lockGetComputeRunningProcesses.RUnlock() - return calls -} - -// GetConfComputeGpuAttestationReport calls GetConfComputeGpuAttestationReportFunc. -func (mock *Device) GetConfComputeGpuAttestationReport(confComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport) nvml.Return { - if mock.GetConfComputeGpuAttestationReportFunc == nil { - panic("Device.GetConfComputeGpuAttestationReportFunc: method is nil but Device.GetConfComputeGpuAttestationReport was just called") - } - callInfo := struct { - ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport - }{ - ConfComputeGpuAttestationReport: confComputeGpuAttestationReport, - } - mock.lockGetConfComputeGpuAttestationReport.Lock() - mock.calls.GetConfComputeGpuAttestationReport = append(mock.calls.GetConfComputeGpuAttestationReport, callInfo) - mock.lockGetConfComputeGpuAttestationReport.Unlock() - return mock.GetConfComputeGpuAttestationReportFunc(confComputeGpuAttestationReport) -} - -// GetConfComputeGpuAttestationReportCalls gets all the calls that were made to GetConfComputeGpuAttestationReport. -// Check the length with: -// -// len(mockedDevice.GetConfComputeGpuAttestationReportCalls()) -func (mock *Device) GetConfComputeGpuAttestationReportCalls() []struct { - ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport -} { - var calls []struct { - ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport - } - mock.lockGetConfComputeGpuAttestationReport.RLock() - calls = mock.calls.GetConfComputeGpuAttestationReport - mock.lockGetConfComputeGpuAttestationReport.RUnlock() - return calls -} - -// GetConfComputeGpuCertificate calls GetConfComputeGpuCertificateFunc. -func (mock *Device) GetConfComputeGpuCertificate() (nvml.ConfComputeGpuCertificate, nvml.Return) { - if mock.GetConfComputeGpuCertificateFunc == nil { - panic("Device.GetConfComputeGpuCertificateFunc: method is nil but Device.GetConfComputeGpuCertificate was just called") - } - callInfo := struct { - }{} - mock.lockGetConfComputeGpuCertificate.Lock() - mock.calls.GetConfComputeGpuCertificate = append(mock.calls.GetConfComputeGpuCertificate, callInfo) - mock.lockGetConfComputeGpuCertificate.Unlock() - return mock.GetConfComputeGpuCertificateFunc() -} - -// GetConfComputeGpuCertificateCalls gets all the calls that were made to GetConfComputeGpuCertificate. -// Check the length with: -// -// len(mockedDevice.GetConfComputeGpuCertificateCalls()) -func (mock *Device) GetConfComputeGpuCertificateCalls() []struct { -} { - var calls []struct { - } - mock.lockGetConfComputeGpuCertificate.RLock() - calls = mock.calls.GetConfComputeGpuCertificate - mock.lockGetConfComputeGpuCertificate.RUnlock() - return calls -} - -// GetConfComputeMemSizeInfo calls GetConfComputeMemSizeInfoFunc. -func (mock *Device) GetConfComputeMemSizeInfo() (nvml.ConfComputeMemSizeInfo, nvml.Return) { - if mock.GetConfComputeMemSizeInfoFunc == nil { - panic("Device.GetConfComputeMemSizeInfoFunc: method is nil but Device.GetConfComputeMemSizeInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetConfComputeMemSizeInfo.Lock() - mock.calls.GetConfComputeMemSizeInfo = append(mock.calls.GetConfComputeMemSizeInfo, callInfo) - mock.lockGetConfComputeMemSizeInfo.Unlock() - return mock.GetConfComputeMemSizeInfoFunc() -} - -// GetConfComputeMemSizeInfoCalls gets all the calls that were made to GetConfComputeMemSizeInfo. -// Check the length with: -// -// len(mockedDevice.GetConfComputeMemSizeInfoCalls()) -func (mock *Device) GetConfComputeMemSizeInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetConfComputeMemSizeInfo.RLock() - calls = mock.calls.GetConfComputeMemSizeInfo - mock.lockGetConfComputeMemSizeInfo.RUnlock() - return calls -} - -// GetConfComputeProtectedMemoryUsage calls GetConfComputeProtectedMemoryUsageFunc. -func (mock *Device) GetConfComputeProtectedMemoryUsage() (nvml.Memory, nvml.Return) { - if mock.GetConfComputeProtectedMemoryUsageFunc == nil { - panic("Device.GetConfComputeProtectedMemoryUsageFunc: method is nil but Device.GetConfComputeProtectedMemoryUsage was just called") - } - callInfo := struct { - }{} - mock.lockGetConfComputeProtectedMemoryUsage.Lock() - mock.calls.GetConfComputeProtectedMemoryUsage = append(mock.calls.GetConfComputeProtectedMemoryUsage, callInfo) - mock.lockGetConfComputeProtectedMemoryUsage.Unlock() - return mock.GetConfComputeProtectedMemoryUsageFunc() -} - -// GetConfComputeProtectedMemoryUsageCalls gets all the calls that were made to GetConfComputeProtectedMemoryUsage. -// Check the length with: -// -// len(mockedDevice.GetConfComputeProtectedMemoryUsageCalls()) -func (mock *Device) GetConfComputeProtectedMemoryUsageCalls() []struct { -} { - var calls []struct { - } - mock.lockGetConfComputeProtectedMemoryUsage.RLock() - calls = mock.calls.GetConfComputeProtectedMemoryUsage - mock.lockGetConfComputeProtectedMemoryUsage.RUnlock() - return calls -} - -// GetCoolerInfo calls GetCoolerInfoFunc. -func (mock *Device) GetCoolerInfo() (nvml.CoolerInfo, nvml.Return) { - if mock.GetCoolerInfoFunc == nil { - panic("Device.GetCoolerInfoFunc: method is nil but Device.GetCoolerInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetCoolerInfo.Lock() - mock.calls.GetCoolerInfo = append(mock.calls.GetCoolerInfo, callInfo) - mock.lockGetCoolerInfo.Unlock() - return mock.GetCoolerInfoFunc() -} - -// GetCoolerInfoCalls gets all the calls that were made to GetCoolerInfo. -// Check the length with: -// -// len(mockedDevice.GetCoolerInfoCalls()) -func (mock *Device) GetCoolerInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetCoolerInfo.RLock() - calls = mock.calls.GetCoolerInfo - mock.lockGetCoolerInfo.RUnlock() - return calls -} - -// GetCpuAffinity calls GetCpuAffinityFunc. -func (mock *Device) GetCpuAffinity(n int) ([]uint, nvml.Return) { - if mock.GetCpuAffinityFunc == nil { - panic("Device.GetCpuAffinityFunc: method is nil but Device.GetCpuAffinity was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetCpuAffinity.Lock() - mock.calls.GetCpuAffinity = append(mock.calls.GetCpuAffinity, callInfo) - mock.lockGetCpuAffinity.Unlock() - return mock.GetCpuAffinityFunc(n) -} - -// GetCpuAffinityCalls gets all the calls that were made to GetCpuAffinity. -// Check the length with: -// -// len(mockedDevice.GetCpuAffinityCalls()) -func (mock *Device) GetCpuAffinityCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetCpuAffinity.RLock() - calls = mock.calls.GetCpuAffinity - mock.lockGetCpuAffinity.RUnlock() - return calls -} - -// GetCpuAffinityWithinScope calls GetCpuAffinityWithinScopeFunc. -func (mock *Device) GetCpuAffinityWithinScope(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { - if mock.GetCpuAffinityWithinScopeFunc == nil { - panic("Device.GetCpuAffinityWithinScopeFunc: method is nil but Device.GetCpuAffinityWithinScope was just called") - } - callInfo := struct { - N int - AffinityScope nvml.AffinityScope - }{ - N: n, - AffinityScope: affinityScope, - } - mock.lockGetCpuAffinityWithinScope.Lock() - mock.calls.GetCpuAffinityWithinScope = append(mock.calls.GetCpuAffinityWithinScope, callInfo) - mock.lockGetCpuAffinityWithinScope.Unlock() - return mock.GetCpuAffinityWithinScopeFunc(n, affinityScope) -} - -// GetCpuAffinityWithinScopeCalls gets all the calls that were made to GetCpuAffinityWithinScope. -// Check the length with: -// -// len(mockedDevice.GetCpuAffinityWithinScopeCalls()) -func (mock *Device) GetCpuAffinityWithinScopeCalls() []struct { - N int - AffinityScope nvml.AffinityScope -} { - var calls []struct { - N int - AffinityScope nvml.AffinityScope - } - mock.lockGetCpuAffinityWithinScope.RLock() - calls = mock.calls.GetCpuAffinityWithinScope - mock.lockGetCpuAffinityWithinScope.RUnlock() - return calls -} - -// GetCreatableVgpus calls GetCreatableVgpusFunc. -func (mock *Device) GetCreatableVgpus() ([]nvml.VgpuTypeId, nvml.Return) { - if mock.GetCreatableVgpusFunc == nil { - panic("Device.GetCreatableVgpusFunc: method is nil but Device.GetCreatableVgpus was just called") - } - callInfo := struct { - }{} - mock.lockGetCreatableVgpus.Lock() - mock.calls.GetCreatableVgpus = append(mock.calls.GetCreatableVgpus, callInfo) - mock.lockGetCreatableVgpus.Unlock() - return mock.GetCreatableVgpusFunc() -} - -// GetCreatableVgpusCalls gets all the calls that were made to GetCreatableVgpus. -// Check the length with: -// -// len(mockedDevice.GetCreatableVgpusCalls()) -func (mock *Device) GetCreatableVgpusCalls() []struct { -} { - var calls []struct { - } - mock.lockGetCreatableVgpus.RLock() - calls = mock.calls.GetCreatableVgpus - mock.lockGetCreatableVgpus.RUnlock() - return calls -} - -// GetCudaComputeCapability calls GetCudaComputeCapabilityFunc. -func (mock *Device) GetCudaComputeCapability() (int, int, nvml.Return) { - if mock.GetCudaComputeCapabilityFunc == nil { - panic("Device.GetCudaComputeCapabilityFunc: method is nil but Device.GetCudaComputeCapability was just called") - } - callInfo := struct { - }{} - mock.lockGetCudaComputeCapability.Lock() - mock.calls.GetCudaComputeCapability = append(mock.calls.GetCudaComputeCapability, callInfo) - mock.lockGetCudaComputeCapability.Unlock() - return mock.GetCudaComputeCapabilityFunc() -} - -// GetCudaComputeCapabilityCalls gets all the calls that were made to GetCudaComputeCapability. -// Check the length with: -// -// len(mockedDevice.GetCudaComputeCapabilityCalls()) -func (mock *Device) GetCudaComputeCapabilityCalls() []struct { -} { - var calls []struct { - } - mock.lockGetCudaComputeCapability.RLock() - calls = mock.calls.GetCudaComputeCapability - mock.lockGetCudaComputeCapability.RUnlock() - return calls -} - -// GetCurrPcieLinkGeneration calls GetCurrPcieLinkGenerationFunc. -func (mock *Device) GetCurrPcieLinkGeneration() (int, nvml.Return) { - if mock.GetCurrPcieLinkGenerationFunc == nil { - panic("Device.GetCurrPcieLinkGenerationFunc: method is nil but Device.GetCurrPcieLinkGeneration was just called") - } - callInfo := struct { - }{} - mock.lockGetCurrPcieLinkGeneration.Lock() - mock.calls.GetCurrPcieLinkGeneration = append(mock.calls.GetCurrPcieLinkGeneration, callInfo) - mock.lockGetCurrPcieLinkGeneration.Unlock() - return mock.GetCurrPcieLinkGenerationFunc() -} - -// GetCurrPcieLinkGenerationCalls gets all the calls that were made to GetCurrPcieLinkGeneration. -// Check the length with: -// -// len(mockedDevice.GetCurrPcieLinkGenerationCalls()) -func (mock *Device) GetCurrPcieLinkGenerationCalls() []struct { -} { - var calls []struct { - } - mock.lockGetCurrPcieLinkGeneration.RLock() - calls = mock.calls.GetCurrPcieLinkGeneration - mock.lockGetCurrPcieLinkGeneration.RUnlock() - return calls -} - -// GetCurrPcieLinkWidth calls GetCurrPcieLinkWidthFunc. -func (mock *Device) GetCurrPcieLinkWidth() (int, nvml.Return) { - if mock.GetCurrPcieLinkWidthFunc == nil { - panic("Device.GetCurrPcieLinkWidthFunc: method is nil but Device.GetCurrPcieLinkWidth was just called") - } - callInfo := struct { - }{} - mock.lockGetCurrPcieLinkWidth.Lock() - mock.calls.GetCurrPcieLinkWidth = append(mock.calls.GetCurrPcieLinkWidth, callInfo) - mock.lockGetCurrPcieLinkWidth.Unlock() - return mock.GetCurrPcieLinkWidthFunc() -} - -// GetCurrPcieLinkWidthCalls gets all the calls that were made to GetCurrPcieLinkWidth. -// Check the length with: -// -// len(mockedDevice.GetCurrPcieLinkWidthCalls()) -func (mock *Device) GetCurrPcieLinkWidthCalls() []struct { -} { - var calls []struct { - } - mock.lockGetCurrPcieLinkWidth.RLock() - calls = mock.calls.GetCurrPcieLinkWidth - mock.lockGetCurrPcieLinkWidth.RUnlock() - return calls -} - -// GetCurrentClockFreqs calls GetCurrentClockFreqsFunc. -func (mock *Device) GetCurrentClockFreqs() (nvml.DeviceCurrentClockFreqs, nvml.Return) { - if mock.GetCurrentClockFreqsFunc == nil { - panic("Device.GetCurrentClockFreqsFunc: method is nil but Device.GetCurrentClockFreqs was just called") - } - callInfo := struct { - }{} - mock.lockGetCurrentClockFreqs.Lock() - mock.calls.GetCurrentClockFreqs = append(mock.calls.GetCurrentClockFreqs, callInfo) - mock.lockGetCurrentClockFreqs.Unlock() - return mock.GetCurrentClockFreqsFunc() -} - -// GetCurrentClockFreqsCalls gets all the calls that were made to GetCurrentClockFreqs. -// Check the length with: -// -// len(mockedDevice.GetCurrentClockFreqsCalls()) -func (mock *Device) GetCurrentClockFreqsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetCurrentClockFreqs.RLock() - calls = mock.calls.GetCurrentClockFreqs - mock.lockGetCurrentClockFreqs.RUnlock() - return calls -} - -// GetCurrentClocksEventReasons calls GetCurrentClocksEventReasonsFunc. -func (mock *Device) GetCurrentClocksEventReasons() (uint64, nvml.Return) { - if mock.GetCurrentClocksEventReasonsFunc == nil { - panic("Device.GetCurrentClocksEventReasonsFunc: method is nil but Device.GetCurrentClocksEventReasons was just called") - } - callInfo := struct { - }{} - mock.lockGetCurrentClocksEventReasons.Lock() - mock.calls.GetCurrentClocksEventReasons = append(mock.calls.GetCurrentClocksEventReasons, callInfo) - mock.lockGetCurrentClocksEventReasons.Unlock() - return mock.GetCurrentClocksEventReasonsFunc() -} - -// GetCurrentClocksEventReasonsCalls gets all the calls that were made to GetCurrentClocksEventReasons. -// Check the length with: -// -// len(mockedDevice.GetCurrentClocksEventReasonsCalls()) -func (mock *Device) GetCurrentClocksEventReasonsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetCurrentClocksEventReasons.RLock() - calls = mock.calls.GetCurrentClocksEventReasons - mock.lockGetCurrentClocksEventReasons.RUnlock() - return calls -} - -// GetCurrentClocksThrottleReasons calls GetCurrentClocksThrottleReasonsFunc. -func (mock *Device) GetCurrentClocksThrottleReasons() (uint64, nvml.Return) { - if mock.GetCurrentClocksThrottleReasonsFunc == nil { - panic("Device.GetCurrentClocksThrottleReasonsFunc: method is nil but Device.GetCurrentClocksThrottleReasons was just called") - } - callInfo := struct { - }{} - mock.lockGetCurrentClocksThrottleReasons.Lock() - mock.calls.GetCurrentClocksThrottleReasons = append(mock.calls.GetCurrentClocksThrottleReasons, callInfo) - mock.lockGetCurrentClocksThrottleReasons.Unlock() - return mock.GetCurrentClocksThrottleReasonsFunc() -} - -// GetCurrentClocksThrottleReasonsCalls gets all the calls that were made to GetCurrentClocksThrottleReasons. -// Check the length with: -// -// len(mockedDevice.GetCurrentClocksThrottleReasonsCalls()) -func (mock *Device) GetCurrentClocksThrottleReasonsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetCurrentClocksThrottleReasons.RLock() - calls = mock.calls.GetCurrentClocksThrottleReasons - mock.lockGetCurrentClocksThrottleReasons.RUnlock() - return calls -} - -// GetDecoderUtilization calls GetDecoderUtilizationFunc. -func (mock *Device) GetDecoderUtilization() (uint32, uint32, nvml.Return) { - if mock.GetDecoderUtilizationFunc == nil { - panic("Device.GetDecoderUtilizationFunc: method is nil but Device.GetDecoderUtilization was just called") - } - callInfo := struct { - }{} - mock.lockGetDecoderUtilization.Lock() - mock.calls.GetDecoderUtilization = append(mock.calls.GetDecoderUtilization, callInfo) - mock.lockGetDecoderUtilization.Unlock() - return mock.GetDecoderUtilizationFunc() -} - -// GetDecoderUtilizationCalls gets all the calls that were made to GetDecoderUtilization. -// Check the length with: -// -// len(mockedDevice.GetDecoderUtilizationCalls()) -func (mock *Device) GetDecoderUtilizationCalls() []struct { -} { - var calls []struct { - } - mock.lockGetDecoderUtilization.RLock() - calls = mock.calls.GetDecoderUtilization - mock.lockGetDecoderUtilization.RUnlock() - return calls -} - -// GetDefaultApplicationsClock calls GetDefaultApplicationsClockFunc. -func (mock *Device) GetDefaultApplicationsClock(clockType nvml.ClockType) (uint32, nvml.Return) { - if mock.GetDefaultApplicationsClockFunc == nil { - panic("Device.GetDefaultApplicationsClockFunc: method is nil but Device.GetDefaultApplicationsClock was just called") - } - callInfo := struct { - ClockType nvml.ClockType - }{ - ClockType: clockType, - } - mock.lockGetDefaultApplicationsClock.Lock() - mock.calls.GetDefaultApplicationsClock = append(mock.calls.GetDefaultApplicationsClock, callInfo) - mock.lockGetDefaultApplicationsClock.Unlock() - return mock.GetDefaultApplicationsClockFunc(clockType) -} - -// GetDefaultApplicationsClockCalls gets all the calls that were made to GetDefaultApplicationsClock. -// Check the length with: -// -// len(mockedDevice.GetDefaultApplicationsClockCalls()) -func (mock *Device) GetDefaultApplicationsClockCalls() []struct { - ClockType nvml.ClockType -} { - var calls []struct { - ClockType nvml.ClockType - } - mock.lockGetDefaultApplicationsClock.RLock() - calls = mock.calls.GetDefaultApplicationsClock - mock.lockGetDefaultApplicationsClock.RUnlock() - return calls -} - -// GetDefaultEccMode calls GetDefaultEccModeFunc. -func (mock *Device) GetDefaultEccMode() (nvml.EnableState, nvml.Return) { - if mock.GetDefaultEccModeFunc == nil { - panic("Device.GetDefaultEccModeFunc: method is nil but Device.GetDefaultEccMode was just called") - } - callInfo := struct { - }{} - mock.lockGetDefaultEccMode.Lock() - mock.calls.GetDefaultEccMode = append(mock.calls.GetDefaultEccMode, callInfo) - mock.lockGetDefaultEccMode.Unlock() - return mock.GetDefaultEccModeFunc() -} - -// GetDefaultEccModeCalls gets all the calls that were made to GetDefaultEccMode. -// Check the length with: -// -// len(mockedDevice.GetDefaultEccModeCalls()) -func (mock *Device) GetDefaultEccModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetDefaultEccMode.RLock() - calls = mock.calls.GetDefaultEccMode - mock.lockGetDefaultEccMode.RUnlock() - return calls -} - -// GetDetailedEccErrors calls GetDetailedEccErrorsFunc. -func (mock *Device) GetDetailedEccErrors(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) { - if mock.GetDetailedEccErrorsFunc == nil { - panic("Device.GetDetailedEccErrorsFunc: method is nil but Device.GetDetailedEccErrors was just called") - } - callInfo := struct { - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - }{ - MemoryErrorType: memoryErrorType, - EccCounterType: eccCounterType, - } - mock.lockGetDetailedEccErrors.Lock() - mock.calls.GetDetailedEccErrors = append(mock.calls.GetDetailedEccErrors, callInfo) - mock.lockGetDetailedEccErrors.Unlock() - return mock.GetDetailedEccErrorsFunc(memoryErrorType, eccCounterType) -} - -// GetDetailedEccErrorsCalls gets all the calls that were made to GetDetailedEccErrors. -// Check the length with: -// -// len(mockedDevice.GetDetailedEccErrorsCalls()) -func (mock *Device) GetDetailedEccErrorsCalls() []struct { - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType -} { - var calls []struct { - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - } - mock.lockGetDetailedEccErrors.RLock() - calls = mock.calls.GetDetailedEccErrors - mock.lockGetDetailedEccErrors.RUnlock() - return calls -} - -// GetDeviceHandleFromMigDeviceHandle calls GetDeviceHandleFromMigDeviceHandleFunc. -func (mock *Device) GetDeviceHandleFromMigDeviceHandle() (nvml.Device, nvml.Return) { - if mock.GetDeviceHandleFromMigDeviceHandleFunc == nil { - panic("Device.GetDeviceHandleFromMigDeviceHandleFunc: method is nil but Device.GetDeviceHandleFromMigDeviceHandle was just called") - } - callInfo := struct { - }{} - mock.lockGetDeviceHandleFromMigDeviceHandle.Lock() - mock.calls.GetDeviceHandleFromMigDeviceHandle = append(mock.calls.GetDeviceHandleFromMigDeviceHandle, callInfo) - mock.lockGetDeviceHandleFromMigDeviceHandle.Unlock() - return mock.GetDeviceHandleFromMigDeviceHandleFunc() -} - -// GetDeviceHandleFromMigDeviceHandleCalls gets all the calls that were made to GetDeviceHandleFromMigDeviceHandle. -// Check the length with: -// -// len(mockedDevice.GetDeviceHandleFromMigDeviceHandleCalls()) -func (mock *Device) GetDeviceHandleFromMigDeviceHandleCalls() []struct { -} { - var calls []struct { - } - mock.lockGetDeviceHandleFromMigDeviceHandle.RLock() - calls = mock.calls.GetDeviceHandleFromMigDeviceHandle - mock.lockGetDeviceHandleFromMigDeviceHandle.RUnlock() - return calls -} - -// GetDisplayActive calls GetDisplayActiveFunc. -func (mock *Device) GetDisplayActive() (nvml.EnableState, nvml.Return) { - if mock.GetDisplayActiveFunc == nil { - panic("Device.GetDisplayActiveFunc: method is nil but Device.GetDisplayActive was just called") - } - callInfo := struct { - }{} - mock.lockGetDisplayActive.Lock() - mock.calls.GetDisplayActive = append(mock.calls.GetDisplayActive, callInfo) - mock.lockGetDisplayActive.Unlock() - return mock.GetDisplayActiveFunc() -} - -// GetDisplayActiveCalls gets all the calls that were made to GetDisplayActive. -// Check the length with: -// -// len(mockedDevice.GetDisplayActiveCalls()) -func (mock *Device) GetDisplayActiveCalls() []struct { -} { - var calls []struct { - } - mock.lockGetDisplayActive.RLock() - calls = mock.calls.GetDisplayActive - mock.lockGetDisplayActive.RUnlock() - return calls -} - -// GetDisplayMode calls GetDisplayModeFunc. -func (mock *Device) GetDisplayMode() (nvml.EnableState, nvml.Return) { - if mock.GetDisplayModeFunc == nil { - panic("Device.GetDisplayModeFunc: method is nil but Device.GetDisplayMode was just called") - } - callInfo := struct { - }{} - mock.lockGetDisplayMode.Lock() - mock.calls.GetDisplayMode = append(mock.calls.GetDisplayMode, callInfo) - mock.lockGetDisplayMode.Unlock() - return mock.GetDisplayModeFunc() -} - -// GetDisplayModeCalls gets all the calls that were made to GetDisplayMode. -// Check the length with: -// -// len(mockedDevice.GetDisplayModeCalls()) -func (mock *Device) GetDisplayModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetDisplayMode.RLock() - calls = mock.calls.GetDisplayMode - mock.lockGetDisplayMode.RUnlock() - return calls -} - -// GetDramEncryptionMode calls GetDramEncryptionModeFunc. -func (mock *Device) GetDramEncryptionMode() (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) { - if mock.GetDramEncryptionModeFunc == nil { - panic("Device.GetDramEncryptionModeFunc: method is nil but Device.GetDramEncryptionMode was just called") - } - callInfo := struct { - }{} - mock.lockGetDramEncryptionMode.Lock() - mock.calls.GetDramEncryptionMode = append(mock.calls.GetDramEncryptionMode, callInfo) - mock.lockGetDramEncryptionMode.Unlock() - return mock.GetDramEncryptionModeFunc() -} - -// GetDramEncryptionModeCalls gets all the calls that were made to GetDramEncryptionMode. -// Check the length with: -// -// len(mockedDevice.GetDramEncryptionModeCalls()) -func (mock *Device) GetDramEncryptionModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetDramEncryptionMode.RLock() - calls = mock.calls.GetDramEncryptionMode - mock.lockGetDramEncryptionMode.RUnlock() - return calls -} - -// GetDriverModel calls GetDriverModelFunc. -func (mock *Device) GetDriverModel() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { - if mock.GetDriverModelFunc == nil { - panic("Device.GetDriverModelFunc: method is nil but Device.GetDriverModel was just called") - } - callInfo := struct { - }{} - mock.lockGetDriverModel.Lock() - mock.calls.GetDriverModel = append(mock.calls.GetDriverModel, callInfo) - mock.lockGetDriverModel.Unlock() - return mock.GetDriverModelFunc() -} - -// GetDriverModelCalls gets all the calls that were made to GetDriverModel. -// Check the length with: -// -// len(mockedDevice.GetDriverModelCalls()) -func (mock *Device) GetDriverModelCalls() []struct { -} { - var calls []struct { - } - mock.lockGetDriverModel.RLock() - calls = mock.calls.GetDriverModel - mock.lockGetDriverModel.RUnlock() - return calls -} - -// GetDriverModel_v2 calls GetDriverModel_v2Func. -func (mock *Device) GetDriverModel_v2() (nvml.DriverModel, nvml.DriverModel, nvml.Return) { - if mock.GetDriverModel_v2Func == nil { - panic("Device.GetDriverModel_v2Func: method is nil but Device.GetDriverModel_v2 was just called") - } - callInfo := struct { - }{} - mock.lockGetDriverModel_v2.Lock() - mock.calls.GetDriverModel_v2 = append(mock.calls.GetDriverModel_v2, callInfo) - mock.lockGetDriverModel_v2.Unlock() - return mock.GetDriverModel_v2Func() -} - -// GetDriverModel_v2Calls gets all the calls that were made to GetDriverModel_v2. -// Check the length with: -// -// len(mockedDevice.GetDriverModel_v2Calls()) -func (mock *Device) GetDriverModel_v2Calls() []struct { -} { - var calls []struct { - } - mock.lockGetDriverModel_v2.RLock() - calls = mock.calls.GetDriverModel_v2 - mock.lockGetDriverModel_v2.RUnlock() - return calls -} - -// GetDynamicPstatesInfo calls GetDynamicPstatesInfoFunc. -func (mock *Device) GetDynamicPstatesInfo() (nvml.GpuDynamicPstatesInfo, nvml.Return) { - if mock.GetDynamicPstatesInfoFunc == nil { - panic("Device.GetDynamicPstatesInfoFunc: method is nil but Device.GetDynamicPstatesInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetDynamicPstatesInfo.Lock() - mock.calls.GetDynamicPstatesInfo = append(mock.calls.GetDynamicPstatesInfo, callInfo) - mock.lockGetDynamicPstatesInfo.Unlock() - return mock.GetDynamicPstatesInfoFunc() -} - -// GetDynamicPstatesInfoCalls gets all the calls that were made to GetDynamicPstatesInfo. -// Check the length with: -// -// len(mockedDevice.GetDynamicPstatesInfoCalls()) -func (mock *Device) GetDynamicPstatesInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetDynamicPstatesInfo.RLock() - calls = mock.calls.GetDynamicPstatesInfo - mock.lockGetDynamicPstatesInfo.RUnlock() - return calls -} - -// GetEccMode calls GetEccModeFunc. -func (mock *Device) GetEccMode() (nvml.EnableState, nvml.EnableState, nvml.Return) { - if mock.GetEccModeFunc == nil { - panic("Device.GetEccModeFunc: method is nil but Device.GetEccMode was just called") - } - callInfo := struct { - }{} - mock.lockGetEccMode.Lock() - mock.calls.GetEccMode = append(mock.calls.GetEccMode, callInfo) - mock.lockGetEccMode.Unlock() - return mock.GetEccModeFunc() -} - -// GetEccModeCalls gets all the calls that were made to GetEccMode. -// Check the length with: -// -// len(mockedDevice.GetEccModeCalls()) -func (mock *Device) GetEccModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetEccMode.RLock() - calls = mock.calls.GetEccMode - mock.lockGetEccMode.RUnlock() - return calls -} - -// GetEncoderCapacity calls GetEncoderCapacityFunc. -func (mock *Device) GetEncoderCapacity(encoderType nvml.EncoderType) (int, nvml.Return) { - if mock.GetEncoderCapacityFunc == nil { - panic("Device.GetEncoderCapacityFunc: method is nil but Device.GetEncoderCapacity was just called") - } - callInfo := struct { - EncoderType nvml.EncoderType - }{ - EncoderType: encoderType, - } - mock.lockGetEncoderCapacity.Lock() - mock.calls.GetEncoderCapacity = append(mock.calls.GetEncoderCapacity, callInfo) - mock.lockGetEncoderCapacity.Unlock() - return mock.GetEncoderCapacityFunc(encoderType) -} - -// GetEncoderCapacityCalls gets all the calls that were made to GetEncoderCapacity. -// Check the length with: -// -// len(mockedDevice.GetEncoderCapacityCalls()) -func (mock *Device) GetEncoderCapacityCalls() []struct { - EncoderType nvml.EncoderType -} { - var calls []struct { - EncoderType nvml.EncoderType - } - mock.lockGetEncoderCapacity.RLock() - calls = mock.calls.GetEncoderCapacity - mock.lockGetEncoderCapacity.RUnlock() - return calls -} - -// GetEncoderSessions calls GetEncoderSessionsFunc. -func (mock *Device) GetEncoderSessions() ([]nvml.EncoderSessionInfo, nvml.Return) { - if mock.GetEncoderSessionsFunc == nil { - panic("Device.GetEncoderSessionsFunc: method is nil but Device.GetEncoderSessions was just called") - } - callInfo := struct { - }{} - mock.lockGetEncoderSessions.Lock() - mock.calls.GetEncoderSessions = append(mock.calls.GetEncoderSessions, callInfo) - mock.lockGetEncoderSessions.Unlock() - return mock.GetEncoderSessionsFunc() -} - -// GetEncoderSessionsCalls gets all the calls that were made to GetEncoderSessions. -// Check the length with: -// -// len(mockedDevice.GetEncoderSessionsCalls()) -func (mock *Device) GetEncoderSessionsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetEncoderSessions.RLock() - calls = mock.calls.GetEncoderSessions - mock.lockGetEncoderSessions.RUnlock() - return calls -} - -// GetEncoderStats calls GetEncoderStatsFunc. -func (mock *Device) GetEncoderStats() (int, uint32, uint32, nvml.Return) { - if mock.GetEncoderStatsFunc == nil { - panic("Device.GetEncoderStatsFunc: method is nil but Device.GetEncoderStats was just called") - } - callInfo := struct { - }{} - mock.lockGetEncoderStats.Lock() - mock.calls.GetEncoderStats = append(mock.calls.GetEncoderStats, callInfo) - mock.lockGetEncoderStats.Unlock() - return mock.GetEncoderStatsFunc() -} - -// GetEncoderStatsCalls gets all the calls that were made to GetEncoderStats. -// Check the length with: -// -// len(mockedDevice.GetEncoderStatsCalls()) -func (mock *Device) GetEncoderStatsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetEncoderStats.RLock() - calls = mock.calls.GetEncoderStats - mock.lockGetEncoderStats.RUnlock() - return calls -} - -// GetEncoderUtilization calls GetEncoderUtilizationFunc. -func (mock *Device) GetEncoderUtilization() (uint32, uint32, nvml.Return) { - if mock.GetEncoderUtilizationFunc == nil { - panic("Device.GetEncoderUtilizationFunc: method is nil but Device.GetEncoderUtilization was just called") - } - callInfo := struct { - }{} - mock.lockGetEncoderUtilization.Lock() - mock.calls.GetEncoderUtilization = append(mock.calls.GetEncoderUtilization, callInfo) - mock.lockGetEncoderUtilization.Unlock() - return mock.GetEncoderUtilizationFunc() -} - -// GetEncoderUtilizationCalls gets all the calls that were made to GetEncoderUtilization. -// Check the length with: -// -// len(mockedDevice.GetEncoderUtilizationCalls()) -func (mock *Device) GetEncoderUtilizationCalls() []struct { -} { - var calls []struct { - } - mock.lockGetEncoderUtilization.RLock() - calls = mock.calls.GetEncoderUtilization - mock.lockGetEncoderUtilization.RUnlock() - return calls -} - -// GetEnforcedPowerLimit calls GetEnforcedPowerLimitFunc. -func (mock *Device) GetEnforcedPowerLimit() (uint32, nvml.Return) { - if mock.GetEnforcedPowerLimitFunc == nil { - panic("Device.GetEnforcedPowerLimitFunc: method is nil but Device.GetEnforcedPowerLimit was just called") - } - callInfo := struct { - }{} - mock.lockGetEnforcedPowerLimit.Lock() - mock.calls.GetEnforcedPowerLimit = append(mock.calls.GetEnforcedPowerLimit, callInfo) - mock.lockGetEnforcedPowerLimit.Unlock() - return mock.GetEnforcedPowerLimitFunc() -} - -// GetEnforcedPowerLimitCalls gets all the calls that were made to GetEnforcedPowerLimit. -// Check the length with: -// -// len(mockedDevice.GetEnforcedPowerLimitCalls()) -func (mock *Device) GetEnforcedPowerLimitCalls() []struct { -} { - var calls []struct { - } - mock.lockGetEnforcedPowerLimit.RLock() - calls = mock.calls.GetEnforcedPowerLimit - mock.lockGetEnforcedPowerLimit.RUnlock() - return calls -} - -// GetFBCSessions calls GetFBCSessionsFunc. -func (mock *Device) GetFBCSessions() ([]nvml.FBCSessionInfo, nvml.Return) { - if mock.GetFBCSessionsFunc == nil { - panic("Device.GetFBCSessionsFunc: method is nil but Device.GetFBCSessions was just called") - } - callInfo := struct { - }{} - mock.lockGetFBCSessions.Lock() - mock.calls.GetFBCSessions = append(mock.calls.GetFBCSessions, callInfo) - mock.lockGetFBCSessions.Unlock() - return mock.GetFBCSessionsFunc() -} - -// GetFBCSessionsCalls gets all the calls that were made to GetFBCSessions. -// Check the length with: -// -// len(mockedDevice.GetFBCSessionsCalls()) -func (mock *Device) GetFBCSessionsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetFBCSessions.RLock() - calls = mock.calls.GetFBCSessions - mock.lockGetFBCSessions.RUnlock() - return calls -} - -// GetFBCStats calls GetFBCStatsFunc. -func (mock *Device) GetFBCStats() (nvml.FBCStats, nvml.Return) { - if mock.GetFBCStatsFunc == nil { - panic("Device.GetFBCStatsFunc: method is nil but Device.GetFBCStats was just called") - } - callInfo := struct { - }{} - mock.lockGetFBCStats.Lock() - mock.calls.GetFBCStats = append(mock.calls.GetFBCStats, callInfo) - mock.lockGetFBCStats.Unlock() - return mock.GetFBCStatsFunc() -} - -// GetFBCStatsCalls gets all the calls that were made to GetFBCStats. -// Check the length with: -// -// len(mockedDevice.GetFBCStatsCalls()) -func (mock *Device) GetFBCStatsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetFBCStats.RLock() - calls = mock.calls.GetFBCStats - mock.lockGetFBCStats.RUnlock() - return calls -} - -// GetFanControlPolicy_v2 calls GetFanControlPolicy_v2Func. -func (mock *Device) GetFanControlPolicy_v2(n int) (nvml.FanControlPolicy, nvml.Return) { - if mock.GetFanControlPolicy_v2Func == nil { - panic("Device.GetFanControlPolicy_v2Func: method is nil but Device.GetFanControlPolicy_v2 was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetFanControlPolicy_v2.Lock() - mock.calls.GetFanControlPolicy_v2 = append(mock.calls.GetFanControlPolicy_v2, callInfo) - mock.lockGetFanControlPolicy_v2.Unlock() - return mock.GetFanControlPolicy_v2Func(n) -} - -// GetFanControlPolicy_v2Calls gets all the calls that were made to GetFanControlPolicy_v2. -// Check the length with: -// -// len(mockedDevice.GetFanControlPolicy_v2Calls()) -func (mock *Device) GetFanControlPolicy_v2Calls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetFanControlPolicy_v2.RLock() - calls = mock.calls.GetFanControlPolicy_v2 - mock.lockGetFanControlPolicy_v2.RUnlock() - return calls -} - -// GetFanSpeed calls GetFanSpeedFunc. -func (mock *Device) GetFanSpeed() (uint32, nvml.Return) { - if mock.GetFanSpeedFunc == nil { - panic("Device.GetFanSpeedFunc: method is nil but Device.GetFanSpeed was just called") - } - callInfo := struct { - }{} - mock.lockGetFanSpeed.Lock() - mock.calls.GetFanSpeed = append(mock.calls.GetFanSpeed, callInfo) - mock.lockGetFanSpeed.Unlock() - return mock.GetFanSpeedFunc() -} - -// GetFanSpeedCalls gets all the calls that were made to GetFanSpeed. -// Check the length with: -// -// len(mockedDevice.GetFanSpeedCalls()) -func (mock *Device) GetFanSpeedCalls() []struct { -} { - var calls []struct { - } - mock.lockGetFanSpeed.RLock() - calls = mock.calls.GetFanSpeed - mock.lockGetFanSpeed.RUnlock() - return calls -} - -// GetFanSpeedRPM calls GetFanSpeedRPMFunc. -func (mock *Device) GetFanSpeedRPM() (nvml.FanSpeedInfo, nvml.Return) { - if mock.GetFanSpeedRPMFunc == nil { - panic("Device.GetFanSpeedRPMFunc: method is nil but Device.GetFanSpeedRPM was just called") - } - callInfo := struct { - }{} - mock.lockGetFanSpeedRPM.Lock() - mock.calls.GetFanSpeedRPM = append(mock.calls.GetFanSpeedRPM, callInfo) - mock.lockGetFanSpeedRPM.Unlock() - return mock.GetFanSpeedRPMFunc() -} - -// GetFanSpeedRPMCalls gets all the calls that were made to GetFanSpeedRPM. -// Check the length with: -// -// len(mockedDevice.GetFanSpeedRPMCalls()) -func (mock *Device) GetFanSpeedRPMCalls() []struct { -} { - var calls []struct { - } - mock.lockGetFanSpeedRPM.RLock() - calls = mock.calls.GetFanSpeedRPM - mock.lockGetFanSpeedRPM.RUnlock() - return calls -} - -// GetFanSpeed_v2 calls GetFanSpeed_v2Func. -func (mock *Device) GetFanSpeed_v2(n int) (uint32, nvml.Return) { - if mock.GetFanSpeed_v2Func == nil { - panic("Device.GetFanSpeed_v2Func: method is nil but Device.GetFanSpeed_v2 was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetFanSpeed_v2.Lock() - mock.calls.GetFanSpeed_v2 = append(mock.calls.GetFanSpeed_v2, callInfo) - mock.lockGetFanSpeed_v2.Unlock() - return mock.GetFanSpeed_v2Func(n) -} - -// GetFanSpeed_v2Calls gets all the calls that were made to GetFanSpeed_v2. -// Check the length with: -// -// len(mockedDevice.GetFanSpeed_v2Calls()) -func (mock *Device) GetFanSpeed_v2Calls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetFanSpeed_v2.RLock() - calls = mock.calls.GetFanSpeed_v2 - mock.lockGetFanSpeed_v2.RUnlock() - return calls -} - -// GetFieldValues calls GetFieldValuesFunc. -func (mock *Device) GetFieldValues(fieldValues []nvml.FieldValue) nvml.Return { - if mock.GetFieldValuesFunc == nil { - panic("Device.GetFieldValuesFunc: method is nil but Device.GetFieldValues was just called") - } - callInfo := struct { - FieldValues []nvml.FieldValue - }{ - FieldValues: fieldValues, - } - mock.lockGetFieldValues.Lock() - mock.calls.GetFieldValues = append(mock.calls.GetFieldValues, callInfo) - mock.lockGetFieldValues.Unlock() - return mock.GetFieldValuesFunc(fieldValues) -} - -// GetFieldValuesCalls gets all the calls that were made to GetFieldValues. -// Check the length with: -// -// len(mockedDevice.GetFieldValuesCalls()) -func (mock *Device) GetFieldValuesCalls() []struct { - FieldValues []nvml.FieldValue -} { - var calls []struct { - FieldValues []nvml.FieldValue - } - mock.lockGetFieldValues.RLock() - calls = mock.calls.GetFieldValues - mock.lockGetFieldValues.RUnlock() - return calls -} - -// GetGpcClkMinMaxVfOffset calls GetGpcClkMinMaxVfOffsetFunc. -func (mock *Device) GetGpcClkMinMaxVfOffset() (int, int, nvml.Return) { - if mock.GetGpcClkMinMaxVfOffsetFunc == nil { - panic("Device.GetGpcClkMinMaxVfOffsetFunc: method is nil but Device.GetGpcClkMinMaxVfOffset was just called") - } - callInfo := struct { - }{} - mock.lockGetGpcClkMinMaxVfOffset.Lock() - mock.calls.GetGpcClkMinMaxVfOffset = append(mock.calls.GetGpcClkMinMaxVfOffset, callInfo) - mock.lockGetGpcClkMinMaxVfOffset.Unlock() - return mock.GetGpcClkMinMaxVfOffsetFunc() -} - -// GetGpcClkMinMaxVfOffsetCalls gets all the calls that were made to GetGpcClkMinMaxVfOffset. -// Check the length with: -// -// len(mockedDevice.GetGpcClkMinMaxVfOffsetCalls()) -func (mock *Device) GetGpcClkMinMaxVfOffsetCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGpcClkMinMaxVfOffset.RLock() - calls = mock.calls.GetGpcClkMinMaxVfOffset - mock.lockGetGpcClkMinMaxVfOffset.RUnlock() - return calls -} - -// GetGpcClkVfOffset calls GetGpcClkVfOffsetFunc. -func (mock *Device) GetGpcClkVfOffset() (int, nvml.Return) { - if mock.GetGpcClkVfOffsetFunc == nil { - panic("Device.GetGpcClkVfOffsetFunc: method is nil but Device.GetGpcClkVfOffset was just called") - } - callInfo := struct { - }{} - mock.lockGetGpcClkVfOffset.Lock() - mock.calls.GetGpcClkVfOffset = append(mock.calls.GetGpcClkVfOffset, callInfo) - mock.lockGetGpcClkVfOffset.Unlock() - return mock.GetGpcClkVfOffsetFunc() -} - -// GetGpcClkVfOffsetCalls gets all the calls that were made to GetGpcClkVfOffset. -// Check the length with: -// -// len(mockedDevice.GetGpcClkVfOffsetCalls()) -func (mock *Device) GetGpcClkVfOffsetCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGpcClkVfOffset.RLock() - calls = mock.calls.GetGpcClkVfOffset - mock.lockGetGpcClkVfOffset.RUnlock() - return calls -} - -// GetGpuFabricInfo calls GetGpuFabricInfoFunc. -func (mock *Device) GetGpuFabricInfo() (nvml.GpuFabricInfo, nvml.Return) { - if mock.GetGpuFabricInfoFunc == nil { - panic("Device.GetGpuFabricInfoFunc: method is nil but Device.GetGpuFabricInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetGpuFabricInfo.Lock() - mock.calls.GetGpuFabricInfo = append(mock.calls.GetGpuFabricInfo, callInfo) - mock.lockGetGpuFabricInfo.Unlock() - return mock.GetGpuFabricInfoFunc() -} - -// GetGpuFabricInfoCalls gets all the calls that were made to GetGpuFabricInfo. -// Check the length with: -// -// len(mockedDevice.GetGpuFabricInfoCalls()) -func (mock *Device) GetGpuFabricInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGpuFabricInfo.RLock() - calls = mock.calls.GetGpuFabricInfo - mock.lockGetGpuFabricInfo.RUnlock() - return calls -} - -// GetGpuFabricInfoV calls GetGpuFabricInfoVFunc. -func (mock *Device) GetGpuFabricInfoV() nvml.GpuFabricInfoHandler { - if mock.GetGpuFabricInfoVFunc == nil { - panic("Device.GetGpuFabricInfoVFunc: method is nil but Device.GetGpuFabricInfoV was just called") - } - callInfo := struct { - }{} - mock.lockGetGpuFabricInfoV.Lock() - mock.calls.GetGpuFabricInfoV = append(mock.calls.GetGpuFabricInfoV, callInfo) - mock.lockGetGpuFabricInfoV.Unlock() - return mock.GetGpuFabricInfoVFunc() -} - -// GetGpuFabricInfoVCalls gets all the calls that were made to GetGpuFabricInfoV. -// Check the length with: -// -// len(mockedDevice.GetGpuFabricInfoVCalls()) -func (mock *Device) GetGpuFabricInfoVCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGpuFabricInfoV.RLock() - calls = mock.calls.GetGpuFabricInfoV - mock.lockGetGpuFabricInfoV.RUnlock() - return calls -} - -// GetGpuInstanceById calls GetGpuInstanceByIdFunc. -func (mock *Device) GetGpuInstanceById(n int) (nvml.GpuInstance, nvml.Return) { - if mock.GetGpuInstanceByIdFunc == nil { - panic("Device.GetGpuInstanceByIdFunc: method is nil but Device.GetGpuInstanceById was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetGpuInstanceById.Lock() - mock.calls.GetGpuInstanceById = append(mock.calls.GetGpuInstanceById, callInfo) - mock.lockGetGpuInstanceById.Unlock() - return mock.GetGpuInstanceByIdFunc(n) -} - -// GetGpuInstanceByIdCalls gets all the calls that were made to GetGpuInstanceById. -// Check the length with: -// -// len(mockedDevice.GetGpuInstanceByIdCalls()) -func (mock *Device) GetGpuInstanceByIdCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetGpuInstanceById.RLock() - calls = mock.calls.GetGpuInstanceById - mock.lockGetGpuInstanceById.RUnlock() - return calls -} - -// GetGpuInstanceId calls GetGpuInstanceIdFunc. -func (mock *Device) GetGpuInstanceId() (int, nvml.Return) { - if mock.GetGpuInstanceIdFunc == nil { - panic("Device.GetGpuInstanceIdFunc: method is nil but Device.GetGpuInstanceId was just called") - } - callInfo := struct { - }{} - mock.lockGetGpuInstanceId.Lock() - mock.calls.GetGpuInstanceId = append(mock.calls.GetGpuInstanceId, callInfo) - mock.lockGetGpuInstanceId.Unlock() - return mock.GetGpuInstanceIdFunc() -} - -// GetGpuInstanceIdCalls gets all the calls that were made to GetGpuInstanceId. -// Check the length with: -// -// len(mockedDevice.GetGpuInstanceIdCalls()) -func (mock *Device) GetGpuInstanceIdCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGpuInstanceId.RLock() - calls = mock.calls.GetGpuInstanceId - mock.lockGetGpuInstanceId.RUnlock() - return calls -} - -// GetGpuInstancePossiblePlacements calls GetGpuInstancePossiblePlacementsFunc. -func (mock *Device) GetGpuInstancePossiblePlacements(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { - if mock.GetGpuInstancePossiblePlacementsFunc == nil { - panic("Device.GetGpuInstancePossiblePlacementsFunc: method is nil but Device.GetGpuInstancePossiblePlacements was just called") - } - callInfo := struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - }{ - GpuInstanceProfileInfo: gpuInstanceProfileInfo, - } - mock.lockGetGpuInstancePossiblePlacements.Lock() - mock.calls.GetGpuInstancePossiblePlacements = append(mock.calls.GetGpuInstancePossiblePlacements, callInfo) - mock.lockGetGpuInstancePossiblePlacements.Unlock() - return mock.GetGpuInstancePossiblePlacementsFunc(gpuInstanceProfileInfo) -} - -// GetGpuInstancePossiblePlacementsCalls gets all the calls that were made to GetGpuInstancePossiblePlacements. -// Check the length with: -// -// len(mockedDevice.GetGpuInstancePossiblePlacementsCalls()) -func (mock *Device) GetGpuInstancePossiblePlacementsCalls() []struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo -} { - var calls []struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - mock.lockGetGpuInstancePossiblePlacements.RLock() - calls = mock.calls.GetGpuInstancePossiblePlacements - mock.lockGetGpuInstancePossiblePlacements.RUnlock() - return calls -} - -// GetGpuInstanceProfileInfo calls GetGpuInstanceProfileInfoFunc. -func (mock *Device) GetGpuInstanceProfileInfo(n int) (nvml.GpuInstanceProfileInfo, nvml.Return) { - if mock.GetGpuInstanceProfileInfoFunc == nil { - panic("Device.GetGpuInstanceProfileInfoFunc: method is nil but Device.GetGpuInstanceProfileInfo was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetGpuInstanceProfileInfo.Lock() - mock.calls.GetGpuInstanceProfileInfo = append(mock.calls.GetGpuInstanceProfileInfo, callInfo) - mock.lockGetGpuInstanceProfileInfo.Unlock() - return mock.GetGpuInstanceProfileInfoFunc(n) -} - -// GetGpuInstanceProfileInfoCalls gets all the calls that were made to GetGpuInstanceProfileInfo. -// Check the length with: -// -// len(mockedDevice.GetGpuInstanceProfileInfoCalls()) -func (mock *Device) GetGpuInstanceProfileInfoCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetGpuInstanceProfileInfo.RLock() - calls = mock.calls.GetGpuInstanceProfileInfo - mock.lockGetGpuInstanceProfileInfo.RUnlock() - return calls -} - -// GetGpuInstanceProfileInfoByIdV calls GetGpuInstanceProfileInfoByIdVFunc. -func (mock *Device) GetGpuInstanceProfileInfoByIdV(n int) nvml.GpuInstanceProfileInfoByIdHandler { - if mock.GetGpuInstanceProfileInfoByIdVFunc == nil { - panic("Device.GetGpuInstanceProfileInfoByIdVFunc: method is nil but Device.GetGpuInstanceProfileInfoByIdV was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetGpuInstanceProfileInfoByIdV.Lock() - mock.calls.GetGpuInstanceProfileInfoByIdV = append(mock.calls.GetGpuInstanceProfileInfoByIdV, callInfo) - mock.lockGetGpuInstanceProfileInfoByIdV.Unlock() - return mock.GetGpuInstanceProfileInfoByIdVFunc(n) -} - -// GetGpuInstanceProfileInfoByIdVCalls gets all the calls that were made to GetGpuInstanceProfileInfoByIdV. -// Check the length with: -// -// len(mockedDevice.GetGpuInstanceProfileInfoByIdVCalls()) -func (mock *Device) GetGpuInstanceProfileInfoByIdVCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetGpuInstanceProfileInfoByIdV.RLock() - calls = mock.calls.GetGpuInstanceProfileInfoByIdV - mock.lockGetGpuInstanceProfileInfoByIdV.RUnlock() - return calls -} - -// GetGpuInstanceProfileInfoV calls GetGpuInstanceProfileInfoVFunc. -func (mock *Device) GetGpuInstanceProfileInfoV(n int) nvml.GpuInstanceProfileInfoHandler { - if mock.GetGpuInstanceProfileInfoVFunc == nil { - panic("Device.GetGpuInstanceProfileInfoVFunc: method is nil but Device.GetGpuInstanceProfileInfoV was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetGpuInstanceProfileInfoV.Lock() - mock.calls.GetGpuInstanceProfileInfoV = append(mock.calls.GetGpuInstanceProfileInfoV, callInfo) - mock.lockGetGpuInstanceProfileInfoV.Unlock() - return mock.GetGpuInstanceProfileInfoVFunc(n) -} - -// GetGpuInstanceProfileInfoVCalls gets all the calls that were made to GetGpuInstanceProfileInfoV. -// Check the length with: -// -// len(mockedDevice.GetGpuInstanceProfileInfoVCalls()) -func (mock *Device) GetGpuInstanceProfileInfoVCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetGpuInstanceProfileInfoV.RLock() - calls = mock.calls.GetGpuInstanceProfileInfoV - mock.lockGetGpuInstanceProfileInfoV.RUnlock() - return calls -} - -// GetGpuInstanceRemainingCapacity calls GetGpuInstanceRemainingCapacityFunc. -func (mock *Device) GetGpuInstanceRemainingCapacity(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) { - if mock.GetGpuInstanceRemainingCapacityFunc == nil { - panic("Device.GetGpuInstanceRemainingCapacityFunc: method is nil but Device.GetGpuInstanceRemainingCapacity was just called") - } - callInfo := struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - }{ - GpuInstanceProfileInfo: gpuInstanceProfileInfo, - } - mock.lockGetGpuInstanceRemainingCapacity.Lock() - mock.calls.GetGpuInstanceRemainingCapacity = append(mock.calls.GetGpuInstanceRemainingCapacity, callInfo) - mock.lockGetGpuInstanceRemainingCapacity.Unlock() - return mock.GetGpuInstanceRemainingCapacityFunc(gpuInstanceProfileInfo) -} - -// GetGpuInstanceRemainingCapacityCalls gets all the calls that were made to GetGpuInstanceRemainingCapacity. -// Check the length with: -// -// len(mockedDevice.GetGpuInstanceRemainingCapacityCalls()) -func (mock *Device) GetGpuInstanceRemainingCapacityCalls() []struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo -} { - var calls []struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - mock.lockGetGpuInstanceRemainingCapacity.RLock() - calls = mock.calls.GetGpuInstanceRemainingCapacity - mock.lockGetGpuInstanceRemainingCapacity.RUnlock() - return calls -} - -// GetGpuInstances calls GetGpuInstancesFunc. -func (mock *Device) GetGpuInstances(gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { - if mock.GetGpuInstancesFunc == nil { - panic("Device.GetGpuInstancesFunc: method is nil but Device.GetGpuInstances was just called") - } - callInfo := struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - }{ - GpuInstanceProfileInfo: gpuInstanceProfileInfo, - } - mock.lockGetGpuInstances.Lock() - mock.calls.GetGpuInstances = append(mock.calls.GetGpuInstances, callInfo) - mock.lockGetGpuInstances.Unlock() - return mock.GetGpuInstancesFunc(gpuInstanceProfileInfo) -} - -// GetGpuInstancesCalls gets all the calls that were made to GetGpuInstances. -// Check the length with: -// -// len(mockedDevice.GetGpuInstancesCalls()) -func (mock *Device) GetGpuInstancesCalls() []struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo -} { - var calls []struct { - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - mock.lockGetGpuInstances.RLock() - calls = mock.calls.GetGpuInstances - mock.lockGetGpuInstances.RUnlock() - return calls -} - -// GetGpuMaxPcieLinkGeneration calls GetGpuMaxPcieLinkGenerationFunc. -func (mock *Device) GetGpuMaxPcieLinkGeneration() (int, nvml.Return) { - if mock.GetGpuMaxPcieLinkGenerationFunc == nil { - panic("Device.GetGpuMaxPcieLinkGenerationFunc: method is nil but Device.GetGpuMaxPcieLinkGeneration was just called") - } - callInfo := struct { - }{} - mock.lockGetGpuMaxPcieLinkGeneration.Lock() - mock.calls.GetGpuMaxPcieLinkGeneration = append(mock.calls.GetGpuMaxPcieLinkGeneration, callInfo) - mock.lockGetGpuMaxPcieLinkGeneration.Unlock() - return mock.GetGpuMaxPcieLinkGenerationFunc() -} - -// GetGpuMaxPcieLinkGenerationCalls gets all the calls that were made to GetGpuMaxPcieLinkGeneration. -// Check the length with: -// -// len(mockedDevice.GetGpuMaxPcieLinkGenerationCalls()) -func (mock *Device) GetGpuMaxPcieLinkGenerationCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGpuMaxPcieLinkGeneration.RLock() - calls = mock.calls.GetGpuMaxPcieLinkGeneration - mock.lockGetGpuMaxPcieLinkGeneration.RUnlock() - return calls -} - -// GetGpuOperationMode calls GetGpuOperationModeFunc. -func (mock *Device) GetGpuOperationMode() (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { - if mock.GetGpuOperationModeFunc == nil { - panic("Device.GetGpuOperationModeFunc: method is nil but Device.GetGpuOperationMode was just called") - } - callInfo := struct { - }{} - mock.lockGetGpuOperationMode.Lock() - mock.calls.GetGpuOperationMode = append(mock.calls.GetGpuOperationMode, callInfo) - mock.lockGetGpuOperationMode.Unlock() - return mock.GetGpuOperationModeFunc() -} - -// GetGpuOperationModeCalls gets all the calls that were made to GetGpuOperationMode. -// Check the length with: -// -// len(mockedDevice.GetGpuOperationModeCalls()) -func (mock *Device) GetGpuOperationModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGpuOperationMode.RLock() - calls = mock.calls.GetGpuOperationMode - mock.lockGetGpuOperationMode.RUnlock() - return calls -} - -// GetGraphicsRunningProcesses calls GetGraphicsRunningProcessesFunc. -func (mock *Device) GetGraphicsRunningProcesses() ([]nvml.ProcessInfo, nvml.Return) { - if mock.GetGraphicsRunningProcessesFunc == nil { - panic("Device.GetGraphicsRunningProcessesFunc: method is nil but Device.GetGraphicsRunningProcesses was just called") - } - callInfo := struct { - }{} - mock.lockGetGraphicsRunningProcesses.Lock() - mock.calls.GetGraphicsRunningProcesses = append(mock.calls.GetGraphicsRunningProcesses, callInfo) - mock.lockGetGraphicsRunningProcesses.Unlock() - return mock.GetGraphicsRunningProcessesFunc() -} - -// GetGraphicsRunningProcessesCalls gets all the calls that were made to GetGraphicsRunningProcesses. -// Check the length with: -// -// len(mockedDevice.GetGraphicsRunningProcessesCalls()) -func (mock *Device) GetGraphicsRunningProcessesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGraphicsRunningProcesses.RLock() - calls = mock.calls.GetGraphicsRunningProcesses - mock.lockGetGraphicsRunningProcesses.RUnlock() - return calls -} - -// GetGridLicensableFeatures calls GetGridLicensableFeaturesFunc. -func (mock *Device) GetGridLicensableFeatures() (nvml.GridLicensableFeatures, nvml.Return) { - if mock.GetGridLicensableFeaturesFunc == nil { - panic("Device.GetGridLicensableFeaturesFunc: method is nil but Device.GetGridLicensableFeatures was just called") - } - callInfo := struct { - }{} - mock.lockGetGridLicensableFeatures.Lock() - mock.calls.GetGridLicensableFeatures = append(mock.calls.GetGridLicensableFeatures, callInfo) - mock.lockGetGridLicensableFeatures.Unlock() - return mock.GetGridLicensableFeaturesFunc() -} - -// GetGridLicensableFeaturesCalls gets all the calls that were made to GetGridLicensableFeatures. -// Check the length with: -// -// len(mockedDevice.GetGridLicensableFeaturesCalls()) -func (mock *Device) GetGridLicensableFeaturesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGridLicensableFeatures.RLock() - calls = mock.calls.GetGridLicensableFeatures - mock.lockGetGridLicensableFeatures.RUnlock() - return calls -} - -// GetGspFirmwareMode calls GetGspFirmwareModeFunc. -func (mock *Device) GetGspFirmwareMode() (bool, bool, nvml.Return) { - if mock.GetGspFirmwareModeFunc == nil { - panic("Device.GetGspFirmwareModeFunc: method is nil but Device.GetGspFirmwareMode was just called") - } - callInfo := struct { - }{} - mock.lockGetGspFirmwareMode.Lock() - mock.calls.GetGspFirmwareMode = append(mock.calls.GetGspFirmwareMode, callInfo) - mock.lockGetGspFirmwareMode.Unlock() - return mock.GetGspFirmwareModeFunc() -} - -// GetGspFirmwareModeCalls gets all the calls that were made to GetGspFirmwareMode. -// Check the length with: -// -// len(mockedDevice.GetGspFirmwareModeCalls()) -func (mock *Device) GetGspFirmwareModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGspFirmwareMode.RLock() - calls = mock.calls.GetGspFirmwareMode - mock.lockGetGspFirmwareMode.RUnlock() - return calls -} - -// GetGspFirmwareVersion calls GetGspFirmwareVersionFunc. -func (mock *Device) GetGspFirmwareVersion() (string, nvml.Return) { - if mock.GetGspFirmwareVersionFunc == nil { - panic("Device.GetGspFirmwareVersionFunc: method is nil but Device.GetGspFirmwareVersion was just called") - } - callInfo := struct { - }{} - mock.lockGetGspFirmwareVersion.Lock() - mock.calls.GetGspFirmwareVersion = append(mock.calls.GetGspFirmwareVersion, callInfo) - mock.lockGetGspFirmwareVersion.Unlock() - return mock.GetGspFirmwareVersionFunc() -} - -// GetGspFirmwareVersionCalls gets all the calls that were made to GetGspFirmwareVersion. -// Check the length with: -// -// len(mockedDevice.GetGspFirmwareVersionCalls()) -func (mock *Device) GetGspFirmwareVersionCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGspFirmwareVersion.RLock() - calls = mock.calls.GetGspFirmwareVersion - mock.lockGetGspFirmwareVersion.RUnlock() - return calls -} - -// GetHostVgpuMode calls GetHostVgpuModeFunc. -func (mock *Device) GetHostVgpuMode() (nvml.HostVgpuMode, nvml.Return) { - if mock.GetHostVgpuModeFunc == nil { - panic("Device.GetHostVgpuModeFunc: method is nil but Device.GetHostVgpuMode was just called") - } - callInfo := struct { - }{} - mock.lockGetHostVgpuMode.Lock() - mock.calls.GetHostVgpuMode = append(mock.calls.GetHostVgpuMode, callInfo) - mock.lockGetHostVgpuMode.Unlock() - return mock.GetHostVgpuModeFunc() -} - -// GetHostVgpuModeCalls gets all the calls that were made to GetHostVgpuMode. -// Check the length with: -// -// len(mockedDevice.GetHostVgpuModeCalls()) -func (mock *Device) GetHostVgpuModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetHostVgpuMode.RLock() - calls = mock.calls.GetHostVgpuMode - mock.lockGetHostVgpuMode.RUnlock() - return calls -} - -// GetIndex calls GetIndexFunc. -func (mock *Device) GetIndex() (int, nvml.Return) { - if mock.GetIndexFunc == nil { - panic("Device.GetIndexFunc: method is nil but Device.GetIndex was just called") - } - callInfo := struct { - }{} - mock.lockGetIndex.Lock() - mock.calls.GetIndex = append(mock.calls.GetIndex, callInfo) - mock.lockGetIndex.Unlock() - return mock.GetIndexFunc() -} - -// GetIndexCalls gets all the calls that were made to GetIndex. -// Check the length with: -// -// len(mockedDevice.GetIndexCalls()) -func (mock *Device) GetIndexCalls() []struct { -} { - var calls []struct { - } - mock.lockGetIndex.RLock() - calls = mock.calls.GetIndex - mock.lockGetIndex.RUnlock() - return calls -} - -// GetInforomConfigurationChecksum calls GetInforomConfigurationChecksumFunc. -func (mock *Device) GetInforomConfigurationChecksum() (uint32, nvml.Return) { - if mock.GetInforomConfigurationChecksumFunc == nil { - panic("Device.GetInforomConfigurationChecksumFunc: method is nil but Device.GetInforomConfigurationChecksum was just called") - } - callInfo := struct { - }{} - mock.lockGetInforomConfigurationChecksum.Lock() - mock.calls.GetInforomConfigurationChecksum = append(mock.calls.GetInforomConfigurationChecksum, callInfo) - mock.lockGetInforomConfigurationChecksum.Unlock() - return mock.GetInforomConfigurationChecksumFunc() -} - -// GetInforomConfigurationChecksumCalls gets all the calls that were made to GetInforomConfigurationChecksum. -// Check the length with: -// -// len(mockedDevice.GetInforomConfigurationChecksumCalls()) -func (mock *Device) GetInforomConfigurationChecksumCalls() []struct { -} { - var calls []struct { - } - mock.lockGetInforomConfigurationChecksum.RLock() - calls = mock.calls.GetInforomConfigurationChecksum - mock.lockGetInforomConfigurationChecksum.RUnlock() - return calls -} - -// GetInforomImageVersion calls GetInforomImageVersionFunc. -func (mock *Device) GetInforomImageVersion() (string, nvml.Return) { - if mock.GetInforomImageVersionFunc == nil { - panic("Device.GetInforomImageVersionFunc: method is nil but Device.GetInforomImageVersion was just called") - } - callInfo := struct { - }{} - mock.lockGetInforomImageVersion.Lock() - mock.calls.GetInforomImageVersion = append(mock.calls.GetInforomImageVersion, callInfo) - mock.lockGetInforomImageVersion.Unlock() - return mock.GetInforomImageVersionFunc() -} - -// GetInforomImageVersionCalls gets all the calls that were made to GetInforomImageVersion. -// Check the length with: -// -// len(mockedDevice.GetInforomImageVersionCalls()) -func (mock *Device) GetInforomImageVersionCalls() []struct { -} { - var calls []struct { - } - mock.lockGetInforomImageVersion.RLock() - calls = mock.calls.GetInforomImageVersion - mock.lockGetInforomImageVersion.RUnlock() - return calls -} - -// GetInforomVersion calls GetInforomVersionFunc. -func (mock *Device) GetInforomVersion(inforomObject nvml.InforomObject) (string, nvml.Return) { - if mock.GetInforomVersionFunc == nil { - panic("Device.GetInforomVersionFunc: method is nil but Device.GetInforomVersion was just called") - } - callInfo := struct { - InforomObject nvml.InforomObject - }{ - InforomObject: inforomObject, - } - mock.lockGetInforomVersion.Lock() - mock.calls.GetInforomVersion = append(mock.calls.GetInforomVersion, callInfo) - mock.lockGetInforomVersion.Unlock() - return mock.GetInforomVersionFunc(inforomObject) -} - -// GetInforomVersionCalls gets all the calls that were made to GetInforomVersion. -// Check the length with: -// -// len(mockedDevice.GetInforomVersionCalls()) -func (mock *Device) GetInforomVersionCalls() []struct { - InforomObject nvml.InforomObject -} { - var calls []struct { - InforomObject nvml.InforomObject - } - mock.lockGetInforomVersion.RLock() - calls = mock.calls.GetInforomVersion - mock.lockGetInforomVersion.RUnlock() - return calls -} - -// GetIrqNum calls GetIrqNumFunc. -func (mock *Device) GetIrqNum() (int, nvml.Return) { - if mock.GetIrqNumFunc == nil { - panic("Device.GetIrqNumFunc: method is nil but Device.GetIrqNum was just called") - } - callInfo := struct { - }{} - mock.lockGetIrqNum.Lock() - mock.calls.GetIrqNum = append(mock.calls.GetIrqNum, callInfo) - mock.lockGetIrqNum.Unlock() - return mock.GetIrqNumFunc() -} - -// GetIrqNumCalls gets all the calls that were made to GetIrqNum. -// Check the length with: -// -// len(mockedDevice.GetIrqNumCalls()) -func (mock *Device) GetIrqNumCalls() []struct { -} { - var calls []struct { - } - mock.lockGetIrqNum.RLock() - calls = mock.calls.GetIrqNum - mock.lockGetIrqNum.RUnlock() - return calls -} - -// GetJpgUtilization calls GetJpgUtilizationFunc. -func (mock *Device) GetJpgUtilization() (uint32, uint32, nvml.Return) { - if mock.GetJpgUtilizationFunc == nil { - panic("Device.GetJpgUtilizationFunc: method is nil but Device.GetJpgUtilization was just called") - } - callInfo := struct { - }{} - mock.lockGetJpgUtilization.Lock() - mock.calls.GetJpgUtilization = append(mock.calls.GetJpgUtilization, callInfo) - mock.lockGetJpgUtilization.Unlock() - return mock.GetJpgUtilizationFunc() -} - -// GetJpgUtilizationCalls gets all the calls that were made to GetJpgUtilization. -// Check the length with: -// -// len(mockedDevice.GetJpgUtilizationCalls()) -func (mock *Device) GetJpgUtilizationCalls() []struct { -} { - var calls []struct { - } - mock.lockGetJpgUtilization.RLock() - calls = mock.calls.GetJpgUtilization - mock.lockGetJpgUtilization.RUnlock() - return calls -} - -// GetLastBBXFlushTime calls GetLastBBXFlushTimeFunc. -func (mock *Device) GetLastBBXFlushTime() (uint64, uint, nvml.Return) { - if mock.GetLastBBXFlushTimeFunc == nil { - panic("Device.GetLastBBXFlushTimeFunc: method is nil but Device.GetLastBBXFlushTime was just called") - } - callInfo := struct { - }{} - mock.lockGetLastBBXFlushTime.Lock() - mock.calls.GetLastBBXFlushTime = append(mock.calls.GetLastBBXFlushTime, callInfo) - mock.lockGetLastBBXFlushTime.Unlock() - return mock.GetLastBBXFlushTimeFunc() -} - -// GetLastBBXFlushTimeCalls gets all the calls that were made to GetLastBBXFlushTime. -// Check the length with: -// -// len(mockedDevice.GetLastBBXFlushTimeCalls()) -func (mock *Device) GetLastBBXFlushTimeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetLastBBXFlushTime.RLock() - calls = mock.calls.GetLastBBXFlushTime - mock.lockGetLastBBXFlushTime.RUnlock() - return calls -} - -// GetMPSComputeRunningProcesses calls GetMPSComputeRunningProcessesFunc. -func (mock *Device) GetMPSComputeRunningProcesses() ([]nvml.ProcessInfo, nvml.Return) { - if mock.GetMPSComputeRunningProcessesFunc == nil { - panic("Device.GetMPSComputeRunningProcessesFunc: method is nil but Device.GetMPSComputeRunningProcesses was just called") - } - callInfo := struct { - }{} - mock.lockGetMPSComputeRunningProcesses.Lock() - mock.calls.GetMPSComputeRunningProcesses = append(mock.calls.GetMPSComputeRunningProcesses, callInfo) - mock.lockGetMPSComputeRunningProcesses.Unlock() - return mock.GetMPSComputeRunningProcessesFunc() -} - -// GetMPSComputeRunningProcessesCalls gets all the calls that were made to GetMPSComputeRunningProcesses. -// Check the length with: -// -// len(mockedDevice.GetMPSComputeRunningProcessesCalls()) -func (mock *Device) GetMPSComputeRunningProcessesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMPSComputeRunningProcesses.RLock() - calls = mock.calls.GetMPSComputeRunningProcesses - mock.lockGetMPSComputeRunningProcesses.RUnlock() - return calls -} - -// GetMarginTemperature calls GetMarginTemperatureFunc. -func (mock *Device) GetMarginTemperature() (nvml.MarginTemperature, nvml.Return) { - if mock.GetMarginTemperatureFunc == nil { - panic("Device.GetMarginTemperatureFunc: method is nil but Device.GetMarginTemperature was just called") - } - callInfo := struct { - }{} - mock.lockGetMarginTemperature.Lock() - mock.calls.GetMarginTemperature = append(mock.calls.GetMarginTemperature, callInfo) - mock.lockGetMarginTemperature.Unlock() - return mock.GetMarginTemperatureFunc() -} - -// GetMarginTemperatureCalls gets all the calls that were made to GetMarginTemperature. -// Check the length with: -// -// len(mockedDevice.GetMarginTemperatureCalls()) -func (mock *Device) GetMarginTemperatureCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMarginTemperature.RLock() - calls = mock.calls.GetMarginTemperature - mock.lockGetMarginTemperature.RUnlock() - return calls -} - -// GetMaxClockInfo calls GetMaxClockInfoFunc. -func (mock *Device) GetMaxClockInfo(clockType nvml.ClockType) (uint32, nvml.Return) { - if mock.GetMaxClockInfoFunc == nil { - panic("Device.GetMaxClockInfoFunc: method is nil but Device.GetMaxClockInfo was just called") - } - callInfo := struct { - ClockType nvml.ClockType - }{ - ClockType: clockType, - } - mock.lockGetMaxClockInfo.Lock() - mock.calls.GetMaxClockInfo = append(mock.calls.GetMaxClockInfo, callInfo) - mock.lockGetMaxClockInfo.Unlock() - return mock.GetMaxClockInfoFunc(clockType) -} - -// GetMaxClockInfoCalls gets all the calls that were made to GetMaxClockInfo. -// Check the length with: -// -// len(mockedDevice.GetMaxClockInfoCalls()) -func (mock *Device) GetMaxClockInfoCalls() []struct { - ClockType nvml.ClockType -} { - var calls []struct { - ClockType nvml.ClockType - } - mock.lockGetMaxClockInfo.RLock() - calls = mock.calls.GetMaxClockInfo - mock.lockGetMaxClockInfo.RUnlock() - return calls -} - -// GetMaxCustomerBoostClock calls GetMaxCustomerBoostClockFunc. -func (mock *Device) GetMaxCustomerBoostClock(clockType nvml.ClockType) (uint32, nvml.Return) { - if mock.GetMaxCustomerBoostClockFunc == nil { - panic("Device.GetMaxCustomerBoostClockFunc: method is nil but Device.GetMaxCustomerBoostClock was just called") - } - callInfo := struct { - ClockType nvml.ClockType - }{ - ClockType: clockType, - } - mock.lockGetMaxCustomerBoostClock.Lock() - mock.calls.GetMaxCustomerBoostClock = append(mock.calls.GetMaxCustomerBoostClock, callInfo) - mock.lockGetMaxCustomerBoostClock.Unlock() - return mock.GetMaxCustomerBoostClockFunc(clockType) -} - -// GetMaxCustomerBoostClockCalls gets all the calls that were made to GetMaxCustomerBoostClock. -// Check the length with: -// -// len(mockedDevice.GetMaxCustomerBoostClockCalls()) -func (mock *Device) GetMaxCustomerBoostClockCalls() []struct { - ClockType nvml.ClockType -} { - var calls []struct { - ClockType nvml.ClockType - } - mock.lockGetMaxCustomerBoostClock.RLock() - calls = mock.calls.GetMaxCustomerBoostClock - mock.lockGetMaxCustomerBoostClock.RUnlock() - return calls -} - -// GetMaxMigDeviceCount calls GetMaxMigDeviceCountFunc. -func (mock *Device) GetMaxMigDeviceCount() (int, nvml.Return) { - if mock.GetMaxMigDeviceCountFunc == nil { - panic("Device.GetMaxMigDeviceCountFunc: method is nil but Device.GetMaxMigDeviceCount was just called") - } - callInfo := struct { - }{} - mock.lockGetMaxMigDeviceCount.Lock() - mock.calls.GetMaxMigDeviceCount = append(mock.calls.GetMaxMigDeviceCount, callInfo) - mock.lockGetMaxMigDeviceCount.Unlock() - return mock.GetMaxMigDeviceCountFunc() -} - -// GetMaxMigDeviceCountCalls gets all the calls that were made to GetMaxMigDeviceCount. -// Check the length with: -// -// len(mockedDevice.GetMaxMigDeviceCountCalls()) -func (mock *Device) GetMaxMigDeviceCountCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMaxMigDeviceCount.RLock() - calls = mock.calls.GetMaxMigDeviceCount - mock.lockGetMaxMigDeviceCount.RUnlock() - return calls -} - -// GetMaxPcieLinkGeneration calls GetMaxPcieLinkGenerationFunc. -func (mock *Device) GetMaxPcieLinkGeneration() (int, nvml.Return) { - if mock.GetMaxPcieLinkGenerationFunc == nil { - panic("Device.GetMaxPcieLinkGenerationFunc: method is nil but Device.GetMaxPcieLinkGeneration was just called") - } - callInfo := struct { - }{} - mock.lockGetMaxPcieLinkGeneration.Lock() - mock.calls.GetMaxPcieLinkGeneration = append(mock.calls.GetMaxPcieLinkGeneration, callInfo) - mock.lockGetMaxPcieLinkGeneration.Unlock() - return mock.GetMaxPcieLinkGenerationFunc() -} - -// GetMaxPcieLinkGenerationCalls gets all the calls that were made to GetMaxPcieLinkGeneration. -// Check the length with: -// -// len(mockedDevice.GetMaxPcieLinkGenerationCalls()) -func (mock *Device) GetMaxPcieLinkGenerationCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMaxPcieLinkGeneration.RLock() - calls = mock.calls.GetMaxPcieLinkGeneration - mock.lockGetMaxPcieLinkGeneration.RUnlock() - return calls -} - -// GetMaxPcieLinkWidth calls GetMaxPcieLinkWidthFunc. -func (mock *Device) GetMaxPcieLinkWidth() (int, nvml.Return) { - if mock.GetMaxPcieLinkWidthFunc == nil { - panic("Device.GetMaxPcieLinkWidthFunc: method is nil but Device.GetMaxPcieLinkWidth was just called") - } - callInfo := struct { - }{} - mock.lockGetMaxPcieLinkWidth.Lock() - mock.calls.GetMaxPcieLinkWidth = append(mock.calls.GetMaxPcieLinkWidth, callInfo) - mock.lockGetMaxPcieLinkWidth.Unlock() - return mock.GetMaxPcieLinkWidthFunc() -} - -// GetMaxPcieLinkWidthCalls gets all the calls that were made to GetMaxPcieLinkWidth. -// Check the length with: -// -// len(mockedDevice.GetMaxPcieLinkWidthCalls()) -func (mock *Device) GetMaxPcieLinkWidthCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMaxPcieLinkWidth.RLock() - calls = mock.calls.GetMaxPcieLinkWidth - mock.lockGetMaxPcieLinkWidth.RUnlock() - return calls -} - -// GetMemClkMinMaxVfOffset calls GetMemClkMinMaxVfOffsetFunc. -func (mock *Device) GetMemClkMinMaxVfOffset() (int, int, nvml.Return) { - if mock.GetMemClkMinMaxVfOffsetFunc == nil { - panic("Device.GetMemClkMinMaxVfOffsetFunc: method is nil but Device.GetMemClkMinMaxVfOffset was just called") - } - callInfo := struct { - }{} - mock.lockGetMemClkMinMaxVfOffset.Lock() - mock.calls.GetMemClkMinMaxVfOffset = append(mock.calls.GetMemClkMinMaxVfOffset, callInfo) - mock.lockGetMemClkMinMaxVfOffset.Unlock() - return mock.GetMemClkMinMaxVfOffsetFunc() -} - -// GetMemClkMinMaxVfOffsetCalls gets all the calls that were made to GetMemClkMinMaxVfOffset. -// Check the length with: -// -// len(mockedDevice.GetMemClkMinMaxVfOffsetCalls()) -func (mock *Device) GetMemClkMinMaxVfOffsetCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMemClkMinMaxVfOffset.RLock() - calls = mock.calls.GetMemClkMinMaxVfOffset - mock.lockGetMemClkMinMaxVfOffset.RUnlock() - return calls -} - -// GetMemClkVfOffset calls GetMemClkVfOffsetFunc. -func (mock *Device) GetMemClkVfOffset() (int, nvml.Return) { - if mock.GetMemClkVfOffsetFunc == nil { - panic("Device.GetMemClkVfOffsetFunc: method is nil but Device.GetMemClkVfOffset was just called") - } - callInfo := struct { - }{} - mock.lockGetMemClkVfOffset.Lock() - mock.calls.GetMemClkVfOffset = append(mock.calls.GetMemClkVfOffset, callInfo) - mock.lockGetMemClkVfOffset.Unlock() - return mock.GetMemClkVfOffsetFunc() -} - -// GetMemClkVfOffsetCalls gets all the calls that were made to GetMemClkVfOffset. -// Check the length with: -// -// len(mockedDevice.GetMemClkVfOffsetCalls()) -func (mock *Device) GetMemClkVfOffsetCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMemClkVfOffset.RLock() - calls = mock.calls.GetMemClkVfOffset - mock.lockGetMemClkVfOffset.RUnlock() - return calls -} - -// GetMemoryAffinity calls GetMemoryAffinityFunc. -func (mock *Device) GetMemoryAffinity(n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { - if mock.GetMemoryAffinityFunc == nil { - panic("Device.GetMemoryAffinityFunc: method is nil but Device.GetMemoryAffinity was just called") - } - callInfo := struct { - N int - AffinityScope nvml.AffinityScope - }{ - N: n, - AffinityScope: affinityScope, - } - mock.lockGetMemoryAffinity.Lock() - mock.calls.GetMemoryAffinity = append(mock.calls.GetMemoryAffinity, callInfo) - mock.lockGetMemoryAffinity.Unlock() - return mock.GetMemoryAffinityFunc(n, affinityScope) -} - -// GetMemoryAffinityCalls gets all the calls that were made to GetMemoryAffinity. -// Check the length with: -// -// len(mockedDevice.GetMemoryAffinityCalls()) -func (mock *Device) GetMemoryAffinityCalls() []struct { - N int - AffinityScope nvml.AffinityScope -} { - var calls []struct { - N int - AffinityScope nvml.AffinityScope - } - mock.lockGetMemoryAffinity.RLock() - calls = mock.calls.GetMemoryAffinity - mock.lockGetMemoryAffinity.RUnlock() - return calls -} - -// GetMemoryBusWidth calls GetMemoryBusWidthFunc. -func (mock *Device) GetMemoryBusWidth() (uint32, nvml.Return) { - if mock.GetMemoryBusWidthFunc == nil { - panic("Device.GetMemoryBusWidthFunc: method is nil but Device.GetMemoryBusWidth was just called") - } - callInfo := struct { - }{} - mock.lockGetMemoryBusWidth.Lock() - mock.calls.GetMemoryBusWidth = append(mock.calls.GetMemoryBusWidth, callInfo) - mock.lockGetMemoryBusWidth.Unlock() - return mock.GetMemoryBusWidthFunc() -} - -// GetMemoryBusWidthCalls gets all the calls that were made to GetMemoryBusWidth. -// Check the length with: -// -// len(mockedDevice.GetMemoryBusWidthCalls()) -func (mock *Device) GetMemoryBusWidthCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMemoryBusWidth.RLock() - calls = mock.calls.GetMemoryBusWidth - mock.lockGetMemoryBusWidth.RUnlock() - return calls -} - -// GetMemoryErrorCounter calls GetMemoryErrorCounterFunc. -func (mock *Device) GetMemoryErrorCounter(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) { - if mock.GetMemoryErrorCounterFunc == nil { - panic("Device.GetMemoryErrorCounterFunc: method is nil but Device.GetMemoryErrorCounter was just called") - } - callInfo := struct { - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - MemoryLocation nvml.MemoryLocation - }{ - MemoryErrorType: memoryErrorType, - EccCounterType: eccCounterType, - MemoryLocation: memoryLocation, - } - mock.lockGetMemoryErrorCounter.Lock() - mock.calls.GetMemoryErrorCounter = append(mock.calls.GetMemoryErrorCounter, callInfo) - mock.lockGetMemoryErrorCounter.Unlock() - return mock.GetMemoryErrorCounterFunc(memoryErrorType, eccCounterType, memoryLocation) -} - -// GetMemoryErrorCounterCalls gets all the calls that were made to GetMemoryErrorCounter. -// Check the length with: -// -// len(mockedDevice.GetMemoryErrorCounterCalls()) -func (mock *Device) GetMemoryErrorCounterCalls() []struct { - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - MemoryLocation nvml.MemoryLocation -} { - var calls []struct { - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - MemoryLocation nvml.MemoryLocation - } - mock.lockGetMemoryErrorCounter.RLock() - calls = mock.calls.GetMemoryErrorCounter - mock.lockGetMemoryErrorCounter.RUnlock() - return calls -} - -// GetMemoryInfo calls GetMemoryInfoFunc. -func (mock *Device) GetMemoryInfo() (nvml.Memory, nvml.Return) { - if mock.GetMemoryInfoFunc == nil { - panic("Device.GetMemoryInfoFunc: method is nil but Device.GetMemoryInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetMemoryInfo.Lock() - mock.calls.GetMemoryInfo = append(mock.calls.GetMemoryInfo, callInfo) - mock.lockGetMemoryInfo.Unlock() - return mock.GetMemoryInfoFunc() -} - -// GetMemoryInfoCalls gets all the calls that were made to GetMemoryInfo. -// Check the length with: -// -// len(mockedDevice.GetMemoryInfoCalls()) -func (mock *Device) GetMemoryInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMemoryInfo.RLock() - calls = mock.calls.GetMemoryInfo - mock.lockGetMemoryInfo.RUnlock() - return calls -} - -// GetMemoryInfo_v2 calls GetMemoryInfo_v2Func. -func (mock *Device) GetMemoryInfo_v2() (nvml.Memory_v2, nvml.Return) { - if mock.GetMemoryInfo_v2Func == nil { - panic("Device.GetMemoryInfo_v2Func: method is nil but Device.GetMemoryInfo_v2 was just called") - } - callInfo := struct { - }{} - mock.lockGetMemoryInfo_v2.Lock() - mock.calls.GetMemoryInfo_v2 = append(mock.calls.GetMemoryInfo_v2, callInfo) - mock.lockGetMemoryInfo_v2.Unlock() - return mock.GetMemoryInfo_v2Func() -} - -// GetMemoryInfo_v2Calls gets all the calls that were made to GetMemoryInfo_v2. -// Check the length with: -// -// len(mockedDevice.GetMemoryInfo_v2Calls()) -func (mock *Device) GetMemoryInfo_v2Calls() []struct { -} { - var calls []struct { - } - mock.lockGetMemoryInfo_v2.RLock() - calls = mock.calls.GetMemoryInfo_v2 - mock.lockGetMemoryInfo_v2.RUnlock() - return calls -} - -// GetMigDeviceHandleByIndex calls GetMigDeviceHandleByIndexFunc. -func (mock *Device) GetMigDeviceHandleByIndex(n int) (nvml.Device, nvml.Return) { - if mock.GetMigDeviceHandleByIndexFunc == nil { - panic("Device.GetMigDeviceHandleByIndexFunc: method is nil but Device.GetMigDeviceHandleByIndex was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetMigDeviceHandleByIndex.Lock() - mock.calls.GetMigDeviceHandleByIndex = append(mock.calls.GetMigDeviceHandleByIndex, callInfo) - mock.lockGetMigDeviceHandleByIndex.Unlock() - return mock.GetMigDeviceHandleByIndexFunc(n) -} - -// GetMigDeviceHandleByIndexCalls gets all the calls that were made to GetMigDeviceHandleByIndex. -// Check the length with: -// -// len(mockedDevice.GetMigDeviceHandleByIndexCalls()) -func (mock *Device) GetMigDeviceHandleByIndexCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetMigDeviceHandleByIndex.RLock() - calls = mock.calls.GetMigDeviceHandleByIndex - mock.lockGetMigDeviceHandleByIndex.RUnlock() - return calls -} - -// GetMigMode calls GetMigModeFunc. -func (mock *Device) GetMigMode() (int, int, nvml.Return) { - if mock.GetMigModeFunc == nil { - panic("Device.GetMigModeFunc: method is nil but Device.GetMigMode was just called") - } - callInfo := struct { - }{} - mock.lockGetMigMode.Lock() - mock.calls.GetMigMode = append(mock.calls.GetMigMode, callInfo) - mock.lockGetMigMode.Unlock() - return mock.GetMigModeFunc() -} - -// GetMigModeCalls gets all the calls that were made to GetMigMode. -// Check the length with: -// -// len(mockedDevice.GetMigModeCalls()) -func (mock *Device) GetMigModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMigMode.RLock() - calls = mock.calls.GetMigMode - mock.lockGetMigMode.RUnlock() - return calls -} - -// GetMinMaxClockOfPState calls GetMinMaxClockOfPStateFunc. -func (mock *Device) GetMinMaxClockOfPState(clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) { - if mock.GetMinMaxClockOfPStateFunc == nil { - panic("Device.GetMinMaxClockOfPStateFunc: method is nil but Device.GetMinMaxClockOfPState was just called") - } - callInfo := struct { - ClockType nvml.ClockType - Pstates nvml.Pstates - }{ - ClockType: clockType, - Pstates: pstates, - } - mock.lockGetMinMaxClockOfPState.Lock() - mock.calls.GetMinMaxClockOfPState = append(mock.calls.GetMinMaxClockOfPState, callInfo) - mock.lockGetMinMaxClockOfPState.Unlock() - return mock.GetMinMaxClockOfPStateFunc(clockType, pstates) -} - -// GetMinMaxClockOfPStateCalls gets all the calls that were made to GetMinMaxClockOfPState. -// Check the length with: -// -// len(mockedDevice.GetMinMaxClockOfPStateCalls()) -func (mock *Device) GetMinMaxClockOfPStateCalls() []struct { - ClockType nvml.ClockType - Pstates nvml.Pstates -} { - var calls []struct { - ClockType nvml.ClockType - Pstates nvml.Pstates - } - mock.lockGetMinMaxClockOfPState.RLock() - calls = mock.calls.GetMinMaxClockOfPState - mock.lockGetMinMaxClockOfPState.RUnlock() - return calls -} - -// GetMinMaxFanSpeed calls GetMinMaxFanSpeedFunc. -func (mock *Device) GetMinMaxFanSpeed() (int, int, nvml.Return) { - if mock.GetMinMaxFanSpeedFunc == nil { - panic("Device.GetMinMaxFanSpeedFunc: method is nil but Device.GetMinMaxFanSpeed was just called") - } - callInfo := struct { - }{} - mock.lockGetMinMaxFanSpeed.Lock() - mock.calls.GetMinMaxFanSpeed = append(mock.calls.GetMinMaxFanSpeed, callInfo) - mock.lockGetMinMaxFanSpeed.Unlock() - return mock.GetMinMaxFanSpeedFunc() -} - -// GetMinMaxFanSpeedCalls gets all the calls that were made to GetMinMaxFanSpeed. -// Check the length with: -// -// len(mockedDevice.GetMinMaxFanSpeedCalls()) -func (mock *Device) GetMinMaxFanSpeedCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMinMaxFanSpeed.RLock() - calls = mock.calls.GetMinMaxFanSpeed - mock.lockGetMinMaxFanSpeed.RUnlock() - return calls -} - -// GetMinorNumber calls GetMinorNumberFunc. -func (mock *Device) GetMinorNumber() (int, nvml.Return) { - if mock.GetMinorNumberFunc == nil { - panic("Device.GetMinorNumberFunc: method is nil but Device.GetMinorNumber was just called") - } - callInfo := struct { - }{} - mock.lockGetMinorNumber.Lock() - mock.calls.GetMinorNumber = append(mock.calls.GetMinorNumber, callInfo) - mock.lockGetMinorNumber.Unlock() - return mock.GetMinorNumberFunc() -} - -// GetMinorNumberCalls gets all the calls that were made to GetMinorNumber. -// Check the length with: -// -// len(mockedDevice.GetMinorNumberCalls()) -func (mock *Device) GetMinorNumberCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMinorNumber.RLock() - calls = mock.calls.GetMinorNumber - mock.lockGetMinorNumber.RUnlock() - return calls -} - -// GetModuleId calls GetModuleIdFunc. -func (mock *Device) GetModuleId() (int, nvml.Return) { - if mock.GetModuleIdFunc == nil { - panic("Device.GetModuleIdFunc: method is nil but Device.GetModuleId was just called") - } - callInfo := struct { - }{} - mock.lockGetModuleId.Lock() - mock.calls.GetModuleId = append(mock.calls.GetModuleId, callInfo) - mock.lockGetModuleId.Unlock() - return mock.GetModuleIdFunc() -} - -// GetModuleIdCalls gets all the calls that were made to GetModuleId. -// Check the length with: -// -// len(mockedDevice.GetModuleIdCalls()) -func (mock *Device) GetModuleIdCalls() []struct { -} { - var calls []struct { - } - mock.lockGetModuleId.RLock() - calls = mock.calls.GetModuleId - mock.lockGetModuleId.RUnlock() - return calls -} - -// GetMultiGpuBoard calls GetMultiGpuBoardFunc. -func (mock *Device) GetMultiGpuBoard() (int, nvml.Return) { - if mock.GetMultiGpuBoardFunc == nil { - panic("Device.GetMultiGpuBoardFunc: method is nil but Device.GetMultiGpuBoard was just called") - } - callInfo := struct { - }{} - mock.lockGetMultiGpuBoard.Lock() - mock.calls.GetMultiGpuBoard = append(mock.calls.GetMultiGpuBoard, callInfo) - mock.lockGetMultiGpuBoard.Unlock() - return mock.GetMultiGpuBoardFunc() -} - -// GetMultiGpuBoardCalls gets all the calls that were made to GetMultiGpuBoard. -// Check the length with: -// -// len(mockedDevice.GetMultiGpuBoardCalls()) -func (mock *Device) GetMultiGpuBoardCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMultiGpuBoard.RLock() - calls = mock.calls.GetMultiGpuBoard - mock.lockGetMultiGpuBoard.RUnlock() - return calls -} - -// GetName calls GetNameFunc. -func (mock *Device) GetName() (string, nvml.Return) { - if mock.GetNameFunc == nil { - panic("Device.GetNameFunc: method is nil but Device.GetName was just called") - } - callInfo := struct { - }{} - mock.lockGetName.Lock() - mock.calls.GetName = append(mock.calls.GetName, callInfo) - mock.lockGetName.Unlock() - return mock.GetNameFunc() -} - -// GetNameCalls gets all the calls that were made to GetName. -// Check the length with: -// -// len(mockedDevice.GetNameCalls()) -func (mock *Device) GetNameCalls() []struct { -} { - var calls []struct { - } - mock.lockGetName.RLock() - calls = mock.calls.GetName - mock.lockGetName.RUnlock() - return calls -} - -// GetNumFans calls GetNumFansFunc. -func (mock *Device) GetNumFans() (int, nvml.Return) { - if mock.GetNumFansFunc == nil { - panic("Device.GetNumFansFunc: method is nil but Device.GetNumFans was just called") - } - callInfo := struct { - }{} - mock.lockGetNumFans.Lock() - mock.calls.GetNumFans = append(mock.calls.GetNumFans, callInfo) - mock.lockGetNumFans.Unlock() - return mock.GetNumFansFunc() -} - -// GetNumFansCalls gets all the calls that were made to GetNumFans. -// Check the length with: -// -// len(mockedDevice.GetNumFansCalls()) -func (mock *Device) GetNumFansCalls() []struct { -} { - var calls []struct { - } - mock.lockGetNumFans.RLock() - calls = mock.calls.GetNumFans - mock.lockGetNumFans.RUnlock() - return calls -} - -// GetNumGpuCores calls GetNumGpuCoresFunc. -func (mock *Device) GetNumGpuCores() (int, nvml.Return) { - if mock.GetNumGpuCoresFunc == nil { - panic("Device.GetNumGpuCoresFunc: method is nil but Device.GetNumGpuCores was just called") - } - callInfo := struct { - }{} - mock.lockGetNumGpuCores.Lock() - mock.calls.GetNumGpuCores = append(mock.calls.GetNumGpuCores, callInfo) - mock.lockGetNumGpuCores.Unlock() - return mock.GetNumGpuCoresFunc() -} - -// GetNumGpuCoresCalls gets all the calls that were made to GetNumGpuCores. -// Check the length with: -// -// len(mockedDevice.GetNumGpuCoresCalls()) -func (mock *Device) GetNumGpuCoresCalls() []struct { -} { - var calls []struct { - } - mock.lockGetNumGpuCores.RLock() - calls = mock.calls.GetNumGpuCores - mock.lockGetNumGpuCores.RUnlock() - return calls -} - -// GetNumaNodeId calls GetNumaNodeIdFunc. -func (mock *Device) GetNumaNodeId() (int, nvml.Return) { - if mock.GetNumaNodeIdFunc == nil { - panic("Device.GetNumaNodeIdFunc: method is nil but Device.GetNumaNodeId was just called") - } - callInfo := struct { - }{} - mock.lockGetNumaNodeId.Lock() - mock.calls.GetNumaNodeId = append(mock.calls.GetNumaNodeId, callInfo) - mock.lockGetNumaNodeId.Unlock() - return mock.GetNumaNodeIdFunc() -} - -// GetNumaNodeIdCalls gets all the calls that were made to GetNumaNodeId. -// Check the length with: -// -// len(mockedDevice.GetNumaNodeIdCalls()) -func (mock *Device) GetNumaNodeIdCalls() []struct { -} { - var calls []struct { - } - mock.lockGetNumaNodeId.RLock() - calls = mock.calls.GetNumaNodeId - mock.lockGetNumaNodeId.RUnlock() - return calls -} - -// GetNvLinkCapability calls GetNvLinkCapabilityFunc. -func (mock *Device) GetNvLinkCapability(n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) { - if mock.GetNvLinkCapabilityFunc == nil { - panic("Device.GetNvLinkCapabilityFunc: method is nil but Device.GetNvLinkCapability was just called") - } - callInfo := struct { - N int - NvLinkCapability nvml.NvLinkCapability - }{ - N: n, - NvLinkCapability: nvLinkCapability, - } - mock.lockGetNvLinkCapability.Lock() - mock.calls.GetNvLinkCapability = append(mock.calls.GetNvLinkCapability, callInfo) - mock.lockGetNvLinkCapability.Unlock() - return mock.GetNvLinkCapabilityFunc(n, nvLinkCapability) -} - -// GetNvLinkCapabilityCalls gets all the calls that were made to GetNvLinkCapability. -// Check the length with: -// -// len(mockedDevice.GetNvLinkCapabilityCalls()) -func (mock *Device) GetNvLinkCapabilityCalls() []struct { - N int - NvLinkCapability nvml.NvLinkCapability -} { - var calls []struct { - N int - NvLinkCapability nvml.NvLinkCapability - } - mock.lockGetNvLinkCapability.RLock() - calls = mock.calls.GetNvLinkCapability - mock.lockGetNvLinkCapability.RUnlock() - return calls -} - -// GetNvLinkErrorCounter calls GetNvLinkErrorCounterFunc. -func (mock *Device) GetNvLinkErrorCounter(n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) { - if mock.GetNvLinkErrorCounterFunc == nil { - panic("Device.GetNvLinkErrorCounterFunc: method is nil but Device.GetNvLinkErrorCounter was just called") - } - callInfo := struct { - N int - NvLinkErrorCounter nvml.NvLinkErrorCounter - }{ - N: n, - NvLinkErrorCounter: nvLinkErrorCounter, - } - mock.lockGetNvLinkErrorCounter.Lock() - mock.calls.GetNvLinkErrorCounter = append(mock.calls.GetNvLinkErrorCounter, callInfo) - mock.lockGetNvLinkErrorCounter.Unlock() - return mock.GetNvLinkErrorCounterFunc(n, nvLinkErrorCounter) -} - -// GetNvLinkErrorCounterCalls gets all the calls that were made to GetNvLinkErrorCounter. -// Check the length with: -// -// len(mockedDevice.GetNvLinkErrorCounterCalls()) -func (mock *Device) GetNvLinkErrorCounterCalls() []struct { - N int - NvLinkErrorCounter nvml.NvLinkErrorCounter -} { - var calls []struct { - N int - NvLinkErrorCounter nvml.NvLinkErrorCounter - } - mock.lockGetNvLinkErrorCounter.RLock() - calls = mock.calls.GetNvLinkErrorCounter - mock.lockGetNvLinkErrorCounter.RUnlock() - return calls -} - -// GetNvLinkInfo calls GetNvLinkInfoFunc. -func (mock *Device) GetNvLinkInfo() nvml.NvLinkInfoHandler { - if mock.GetNvLinkInfoFunc == nil { - panic("Device.GetNvLinkInfoFunc: method is nil but Device.GetNvLinkInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetNvLinkInfo.Lock() - mock.calls.GetNvLinkInfo = append(mock.calls.GetNvLinkInfo, callInfo) - mock.lockGetNvLinkInfo.Unlock() - return mock.GetNvLinkInfoFunc() -} - -// GetNvLinkInfoCalls gets all the calls that were made to GetNvLinkInfo. -// Check the length with: -// -// len(mockedDevice.GetNvLinkInfoCalls()) -func (mock *Device) GetNvLinkInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetNvLinkInfo.RLock() - calls = mock.calls.GetNvLinkInfo - mock.lockGetNvLinkInfo.RUnlock() - return calls -} - -// GetNvLinkRemoteDeviceType calls GetNvLinkRemoteDeviceTypeFunc. -func (mock *Device) GetNvLinkRemoteDeviceType(n int) (nvml.IntNvLinkDeviceType, nvml.Return) { - if mock.GetNvLinkRemoteDeviceTypeFunc == nil { - panic("Device.GetNvLinkRemoteDeviceTypeFunc: method is nil but Device.GetNvLinkRemoteDeviceType was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetNvLinkRemoteDeviceType.Lock() - mock.calls.GetNvLinkRemoteDeviceType = append(mock.calls.GetNvLinkRemoteDeviceType, callInfo) - mock.lockGetNvLinkRemoteDeviceType.Unlock() - return mock.GetNvLinkRemoteDeviceTypeFunc(n) -} - -// GetNvLinkRemoteDeviceTypeCalls gets all the calls that were made to GetNvLinkRemoteDeviceType. -// Check the length with: -// -// len(mockedDevice.GetNvLinkRemoteDeviceTypeCalls()) -func (mock *Device) GetNvLinkRemoteDeviceTypeCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetNvLinkRemoteDeviceType.RLock() - calls = mock.calls.GetNvLinkRemoteDeviceType - mock.lockGetNvLinkRemoteDeviceType.RUnlock() - return calls -} - -// GetNvLinkRemotePciInfo calls GetNvLinkRemotePciInfoFunc. -func (mock *Device) GetNvLinkRemotePciInfo(n int) (nvml.PciInfo, nvml.Return) { - if mock.GetNvLinkRemotePciInfoFunc == nil { - panic("Device.GetNvLinkRemotePciInfoFunc: method is nil but Device.GetNvLinkRemotePciInfo was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetNvLinkRemotePciInfo.Lock() - mock.calls.GetNvLinkRemotePciInfo = append(mock.calls.GetNvLinkRemotePciInfo, callInfo) - mock.lockGetNvLinkRemotePciInfo.Unlock() - return mock.GetNvLinkRemotePciInfoFunc(n) -} - -// GetNvLinkRemotePciInfoCalls gets all the calls that were made to GetNvLinkRemotePciInfo. -// Check the length with: -// -// len(mockedDevice.GetNvLinkRemotePciInfoCalls()) -func (mock *Device) GetNvLinkRemotePciInfoCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetNvLinkRemotePciInfo.RLock() - calls = mock.calls.GetNvLinkRemotePciInfo - mock.lockGetNvLinkRemotePciInfo.RUnlock() - return calls -} - -// GetNvLinkState calls GetNvLinkStateFunc. -func (mock *Device) GetNvLinkState(n int) (nvml.EnableState, nvml.Return) { - if mock.GetNvLinkStateFunc == nil { - panic("Device.GetNvLinkStateFunc: method is nil but Device.GetNvLinkState was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetNvLinkState.Lock() - mock.calls.GetNvLinkState = append(mock.calls.GetNvLinkState, callInfo) - mock.lockGetNvLinkState.Unlock() - return mock.GetNvLinkStateFunc(n) -} - -// GetNvLinkStateCalls gets all the calls that were made to GetNvLinkState. -// Check the length with: -// -// len(mockedDevice.GetNvLinkStateCalls()) -func (mock *Device) GetNvLinkStateCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetNvLinkState.RLock() - calls = mock.calls.GetNvLinkState - mock.lockGetNvLinkState.RUnlock() - return calls -} - -// GetNvLinkUtilizationControl calls GetNvLinkUtilizationControlFunc. -func (mock *Device) GetNvLinkUtilizationControl(n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { - if mock.GetNvLinkUtilizationControlFunc == nil { - panic("Device.GetNvLinkUtilizationControlFunc: method is nil but Device.GetNvLinkUtilizationControl was just called") - } - callInfo := struct { - N1 int - N2 int - }{ - N1: n1, - N2: n2, - } - mock.lockGetNvLinkUtilizationControl.Lock() - mock.calls.GetNvLinkUtilizationControl = append(mock.calls.GetNvLinkUtilizationControl, callInfo) - mock.lockGetNvLinkUtilizationControl.Unlock() - return mock.GetNvLinkUtilizationControlFunc(n1, n2) -} - -// GetNvLinkUtilizationControlCalls gets all the calls that were made to GetNvLinkUtilizationControl. -// Check the length with: -// -// len(mockedDevice.GetNvLinkUtilizationControlCalls()) -func (mock *Device) GetNvLinkUtilizationControlCalls() []struct { - N1 int - N2 int -} { - var calls []struct { - N1 int - N2 int - } - mock.lockGetNvLinkUtilizationControl.RLock() - calls = mock.calls.GetNvLinkUtilizationControl - mock.lockGetNvLinkUtilizationControl.RUnlock() - return calls -} - -// GetNvLinkUtilizationCounter calls GetNvLinkUtilizationCounterFunc. -func (mock *Device) GetNvLinkUtilizationCounter(n1 int, n2 int) (uint64, uint64, nvml.Return) { - if mock.GetNvLinkUtilizationCounterFunc == nil { - panic("Device.GetNvLinkUtilizationCounterFunc: method is nil but Device.GetNvLinkUtilizationCounter was just called") - } - callInfo := struct { - N1 int - N2 int - }{ - N1: n1, - N2: n2, - } - mock.lockGetNvLinkUtilizationCounter.Lock() - mock.calls.GetNvLinkUtilizationCounter = append(mock.calls.GetNvLinkUtilizationCounter, callInfo) - mock.lockGetNvLinkUtilizationCounter.Unlock() - return mock.GetNvLinkUtilizationCounterFunc(n1, n2) -} - -// GetNvLinkUtilizationCounterCalls gets all the calls that were made to GetNvLinkUtilizationCounter. -// Check the length with: -// -// len(mockedDevice.GetNvLinkUtilizationCounterCalls()) -func (mock *Device) GetNvLinkUtilizationCounterCalls() []struct { - N1 int - N2 int -} { - var calls []struct { - N1 int - N2 int - } - mock.lockGetNvLinkUtilizationCounter.RLock() - calls = mock.calls.GetNvLinkUtilizationCounter - mock.lockGetNvLinkUtilizationCounter.RUnlock() - return calls -} - -// GetNvLinkVersion calls GetNvLinkVersionFunc. -func (mock *Device) GetNvLinkVersion(n int) (uint32, nvml.Return) { - if mock.GetNvLinkVersionFunc == nil { - panic("Device.GetNvLinkVersionFunc: method is nil but Device.GetNvLinkVersion was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetNvLinkVersion.Lock() - mock.calls.GetNvLinkVersion = append(mock.calls.GetNvLinkVersion, callInfo) - mock.lockGetNvLinkVersion.Unlock() - return mock.GetNvLinkVersionFunc(n) -} - -// GetNvLinkVersionCalls gets all the calls that were made to GetNvLinkVersion. -// Check the length with: -// -// len(mockedDevice.GetNvLinkVersionCalls()) -func (mock *Device) GetNvLinkVersionCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetNvLinkVersion.RLock() - calls = mock.calls.GetNvLinkVersion - mock.lockGetNvLinkVersion.RUnlock() - return calls -} - -// GetNvlinkBwMode calls GetNvlinkBwModeFunc. -func (mock *Device) GetNvlinkBwMode() (nvml.NvlinkGetBwMode, nvml.Return) { - if mock.GetNvlinkBwModeFunc == nil { - panic("Device.GetNvlinkBwModeFunc: method is nil but Device.GetNvlinkBwMode was just called") - } - callInfo := struct { - }{} - mock.lockGetNvlinkBwMode.Lock() - mock.calls.GetNvlinkBwMode = append(mock.calls.GetNvlinkBwMode, callInfo) - mock.lockGetNvlinkBwMode.Unlock() - return mock.GetNvlinkBwModeFunc() -} - -// GetNvlinkBwModeCalls gets all the calls that were made to GetNvlinkBwMode. -// Check the length with: -// -// len(mockedDevice.GetNvlinkBwModeCalls()) -func (mock *Device) GetNvlinkBwModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetNvlinkBwMode.RLock() - calls = mock.calls.GetNvlinkBwMode - mock.lockGetNvlinkBwMode.RUnlock() - return calls -} - -// GetNvlinkSupportedBwModes calls GetNvlinkSupportedBwModesFunc. -func (mock *Device) GetNvlinkSupportedBwModes() (nvml.NvlinkSupportedBwModes, nvml.Return) { - if mock.GetNvlinkSupportedBwModesFunc == nil { - panic("Device.GetNvlinkSupportedBwModesFunc: method is nil but Device.GetNvlinkSupportedBwModes was just called") - } - callInfo := struct { - }{} - mock.lockGetNvlinkSupportedBwModes.Lock() - mock.calls.GetNvlinkSupportedBwModes = append(mock.calls.GetNvlinkSupportedBwModes, callInfo) - mock.lockGetNvlinkSupportedBwModes.Unlock() - return mock.GetNvlinkSupportedBwModesFunc() -} - -// GetNvlinkSupportedBwModesCalls gets all the calls that were made to GetNvlinkSupportedBwModes. -// Check the length with: -// -// len(mockedDevice.GetNvlinkSupportedBwModesCalls()) -func (mock *Device) GetNvlinkSupportedBwModesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetNvlinkSupportedBwModes.RLock() - calls = mock.calls.GetNvlinkSupportedBwModes - mock.lockGetNvlinkSupportedBwModes.RUnlock() - return calls -} - -// GetOfaUtilization calls GetOfaUtilizationFunc. -func (mock *Device) GetOfaUtilization() (uint32, uint32, nvml.Return) { - if mock.GetOfaUtilizationFunc == nil { - panic("Device.GetOfaUtilizationFunc: method is nil but Device.GetOfaUtilization was just called") - } - callInfo := struct { - }{} - mock.lockGetOfaUtilization.Lock() - mock.calls.GetOfaUtilization = append(mock.calls.GetOfaUtilization, callInfo) - mock.lockGetOfaUtilization.Unlock() - return mock.GetOfaUtilizationFunc() -} - -// GetOfaUtilizationCalls gets all the calls that were made to GetOfaUtilization. -// Check the length with: -// -// len(mockedDevice.GetOfaUtilizationCalls()) -func (mock *Device) GetOfaUtilizationCalls() []struct { -} { - var calls []struct { - } - mock.lockGetOfaUtilization.RLock() - calls = mock.calls.GetOfaUtilization - mock.lockGetOfaUtilization.RUnlock() - return calls -} - -// GetP2PStatus calls GetP2PStatusFunc. -func (mock *Device) GetP2PStatus(device nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) { - if mock.GetP2PStatusFunc == nil { - panic("Device.GetP2PStatusFunc: method is nil but Device.GetP2PStatus was just called") - } - callInfo := struct { - Device nvml.Device - GpuP2PCapsIndex nvml.GpuP2PCapsIndex - }{ - Device: device, - GpuP2PCapsIndex: gpuP2PCapsIndex, - } - mock.lockGetP2PStatus.Lock() - mock.calls.GetP2PStatus = append(mock.calls.GetP2PStatus, callInfo) - mock.lockGetP2PStatus.Unlock() - return mock.GetP2PStatusFunc(device, gpuP2PCapsIndex) -} - -// GetP2PStatusCalls gets all the calls that were made to GetP2PStatus. -// Check the length with: -// -// len(mockedDevice.GetP2PStatusCalls()) -func (mock *Device) GetP2PStatusCalls() []struct { - Device nvml.Device - GpuP2PCapsIndex nvml.GpuP2PCapsIndex -} { - var calls []struct { - Device nvml.Device - GpuP2PCapsIndex nvml.GpuP2PCapsIndex - } - mock.lockGetP2PStatus.RLock() - calls = mock.calls.GetP2PStatus - mock.lockGetP2PStatus.RUnlock() - return calls -} - -// GetPciInfo calls GetPciInfoFunc. -func (mock *Device) GetPciInfo() (nvml.PciInfo, nvml.Return) { - if mock.GetPciInfoFunc == nil { - panic("Device.GetPciInfoFunc: method is nil but Device.GetPciInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetPciInfo.Lock() - mock.calls.GetPciInfo = append(mock.calls.GetPciInfo, callInfo) - mock.lockGetPciInfo.Unlock() - return mock.GetPciInfoFunc() -} - -// GetPciInfoCalls gets all the calls that were made to GetPciInfo. -// Check the length with: -// -// len(mockedDevice.GetPciInfoCalls()) -func (mock *Device) GetPciInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPciInfo.RLock() - calls = mock.calls.GetPciInfo - mock.lockGetPciInfo.RUnlock() - return calls -} - -// GetPciInfoExt calls GetPciInfoExtFunc. -func (mock *Device) GetPciInfoExt() (nvml.PciInfoExt, nvml.Return) { - if mock.GetPciInfoExtFunc == nil { - panic("Device.GetPciInfoExtFunc: method is nil but Device.GetPciInfoExt was just called") - } - callInfo := struct { - }{} - mock.lockGetPciInfoExt.Lock() - mock.calls.GetPciInfoExt = append(mock.calls.GetPciInfoExt, callInfo) - mock.lockGetPciInfoExt.Unlock() - return mock.GetPciInfoExtFunc() -} - -// GetPciInfoExtCalls gets all the calls that were made to GetPciInfoExt. -// Check the length with: -// -// len(mockedDevice.GetPciInfoExtCalls()) -func (mock *Device) GetPciInfoExtCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPciInfoExt.RLock() - calls = mock.calls.GetPciInfoExt - mock.lockGetPciInfoExt.RUnlock() - return calls -} - -// GetPcieLinkMaxSpeed calls GetPcieLinkMaxSpeedFunc. -func (mock *Device) GetPcieLinkMaxSpeed() (uint32, nvml.Return) { - if mock.GetPcieLinkMaxSpeedFunc == nil { - panic("Device.GetPcieLinkMaxSpeedFunc: method is nil but Device.GetPcieLinkMaxSpeed was just called") - } - callInfo := struct { - }{} - mock.lockGetPcieLinkMaxSpeed.Lock() - mock.calls.GetPcieLinkMaxSpeed = append(mock.calls.GetPcieLinkMaxSpeed, callInfo) - mock.lockGetPcieLinkMaxSpeed.Unlock() - return mock.GetPcieLinkMaxSpeedFunc() -} - -// GetPcieLinkMaxSpeedCalls gets all the calls that were made to GetPcieLinkMaxSpeed. -// Check the length with: -// -// len(mockedDevice.GetPcieLinkMaxSpeedCalls()) -func (mock *Device) GetPcieLinkMaxSpeedCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPcieLinkMaxSpeed.RLock() - calls = mock.calls.GetPcieLinkMaxSpeed - mock.lockGetPcieLinkMaxSpeed.RUnlock() - return calls -} - -// GetPcieReplayCounter calls GetPcieReplayCounterFunc. -func (mock *Device) GetPcieReplayCounter() (int, nvml.Return) { - if mock.GetPcieReplayCounterFunc == nil { - panic("Device.GetPcieReplayCounterFunc: method is nil but Device.GetPcieReplayCounter was just called") - } - callInfo := struct { - }{} - mock.lockGetPcieReplayCounter.Lock() - mock.calls.GetPcieReplayCounter = append(mock.calls.GetPcieReplayCounter, callInfo) - mock.lockGetPcieReplayCounter.Unlock() - return mock.GetPcieReplayCounterFunc() -} - -// GetPcieReplayCounterCalls gets all the calls that were made to GetPcieReplayCounter. -// Check the length with: -// -// len(mockedDevice.GetPcieReplayCounterCalls()) -func (mock *Device) GetPcieReplayCounterCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPcieReplayCounter.RLock() - calls = mock.calls.GetPcieReplayCounter - mock.lockGetPcieReplayCounter.RUnlock() - return calls -} - -// GetPcieSpeed calls GetPcieSpeedFunc. -func (mock *Device) GetPcieSpeed() (int, nvml.Return) { - if mock.GetPcieSpeedFunc == nil { - panic("Device.GetPcieSpeedFunc: method is nil but Device.GetPcieSpeed was just called") - } - callInfo := struct { - }{} - mock.lockGetPcieSpeed.Lock() - mock.calls.GetPcieSpeed = append(mock.calls.GetPcieSpeed, callInfo) - mock.lockGetPcieSpeed.Unlock() - return mock.GetPcieSpeedFunc() -} - -// GetPcieSpeedCalls gets all the calls that were made to GetPcieSpeed. -// Check the length with: -// -// len(mockedDevice.GetPcieSpeedCalls()) -func (mock *Device) GetPcieSpeedCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPcieSpeed.RLock() - calls = mock.calls.GetPcieSpeed - mock.lockGetPcieSpeed.RUnlock() - return calls -} - -// GetPcieThroughput calls GetPcieThroughputFunc. -func (mock *Device) GetPcieThroughput(pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { - if mock.GetPcieThroughputFunc == nil { - panic("Device.GetPcieThroughputFunc: method is nil but Device.GetPcieThroughput was just called") - } - callInfo := struct { - PcieUtilCounter nvml.PcieUtilCounter - }{ - PcieUtilCounter: pcieUtilCounter, - } - mock.lockGetPcieThroughput.Lock() - mock.calls.GetPcieThroughput = append(mock.calls.GetPcieThroughput, callInfo) - mock.lockGetPcieThroughput.Unlock() - return mock.GetPcieThroughputFunc(pcieUtilCounter) -} - -// GetPcieThroughputCalls gets all the calls that were made to GetPcieThroughput. -// Check the length with: -// -// len(mockedDevice.GetPcieThroughputCalls()) -func (mock *Device) GetPcieThroughputCalls() []struct { - PcieUtilCounter nvml.PcieUtilCounter -} { - var calls []struct { - PcieUtilCounter nvml.PcieUtilCounter - } - mock.lockGetPcieThroughput.RLock() - calls = mock.calls.GetPcieThroughput - mock.lockGetPcieThroughput.RUnlock() - return calls -} - -// GetPdi calls GetPdiFunc. -func (mock *Device) GetPdi() (nvml.Pdi, nvml.Return) { - if mock.GetPdiFunc == nil { - panic("Device.GetPdiFunc: method is nil but Device.GetPdi was just called") - } - callInfo := struct { - }{} - mock.lockGetPdi.Lock() - mock.calls.GetPdi = append(mock.calls.GetPdi, callInfo) - mock.lockGetPdi.Unlock() - return mock.GetPdiFunc() -} - -// GetPdiCalls gets all the calls that were made to GetPdi. -// Check the length with: -// -// len(mockedDevice.GetPdiCalls()) -func (mock *Device) GetPdiCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPdi.RLock() - calls = mock.calls.GetPdi - mock.lockGetPdi.RUnlock() - return calls -} - -// GetPerformanceModes calls GetPerformanceModesFunc. -func (mock *Device) GetPerformanceModes() (nvml.DevicePerfModes, nvml.Return) { - if mock.GetPerformanceModesFunc == nil { - panic("Device.GetPerformanceModesFunc: method is nil but Device.GetPerformanceModes was just called") - } - callInfo := struct { - }{} - mock.lockGetPerformanceModes.Lock() - mock.calls.GetPerformanceModes = append(mock.calls.GetPerformanceModes, callInfo) - mock.lockGetPerformanceModes.Unlock() - return mock.GetPerformanceModesFunc() -} - -// GetPerformanceModesCalls gets all the calls that were made to GetPerformanceModes. -// Check the length with: -// -// len(mockedDevice.GetPerformanceModesCalls()) -func (mock *Device) GetPerformanceModesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPerformanceModes.RLock() - calls = mock.calls.GetPerformanceModes - mock.lockGetPerformanceModes.RUnlock() - return calls -} - -// GetPerformanceState calls GetPerformanceStateFunc. -func (mock *Device) GetPerformanceState() (nvml.Pstates, nvml.Return) { - if mock.GetPerformanceStateFunc == nil { - panic("Device.GetPerformanceStateFunc: method is nil but Device.GetPerformanceState was just called") - } - callInfo := struct { - }{} - mock.lockGetPerformanceState.Lock() - mock.calls.GetPerformanceState = append(mock.calls.GetPerformanceState, callInfo) - mock.lockGetPerformanceState.Unlock() - return mock.GetPerformanceStateFunc() -} - -// GetPerformanceStateCalls gets all the calls that were made to GetPerformanceState. -// Check the length with: -// -// len(mockedDevice.GetPerformanceStateCalls()) -func (mock *Device) GetPerformanceStateCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPerformanceState.RLock() - calls = mock.calls.GetPerformanceState - mock.lockGetPerformanceState.RUnlock() - return calls -} - -// GetPersistenceMode calls GetPersistenceModeFunc. -func (mock *Device) GetPersistenceMode() (nvml.EnableState, nvml.Return) { - if mock.GetPersistenceModeFunc == nil { - panic("Device.GetPersistenceModeFunc: method is nil but Device.GetPersistenceMode was just called") - } - callInfo := struct { - }{} - mock.lockGetPersistenceMode.Lock() - mock.calls.GetPersistenceMode = append(mock.calls.GetPersistenceMode, callInfo) - mock.lockGetPersistenceMode.Unlock() - return mock.GetPersistenceModeFunc() -} - -// GetPersistenceModeCalls gets all the calls that were made to GetPersistenceMode. -// Check the length with: -// -// len(mockedDevice.GetPersistenceModeCalls()) -func (mock *Device) GetPersistenceModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPersistenceMode.RLock() - calls = mock.calls.GetPersistenceMode - mock.lockGetPersistenceMode.RUnlock() - return calls -} - -// GetPgpuMetadataString calls GetPgpuMetadataStringFunc. -func (mock *Device) GetPgpuMetadataString() (string, nvml.Return) { - if mock.GetPgpuMetadataStringFunc == nil { - panic("Device.GetPgpuMetadataStringFunc: method is nil but Device.GetPgpuMetadataString was just called") - } - callInfo := struct { - }{} - mock.lockGetPgpuMetadataString.Lock() - mock.calls.GetPgpuMetadataString = append(mock.calls.GetPgpuMetadataString, callInfo) - mock.lockGetPgpuMetadataString.Unlock() - return mock.GetPgpuMetadataStringFunc() -} - -// GetPgpuMetadataStringCalls gets all the calls that were made to GetPgpuMetadataString. -// Check the length with: -// -// len(mockedDevice.GetPgpuMetadataStringCalls()) -func (mock *Device) GetPgpuMetadataStringCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPgpuMetadataString.RLock() - calls = mock.calls.GetPgpuMetadataString - mock.lockGetPgpuMetadataString.RUnlock() - return calls -} - -// GetPlatformInfo calls GetPlatformInfoFunc. -func (mock *Device) GetPlatformInfo() (nvml.PlatformInfo, nvml.Return) { - if mock.GetPlatformInfoFunc == nil { - panic("Device.GetPlatformInfoFunc: method is nil but Device.GetPlatformInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetPlatformInfo.Lock() - mock.calls.GetPlatformInfo = append(mock.calls.GetPlatformInfo, callInfo) - mock.lockGetPlatformInfo.Unlock() - return mock.GetPlatformInfoFunc() -} - -// GetPlatformInfoCalls gets all the calls that were made to GetPlatformInfo. -// Check the length with: -// -// len(mockedDevice.GetPlatformInfoCalls()) -func (mock *Device) GetPlatformInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPlatformInfo.RLock() - calls = mock.calls.GetPlatformInfo - mock.lockGetPlatformInfo.RUnlock() - return calls -} - -// GetPowerManagementDefaultLimit calls GetPowerManagementDefaultLimitFunc. -func (mock *Device) GetPowerManagementDefaultLimit() (uint32, nvml.Return) { - if mock.GetPowerManagementDefaultLimitFunc == nil { - panic("Device.GetPowerManagementDefaultLimitFunc: method is nil but Device.GetPowerManagementDefaultLimit was just called") - } - callInfo := struct { - }{} - mock.lockGetPowerManagementDefaultLimit.Lock() - mock.calls.GetPowerManagementDefaultLimit = append(mock.calls.GetPowerManagementDefaultLimit, callInfo) - mock.lockGetPowerManagementDefaultLimit.Unlock() - return mock.GetPowerManagementDefaultLimitFunc() -} - -// GetPowerManagementDefaultLimitCalls gets all the calls that were made to GetPowerManagementDefaultLimit. -// Check the length with: -// -// len(mockedDevice.GetPowerManagementDefaultLimitCalls()) -func (mock *Device) GetPowerManagementDefaultLimitCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPowerManagementDefaultLimit.RLock() - calls = mock.calls.GetPowerManagementDefaultLimit - mock.lockGetPowerManagementDefaultLimit.RUnlock() - return calls -} - -// GetPowerManagementLimit calls GetPowerManagementLimitFunc. -func (mock *Device) GetPowerManagementLimit() (uint32, nvml.Return) { - if mock.GetPowerManagementLimitFunc == nil { - panic("Device.GetPowerManagementLimitFunc: method is nil but Device.GetPowerManagementLimit was just called") - } - callInfo := struct { - }{} - mock.lockGetPowerManagementLimit.Lock() - mock.calls.GetPowerManagementLimit = append(mock.calls.GetPowerManagementLimit, callInfo) - mock.lockGetPowerManagementLimit.Unlock() - return mock.GetPowerManagementLimitFunc() -} - -// GetPowerManagementLimitCalls gets all the calls that were made to GetPowerManagementLimit. -// Check the length with: -// -// len(mockedDevice.GetPowerManagementLimitCalls()) -func (mock *Device) GetPowerManagementLimitCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPowerManagementLimit.RLock() - calls = mock.calls.GetPowerManagementLimit - mock.lockGetPowerManagementLimit.RUnlock() - return calls -} - -// GetPowerManagementLimitConstraints calls GetPowerManagementLimitConstraintsFunc. -func (mock *Device) GetPowerManagementLimitConstraints() (uint32, uint32, nvml.Return) { - if mock.GetPowerManagementLimitConstraintsFunc == nil { - panic("Device.GetPowerManagementLimitConstraintsFunc: method is nil but Device.GetPowerManagementLimitConstraints was just called") - } - callInfo := struct { - }{} - mock.lockGetPowerManagementLimitConstraints.Lock() - mock.calls.GetPowerManagementLimitConstraints = append(mock.calls.GetPowerManagementLimitConstraints, callInfo) - mock.lockGetPowerManagementLimitConstraints.Unlock() - return mock.GetPowerManagementLimitConstraintsFunc() -} - -// GetPowerManagementLimitConstraintsCalls gets all the calls that were made to GetPowerManagementLimitConstraints. -// Check the length with: -// -// len(mockedDevice.GetPowerManagementLimitConstraintsCalls()) -func (mock *Device) GetPowerManagementLimitConstraintsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPowerManagementLimitConstraints.RLock() - calls = mock.calls.GetPowerManagementLimitConstraints - mock.lockGetPowerManagementLimitConstraints.RUnlock() - return calls -} - -// GetPowerManagementMode calls GetPowerManagementModeFunc. -func (mock *Device) GetPowerManagementMode() (nvml.EnableState, nvml.Return) { - if mock.GetPowerManagementModeFunc == nil { - panic("Device.GetPowerManagementModeFunc: method is nil but Device.GetPowerManagementMode was just called") - } - callInfo := struct { - }{} - mock.lockGetPowerManagementMode.Lock() - mock.calls.GetPowerManagementMode = append(mock.calls.GetPowerManagementMode, callInfo) - mock.lockGetPowerManagementMode.Unlock() - return mock.GetPowerManagementModeFunc() -} - -// GetPowerManagementModeCalls gets all the calls that were made to GetPowerManagementMode. -// Check the length with: -// -// len(mockedDevice.GetPowerManagementModeCalls()) -func (mock *Device) GetPowerManagementModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPowerManagementMode.RLock() - calls = mock.calls.GetPowerManagementMode - mock.lockGetPowerManagementMode.RUnlock() - return calls -} - -// GetPowerMizerMode_v1 calls GetPowerMizerMode_v1Func. -func (mock *Device) GetPowerMizerMode_v1() (nvml.DevicePowerMizerModes_v1, nvml.Return) { - if mock.GetPowerMizerMode_v1Func == nil { - panic("Device.GetPowerMizerMode_v1Func: method is nil but Device.GetPowerMizerMode_v1 was just called") - } - callInfo := struct { - }{} - mock.lockGetPowerMizerMode_v1.Lock() - mock.calls.GetPowerMizerMode_v1 = append(mock.calls.GetPowerMizerMode_v1, callInfo) - mock.lockGetPowerMizerMode_v1.Unlock() - return mock.GetPowerMizerMode_v1Func() -} - -// GetPowerMizerMode_v1Calls gets all the calls that were made to GetPowerMizerMode_v1. -// Check the length with: -// -// len(mockedDevice.GetPowerMizerMode_v1Calls()) -func (mock *Device) GetPowerMizerMode_v1Calls() []struct { -} { - var calls []struct { - } - mock.lockGetPowerMizerMode_v1.RLock() - calls = mock.calls.GetPowerMizerMode_v1 - mock.lockGetPowerMizerMode_v1.RUnlock() - return calls -} - -// GetPowerSource calls GetPowerSourceFunc. -func (mock *Device) GetPowerSource() (nvml.PowerSource, nvml.Return) { - if mock.GetPowerSourceFunc == nil { - panic("Device.GetPowerSourceFunc: method is nil but Device.GetPowerSource was just called") - } - callInfo := struct { - }{} - mock.lockGetPowerSource.Lock() - mock.calls.GetPowerSource = append(mock.calls.GetPowerSource, callInfo) - mock.lockGetPowerSource.Unlock() - return mock.GetPowerSourceFunc() -} - -// GetPowerSourceCalls gets all the calls that were made to GetPowerSource. -// Check the length with: -// -// len(mockedDevice.GetPowerSourceCalls()) -func (mock *Device) GetPowerSourceCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPowerSource.RLock() - calls = mock.calls.GetPowerSource - mock.lockGetPowerSource.RUnlock() - return calls -} - -// GetPowerState calls GetPowerStateFunc. -func (mock *Device) GetPowerState() (nvml.Pstates, nvml.Return) { - if mock.GetPowerStateFunc == nil { - panic("Device.GetPowerStateFunc: method is nil but Device.GetPowerState was just called") - } - callInfo := struct { - }{} - mock.lockGetPowerState.Lock() - mock.calls.GetPowerState = append(mock.calls.GetPowerState, callInfo) - mock.lockGetPowerState.Unlock() - return mock.GetPowerStateFunc() -} - -// GetPowerStateCalls gets all the calls that were made to GetPowerState. -// Check the length with: -// -// len(mockedDevice.GetPowerStateCalls()) -func (mock *Device) GetPowerStateCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPowerState.RLock() - calls = mock.calls.GetPowerState - mock.lockGetPowerState.RUnlock() - return calls -} - -// GetPowerUsage calls GetPowerUsageFunc. -func (mock *Device) GetPowerUsage() (uint32, nvml.Return) { - if mock.GetPowerUsageFunc == nil { - panic("Device.GetPowerUsageFunc: method is nil but Device.GetPowerUsage was just called") - } - callInfo := struct { - }{} - mock.lockGetPowerUsage.Lock() - mock.calls.GetPowerUsage = append(mock.calls.GetPowerUsage, callInfo) - mock.lockGetPowerUsage.Unlock() - return mock.GetPowerUsageFunc() -} - -// GetPowerUsageCalls gets all the calls that were made to GetPowerUsage. -// Check the length with: -// -// len(mockedDevice.GetPowerUsageCalls()) -func (mock *Device) GetPowerUsageCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPowerUsage.RLock() - calls = mock.calls.GetPowerUsage - mock.lockGetPowerUsage.RUnlock() - return calls -} - -// GetProcessUtilization calls GetProcessUtilizationFunc. -func (mock *Device) GetProcessUtilization(v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) { - if mock.GetProcessUtilizationFunc == nil { - panic("Device.GetProcessUtilizationFunc: method is nil but Device.GetProcessUtilization was just called") - } - callInfo := struct { - V uint64 - }{ - V: v, - } - mock.lockGetProcessUtilization.Lock() - mock.calls.GetProcessUtilization = append(mock.calls.GetProcessUtilization, callInfo) - mock.lockGetProcessUtilization.Unlock() - return mock.GetProcessUtilizationFunc(v) -} - -// GetProcessUtilizationCalls gets all the calls that were made to GetProcessUtilization. -// Check the length with: -// -// len(mockedDevice.GetProcessUtilizationCalls()) -func (mock *Device) GetProcessUtilizationCalls() []struct { - V uint64 -} { - var calls []struct { - V uint64 - } - mock.lockGetProcessUtilization.RLock() - calls = mock.calls.GetProcessUtilization - mock.lockGetProcessUtilization.RUnlock() - return calls -} - -// GetProcessesUtilizationInfo calls GetProcessesUtilizationInfoFunc. -func (mock *Device) GetProcessesUtilizationInfo() (nvml.ProcessesUtilizationInfo, nvml.Return) { - if mock.GetProcessesUtilizationInfoFunc == nil { - panic("Device.GetProcessesUtilizationInfoFunc: method is nil but Device.GetProcessesUtilizationInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetProcessesUtilizationInfo.Lock() - mock.calls.GetProcessesUtilizationInfo = append(mock.calls.GetProcessesUtilizationInfo, callInfo) - mock.lockGetProcessesUtilizationInfo.Unlock() - return mock.GetProcessesUtilizationInfoFunc() -} - -// GetProcessesUtilizationInfoCalls gets all the calls that were made to GetProcessesUtilizationInfo. -// Check the length with: -// -// len(mockedDevice.GetProcessesUtilizationInfoCalls()) -func (mock *Device) GetProcessesUtilizationInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetProcessesUtilizationInfo.RLock() - calls = mock.calls.GetProcessesUtilizationInfo - mock.lockGetProcessesUtilizationInfo.RUnlock() - return calls -} - -// GetRemappedRows calls GetRemappedRowsFunc. -func (mock *Device) GetRemappedRows() (int, int, bool, bool, nvml.Return) { - if mock.GetRemappedRowsFunc == nil { - panic("Device.GetRemappedRowsFunc: method is nil but Device.GetRemappedRows was just called") - } - callInfo := struct { - }{} - mock.lockGetRemappedRows.Lock() - mock.calls.GetRemappedRows = append(mock.calls.GetRemappedRows, callInfo) - mock.lockGetRemappedRows.Unlock() - return mock.GetRemappedRowsFunc() -} - -// GetRemappedRowsCalls gets all the calls that were made to GetRemappedRows. -// Check the length with: -// -// len(mockedDevice.GetRemappedRowsCalls()) -func (mock *Device) GetRemappedRowsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetRemappedRows.RLock() - calls = mock.calls.GetRemappedRows - mock.lockGetRemappedRows.RUnlock() - return calls -} - -// GetRepairStatus calls GetRepairStatusFunc. -func (mock *Device) GetRepairStatus() (nvml.RepairStatus, nvml.Return) { - if mock.GetRepairStatusFunc == nil { - panic("Device.GetRepairStatusFunc: method is nil but Device.GetRepairStatus was just called") - } - callInfo := struct { - }{} - mock.lockGetRepairStatus.Lock() - mock.calls.GetRepairStatus = append(mock.calls.GetRepairStatus, callInfo) - mock.lockGetRepairStatus.Unlock() - return mock.GetRepairStatusFunc() -} - -// GetRepairStatusCalls gets all the calls that were made to GetRepairStatus. -// Check the length with: -// -// len(mockedDevice.GetRepairStatusCalls()) -func (mock *Device) GetRepairStatusCalls() []struct { -} { - var calls []struct { - } - mock.lockGetRepairStatus.RLock() - calls = mock.calls.GetRepairStatus - mock.lockGetRepairStatus.RUnlock() - return calls -} - -// GetRetiredPages calls GetRetiredPagesFunc. -func (mock *Device) GetRetiredPages(pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) { - if mock.GetRetiredPagesFunc == nil { - panic("Device.GetRetiredPagesFunc: method is nil but Device.GetRetiredPages was just called") - } - callInfo := struct { - PageRetirementCause nvml.PageRetirementCause - }{ - PageRetirementCause: pageRetirementCause, - } - mock.lockGetRetiredPages.Lock() - mock.calls.GetRetiredPages = append(mock.calls.GetRetiredPages, callInfo) - mock.lockGetRetiredPages.Unlock() - return mock.GetRetiredPagesFunc(pageRetirementCause) -} - -// GetRetiredPagesCalls gets all the calls that were made to GetRetiredPages. -// Check the length with: -// -// len(mockedDevice.GetRetiredPagesCalls()) -func (mock *Device) GetRetiredPagesCalls() []struct { - PageRetirementCause nvml.PageRetirementCause -} { - var calls []struct { - PageRetirementCause nvml.PageRetirementCause - } - mock.lockGetRetiredPages.RLock() - calls = mock.calls.GetRetiredPages - mock.lockGetRetiredPages.RUnlock() - return calls -} - -// GetRetiredPagesPendingStatus calls GetRetiredPagesPendingStatusFunc. -func (mock *Device) GetRetiredPagesPendingStatus() (nvml.EnableState, nvml.Return) { - if mock.GetRetiredPagesPendingStatusFunc == nil { - panic("Device.GetRetiredPagesPendingStatusFunc: method is nil but Device.GetRetiredPagesPendingStatus was just called") - } - callInfo := struct { - }{} - mock.lockGetRetiredPagesPendingStatus.Lock() - mock.calls.GetRetiredPagesPendingStatus = append(mock.calls.GetRetiredPagesPendingStatus, callInfo) - mock.lockGetRetiredPagesPendingStatus.Unlock() - return mock.GetRetiredPagesPendingStatusFunc() -} - -// GetRetiredPagesPendingStatusCalls gets all the calls that were made to GetRetiredPagesPendingStatus. -// Check the length with: -// -// len(mockedDevice.GetRetiredPagesPendingStatusCalls()) -func (mock *Device) GetRetiredPagesPendingStatusCalls() []struct { -} { - var calls []struct { - } - mock.lockGetRetiredPagesPendingStatus.RLock() - calls = mock.calls.GetRetiredPagesPendingStatus - mock.lockGetRetiredPagesPendingStatus.RUnlock() - return calls -} - -// GetRetiredPages_v2 calls GetRetiredPages_v2Func. -func (mock *Device) GetRetiredPages_v2(pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) { - if mock.GetRetiredPages_v2Func == nil { - panic("Device.GetRetiredPages_v2Func: method is nil but Device.GetRetiredPages_v2 was just called") - } - callInfo := struct { - PageRetirementCause nvml.PageRetirementCause - }{ - PageRetirementCause: pageRetirementCause, - } - mock.lockGetRetiredPages_v2.Lock() - mock.calls.GetRetiredPages_v2 = append(mock.calls.GetRetiredPages_v2, callInfo) - mock.lockGetRetiredPages_v2.Unlock() - return mock.GetRetiredPages_v2Func(pageRetirementCause) -} - -// GetRetiredPages_v2Calls gets all the calls that were made to GetRetiredPages_v2. -// Check the length with: -// -// len(mockedDevice.GetRetiredPages_v2Calls()) -func (mock *Device) GetRetiredPages_v2Calls() []struct { - PageRetirementCause nvml.PageRetirementCause -} { - var calls []struct { - PageRetirementCause nvml.PageRetirementCause - } - mock.lockGetRetiredPages_v2.RLock() - calls = mock.calls.GetRetiredPages_v2 - mock.lockGetRetiredPages_v2.RUnlock() - return calls -} - -// GetRowRemapperHistogram calls GetRowRemapperHistogramFunc. -func (mock *Device) GetRowRemapperHistogram() (nvml.RowRemapperHistogramValues, nvml.Return) { - if mock.GetRowRemapperHistogramFunc == nil { - panic("Device.GetRowRemapperHistogramFunc: method is nil but Device.GetRowRemapperHistogram was just called") - } - callInfo := struct { - }{} - mock.lockGetRowRemapperHistogram.Lock() - mock.calls.GetRowRemapperHistogram = append(mock.calls.GetRowRemapperHistogram, callInfo) - mock.lockGetRowRemapperHistogram.Unlock() - return mock.GetRowRemapperHistogramFunc() -} - -// GetRowRemapperHistogramCalls gets all the calls that were made to GetRowRemapperHistogram. -// Check the length with: -// -// len(mockedDevice.GetRowRemapperHistogramCalls()) -func (mock *Device) GetRowRemapperHistogramCalls() []struct { -} { - var calls []struct { - } - mock.lockGetRowRemapperHistogram.RLock() - calls = mock.calls.GetRowRemapperHistogram - mock.lockGetRowRemapperHistogram.RUnlock() - return calls -} - -// GetRunningProcessDetailList calls GetRunningProcessDetailListFunc. -func (mock *Device) GetRunningProcessDetailList() (nvml.ProcessDetailList, nvml.Return) { - if mock.GetRunningProcessDetailListFunc == nil { - panic("Device.GetRunningProcessDetailListFunc: method is nil but Device.GetRunningProcessDetailList was just called") - } - callInfo := struct { - }{} - mock.lockGetRunningProcessDetailList.Lock() - mock.calls.GetRunningProcessDetailList = append(mock.calls.GetRunningProcessDetailList, callInfo) - mock.lockGetRunningProcessDetailList.Unlock() - return mock.GetRunningProcessDetailListFunc() -} - -// GetRunningProcessDetailListCalls gets all the calls that were made to GetRunningProcessDetailList. -// Check the length with: -// -// len(mockedDevice.GetRunningProcessDetailListCalls()) -func (mock *Device) GetRunningProcessDetailListCalls() []struct { -} { - var calls []struct { - } - mock.lockGetRunningProcessDetailList.RLock() - calls = mock.calls.GetRunningProcessDetailList - mock.lockGetRunningProcessDetailList.RUnlock() - return calls -} - -// GetSamples calls GetSamplesFunc. -func (mock *Device) GetSamples(samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) { - if mock.GetSamplesFunc == nil { - panic("Device.GetSamplesFunc: method is nil but Device.GetSamples was just called") - } - callInfo := struct { - SamplingType nvml.SamplingType - V uint64 - }{ - SamplingType: samplingType, - V: v, - } - mock.lockGetSamples.Lock() - mock.calls.GetSamples = append(mock.calls.GetSamples, callInfo) - mock.lockGetSamples.Unlock() - return mock.GetSamplesFunc(samplingType, v) -} - -// GetSamplesCalls gets all the calls that were made to GetSamples. -// Check the length with: -// -// len(mockedDevice.GetSamplesCalls()) -func (mock *Device) GetSamplesCalls() []struct { - SamplingType nvml.SamplingType - V uint64 -} { - var calls []struct { - SamplingType nvml.SamplingType - V uint64 - } - mock.lockGetSamples.RLock() - calls = mock.calls.GetSamples - mock.lockGetSamples.RUnlock() - return calls -} - -// GetSerial calls GetSerialFunc. -func (mock *Device) GetSerial() (string, nvml.Return) { - if mock.GetSerialFunc == nil { - panic("Device.GetSerialFunc: method is nil but Device.GetSerial was just called") - } - callInfo := struct { - }{} - mock.lockGetSerial.Lock() - mock.calls.GetSerial = append(mock.calls.GetSerial, callInfo) - mock.lockGetSerial.Unlock() - return mock.GetSerialFunc() -} - -// GetSerialCalls gets all the calls that were made to GetSerial. -// Check the length with: -// -// len(mockedDevice.GetSerialCalls()) -func (mock *Device) GetSerialCalls() []struct { -} { - var calls []struct { - } - mock.lockGetSerial.RLock() - calls = mock.calls.GetSerial - mock.lockGetSerial.RUnlock() - return calls -} - -// GetSramEccErrorStatus calls GetSramEccErrorStatusFunc. -func (mock *Device) GetSramEccErrorStatus() (nvml.EccSramErrorStatus, nvml.Return) { - if mock.GetSramEccErrorStatusFunc == nil { - panic("Device.GetSramEccErrorStatusFunc: method is nil but Device.GetSramEccErrorStatus was just called") - } - callInfo := struct { - }{} - mock.lockGetSramEccErrorStatus.Lock() - mock.calls.GetSramEccErrorStatus = append(mock.calls.GetSramEccErrorStatus, callInfo) - mock.lockGetSramEccErrorStatus.Unlock() - return mock.GetSramEccErrorStatusFunc() -} - -// GetSramEccErrorStatusCalls gets all the calls that were made to GetSramEccErrorStatus. -// Check the length with: -// -// len(mockedDevice.GetSramEccErrorStatusCalls()) -func (mock *Device) GetSramEccErrorStatusCalls() []struct { -} { - var calls []struct { - } - mock.lockGetSramEccErrorStatus.RLock() - calls = mock.calls.GetSramEccErrorStatus - mock.lockGetSramEccErrorStatus.RUnlock() - return calls -} - -// GetSramUniqueUncorrectedEccErrorCounts calls GetSramUniqueUncorrectedEccErrorCountsFunc. -func (mock *Device) GetSramUniqueUncorrectedEccErrorCounts(eccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts) nvml.Return { - if mock.GetSramUniqueUncorrectedEccErrorCountsFunc == nil { - panic("Device.GetSramUniqueUncorrectedEccErrorCountsFunc: method is nil but Device.GetSramUniqueUncorrectedEccErrorCounts was just called") - } - callInfo := struct { - EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts - }{ - EccSramUniqueUncorrectedErrorCounts: eccSramUniqueUncorrectedErrorCounts, - } - mock.lockGetSramUniqueUncorrectedEccErrorCounts.Lock() - mock.calls.GetSramUniqueUncorrectedEccErrorCounts = append(mock.calls.GetSramUniqueUncorrectedEccErrorCounts, callInfo) - mock.lockGetSramUniqueUncorrectedEccErrorCounts.Unlock() - return mock.GetSramUniqueUncorrectedEccErrorCountsFunc(eccSramUniqueUncorrectedErrorCounts) -} - -// GetSramUniqueUncorrectedEccErrorCountsCalls gets all the calls that were made to GetSramUniqueUncorrectedEccErrorCounts. -// Check the length with: -// -// len(mockedDevice.GetSramUniqueUncorrectedEccErrorCountsCalls()) -func (mock *Device) GetSramUniqueUncorrectedEccErrorCountsCalls() []struct { - EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts -} { - var calls []struct { - EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts - } - mock.lockGetSramUniqueUncorrectedEccErrorCounts.RLock() - calls = mock.calls.GetSramUniqueUncorrectedEccErrorCounts - mock.lockGetSramUniqueUncorrectedEccErrorCounts.RUnlock() - return calls -} - -// GetSupportedClocksEventReasons calls GetSupportedClocksEventReasonsFunc. -func (mock *Device) GetSupportedClocksEventReasons() (uint64, nvml.Return) { - if mock.GetSupportedClocksEventReasonsFunc == nil { - panic("Device.GetSupportedClocksEventReasonsFunc: method is nil but Device.GetSupportedClocksEventReasons was just called") - } - callInfo := struct { - }{} - mock.lockGetSupportedClocksEventReasons.Lock() - mock.calls.GetSupportedClocksEventReasons = append(mock.calls.GetSupportedClocksEventReasons, callInfo) - mock.lockGetSupportedClocksEventReasons.Unlock() - return mock.GetSupportedClocksEventReasonsFunc() -} - -// GetSupportedClocksEventReasonsCalls gets all the calls that were made to GetSupportedClocksEventReasons. -// Check the length with: -// -// len(mockedDevice.GetSupportedClocksEventReasonsCalls()) -func (mock *Device) GetSupportedClocksEventReasonsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetSupportedClocksEventReasons.RLock() - calls = mock.calls.GetSupportedClocksEventReasons - mock.lockGetSupportedClocksEventReasons.RUnlock() - return calls -} - -// GetSupportedClocksThrottleReasons calls GetSupportedClocksThrottleReasonsFunc. -func (mock *Device) GetSupportedClocksThrottleReasons() (uint64, nvml.Return) { - if mock.GetSupportedClocksThrottleReasonsFunc == nil { - panic("Device.GetSupportedClocksThrottleReasonsFunc: method is nil but Device.GetSupportedClocksThrottleReasons was just called") - } - callInfo := struct { - }{} - mock.lockGetSupportedClocksThrottleReasons.Lock() - mock.calls.GetSupportedClocksThrottleReasons = append(mock.calls.GetSupportedClocksThrottleReasons, callInfo) - mock.lockGetSupportedClocksThrottleReasons.Unlock() - return mock.GetSupportedClocksThrottleReasonsFunc() -} - -// GetSupportedClocksThrottleReasonsCalls gets all the calls that were made to GetSupportedClocksThrottleReasons. -// Check the length with: -// -// len(mockedDevice.GetSupportedClocksThrottleReasonsCalls()) -func (mock *Device) GetSupportedClocksThrottleReasonsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetSupportedClocksThrottleReasons.RLock() - calls = mock.calls.GetSupportedClocksThrottleReasons - mock.lockGetSupportedClocksThrottleReasons.RUnlock() - return calls -} - -// GetSupportedEventTypes calls GetSupportedEventTypesFunc. -func (mock *Device) GetSupportedEventTypes() (uint64, nvml.Return) { - if mock.GetSupportedEventTypesFunc == nil { - panic("Device.GetSupportedEventTypesFunc: method is nil but Device.GetSupportedEventTypes was just called") - } - callInfo := struct { - }{} - mock.lockGetSupportedEventTypes.Lock() - mock.calls.GetSupportedEventTypes = append(mock.calls.GetSupportedEventTypes, callInfo) - mock.lockGetSupportedEventTypes.Unlock() - return mock.GetSupportedEventTypesFunc() -} - -// GetSupportedEventTypesCalls gets all the calls that were made to GetSupportedEventTypes. -// Check the length with: -// -// len(mockedDevice.GetSupportedEventTypesCalls()) -func (mock *Device) GetSupportedEventTypesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetSupportedEventTypes.RLock() - calls = mock.calls.GetSupportedEventTypes - mock.lockGetSupportedEventTypes.RUnlock() - return calls -} - -// GetSupportedGraphicsClocks calls GetSupportedGraphicsClocksFunc. -func (mock *Device) GetSupportedGraphicsClocks(n int) (int, uint32, nvml.Return) { - if mock.GetSupportedGraphicsClocksFunc == nil { - panic("Device.GetSupportedGraphicsClocksFunc: method is nil but Device.GetSupportedGraphicsClocks was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetSupportedGraphicsClocks.Lock() - mock.calls.GetSupportedGraphicsClocks = append(mock.calls.GetSupportedGraphicsClocks, callInfo) - mock.lockGetSupportedGraphicsClocks.Unlock() - return mock.GetSupportedGraphicsClocksFunc(n) -} - -// GetSupportedGraphicsClocksCalls gets all the calls that were made to GetSupportedGraphicsClocks. -// Check the length with: -// -// len(mockedDevice.GetSupportedGraphicsClocksCalls()) -func (mock *Device) GetSupportedGraphicsClocksCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetSupportedGraphicsClocks.RLock() - calls = mock.calls.GetSupportedGraphicsClocks - mock.lockGetSupportedGraphicsClocks.RUnlock() - return calls -} - -// GetSupportedMemoryClocks calls GetSupportedMemoryClocksFunc. -func (mock *Device) GetSupportedMemoryClocks() (int, uint32, nvml.Return) { - if mock.GetSupportedMemoryClocksFunc == nil { - panic("Device.GetSupportedMemoryClocksFunc: method is nil but Device.GetSupportedMemoryClocks was just called") - } - callInfo := struct { - }{} - mock.lockGetSupportedMemoryClocks.Lock() - mock.calls.GetSupportedMemoryClocks = append(mock.calls.GetSupportedMemoryClocks, callInfo) - mock.lockGetSupportedMemoryClocks.Unlock() - return mock.GetSupportedMemoryClocksFunc() -} - -// GetSupportedMemoryClocksCalls gets all the calls that were made to GetSupportedMemoryClocks. -// Check the length with: -// -// len(mockedDevice.GetSupportedMemoryClocksCalls()) -func (mock *Device) GetSupportedMemoryClocksCalls() []struct { -} { - var calls []struct { - } - mock.lockGetSupportedMemoryClocks.RLock() - calls = mock.calls.GetSupportedMemoryClocks - mock.lockGetSupportedMemoryClocks.RUnlock() - return calls -} - -// GetSupportedPerformanceStates calls GetSupportedPerformanceStatesFunc. -func (mock *Device) GetSupportedPerformanceStates() ([]nvml.Pstates, nvml.Return) { - if mock.GetSupportedPerformanceStatesFunc == nil { - panic("Device.GetSupportedPerformanceStatesFunc: method is nil but Device.GetSupportedPerformanceStates was just called") - } - callInfo := struct { - }{} - mock.lockGetSupportedPerformanceStates.Lock() - mock.calls.GetSupportedPerformanceStates = append(mock.calls.GetSupportedPerformanceStates, callInfo) - mock.lockGetSupportedPerformanceStates.Unlock() - return mock.GetSupportedPerformanceStatesFunc() -} - -// GetSupportedPerformanceStatesCalls gets all the calls that were made to GetSupportedPerformanceStates. -// Check the length with: -// -// len(mockedDevice.GetSupportedPerformanceStatesCalls()) -func (mock *Device) GetSupportedPerformanceStatesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetSupportedPerformanceStates.RLock() - calls = mock.calls.GetSupportedPerformanceStates - mock.lockGetSupportedPerformanceStates.RUnlock() - return calls -} - -// GetSupportedVgpus calls GetSupportedVgpusFunc. -func (mock *Device) GetSupportedVgpus() ([]nvml.VgpuTypeId, nvml.Return) { - if mock.GetSupportedVgpusFunc == nil { - panic("Device.GetSupportedVgpusFunc: method is nil but Device.GetSupportedVgpus was just called") - } - callInfo := struct { - }{} - mock.lockGetSupportedVgpus.Lock() - mock.calls.GetSupportedVgpus = append(mock.calls.GetSupportedVgpus, callInfo) - mock.lockGetSupportedVgpus.Unlock() - return mock.GetSupportedVgpusFunc() -} - -// GetSupportedVgpusCalls gets all the calls that were made to GetSupportedVgpus. -// Check the length with: -// -// len(mockedDevice.GetSupportedVgpusCalls()) -func (mock *Device) GetSupportedVgpusCalls() []struct { -} { - var calls []struct { - } - mock.lockGetSupportedVgpus.RLock() - calls = mock.calls.GetSupportedVgpus - mock.lockGetSupportedVgpus.RUnlock() - return calls -} - -// GetTargetFanSpeed calls GetTargetFanSpeedFunc. -func (mock *Device) GetTargetFanSpeed(n int) (int, nvml.Return) { - if mock.GetTargetFanSpeedFunc == nil { - panic("Device.GetTargetFanSpeedFunc: method is nil but Device.GetTargetFanSpeed was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetTargetFanSpeed.Lock() - mock.calls.GetTargetFanSpeed = append(mock.calls.GetTargetFanSpeed, callInfo) - mock.lockGetTargetFanSpeed.Unlock() - return mock.GetTargetFanSpeedFunc(n) -} - -// GetTargetFanSpeedCalls gets all the calls that were made to GetTargetFanSpeed. -// Check the length with: -// -// len(mockedDevice.GetTargetFanSpeedCalls()) -func (mock *Device) GetTargetFanSpeedCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetTargetFanSpeed.RLock() - calls = mock.calls.GetTargetFanSpeed - mock.lockGetTargetFanSpeed.RUnlock() - return calls -} - -// GetTemperature calls GetTemperatureFunc. -func (mock *Device) GetTemperature(temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) { - if mock.GetTemperatureFunc == nil { - panic("Device.GetTemperatureFunc: method is nil but Device.GetTemperature was just called") - } - callInfo := struct { - TemperatureSensors nvml.TemperatureSensors - }{ - TemperatureSensors: temperatureSensors, - } - mock.lockGetTemperature.Lock() - mock.calls.GetTemperature = append(mock.calls.GetTemperature, callInfo) - mock.lockGetTemperature.Unlock() - return mock.GetTemperatureFunc(temperatureSensors) -} - -// GetTemperatureCalls gets all the calls that were made to GetTemperature. -// Check the length with: -// -// len(mockedDevice.GetTemperatureCalls()) -func (mock *Device) GetTemperatureCalls() []struct { - TemperatureSensors nvml.TemperatureSensors -} { - var calls []struct { - TemperatureSensors nvml.TemperatureSensors - } - mock.lockGetTemperature.RLock() - calls = mock.calls.GetTemperature - mock.lockGetTemperature.RUnlock() - return calls -} - -// GetTemperatureThreshold calls GetTemperatureThresholdFunc. -func (mock *Device) GetTemperatureThreshold(temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { - if mock.GetTemperatureThresholdFunc == nil { - panic("Device.GetTemperatureThresholdFunc: method is nil but Device.GetTemperatureThreshold was just called") - } - callInfo := struct { - TemperatureThresholds nvml.TemperatureThresholds - }{ - TemperatureThresholds: temperatureThresholds, - } - mock.lockGetTemperatureThreshold.Lock() - mock.calls.GetTemperatureThreshold = append(mock.calls.GetTemperatureThreshold, callInfo) - mock.lockGetTemperatureThreshold.Unlock() - return mock.GetTemperatureThresholdFunc(temperatureThresholds) -} - -// GetTemperatureThresholdCalls gets all the calls that were made to GetTemperatureThreshold. -// Check the length with: -// -// len(mockedDevice.GetTemperatureThresholdCalls()) -func (mock *Device) GetTemperatureThresholdCalls() []struct { - TemperatureThresholds nvml.TemperatureThresholds -} { - var calls []struct { - TemperatureThresholds nvml.TemperatureThresholds - } - mock.lockGetTemperatureThreshold.RLock() - calls = mock.calls.GetTemperatureThreshold - mock.lockGetTemperatureThreshold.RUnlock() - return calls -} - -// GetTemperatureV calls GetTemperatureVFunc. -func (mock *Device) GetTemperatureV() nvml.TemperatureHandler { - if mock.GetTemperatureVFunc == nil { - panic("Device.GetTemperatureVFunc: method is nil but Device.GetTemperatureV was just called") - } - callInfo := struct { - }{} - mock.lockGetTemperatureV.Lock() - mock.calls.GetTemperatureV = append(mock.calls.GetTemperatureV, callInfo) - mock.lockGetTemperatureV.Unlock() - return mock.GetTemperatureVFunc() -} - -// GetTemperatureVCalls gets all the calls that were made to GetTemperatureV. -// Check the length with: -// -// len(mockedDevice.GetTemperatureVCalls()) -func (mock *Device) GetTemperatureVCalls() []struct { -} { - var calls []struct { - } - mock.lockGetTemperatureV.RLock() - calls = mock.calls.GetTemperatureV - mock.lockGetTemperatureV.RUnlock() - return calls -} - -// GetThermalSettings calls GetThermalSettingsFunc. -func (mock *Device) GetThermalSettings(v uint32) (nvml.GpuThermalSettings, nvml.Return) { - if mock.GetThermalSettingsFunc == nil { - panic("Device.GetThermalSettingsFunc: method is nil but Device.GetThermalSettings was just called") - } - callInfo := struct { - V uint32 - }{ - V: v, - } - mock.lockGetThermalSettings.Lock() - mock.calls.GetThermalSettings = append(mock.calls.GetThermalSettings, callInfo) - mock.lockGetThermalSettings.Unlock() - return mock.GetThermalSettingsFunc(v) -} - -// GetThermalSettingsCalls gets all the calls that were made to GetThermalSettings. -// Check the length with: -// -// len(mockedDevice.GetThermalSettingsCalls()) -func (mock *Device) GetThermalSettingsCalls() []struct { - V uint32 -} { - var calls []struct { - V uint32 - } - mock.lockGetThermalSettings.RLock() - calls = mock.calls.GetThermalSettings - mock.lockGetThermalSettings.RUnlock() - return calls -} - -// GetTopologyCommonAncestor calls GetTopologyCommonAncestorFunc. -func (mock *Device) GetTopologyCommonAncestor(device nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) { - if mock.GetTopologyCommonAncestorFunc == nil { - panic("Device.GetTopologyCommonAncestorFunc: method is nil but Device.GetTopologyCommonAncestor was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockGetTopologyCommonAncestor.Lock() - mock.calls.GetTopologyCommonAncestor = append(mock.calls.GetTopologyCommonAncestor, callInfo) - mock.lockGetTopologyCommonAncestor.Unlock() - return mock.GetTopologyCommonAncestorFunc(device) -} - -// GetTopologyCommonAncestorCalls gets all the calls that were made to GetTopologyCommonAncestor. -// Check the length with: -// -// len(mockedDevice.GetTopologyCommonAncestorCalls()) -func (mock *Device) GetTopologyCommonAncestorCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockGetTopologyCommonAncestor.RLock() - calls = mock.calls.GetTopologyCommonAncestor - mock.lockGetTopologyCommonAncestor.RUnlock() - return calls -} - -// GetTopologyNearestGpus calls GetTopologyNearestGpusFunc. -func (mock *Device) GetTopologyNearestGpus(gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) { - if mock.GetTopologyNearestGpusFunc == nil { - panic("Device.GetTopologyNearestGpusFunc: method is nil but Device.GetTopologyNearestGpus was just called") - } - callInfo := struct { - GpuTopologyLevel nvml.GpuTopologyLevel - }{ - GpuTopologyLevel: gpuTopologyLevel, - } - mock.lockGetTopologyNearestGpus.Lock() - mock.calls.GetTopologyNearestGpus = append(mock.calls.GetTopologyNearestGpus, callInfo) - mock.lockGetTopologyNearestGpus.Unlock() - return mock.GetTopologyNearestGpusFunc(gpuTopologyLevel) -} - -// GetTopologyNearestGpusCalls gets all the calls that were made to GetTopologyNearestGpus. -// Check the length with: -// -// len(mockedDevice.GetTopologyNearestGpusCalls()) -func (mock *Device) GetTopologyNearestGpusCalls() []struct { - GpuTopologyLevel nvml.GpuTopologyLevel -} { - var calls []struct { - GpuTopologyLevel nvml.GpuTopologyLevel - } - mock.lockGetTopologyNearestGpus.RLock() - calls = mock.calls.GetTopologyNearestGpus - mock.lockGetTopologyNearestGpus.RUnlock() - return calls -} - -// GetTotalEccErrors calls GetTotalEccErrorsFunc. -func (mock *Device) GetTotalEccErrors(memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) { - if mock.GetTotalEccErrorsFunc == nil { - panic("Device.GetTotalEccErrorsFunc: method is nil but Device.GetTotalEccErrors was just called") - } - callInfo := struct { - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - }{ - MemoryErrorType: memoryErrorType, - EccCounterType: eccCounterType, - } - mock.lockGetTotalEccErrors.Lock() - mock.calls.GetTotalEccErrors = append(mock.calls.GetTotalEccErrors, callInfo) - mock.lockGetTotalEccErrors.Unlock() - return mock.GetTotalEccErrorsFunc(memoryErrorType, eccCounterType) -} - -// GetTotalEccErrorsCalls gets all the calls that were made to GetTotalEccErrors. -// Check the length with: -// -// len(mockedDevice.GetTotalEccErrorsCalls()) -func (mock *Device) GetTotalEccErrorsCalls() []struct { - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType -} { - var calls []struct { - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - } - mock.lockGetTotalEccErrors.RLock() - calls = mock.calls.GetTotalEccErrors - mock.lockGetTotalEccErrors.RUnlock() - return calls -} - -// GetTotalEnergyConsumption calls GetTotalEnergyConsumptionFunc. -func (mock *Device) GetTotalEnergyConsumption() (uint64, nvml.Return) { - if mock.GetTotalEnergyConsumptionFunc == nil { - panic("Device.GetTotalEnergyConsumptionFunc: method is nil but Device.GetTotalEnergyConsumption was just called") - } - callInfo := struct { - }{} - mock.lockGetTotalEnergyConsumption.Lock() - mock.calls.GetTotalEnergyConsumption = append(mock.calls.GetTotalEnergyConsumption, callInfo) - mock.lockGetTotalEnergyConsumption.Unlock() - return mock.GetTotalEnergyConsumptionFunc() -} - -// GetTotalEnergyConsumptionCalls gets all the calls that were made to GetTotalEnergyConsumption. -// Check the length with: -// -// len(mockedDevice.GetTotalEnergyConsumptionCalls()) -func (mock *Device) GetTotalEnergyConsumptionCalls() []struct { -} { - var calls []struct { - } - mock.lockGetTotalEnergyConsumption.RLock() - calls = mock.calls.GetTotalEnergyConsumption - mock.lockGetTotalEnergyConsumption.RUnlock() - return calls -} - -// GetUUID calls GetUUIDFunc. -func (mock *Device) GetUUID() (string, nvml.Return) { - if mock.GetUUIDFunc == nil { - panic("Device.GetUUIDFunc: method is nil but Device.GetUUID was just called") - } - callInfo := struct { - }{} - mock.lockGetUUID.Lock() - mock.calls.GetUUID = append(mock.calls.GetUUID, callInfo) - mock.lockGetUUID.Unlock() - return mock.GetUUIDFunc() -} - -// GetUUIDCalls gets all the calls that were made to GetUUID. -// Check the length with: -// -// len(mockedDevice.GetUUIDCalls()) -func (mock *Device) GetUUIDCalls() []struct { -} { - var calls []struct { - } - mock.lockGetUUID.RLock() - calls = mock.calls.GetUUID - mock.lockGetUUID.RUnlock() - return calls -} - -// GetUtilizationRates calls GetUtilizationRatesFunc. -func (mock *Device) GetUtilizationRates() (nvml.Utilization, nvml.Return) { - if mock.GetUtilizationRatesFunc == nil { - panic("Device.GetUtilizationRatesFunc: method is nil but Device.GetUtilizationRates was just called") - } - callInfo := struct { - }{} - mock.lockGetUtilizationRates.Lock() - mock.calls.GetUtilizationRates = append(mock.calls.GetUtilizationRates, callInfo) - mock.lockGetUtilizationRates.Unlock() - return mock.GetUtilizationRatesFunc() -} - -// GetUtilizationRatesCalls gets all the calls that were made to GetUtilizationRates. -// Check the length with: -// -// len(mockedDevice.GetUtilizationRatesCalls()) -func (mock *Device) GetUtilizationRatesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetUtilizationRates.RLock() - calls = mock.calls.GetUtilizationRates - mock.lockGetUtilizationRates.RUnlock() - return calls -} - -// GetVbiosVersion calls GetVbiosVersionFunc. -func (mock *Device) GetVbiosVersion() (string, nvml.Return) { - if mock.GetVbiosVersionFunc == nil { - panic("Device.GetVbiosVersionFunc: method is nil but Device.GetVbiosVersion was just called") - } - callInfo := struct { - }{} - mock.lockGetVbiosVersion.Lock() - mock.calls.GetVbiosVersion = append(mock.calls.GetVbiosVersion, callInfo) - mock.lockGetVbiosVersion.Unlock() - return mock.GetVbiosVersionFunc() -} - -// GetVbiosVersionCalls gets all the calls that were made to GetVbiosVersion. -// Check the length with: -// -// len(mockedDevice.GetVbiosVersionCalls()) -func (mock *Device) GetVbiosVersionCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVbiosVersion.RLock() - calls = mock.calls.GetVbiosVersion - mock.lockGetVbiosVersion.RUnlock() - return calls -} - -// GetVgpuCapabilities calls GetVgpuCapabilitiesFunc. -func (mock *Device) GetVgpuCapabilities(deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) { - if mock.GetVgpuCapabilitiesFunc == nil { - panic("Device.GetVgpuCapabilitiesFunc: method is nil but Device.GetVgpuCapabilities was just called") - } - callInfo := struct { - DeviceVgpuCapability nvml.DeviceVgpuCapability - }{ - DeviceVgpuCapability: deviceVgpuCapability, - } - mock.lockGetVgpuCapabilities.Lock() - mock.calls.GetVgpuCapabilities = append(mock.calls.GetVgpuCapabilities, callInfo) - mock.lockGetVgpuCapabilities.Unlock() - return mock.GetVgpuCapabilitiesFunc(deviceVgpuCapability) -} - -// GetVgpuCapabilitiesCalls gets all the calls that were made to GetVgpuCapabilities. -// Check the length with: -// -// len(mockedDevice.GetVgpuCapabilitiesCalls()) -func (mock *Device) GetVgpuCapabilitiesCalls() []struct { - DeviceVgpuCapability nvml.DeviceVgpuCapability -} { - var calls []struct { - DeviceVgpuCapability nvml.DeviceVgpuCapability - } - mock.lockGetVgpuCapabilities.RLock() - calls = mock.calls.GetVgpuCapabilities - mock.lockGetVgpuCapabilities.RUnlock() - return calls -} - -// GetVgpuHeterogeneousMode calls GetVgpuHeterogeneousModeFunc. -func (mock *Device) GetVgpuHeterogeneousMode() (nvml.VgpuHeterogeneousMode, nvml.Return) { - if mock.GetVgpuHeterogeneousModeFunc == nil { - panic("Device.GetVgpuHeterogeneousModeFunc: method is nil but Device.GetVgpuHeterogeneousMode was just called") - } - callInfo := struct { - }{} - mock.lockGetVgpuHeterogeneousMode.Lock() - mock.calls.GetVgpuHeterogeneousMode = append(mock.calls.GetVgpuHeterogeneousMode, callInfo) - mock.lockGetVgpuHeterogeneousMode.Unlock() - return mock.GetVgpuHeterogeneousModeFunc() -} - -// GetVgpuHeterogeneousModeCalls gets all the calls that were made to GetVgpuHeterogeneousMode. -// Check the length with: -// -// len(mockedDevice.GetVgpuHeterogeneousModeCalls()) -func (mock *Device) GetVgpuHeterogeneousModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVgpuHeterogeneousMode.RLock() - calls = mock.calls.GetVgpuHeterogeneousMode - mock.lockGetVgpuHeterogeneousMode.RUnlock() - return calls -} - -// GetVgpuInstancesUtilizationInfo calls GetVgpuInstancesUtilizationInfoFunc. -func (mock *Device) GetVgpuInstancesUtilizationInfo() (nvml.VgpuInstancesUtilizationInfo, nvml.Return) { - if mock.GetVgpuInstancesUtilizationInfoFunc == nil { - panic("Device.GetVgpuInstancesUtilizationInfoFunc: method is nil but Device.GetVgpuInstancesUtilizationInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetVgpuInstancesUtilizationInfo.Lock() - mock.calls.GetVgpuInstancesUtilizationInfo = append(mock.calls.GetVgpuInstancesUtilizationInfo, callInfo) - mock.lockGetVgpuInstancesUtilizationInfo.Unlock() - return mock.GetVgpuInstancesUtilizationInfoFunc() -} - -// GetVgpuInstancesUtilizationInfoCalls gets all the calls that were made to GetVgpuInstancesUtilizationInfo. -// Check the length with: -// -// len(mockedDevice.GetVgpuInstancesUtilizationInfoCalls()) -func (mock *Device) GetVgpuInstancesUtilizationInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVgpuInstancesUtilizationInfo.RLock() - calls = mock.calls.GetVgpuInstancesUtilizationInfo - mock.lockGetVgpuInstancesUtilizationInfo.RUnlock() - return calls -} - -// GetVgpuMetadata calls GetVgpuMetadataFunc. -func (mock *Device) GetVgpuMetadata() (nvml.VgpuPgpuMetadata, nvml.Return) { - if mock.GetVgpuMetadataFunc == nil { - panic("Device.GetVgpuMetadataFunc: method is nil but Device.GetVgpuMetadata was just called") - } - callInfo := struct { - }{} - mock.lockGetVgpuMetadata.Lock() - mock.calls.GetVgpuMetadata = append(mock.calls.GetVgpuMetadata, callInfo) - mock.lockGetVgpuMetadata.Unlock() - return mock.GetVgpuMetadataFunc() -} - -// GetVgpuMetadataCalls gets all the calls that were made to GetVgpuMetadata. -// Check the length with: -// -// len(mockedDevice.GetVgpuMetadataCalls()) -func (mock *Device) GetVgpuMetadataCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVgpuMetadata.RLock() - calls = mock.calls.GetVgpuMetadata - mock.lockGetVgpuMetadata.RUnlock() - return calls -} - -// GetVgpuProcessUtilization calls GetVgpuProcessUtilizationFunc. -func (mock *Device) GetVgpuProcessUtilization(v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) { - if mock.GetVgpuProcessUtilizationFunc == nil { - panic("Device.GetVgpuProcessUtilizationFunc: method is nil but Device.GetVgpuProcessUtilization was just called") - } - callInfo := struct { - V uint64 - }{ - V: v, - } - mock.lockGetVgpuProcessUtilization.Lock() - mock.calls.GetVgpuProcessUtilization = append(mock.calls.GetVgpuProcessUtilization, callInfo) - mock.lockGetVgpuProcessUtilization.Unlock() - return mock.GetVgpuProcessUtilizationFunc(v) -} - -// GetVgpuProcessUtilizationCalls gets all the calls that were made to GetVgpuProcessUtilization. -// Check the length with: -// -// len(mockedDevice.GetVgpuProcessUtilizationCalls()) -func (mock *Device) GetVgpuProcessUtilizationCalls() []struct { - V uint64 -} { - var calls []struct { - V uint64 - } - mock.lockGetVgpuProcessUtilization.RLock() - calls = mock.calls.GetVgpuProcessUtilization - mock.lockGetVgpuProcessUtilization.RUnlock() - return calls -} - -// GetVgpuProcessesUtilizationInfo calls GetVgpuProcessesUtilizationInfoFunc. -func (mock *Device) GetVgpuProcessesUtilizationInfo() (nvml.VgpuProcessesUtilizationInfo, nvml.Return) { - if mock.GetVgpuProcessesUtilizationInfoFunc == nil { - panic("Device.GetVgpuProcessesUtilizationInfoFunc: method is nil but Device.GetVgpuProcessesUtilizationInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetVgpuProcessesUtilizationInfo.Lock() - mock.calls.GetVgpuProcessesUtilizationInfo = append(mock.calls.GetVgpuProcessesUtilizationInfo, callInfo) - mock.lockGetVgpuProcessesUtilizationInfo.Unlock() - return mock.GetVgpuProcessesUtilizationInfoFunc() -} - -// GetVgpuProcessesUtilizationInfoCalls gets all the calls that were made to GetVgpuProcessesUtilizationInfo. -// Check the length with: -// -// len(mockedDevice.GetVgpuProcessesUtilizationInfoCalls()) -func (mock *Device) GetVgpuProcessesUtilizationInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVgpuProcessesUtilizationInfo.RLock() - calls = mock.calls.GetVgpuProcessesUtilizationInfo - mock.lockGetVgpuProcessesUtilizationInfo.RUnlock() - return calls -} - -// GetVgpuSchedulerCapabilities calls GetVgpuSchedulerCapabilitiesFunc. -func (mock *Device) GetVgpuSchedulerCapabilities() (nvml.VgpuSchedulerCapabilities, nvml.Return) { - if mock.GetVgpuSchedulerCapabilitiesFunc == nil { - panic("Device.GetVgpuSchedulerCapabilitiesFunc: method is nil but Device.GetVgpuSchedulerCapabilities was just called") - } - callInfo := struct { - }{} - mock.lockGetVgpuSchedulerCapabilities.Lock() - mock.calls.GetVgpuSchedulerCapabilities = append(mock.calls.GetVgpuSchedulerCapabilities, callInfo) - mock.lockGetVgpuSchedulerCapabilities.Unlock() - return mock.GetVgpuSchedulerCapabilitiesFunc() -} - -// GetVgpuSchedulerCapabilitiesCalls gets all the calls that were made to GetVgpuSchedulerCapabilities. -// Check the length with: -// -// len(mockedDevice.GetVgpuSchedulerCapabilitiesCalls()) -func (mock *Device) GetVgpuSchedulerCapabilitiesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVgpuSchedulerCapabilities.RLock() - calls = mock.calls.GetVgpuSchedulerCapabilities - mock.lockGetVgpuSchedulerCapabilities.RUnlock() - return calls -} - -// GetVgpuSchedulerLog calls GetVgpuSchedulerLogFunc. -func (mock *Device) GetVgpuSchedulerLog() (nvml.VgpuSchedulerLog, nvml.Return) { - if mock.GetVgpuSchedulerLogFunc == nil { - panic("Device.GetVgpuSchedulerLogFunc: method is nil but Device.GetVgpuSchedulerLog was just called") - } - callInfo := struct { - }{} - mock.lockGetVgpuSchedulerLog.Lock() - mock.calls.GetVgpuSchedulerLog = append(mock.calls.GetVgpuSchedulerLog, callInfo) - mock.lockGetVgpuSchedulerLog.Unlock() - return mock.GetVgpuSchedulerLogFunc() -} - -// GetVgpuSchedulerLogCalls gets all the calls that were made to GetVgpuSchedulerLog. -// Check the length with: -// -// len(mockedDevice.GetVgpuSchedulerLogCalls()) -func (mock *Device) GetVgpuSchedulerLogCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVgpuSchedulerLog.RLock() - calls = mock.calls.GetVgpuSchedulerLog - mock.lockGetVgpuSchedulerLog.RUnlock() - return calls -} - -// GetVgpuSchedulerState calls GetVgpuSchedulerStateFunc. -func (mock *Device) GetVgpuSchedulerState() (nvml.VgpuSchedulerGetState, nvml.Return) { - if mock.GetVgpuSchedulerStateFunc == nil { - panic("Device.GetVgpuSchedulerStateFunc: method is nil but Device.GetVgpuSchedulerState was just called") - } - callInfo := struct { - }{} - mock.lockGetVgpuSchedulerState.Lock() - mock.calls.GetVgpuSchedulerState = append(mock.calls.GetVgpuSchedulerState, callInfo) - mock.lockGetVgpuSchedulerState.Unlock() - return mock.GetVgpuSchedulerStateFunc() -} - -// GetVgpuSchedulerStateCalls gets all the calls that were made to GetVgpuSchedulerState. -// Check the length with: -// -// len(mockedDevice.GetVgpuSchedulerStateCalls()) -func (mock *Device) GetVgpuSchedulerStateCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVgpuSchedulerState.RLock() - calls = mock.calls.GetVgpuSchedulerState - mock.lockGetVgpuSchedulerState.RUnlock() - return calls -} - -// GetVgpuTypeCreatablePlacements calls GetVgpuTypeCreatablePlacementsFunc. -func (mock *Device) GetVgpuTypeCreatablePlacements(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { - if mock.GetVgpuTypeCreatablePlacementsFunc == nil { - panic("Device.GetVgpuTypeCreatablePlacementsFunc: method is nil but Device.GetVgpuTypeCreatablePlacements was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockGetVgpuTypeCreatablePlacements.Lock() - mock.calls.GetVgpuTypeCreatablePlacements = append(mock.calls.GetVgpuTypeCreatablePlacements, callInfo) - mock.lockGetVgpuTypeCreatablePlacements.Unlock() - return mock.GetVgpuTypeCreatablePlacementsFunc(vgpuTypeId) -} - -// GetVgpuTypeCreatablePlacementsCalls gets all the calls that were made to GetVgpuTypeCreatablePlacements. -// Check the length with: -// -// len(mockedDevice.GetVgpuTypeCreatablePlacementsCalls()) -func (mock *Device) GetVgpuTypeCreatablePlacementsCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockGetVgpuTypeCreatablePlacements.RLock() - calls = mock.calls.GetVgpuTypeCreatablePlacements - mock.lockGetVgpuTypeCreatablePlacements.RUnlock() - return calls -} - -// GetVgpuTypeSupportedPlacements calls GetVgpuTypeSupportedPlacementsFunc. -func (mock *Device) GetVgpuTypeSupportedPlacements(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { - if mock.GetVgpuTypeSupportedPlacementsFunc == nil { - panic("Device.GetVgpuTypeSupportedPlacementsFunc: method is nil but Device.GetVgpuTypeSupportedPlacements was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockGetVgpuTypeSupportedPlacements.Lock() - mock.calls.GetVgpuTypeSupportedPlacements = append(mock.calls.GetVgpuTypeSupportedPlacements, callInfo) - mock.lockGetVgpuTypeSupportedPlacements.Unlock() - return mock.GetVgpuTypeSupportedPlacementsFunc(vgpuTypeId) -} - -// GetVgpuTypeSupportedPlacementsCalls gets all the calls that were made to GetVgpuTypeSupportedPlacements. -// Check the length with: -// -// len(mockedDevice.GetVgpuTypeSupportedPlacementsCalls()) -func (mock *Device) GetVgpuTypeSupportedPlacementsCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockGetVgpuTypeSupportedPlacements.RLock() - calls = mock.calls.GetVgpuTypeSupportedPlacements - mock.lockGetVgpuTypeSupportedPlacements.RUnlock() - return calls -} - -// GetVgpuUtilization calls GetVgpuUtilizationFunc. -func (mock *Device) GetVgpuUtilization(v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) { - if mock.GetVgpuUtilizationFunc == nil { - panic("Device.GetVgpuUtilizationFunc: method is nil but Device.GetVgpuUtilization was just called") - } - callInfo := struct { - V uint64 - }{ - V: v, - } - mock.lockGetVgpuUtilization.Lock() - mock.calls.GetVgpuUtilization = append(mock.calls.GetVgpuUtilization, callInfo) - mock.lockGetVgpuUtilization.Unlock() - return mock.GetVgpuUtilizationFunc(v) -} - -// GetVgpuUtilizationCalls gets all the calls that were made to GetVgpuUtilization. -// Check the length with: -// -// len(mockedDevice.GetVgpuUtilizationCalls()) -func (mock *Device) GetVgpuUtilizationCalls() []struct { - V uint64 -} { - var calls []struct { - V uint64 - } - mock.lockGetVgpuUtilization.RLock() - calls = mock.calls.GetVgpuUtilization - mock.lockGetVgpuUtilization.RUnlock() - return calls -} - -// GetViolationStatus calls GetViolationStatusFunc. -func (mock *Device) GetViolationStatus(perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) { - if mock.GetViolationStatusFunc == nil { - panic("Device.GetViolationStatusFunc: method is nil but Device.GetViolationStatus was just called") - } - callInfo := struct { - PerfPolicyType nvml.PerfPolicyType - }{ - PerfPolicyType: perfPolicyType, - } - mock.lockGetViolationStatus.Lock() - mock.calls.GetViolationStatus = append(mock.calls.GetViolationStatus, callInfo) - mock.lockGetViolationStatus.Unlock() - return mock.GetViolationStatusFunc(perfPolicyType) -} - -// GetViolationStatusCalls gets all the calls that were made to GetViolationStatus. -// Check the length with: -// -// len(mockedDevice.GetViolationStatusCalls()) -func (mock *Device) GetViolationStatusCalls() []struct { - PerfPolicyType nvml.PerfPolicyType -} { - var calls []struct { - PerfPolicyType nvml.PerfPolicyType - } - mock.lockGetViolationStatus.RLock() - calls = mock.calls.GetViolationStatus - mock.lockGetViolationStatus.RUnlock() - return calls -} - -// GetVirtualizationMode calls GetVirtualizationModeFunc. -func (mock *Device) GetVirtualizationMode() (nvml.GpuVirtualizationMode, nvml.Return) { - if mock.GetVirtualizationModeFunc == nil { - panic("Device.GetVirtualizationModeFunc: method is nil but Device.GetVirtualizationMode was just called") - } - callInfo := struct { - }{} - mock.lockGetVirtualizationMode.Lock() - mock.calls.GetVirtualizationMode = append(mock.calls.GetVirtualizationMode, callInfo) - mock.lockGetVirtualizationMode.Unlock() - return mock.GetVirtualizationModeFunc() -} - -// GetVirtualizationModeCalls gets all the calls that were made to GetVirtualizationMode. -// Check the length with: -// -// len(mockedDevice.GetVirtualizationModeCalls()) -func (mock *Device) GetVirtualizationModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVirtualizationMode.RLock() - calls = mock.calls.GetVirtualizationMode - mock.lockGetVirtualizationMode.RUnlock() - return calls -} - -// GpmMigSampleGet calls GpmMigSampleGetFunc. -func (mock *Device) GpmMigSampleGet(n int, gpmSample nvml.GpmSample) nvml.Return { - if mock.GpmMigSampleGetFunc == nil { - panic("Device.GpmMigSampleGetFunc: method is nil but Device.GpmMigSampleGet was just called") - } - callInfo := struct { - N int - GpmSample nvml.GpmSample - }{ - N: n, - GpmSample: gpmSample, - } - mock.lockGpmMigSampleGet.Lock() - mock.calls.GpmMigSampleGet = append(mock.calls.GpmMigSampleGet, callInfo) - mock.lockGpmMigSampleGet.Unlock() - return mock.GpmMigSampleGetFunc(n, gpmSample) -} - -// GpmMigSampleGetCalls gets all the calls that were made to GpmMigSampleGet. -// Check the length with: -// -// len(mockedDevice.GpmMigSampleGetCalls()) -func (mock *Device) GpmMigSampleGetCalls() []struct { - N int - GpmSample nvml.GpmSample -} { - var calls []struct { - N int - GpmSample nvml.GpmSample - } - mock.lockGpmMigSampleGet.RLock() - calls = mock.calls.GpmMigSampleGet - mock.lockGpmMigSampleGet.RUnlock() - return calls -} - -// GpmQueryDeviceSupport calls GpmQueryDeviceSupportFunc. -func (mock *Device) GpmQueryDeviceSupport() (nvml.GpmSupport, nvml.Return) { - if mock.GpmQueryDeviceSupportFunc == nil { - panic("Device.GpmQueryDeviceSupportFunc: method is nil but Device.GpmQueryDeviceSupport was just called") - } - callInfo := struct { - }{} - mock.lockGpmQueryDeviceSupport.Lock() - mock.calls.GpmQueryDeviceSupport = append(mock.calls.GpmQueryDeviceSupport, callInfo) - mock.lockGpmQueryDeviceSupport.Unlock() - return mock.GpmQueryDeviceSupportFunc() -} - -// GpmQueryDeviceSupportCalls gets all the calls that were made to GpmQueryDeviceSupport. -// Check the length with: -// -// len(mockedDevice.GpmQueryDeviceSupportCalls()) -func (mock *Device) GpmQueryDeviceSupportCalls() []struct { -} { - var calls []struct { - } - mock.lockGpmQueryDeviceSupport.RLock() - calls = mock.calls.GpmQueryDeviceSupport - mock.lockGpmQueryDeviceSupport.RUnlock() - return calls -} - -// GpmQueryDeviceSupportV calls GpmQueryDeviceSupportVFunc. -func (mock *Device) GpmQueryDeviceSupportV() nvml.GpmSupportV { - if mock.GpmQueryDeviceSupportVFunc == nil { - panic("Device.GpmQueryDeviceSupportVFunc: method is nil but Device.GpmQueryDeviceSupportV was just called") - } - callInfo := struct { - }{} - mock.lockGpmQueryDeviceSupportV.Lock() - mock.calls.GpmQueryDeviceSupportV = append(mock.calls.GpmQueryDeviceSupportV, callInfo) - mock.lockGpmQueryDeviceSupportV.Unlock() - return mock.GpmQueryDeviceSupportVFunc() -} - -// GpmQueryDeviceSupportVCalls gets all the calls that were made to GpmQueryDeviceSupportV. -// Check the length with: -// -// len(mockedDevice.GpmQueryDeviceSupportVCalls()) -func (mock *Device) GpmQueryDeviceSupportVCalls() []struct { -} { - var calls []struct { - } - mock.lockGpmQueryDeviceSupportV.RLock() - calls = mock.calls.GpmQueryDeviceSupportV - mock.lockGpmQueryDeviceSupportV.RUnlock() - return calls -} - -// GpmQueryIfStreamingEnabled calls GpmQueryIfStreamingEnabledFunc. -func (mock *Device) GpmQueryIfStreamingEnabled() (uint32, nvml.Return) { - if mock.GpmQueryIfStreamingEnabledFunc == nil { - panic("Device.GpmQueryIfStreamingEnabledFunc: method is nil but Device.GpmQueryIfStreamingEnabled was just called") - } - callInfo := struct { - }{} - mock.lockGpmQueryIfStreamingEnabled.Lock() - mock.calls.GpmQueryIfStreamingEnabled = append(mock.calls.GpmQueryIfStreamingEnabled, callInfo) - mock.lockGpmQueryIfStreamingEnabled.Unlock() - return mock.GpmQueryIfStreamingEnabledFunc() -} - -// GpmQueryIfStreamingEnabledCalls gets all the calls that were made to GpmQueryIfStreamingEnabled. -// Check the length with: -// -// len(mockedDevice.GpmQueryIfStreamingEnabledCalls()) -func (mock *Device) GpmQueryIfStreamingEnabledCalls() []struct { -} { - var calls []struct { - } - mock.lockGpmQueryIfStreamingEnabled.RLock() - calls = mock.calls.GpmQueryIfStreamingEnabled - mock.lockGpmQueryIfStreamingEnabled.RUnlock() - return calls -} - -// GpmSampleGet calls GpmSampleGetFunc. -func (mock *Device) GpmSampleGet(gpmSample nvml.GpmSample) nvml.Return { - if mock.GpmSampleGetFunc == nil { - panic("Device.GpmSampleGetFunc: method is nil but Device.GpmSampleGet was just called") - } - callInfo := struct { - GpmSample nvml.GpmSample - }{ - GpmSample: gpmSample, - } - mock.lockGpmSampleGet.Lock() - mock.calls.GpmSampleGet = append(mock.calls.GpmSampleGet, callInfo) - mock.lockGpmSampleGet.Unlock() - return mock.GpmSampleGetFunc(gpmSample) -} - -// GpmSampleGetCalls gets all the calls that were made to GpmSampleGet. -// Check the length with: -// -// len(mockedDevice.GpmSampleGetCalls()) -func (mock *Device) GpmSampleGetCalls() []struct { - GpmSample nvml.GpmSample -} { - var calls []struct { - GpmSample nvml.GpmSample - } - mock.lockGpmSampleGet.RLock() - calls = mock.calls.GpmSampleGet - mock.lockGpmSampleGet.RUnlock() - return calls -} - -// GpmSetStreamingEnabled calls GpmSetStreamingEnabledFunc. -func (mock *Device) GpmSetStreamingEnabled(v uint32) nvml.Return { - if mock.GpmSetStreamingEnabledFunc == nil { - panic("Device.GpmSetStreamingEnabledFunc: method is nil but Device.GpmSetStreamingEnabled was just called") - } - callInfo := struct { - V uint32 - }{ - V: v, - } - mock.lockGpmSetStreamingEnabled.Lock() - mock.calls.GpmSetStreamingEnabled = append(mock.calls.GpmSetStreamingEnabled, callInfo) - mock.lockGpmSetStreamingEnabled.Unlock() - return mock.GpmSetStreamingEnabledFunc(v) -} - -// GpmSetStreamingEnabledCalls gets all the calls that were made to GpmSetStreamingEnabled. -// Check the length with: -// -// len(mockedDevice.GpmSetStreamingEnabledCalls()) -func (mock *Device) GpmSetStreamingEnabledCalls() []struct { - V uint32 -} { - var calls []struct { - V uint32 - } - mock.lockGpmSetStreamingEnabled.RLock() - calls = mock.calls.GpmSetStreamingEnabled - mock.lockGpmSetStreamingEnabled.RUnlock() - return calls -} - -// IsMigDeviceHandle calls IsMigDeviceHandleFunc. -func (mock *Device) IsMigDeviceHandle() (bool, nvml.Return) { - if mock.IsMigDeviceHandleFunc == nil { - panic("Device.IsMigDeviceHandleFunc: method is nil but Device.IsMigDeviceHandle was just called") - } - callInfo := struct { - }{} - mock.lockIsMigDeviceHandle.Lock() - mock.calls.IsMigDeviceHandle = append(mock.calls.IsMigDeviceHandle, callInfo) - mock.lockIsMigDeviceHandle.Unlock() - return mock.IsMigDeviceHandleFunc() -} - -// IsMigDeviceHandleCalls gets all the calls that were made to IsMigDeviceHandle. -// Check the length with: -// -// len(mockedDevice.IsMigDeviceHandleCalls()) -func (mock *Device) IsMigDeviceHandleCalls() []struct { -} { - var calls []struct { - } - mock.lockIsMigDeviceHandle.RLock() - calls = mock.calls.IsMigDeviceHandle - mock.lockIsMigDeviceHandle.RUnlock() - return calls -} - -// OnSameBoard calls OnSameBoardFunc. -func (mock *Device) OnSameBoard(device nvml.Device) (int, nvml.Return) { - if mock.OnSameBoardFunc == nil { - panic("Device.OnSameBoardFunc: method is nil but Device.OnSameBoard was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockOnSameBoard.Lock() - mock.calls.OnSameBoard = append(mock.calls.OnSameBoard, callInfo) - mock.lockOnSameBoard.Unlock() - return mock.OnSameBoardFunc(device) -} - -// OnSameBoardCalls gets all the calls that were made to OnSameBoard. -// Check the length with: -// -// len(mockedDevice.OnSameBoardCalls()) -func (mock *Device) OnSameBoardCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockOnSameBoard.RLock() - calls = mock.calls.OnSameBoard - mock.lockOnSameBoard.RUnlock() - return calls -} - -// PowerSmoothingActivatePresetProfile calls PowerSmoothingActivatePresetProfileFunc. -func (mock *Device) PowerSmoothingActivatePresetProfile(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { - if mock.PowerSmoothingActivatePresetProfileFunc == nil { - panic("Device.PowerSmoothingActivatePresetProfileFunc: method is nil but Device.PowerSmoothingActivatePresetProfile was just called") - } - callInfo := struct { - PowerSmoothingProfile *nvml.PowerSmoothingProfile - }{ - PowerSmoothingProfile: powerSmoothingProfile, - } - mock.lockPowerSmoothingActivatePresetProfile.Lock() - mock.calls.PowerSmoothingActivatePresetProfile = append(mock.calls.PowerSmoothingActivatePresetProfile, callInfo) - mock.lockPowerSmoothingActivatePresetProfile.Unlock() - return mock.PowerSmoothingActivatePresetProfileFunc(powerSmoothingProfile) -} - -// PowerSmoothingActivatePresetProfileCalls gets all the calls that were made to PowerSmoothingActivatePresetProfile. -// Check the length with: -// -// len(mockedDevice.PowerSmoothingActivatePresetProfileCalls()) -func (mock *Device) PowerSmoothingActivatePresetProfileCalls() []struct { - PowerSmoothingProfile *nvml.PowerSmoothingProfile -} { - var calls []struct { - PowerSmoothingProfile *nvml.PowerSmoothingProfile - } - mock.lockPowerSmoothingActivatePresetProfile.RLock() - calls = mock.calls.PowerSmoothingActivatePresetProfile - mock.lockPowerSmoothingActivatePresetProfile.RUnlock() - return calls -} - -// PowerSmoothingSetState calls PowerSmoothingSetStateFunc. -func (mock *Device) PowerSmoothingSetState(powerSmoothingState *nvml.PowerSmoothingState) nvml.Return { - if mock.PowerSmoothingSetStateFunc == nil { - panic("Device.PowerSmoothingSetStateFunc: method is nil but Device.PowerSmoothingSetState was just called") - } - callInfo := struct { - PowerSmoothingState *nvml.PowerSmoothingState - }{ - PowerSmoothingState: powerSmoothingState, - } - mock.lockPowerSmoothingSetState.Lock() - mock.calls.PowerSmoothingSetState = append(mock.calls.PowerSmoothingSetState, callInfo) - mock.lockPowerSmoothingSetState.Unlock() - return mock.PowerSmoothingSetStateFunc(powerSmoothingState) -} - -// PowerSmoothingSetStateCalls gets all the calls that were made to PowerSmoothingSetState. -// Check the length with: -// -// len(mockedDevice.PowerSmoothingSetStateCalls()) -func (mock *Device) PowerSmoothingSetStateCalls() []struct { - PowerSmoothingState *nvml.PowerSmoothingState -} { - var calls []struct { - PowerSmoothingState *nvml.PowerSmoothingState - } - mock.lockPowerSmoothingSetState.RLock() - calls = mock.calls.PowerSmoothingSetState - mock.lockPowerSmoothingSetState.RUnlock() - return calls -} - -// PowerSmoothingUpdatePresetProfileParam calls PowerSmoothingUpdatePresetProfileParamFunc. -func (mock *Device) PowerSmoothingUpdatePresetProfileParam(powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { - if mock.PowerSmoothingUpdatePresetProfileParamFunc == nil { - panic("Device.PowerSmoothingUpdatePresetProfileParamFunc: method is nil but Device.PowerSmoothingUpdatePresetProfileParam was just called") - } - callInfo := struct { - PowerSmoothingProfile *nvml.PowerSmoothingProfile - }{ - PowerSmoothingProfile: powerSmoothingProfile, - } - mock.lockPowerSmoothingUpdatePresetProfileParam.Lock() - mock.calls.PowerSmoothingUpdatePresetProfileParam = append(mock.calls.PowerSmoothingUpdatePresetProfileParam, callInfo) - mock.lockPowerSmoothingUpdatePresetProfileParam.Unlock() - return mock.PowerSmoothingUpdatePresetProfileParamFunc(powerSmoothingProfile) -} - -// PowerSmoothingUpdatePresetProfileParamCalls gets all the calls that were made to PowerSmoothingUpdatePresetProfileParam. -// Check the length with: -// -// len(mockedDevice.PowerSmoothingUpdatePresetProfileParamCalls()) -func (mock *Device) PowerSmoothingUpdatePresetProfileParamCalls() []struct { - PowerSmoothingProfile *nvml.PowerSmoothingProfile -} { - var calls []struct { - PowerSmoothingProfile *nvml.PowerSmoothingProfile - } - mock.lockPowerSmoothingUpdatePresetProfileParam.RLock() - calls = mock.calls.PowerSmoothingUpdatePresetProfileParam - mock.lockPowerSmoothingUpdatePresetProfileParam.RUnlock() - return calls -} - -// ReadWritePRM_v1 calls ReadWritePRM_v1Func. -func (mock *Device) ReadWritePRM_v1(pRMTLV_v1 *nvml.PRMTLV_v1) nvml.Return { - if mock.ReadWritePRM_v1Func == nil { - panic("Device.ReadWritePRM_v1Func: method is nil but Device.ReadWritePRM_v1 was just called") - } - callInfo := struct { - PRMTLV_v1 *nvml.PRMTLV_v1 - }{ - PRMTLV_v1: pRMTLV_v1, - } - mock.lockReadWritePRM_v1.Lock() - mock.calls.ReadWritePRM_v1 = append(mock.calls.ReadWritePRM_v1, callInfo) - mock.lockReadWritePRM_v1.Unlock() - return mock.ReadWritePRM_v1Func(pRMTLV_v1) -} - -// ReadWritePRM_v1Calls gets all the calls that were made to ReadWritePRM_v1. -// Check the length with: -// -// len(mockedDevice.ReadWritePRM_v1Calls()) -func (mock *Device) ReadWritePRM_v1Calls() []struct { - PRMTLV_v1 *nvml.PRMTLV_v1 -} { - var calls []struct { - PRMTLV_v1 *nvml.PRMTLV_v1 - } - mock.lockReadWritePRM_v1.RLock() - calls = mock.calls.ReadWritePRM_v1 - mock.lockReadWritePRM_v1.RUnlock() - return calls -} - -// RegisterEvents calls RegisterEventsFunc. -func (mock *Device) RegisterEvents(v uint64, eventSet nvml.EventSet) nvml.Return { - if mock.RegisterEventsFunc == nil { - panic("Device.RegisterEventsFunc: method is nil but Device.RegisterEvents was just called") - } - callInfo := struct { - V uint64 - EventSet nvml.EventSet - }{ - V: v, - EventSet: eventSet, - } - mock.lockRegisterEvents.Lock() - mock.calls.RegisterEvents = append(mock.calls.RegisterEvents, callInfo) - mock.lockRegisterEvents.Unlock() - return mock.RegisterEventsFunc(v, eventSet) -} - -// RegisterEventsCalls gets all the calls that were made to RegisterEvents. -// Check the length with: -// -// len(mockedDevice.RegisterEventsCalls()) -func (mock *Device) RegisterEventsCalls() []struct { - V uint64 - EventSet nvml.EventSet -} { - var calls []struct { - V uint64 - EventSet nvml.EventSet - } - mock.lockRegisterEvents.RLock() - calls = mock.calls.RegisterEvents - mock.lockRegisterEvents.RUnlock() - return calls -} - -// ResetApplicationsClocks calls ResetApplicationsClocksFunc. -func (mock *Device) ResetApplicationsClocks() nvml.Return { - if mock.ResetApplicationsClocksFunc == nil { - panic("Device.ResetApplicationsClocksFunc: method is nil but Device.ResetApplicationsClocks was just called") - } - callInfo := struct { - }{} - mock.lockResetApplicationsClocks.Lock() - mock.calls.ResetApplicationsClocks = append(mock.calls.ResetApplicationsClocks, callInfo) - mock.lockResetApplicationsClocks.Unlock() - return mock.ResetApplicationsClocksFunc() -} - -// ResetApplicationsClocksCalls gets all the calls that were made to ResetApplicationsClocks. -// Check the length with: -// -// len(mockedDevice.ResetApplicationsClocksCalls()) -func (mock *Device) ResetApplicationsClocksCalls() []struct { -} { - var calls []struct { - } - mock.lockResetApplicationsClocks.RLock() - calls = mock.calls.ResetApplicationsClocks - mock.lockResetApplicationsClocks.RUnlock() - return calls -} - -// ResetGpuLockedClocks calls ResetGpuLockedClocksFunc. -func (mock *Device) ResetGpuLockedClocks() nvml.Return { - if mock.ResetGpuLockedClocksFunc == nil { - panic("Device.ResetGpuLockedClocksFunc: method is nil but Device.ResetGpuLockedClocks was just called") - } - callInfo := struct { - }{} - mock.lockResetGpuLockedClocks.Lock() - mock.calls.ResetGpuLockedClocks = append(mock.calls.ResetGpuLockedClocks, callInfo) - mock.lockResetGpuLockedClocks.Unlock() - return mock.ResetGpuLockedClocksFunc() -} - -// ResetGpuLockedClocksCalls gets all the calls that were made to ResetGpuLockedClocks. -// Check the length with: -// -// len(mockedDevice.ResetGpuLockedClocksCalls()) -func (mock *Device) ResetGpuLockedClocksCalls() []struct { -} { - var calls []struct { - } - mock.lockResetGpuLockedClocks.RLock() - calls = mock.calls.ResetGpuLockedClocks - mock.lockResetGpuLockedClocks.RUnlock() - return calls -} - -// ResetMemoryLockedClocks calls ResetMemoryLockedClocksFunc. -func (mock *Device) ResetMemoryLockedClocks() nvml.Return { - if mock.ResetMemoryLockedClocksFunc == nil { - panic("Device.ResetMemoryLockedClocksFunc: method is nil but Device.ResetMemoryLockedClocks was just called") - } - callInfo := struct { - }{} - mock.lockResetMemoryLockedClocks.Lock() - mock.calls.ResetMemoryLockedClocks = append(mock.calls.ResetMemoryLockedClocks, callInfo) - mock.lockResetMemoryLockedClocks.Unlock() - return mock.ResetMemoryLockedClocksFunc() -} - -// ResetMemoryLockedClocksCalls gets all the calls that were made to ResetMemoryLockedClocks. -// Check the length with: -// -// len(mockedDevice.ResetMemoryLockedClocksCalls()) -func (mock *Device) ResetMemoryLockedClocksCalls() []struct { -} { - var calls []struct { - } - mock.lockResetMemoryLockedClocks.RLock() - calls = mock.calls.ResetMemoryLockedClocks - mock.lockResetMemoryLockedClocks.RUnlock() - return calls -} - -// ResetNvLinkErrorCounters calls ResetNvLinkErrorCountersFunc. -func (mock *Device) ResetNvLinkErrorCounters(n int) nvml.Return { - if mock.ResetNvLinkErrorCountersFunc == nil { - panic("Device.ResetNvLinkErrorCountersFunc: method is nil but Device.ResetNvLinkErrorCounters was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockResetNvLinkErrorCounters.Lock() - mock.calls.ResetNvLinkErrorCounters = append(mock.calls.ResetNvLinkErrorCounters, callInfo) - mock.lockResetNvLinkErrorCounters.Unlock() - return mock.ResetNvLinkErrorCountersFunc(n) -} - -// ResetNvLinkErrorCountersCalls gets all the calls that were made to ResetNvLinkErrorCounters. -// Check the length with: -// -// len(mockedDevice.ResetNvLinkErrorCountersCalls()) -func (mock *Device) ResetNvLinkErrorCountersCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockResetNvLinkErrorCounters.RLock() - calls = mock.calls.ResetNvLinkErrorCounters - mock.lockResetNvLinkErrorCounters.RUnlock() - return calls -} - -// ResetNvLinkUtilizationCounter calls ResetNvLinkUtilizationCounterFunc. -func (mock *Device) ResetNvLinkUtilizationCounter(n1 int, n2 int) nvml.Return { - if mock.ResetNvLinkUtilizationCounterFunc == nil { - panic("Device.ResetNvLinkUtilizationCounterFunc: method is nil but Device.ResetNvLinkUtilizationCounter was just called") - } - callInfo := struct { - N1 int - N2 int - }{ - N1: n1, - N2: n2, - } - mock.lockResetNvLinkUtilizationCounter.Lock() - mock.calls.ResetNvLinkUtilizationCounter = append(mock.calls.ResetNvLinkUtilizationCounter, callInfo) - mock.lockResetNvLinkUtilizationCounter.Unlock() - return mock.ResetNvLinkUtilizationCounterFunc(n1, n2) -} - -// ResetNvLinkUtilizationCounterCalls gets all the calls that were made to ResetNvLinkUtilizationCounter. -// Check the length with: -// -// len(mockedDevice.ResetNvLinkUtilizationCounterCalls()) -func (mock *Device) ResetNvLinkUtilizationCounterCalls() []struct { - N1 int - N2 int -} { - var calls []struct { - N1 int - N2 int - } - mock.lockResetNvLinkUtilizationCounter.RLock() - calls = mock.calls.ResetNvLinkUtilizationCounter - mock.lockResetNvLinkUtilizationCounter.RUnlock() - return calls -} - -// SetAPIRestriction calls SetAPIRestrictionFunc. -func (mock *Device) SetAPIRestriction(restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return { - if mock.SetAPIRestrictionFunc == nil { - panic("Device.SetAPIRestrictionFunc: method is nil but Device.SetAPIRestriction was just called") - } - callInfo := struct { - RestrictedAPI nvml.RestrictedAPI - EnableState nvml.EnableState - }{ - RestrictedAPI: restrictedAPI, - EnableState: enableState, - } - mock.lockSetAPIRestriction.Lock() - mock.calls.SetAPIRestriction = append(mock.calls.SetAPIRestriction, callInfo) - mock.lockSetAPIRestriction.Unlock() - return mock.SetAPIRestrictionFunc(restrictedAPI, enableState) -} - -// SetAPIRestrictionCalls gets all the calls that were made to SetAPIRestriction. -// Check the length with: -// -// len(mockedDevice.SetAPIRestrictionCalls()) -func (mock *Device) SetAPIRestrictionCalls() []struct { - RestrictedAPI nvml.RestrictedAPI - EnableState nvml.EnableState -} { - var calls []struct { - RestrictedAPI nvml.RestrictedAPI - EnableState nvml.EnableState - } - mock.lockSetAPIRestriction.RLock() - calls = mock.calls.SetAPIRestriction - mock.lockSetAPIRestriction.RUnlock() - return calls -} - -// SetAccountingMode calls SetAccountingModeFunc. -func (mock *Device) SetAccountingMode(enableState nvml.EnableState) nvml.Return { - if mock.SetAccountingModeFunc == nil { - panic("Device.SetAccountingModeFunc: method is nil but Device.SetAccountingMode was just called") - } - callInfo := struct { - EnableState nvml.EnableState - }{ - EnableState: enableState, - } - mock.lockSetAccountingMode.Lock() - mock.calls.SetAccountingMode = append(mock.calls.SetAccountingMode, callInfo) - mock.lockSetAccountingMode.Unlock() - return mock.SetAccountingModeFunc(enableState) -} - -// SetAccountingModeCalls gets all the calls that were made to SetAccountingMode. -// Check the length with: -// -// len(mockedDevice.SetAccountingModeCalls()) -func (mock *Device) SetAccountingModeCalls() []struct { - EnableState nvml.EnableState -} { - var calls []struct { - EnableState nvml.EnableState - } - mock.lockSetAccountingMode.RLock() - calls = mock.calls.SetAccountingMode - mock.lockSetAccountingMode.RUnlock() - return calls -} - -// SetApplicationsClocks calls SetApplicationsClocksFunc. -func (mock *Device) SetApplicationsClocks(v1 uint32, v2 uint32) nvml.Return { - if mock.SetApplicationsClocksFunc == nil { - panic("Device.SetApplicationsClocksFunc: method is nil but Device.SetApplicationsClocks was just called") - } - callInfo := struct { - V1 uint32 - V2 uint32 - }{ - V1: v1, - V2: v2, - } - mock.lockSetApplicationsClocks.Lock() - mock.calls.SetApplicationsClocks = append(mock.calls.SetApplicationsClocks, callInfo) - mock.lockSetApplicationsClocks.Unlock() - return mock.SetApplicationsClocksFunc(v1, v2) -} - -// SetApplicationsClocksCalls gets all the calls that were made to SetApplicationsClocks. -// Check the length with: -// -// len(mockedDevice.SetApplicationsClocksCalls()) -func (mock *Device) SetApplicationsClocksCalls() []struct { - V1 uint32 - V2 uint32 -} { - var calls []struct { - V1 uint32 - V2 uint32 - } - mock.lockSetApplicationsClocks.RLock() - calls = mock.calls.SetApplicationsClocks - mock.lockSetApplicationsClocks.RUnlock() - return calls -} - -// SetAutoBoostedClocksEnabled calls SetAutoBoostedClocksEnabledFunc. -func (mock *Device) SetAutoBoostedClocksEnabled(enableState nvml.EnableState) nvml.Return { - if mock.SetAutoBoostedClocksEnabledFunc == nil { - panic("Device.SetAutoBoostedClocksEnabledFunc: method is nil but Device.SetAutoBoostedClocksEnabled was just called") - } - callInfo := struct { - EnableState nvml.EnableState - }{ - EnableState: enableState, - } - mock.lockSetAutoBoostedClocksEnabled.Lock() - mock.calls.SetAutoBoostedClocksEnabled = append(mock.calls.SetAutoBoostedClocksEnabled, callInfo) - mock.lockSetAutoBoostedClocksEnabled.Unlock() - return mock.SetAutoBoostedClocksEnabledFunc(enableState) -} - -// SetAutoBoostedClocksEnabledCalls gets all the calls that were made to SetAutoBoostedClocksEnabled. -// Check the length with: -// -// len(mockedDevice.SetAutoBoostedClocksEnabledCalls()) -func (mock *Device) SetAutoBoostedClocksEnabledCalls() []struct { - EnableState nvml.EnableState -} { - var calls []struct { - EnableState nvml.EnableState - } - mock.lockSetAutoBoostedClocksEnabled.RLock() - calls = mock.calls.SetAutoBoostedClocksEnabled - mock.lockSetAutoBoostedClocksEnabled.RUnlock() - return calls -} - -// SetClockOffsets calls SetClockOffsetsFunc. -func (mock *Device) SetClockOffsets(clockOffset nvml.ClockOffset) nvml.Return { - if mock.SetClockOffsetsFunc == nil { - panic("Device.SetClockOffsetsFunc: method is nil but Device.SetClockOffsets was just called") - } - callInfo := struct { - ClockOffset nvml.ClockOffset - }{ - ClockOffset: clockOffset, - } - mock.lockSetClockOffsets.Lock() - mock.calls.SetClockOffsets = append(mock.calls.SetClockOffsets, callInfo) - mock.lockSetClockOffsets.Unlock() - return mock.SetClockOffsetsFunc(clockOffset) -} - -// SetClockOffsetsCalls gets all the calls that were made to SetClockOffsets. -// Check the length with: -// -// len(mockedDevice.SetClockOffsetsCalls()) -func (mock *Device) SetClockOffsetsCalls() []struct { - ClockOffset nvml.ClockOffset -} { - var calls []struct { - ClockOffset nvml.ClockOffset - } - mock.lockSetClockOffsets.RLock() - calls = mock.calls.SetClockOffsets - mock.lockSetClockOffsets.RUnlock() - return calls -} - -// SetComputeMode calls SetComputeModeFunc. -func (mock *Device) SetComputeMode(computeMode nvml.ComputeMode) nvml.Return { - if mock.SetComputeModeFunc == nil { - panic("Device.SetComputeModeFunc: method is nil but Device.SetComputeMode was just called") - } - callInfo := struct { - ComputeMode nvml.ComputeMode - }{ - ComputeMode: computeMode, - } - mock.lockSetComputeMode.Lock() - mock.calls.SetComputeMode = append(mock.calls.SetComputeMode, callInfo) - mock.lockSetComputeMode.Unlock() - return mock.SetComputeModeFunc(computeMode) -} - -// SetComputeModeCalls gets all the calls that were made to SetComputeMode. -// Check the length with: -// -// len(mockedDevice.SetComputeModeCalls()) -func (mock *Device) SetComputeModeCalls() []struct { - ComputeMode nvml.ComputeMode -} { - var calls []struct { - ComputeMode nvml.ComputeMode - } - mock.lockSetComputeMode.RLock() - calls = mock.calls.SetComputeMode - mock.lockSetComputeMode.RUnlock() - return calls -} - -// SetConfComputeUnprotectedMemSize calls SetConfComputeUnprotectedMemSizeFunc. -func (mock *Device) SetConfComputeUnprotectedMemSize(v uint64) nvml.Return { - if mock.SetConfComputeUnprotectedMemSizeFunc == nil { - panic("Device.SetConfComputeUnprotectedMemSizeFunc: method is nil but Device.SetConfComputeUnprotectedMemSize was just called") - } - callInfo := struct { - V uint64 - }{ - V: v, - } - mock.lockSetConfComputeUnprotectedMemSize.Lock() - mock.calls.SetConfComputeUnprotectedMemSize = append(mock.calls.SetConfComputeUnprotectedMemSize, callInfo) - mock.lockSetConfComputeUnprotectedMemSize.Unlock() - return mock.SetConfComputeUnprotectedMemSizeFunc(v) -} - -// SetConfComputeUnprotectedMemSizeCalls gets all the calls that were made to SetConfComputeUnprotectedMemSize. -// Check the length with: -// -// len(mockedDevice.SetConfComputeUnprotectedMemSizeCalls()) -func (mock *Device) SetConfComputeUnprotectedMemSizeCalls() []struct { - V uint64 -} { - var calls []struct { - V uint64 - } - mock.lockSetConfComputeUnprotectedMemSize.RLock() - calls = mock.calls.SetConfComputeUnprotectedMemSize - mock.lockSetConfComputeUnprotectedMemSize.RUnlock() - return calls -} - -// SetCpuAffinity calls SetCpuAffinityFunc. -func (mock *Device) SetCpuAffinity() nvml.Return { - if mock.SetCpuAffinityFunc == nil { - panic("Device.SetCpuAffinityFunc: method is nil but Device.SetCpuAffinity was just called") - } - callInfo := struct { - }{} - mock.lockSetCpuAffinity.Lock() - mock.calls.SetCpuAffinity = append(mock.calls.SetCpuAffinity, callInfo) - mock.lockSetCpuAffinity.Unlock() - return mock.SetCpuAffinityFunc() -} - -// SetCpuAffinityCalls gets all the calls that were made to SetCpuAffinity. -// Check the length with: -// -// len(mockedDevice.SetCpuAffinityCalls()) -func (mock *Device) SetCpuAffinityCalls() []struct { -} { - var calls []struct { - } - mock.lockSetCpuAffinity.RLock() - calls = mock.calls.SetCpuAffinity - mock.lockSetCpuAffinity.RUnlock() - return calls -} - -// SetDefaultAutoBoostedClocksEnabled calls SetDefaultAutoBoostedClocksEnabledFunc. -func (mock *Device) SetDefaultAutoBoostedClocksEnabled(enableState nvml.EnableState, v uint32) nvml.Return { - if mock.SetDefaultAutoBoostedClocksEnabledFunc == nil { - panic("Device.SetDefaultAutoBoostedClocksEnabledFunc: method is nil but Device.SetDefaultAutoBoostedClocksEnabled was just called") - } - callInfo := struct { - EnableState nvml.EnableState - V uint32 - }{ - EnableState: enableState, - V: v, - } - mock.lockSetDefaultAutoBoostedClocksEnabled.Lock() - mock.calls.SetDefaultAutoBoostedClocksEnabled = append(mock.calls.SetDefaultAutoBoostedClocksEnabled, callInfo) - mock.lockSetDefaultAutoBoostedClocksEnabled.Unlock() - return mock.SetDefaultAutoBoostedClocksEnabledFunc(enableState, v) -} - -// SetDefaultAutoBoostedClocksEnabledCalls gets all the calls that were made to SetDefaultAutoBoostedClocksEnabled. -// Check the length with: -// -// len(mockedDevice.SetDefaultAutoBoostedClocksEnabledCalls()) -func (mock *Device) SetDefaultAutoBoostedClocksEnabledCalls() []struct { - EnableState nvml.EnableState - V uint32 -} { - var calls []struct { - EnableState nvml.EnableState - V uint32 - } - mock.lockSetDefaultAutoBoostedClocksEnabled.RLock() - calls = mock.calls.SetDefaultAutoBoostedClocksEnabled - mock.lockSetDefaultAutoBoostedClocksEnabled.RUnlock() - return calls -} - -// SetDefaultFanSpeed_v2 calls SetDefaultFanSpeed_v2Func. -func (mock *Device) SetDefaultFanSpeed_v2(n int) nvml.Return { - if mock.SetDefaultFanSpeed_v2Func == nil { - panic("Device.SetDefaultFanSpeed_v2Func: method is nil but Device.SetDefaultFanSpeed_v2 was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockSetDefaultFanSpeed_v2.Lock() - mock.calls.SetDefaultFanSpeed_v2 = append(mock.calls.SetDefaultFanSpeed_v2, callInfo) - mock.lockSetDefaultFanSpeed_v2.Unlock() - return mock.SetDefaultFanSpeed_v2Func(n) -} - -// SetDefaultFanSpeed_v2Calls gets all the calls that were made to SetDefaultFanSpeed_v2. -// Check the length with: -// -// len(mockedDevice.SetDefaultFanSpeed_v2Calls()) -func (mock *Device) SetDefaultFanSpeed_v2Calls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockSetDefaultFanSpeed_v2.RLock() - calls = mock.calls.SetDefaultFanSpeed_v2 - mock.lockSetDefaultFanSpeed_v2.RUnlock() - return calls -} - -// SetDramEncryptionMode calls SetDramEncryptionModeFunc. -func (mock *Device) SetDramEncryptionMode(dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return { - if mock.SetDramEncryptionModeFunc == nil { - panic("Device.SetDramEncryptionModeFunc: method is nil but Device.SetDramEncryptionMode was just called") - } - callInfo := struct { - DramEncryptionInfo *nvml.DramEncryptionInfo - }{ - DramEncryptionInfo: dramEncryptionInfo, - } - mock.lockSetDramEncryptionMode.Lock() - mock.calls.SetDramEncryptionMode = append(mock.calls.SetDramEncryptionMode, callInfo) - mock.lockSetDramEncryptionMode.Unlock() - return mock.SetDramEncryptionModeFunc(dramEncryptionInfo) -} - -// SetDramEncryptionModeCalls gets all the calls that were made to SetDramEncryptionMode. -// Check the length with: -// -// len(mockedDevice.SetDramEncryptionModeCalls()) -func (mock *Device) SetDramEncryptionModeCalls() []struct { - DramEncryptionInfo *nvml.DramEncryptionInfo -} { - var calls []struct { - DramEncryptionInfo *nvml.DramEncryptionInfo - } - mock.lockSetDramEncryptionMode.RLock() - calls = mock.calls.SetDramEncryptionMode - mock.lockSetDramEncryptionMode.RUnlock() - return calls -} - -// SetDriverModel calls SetDriverModelFunc. -func (mock *Device) SetDriverModel(driverModel nvml.DriverModel, v uint32) nvml.Return { - if mock.SetDriverModelFunc == nil { - panic("Device.SetDriverModelFunc: method is nil but Device.SetDriverModel was just called") - } - callInfo := struct { - DriverModel nvml.DriverModel - V uint32 - }{ - DriverModel: driverModel, - V: v, - } - mock.lockSetDriverModel.Lock() - mock.calls.SetDriverModel = append(mock.calls.SetDriverModel, callInfo) - mock.lockSetDriverModel.Unlock() - return mock.SetDriverModelFunc(driverModel, v) -} - -// SetDriverModelCalls gets all the calls that were made to SetDriverModel. -// Check the length with: -// -// len(mockedDevice.SetDriverModelCalls()) -func (mock *Device) SetDriverModelCalls() []struct { - DriverModel nvml.DriverModel - V uint32 -} { - var calls []struct { - DriverModel nvml.DriverModel - V uint32 - } - mock.lockSetDriverModel.RLock() - calls = mock.calls.SetDriverModel - mock.lockSetDriverModel.RUnlock() - return calls -} - -// SetEccMode calls SetEccModeFunc. -func (mock *Device) SetEccMode(enableState nvml.EnableState) nvml.Return { - if mock.SetEccModeFunc == nil { - panic("Device.SetEccModeFunc: method is nil but Device.SetEccMode was just called") - } - callInfo := struct { - EnableState nvml.EnableState - }{ - EnableState: enableState, - } - mock.lockSetEccMode.Lock() - mock.calls.SetEccMode = append(mock.calls.SetEccMode, callInfo) - mock.lockSetEccMode.Unlock() - return mock.SetEccModeFunc(enableState) -} - -// SetEccModeCalls gets all the calls that were made to SetEccMode. -// Check the length with: -// -// len(mockedDevice.SetEccModeCalls()) -func (mock *Device) SetEccModeCalls() []struct { - EnableState nvml.EnableState -} { - var calls []struct { - EnableState nvml.EnableState - } - mock.lockSetEccMode.RLock() - calls = mock.calls.SetEccMode - mock.lockSetEccMode.RUnlock() - return calls -} - -// SetFanControlPolicy calls SetFanControlPolicyFunc. -func (mock *Device) SetFanControlPolicy(n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return { - if mock.SetFanControlPolicyFunc == nil { - panic("Device.SetFanControlPolicyFunc: method is nil but Device.SetFanControlPolicy was just called") - } - callInfo := struct { - N int - FanControlPolicy nvml.FanControlPolicy - }{ - N: n, - FanControlPolicy: fanControlPolicy, - } - mock.lockSetFanControlPolicy.Lock() - mock.calls.SetFanControlPolicy = append(mock.calls.SetFanControlPolicy, callInfo) - mock.lockSetFanControlPolicy.Unlock() - return mock.SetFanControlPolicyFunc(n, fanControlPolicy) -} - -// SetFanControlPolicyCalls gets all the calls that were made to SetFanControlPolicy. -// Check the length with: -// -// len(mockedDevice.SetFanControlPolicyCalls()) -func (mock *Device) SetFanControlPolicyCalls() []struct { - N int - FanControlPolicy nvml.FanControlPolicy -} { - var calls []struct { - N int - FanControlPolicy nvml.FanControlPolicy - } - mock.lockSetFanControlPolicy.RLock() - calls = mock.calls.SetFanControlPolicy - mock.lockSetFanControlPolicy.RUnlock() - return calls -} - -// SetFanSpeed_v2 calls SetFanSpeed_v2Func. -func (mock *Device) SetFanSpeed_v2(n1 int, n2 int) nvml.Return { - if mock.SetFanSpeed_v2Func == nil { - panic("Device.SetFanSpeed_v2Func: method is nil but Device.SetFanSpeed_v2 was just called") - } - callInfo := struct { - N1 int - N2 int - }{ - N1: n1, - N2: n2, - } - mock.lockSetFanSpeed_v2.Lock() - mock.calls.SetFanSpeed_v2 = append(mock.calls.SetFanSpeed_v2, callInfo) - mock.lockSetFanSpeed_v2.Unlock() - return mock.SetFanSpeed_v2Func(n1, n2) -} - -// SetFanSpeed_v2Calls gets all the calls that were made to SetFanSpeed_v2. -// Check the length with: -// -// len(mockedDevice.SetFanSpeed_v2Calls()) -func (mock *Device) SetFanSpeed_v2Calls() []struct { - N1 int - N2 int -} { - var calls []struct { - N1 int - N2 int - } - mock.lockSetFanSpeed_v2.RLock() - calls = mock.calls.SetFanSpeed_v2 - mock.lockSetFanSpeed_v2.RUnlock() - return calls -} - -// SetGpcClkVfOffset calls SetGpcClkVfOffsetFunc. -func (mock *Device) SetGpcClkVfOffset(n int) nvml.Return { - if mock.SetGpcClkVfOffsetFunc == nil { - panic("Device.SetGpcClkVfOffsetFunc: method is nil but Device.SetGpcClkVfOffset was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockSetGpcClkVfOffset.Lock() - mock.calls.SetGpcClkVfOffset = append(mock.calls.SetGpcClkVfOffset, callInfo) - mock.lockSetGpcClkVfOffset.Unlock() - return mock.SetGpcClkVfOffsetFunc(n) -} - -// SetGpcClkVfOffsetCalls gets all the calls that were made to SetGpcClkVfOffset. -// Check the length with: -// -// len(mockedDevice.SetGpcClkVfOffsetCalls()) -func (mock *Device) SetGpcClkVfOffsetCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockSetGpcClkVfOffset.RLock() - calls = mock.calls.SetGpcClkVfOffset - mock.lockSetGpcClkVfOffset.RUnlock() - return calls -} - -// SetGpuLockedClocks calls SetGpuLockedClocksFunc. -func (mock *Device) SetGpuLockedClocks(v1 uint32, v2 uint32) nvml.Return { - if mock.SetGpuLockedClocksFunc == nil { - panic("Device.SetGpuLockedClocksFunc: method is nil but Device.SetGpuLockedClocks was just called") - } - callInfo := struct { - V1 uint32 - V2 uint32 - }{ - V1: v1, - V2: v2, - } - mock.lockSetGpuLockedClocks.Lock() - mock.calls.SetGpuLockedClocks = append(mock.calls.SetGpuLockedClocks, callInfo) - mock.lockSetGpuLockedClocks.Unlock() - return mock.SetGpuLockedClocksFunc(v1, v2) -} - -// SetGpuLockedClocksCalls gets all the calls that were made to SetGpuLockedClocks. -// Check the length with: -// -// len(mockedDevice.SetGpuLockedClocksCalls()) -func (mock *Device) SetGpuLockedClocksCalls() []struct { - V1 uint32 - V2 uint32 -} { - var calls []struct { - V1 uint32 - V2 uint32 - } - mock.lockSetGpuLockedClocks.RLock() - calls = mock.calls.SetGpuLockedClocks - mock.lockSetGpuLockedClocks.RUnlock() - return calls -} - -// SetGpuOperationMode calls SetGpuOperationModeFunc. -func (mock *Device) SetGpuOperationMode(gpuOperationMode nvml.GpuOperationMode) nvml.Return { - if mock.SetGpuOperationModeFunc == nil { - panic("Device.SetGpuOperationModeFunc: method is nil but Device.SetGpuOperationMode was just called") - } - callInfo := struct { - GpuOperationMode nvml.GpuOperationMode - }{ - GpuOperationMode: gpuOperationMode, - } - mock.lockSetGpuOperationMode.Lock() - mock.calls.SetGpuOperationMode = append(mock.calls.SetGpuOperationMode, callInfo) - mock.lockSetGpuOperationMode.Unlock() - return mock.SetGpuOperationModeFunc(gpuOperationMode) -} - -// SetGpuOperationModeCalls gets all the calls that were made to SetGpuOperationMode. -// Check the length with: -// -// len(mockedDevice.SetGpuOperationModeCalls()) -func (mock *Device) SetGpuOperationModeCalls() []struct { - GpuOperationMode nvml.GpuOperationMode -} { - var calls []struct { - GpuOperationMode nvml.GpuOperationMode - } - mock.lockSetGpuOperationMode.RLock() - calls = mock.calls.SetGpuOperationMode - mock.lockSetGpuOperationMode.RUnlock() - return calls -} - -// SetMemClkVfOffset calls SetMemClkVfOffsetFunc. -func (mock *Device) SetMemClkVfOffset(n int) nvml.Return { - if mock.SetMemClkVfOffsetFunc == nil { - panic("Device.SetMemClkVfOffsetFunc: method is nil but Device.SetMemClkVfOffset was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockSetMemClkVfOffset.Lock() - mock.calls.SetMemClkVfOffset = append(mock.calls.SetMemClkVfOffset, callInfo) - mock.lockSetMemClkVfOffset.Unlock() - return mock.SetMemClkVfOffsetFunc(n) -} - -// SetMemClkVfOffsetCalls gets all the calls that were made to SetMemClkVfOffset. -// Check the length with: -// -// len(mockedDevice.SetMemClkVfOffsetCalls()) -func (mock *Device) SetMemClkVfOffsetCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockSetMemClkVfOffset.RLock() - calls = mock.calls.SetMemClkVfOffset - mock.lockSetMemClkVfOffset.RUnlock() - return calls -} - -// SetMemoryLockedClocks calls SetMemoryLockedClocksFunc. -func (mock *Device) SetMemoryLockedClocks(v1 uint32, v2 uint32) nvml.Return { - if mock.SetMemoryLockedClocksFunc == nil { - panic("Device.SetMemoryLockedClocksFunc: method is nil but Device.SetMemoryLockedClocks was just called") - } - callInfo := struct { - V1 uint32 - V2 uint32 - }{ - V1: v1, - V2: v2, - } - mock.lockSetMemoryLockedClocks.Lock() - mock.calls.SetMemoryLockedClocks = append(mock.calls.SetMemoryLockedClocks, callInfo) - mock.lockSetMemoryLockedClocks.Unlock() - return mock.SetMemoryLockedClocksFunc(v1, v2) -} - -// SetMemoryLockedClocksCalls gets all the calls that were made to SetMemoryLockedClocks. -// Check the length with: -// -// len(mockedDevice.SetMemoryLockedClocksCalls()) -func (mock *Device) SetMemoryLockedClocksCalls() []struct { - V1 uint32 - V2 uint32 -} { - var calls []struct { - V1 uint32 - V2 uint32 - } - mock.lockSetMemoryLockedClocks.RLock() - calls = mock.calls.SetMemoryLockedClocks - mock.lockSetMemoryLockedClocks.RUnlock() - return calls -} - -// SetMigMode calls SetMigModeFunc. -func (mock *Device) SetMigMode(n int) (nvml.Return, nvml.Return) { - if mock.SetMigModeFunc == nil { - panic("Device.SetMigModeFunc: method is nil but Device.SetMigMode was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockSetMigMode.Lock() - mock.calls.SetMigMode = append(mock.calls.SetMigMode, callInfo) - mock.lockSetMigMode.Unlock() - return mock.SetMigModeFunc(n) -} - -// SetMigModeCalls gets all the calls that were made to SetMigMode. -// Check the length with: -// -// len(mockedDevice.SetMigModeCalls()) -func (mock *Device) SetMigModeCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockSetMigMode.RLock() - calls = mock.calls.SetMigMode - mock.lockSetMigMode.RUnlock() - return calls -} - -// SetNvLinkDeviceLowPowerThreshold calls SetNvLinkDeviceLowPowerThresholdFunc. -func (mock *Device) SetNvLinkDeviceLowPowerThreshold(nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return { - if mock.SetNvLinkDeviceLowPowerThresholdFunc == nil { - panic("Device.SetNvLinkDeviceLowPowerThresholdFunc: method is nil but Device.SetNvLinkDeviceLowPowerThreshold was just called") - } - callInfo := struct { - NvLinkPowerThres *nvml.NvLinkPowerThres - }{ - NvLinkPowerThres: nvLinkPowerThres, - } - mock.lockSetNvLinkDeviceLowPowerThreshold.Lock() - mock.calls.SetNvLinkDeviceLowPowerThreshold = append(mock.calls.SetNvLinkDeviceLowPowerThreshold, callInfo) - mock.lockSetNvLinkDeviceLowPowerThreshold.Unlock() - return mock.SetNvLinkDeviceLowPowerThresholdFunc(nvLinkPowerThres) -} - -// SetNvLinkDeviceLowPowerThresholdCalls gets all the calls that were made to SetNvLinkDeviceLowPowerThreshold. -// Check the length with: -// -// len(mockedDevice.SetNvLinkDeviceLowPowerThresholdCalls()) -func (mock *Device) SetNvLinkDeviceLowPowerThresholdCalls() []struct { - NvLinkPowerThres *nvml.NvLinkPowerThres -} { - var calls []struct { - NvLinkPowerThres *nvml.NvLinkPowerThres - } - mock.lockSetNvLinkDeviceLowPowerThreshold.RLock() - calls = mock.calls.SetNvLinkDeviceLowPowerThreshold - mock.lockSetNvLinkDeviceLowPowerThreshold.RUnlock() - return calls -} - -// SetNvLinkUtilizationControl calls SetNvLinkUtilizationControlFunc. -func (mock *Device) SetNvLinkUtilizationControl(n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { - if mock.SetNvLinkUtilizationControlFunc == nil { - panic("Device.SetNvLinkUtilizationControlFunc: method is nil but Device.SetNvLinkUtilizationControl was just called") - } - callInfo := struct { - N1 int - N2 int - NvLinkUtilizationControl *nvml.NvLinkUtilizationControl - B bool - }{ - N1: n1, - N2: n2, - NvLinkUtilizationControl: nvLinkUtilizationControl, - B: b, - } - mock.lockSetNvLinkUtilizationControl.Lock() - mock.calls.SetNvLinkUtilizationControl = append(mock.calls.SetNvLinkUtilizationControl, callInfo) - mock.lockSetNvLinkUtilizationControl.Unlock() - return mock.SetNvLinkUtilizationControlFunc(n1, n2, nvLinkUtilizationControl, b) -} - -// SetNvLinkUtilizationControlCalls gets all the calls that were made to SetNvLinkUtilizationControl. -// Check the length with: -// -// len(mockedDevice.SetNvLinkUtilizationControlCalls()) -func (mock *Device) SetNvLinkUtilizationControlCalls() []struct { - N1 int - N2 int - NvLinkUtilizationControl *nvml.NvLinkUtilizationControl - B bool -} { - var calls []struct { - N1 int - N2 int - NvLinkUtilizationControl *nvml.NvLinkUtilizationControl - B bool - } - mock.lockSetNvLinkUtilizationControl.RLock() - calls = mock.calls.SetNvLinkUtilizationControl - mock.lockSetNvLinkUtilizationControl.RUnlock() - return calls -} - -// SetNvlinkBwMode calls SetNvlinkBwModeFunc. -func (mock *Device) SetNvlinkBwMode(nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { - if mock.SetNvlinkBwModeFunc == nil { - panic("Device.SetNvlinkBwModeFunc: method is nil but Device.SetNvlinkBwMode was just called") - } - callInfo := struct { - NvlinkSetBwMode *nvml.NvlinkSetBwMode - }{ - NvlinkSetBwMode: nvlinkSetBwMode, - } - mock.lockSetNvlinkBwMode.Lock() - mock.calls.SetNvlinkBwMode = append(mock.calls.SetNvlinkBwMode, callInfo) - mock.lockSetNvlinkBwMode.Unlock() - return mock.SetNvlinkBwModeFunc(nvlinkSetBwMode) -} - -// SetNvlinkBwModeCalls gets all the calls that were made to SetNvlinkBwMode. -// Check the length with: -// -// len(mockedDevice.SetNvlinkBwModeCalls()) -func (mock *Device) SetNvlinkBwModeCalls() []struct { - NvlinkSetBwMode *nvml.NvlinkSetBwMode -} { - var calls []struct { - NvlinkSetBwMode *nvml.NvlinkSetBwMode - } - mock.lockSetNvlinkBwMode.RLock() - calls = mock.calls.SetNvlinkBwMode - mock.lockSetNvlinkBwMode.RUnlock() - return calls -} - -// SetPersistenceMode calls SetPersistenceModeFunc. -func (mock *Device) SetPersistenceMode(enableState nvml.EnableState) nvml.Return { - if mock.SetPersistenceModeFunc == nil { - panic("Device.SetPersistenceModeFunc: method is nil but Device.SetPersistenceMode was just called") - } - callInfo := struct { - EnableState nvml.EnableState - }{ - EnableState: enableState, - } - mock.lockSetPersistenceMode.Lock() - mock.calls.SetPersistenceMode = append(mock.calls.SetPersistenceMode, callInfo) - mock.lockSetPersistenceMode.Unlock() - return mock.SetPersistenceModeFunc(enableState) -} - -// SetPersistenceModeCalls gets all the calls that were made to SetPersistenceMode. -// Check the length with: -// -// len(mockedDevice.SetPersistenceModeCalls()) -func (mock *Device) SetPersistenceModeCalls() []struct { - EnableState nvml.EnableState -} { - var calls []struct { - EnableState nvml.EnableState - } - mock.lockSetPersistenceMode.RLock() - calls = mock.calls.SetPersistenceMode - mock.lockSetPersistenceMode.RUnlock() - return calls -} - -// SetPowerManagementLimit calls SetPowerManagementLimitFunc. -func (mock *Device) SetPowerManagementLimit(v uint32) nvml.Return { - if mock.SetPowerManagementLimitFunc == nil { - panic("Device.SetPowerManagementLimitFunc: method is nil but Device.SetPowerManagementLimit was just called") - } - callInfo := struct { - V uint32 - }{ - V: v, - } - mock.lockSetPowerManagementLimit.Lock() - mock.calls.SetPowerManagementLimit = append(mock.calls.SetPowerManagementLimit, callInfo) - mock.lockSetPowerManagementLimit.Unlock() - return mock.SetPowerManagementLimitFunc(v) -} - -// SetPowerManagementLimitCalls gets all the calls that were made to SetPowerManagementLimit. -// Check the length with: -// -// len(mockedDevice.SetPowerManagementLimitCalls()) -func (mock *Device) SetPowerManagementLimitCalls() []struct { - V uint32 -} { - var calls []struct { - V uint32 - } - mock.lockSetPowerManagementLimit.RLock() - calls = mock.calls.SetPowerManagementLimit - mock.lockSetPowerManagementLimit.RUnlock() - return calls -} - -// SetPowerManagementLimit_v2 calls SetPowerManagementLimit_v2Func. -func (mock *Device) SetPowerManagementLimit_v2(powerValue_v2 *nvml.PowerValue_v2) nvml.Return { - if mock.SetPowerManagementLimit_v2Func == nil { - panic("Device.SetPowerManagementLimit_v2Func: method is nil but Device.SetPowerManagementLimit_v2 was just called") - } - callInfo := struct { - PowerValue_v2 *nvml.PowerValue_v2 - }{ - PowerValue_v2: powerValue_v2, - } - mock.lockSetPowerManagementLimit_v2.Lock() - mock.calls.SetPowerManagementLimit_v2 = append(mock.calls.SetPowerManagementLimit_v2, callInfo) - mock.lockSetPowerManagementLimit_v2.Unlock() - return mock.SetPowerManagementLimit_v2Func(powerValue_v2) -} - -// SetPowerManagementLimit_v2Calls gets all the calls that were made to SetPowerManagementLimit_v2. -// Check the length with: -// -// len(mockedDevice.SetPowerManagementLimit_v2Calls()) -func (mock *Device) SetPowerManagementLimit_v2Calls() []struct { - PowerValue_v2 *nvml.PowerValue_v2 -} { - var calls []struct { - PowerValue_v2 *nvml.PowerValue_v2 - } - mock.lockSetPowerManagementLimit_v2.RLock() - calls = mock.calls.SetPowerManagementLimit_v2 - mock.lockSetPowerManagementLimit_v2.RUnlock() - return calls -} - -// SetTemperatureThreshold calls SetTemperatureThresholdFunc. -func (mock *Device) SetTemperatureThreshold(temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return { - if mock.SetTemperatureThresholdFunc == nil { - panic("Device.SetTemperatureThresholdFunc: method is nil but Device.SetTemperatureThreshold was just called") - } - callInfo := struct { - TemperatureThresholds nvml.TemperatureThresholds - N int - }{ - TemperatureThresholds: temperatureThresholds, - N: n, - } - mock.lockSetTemperatureThreshold.Lock() - mock.calls.SetTemperatureThreshold = append(mock.calls.SetTemperatureThreshold, callInfo) - mock.lockSetTemperatureThreshold.Unlock() - return mock.SetTemperatureThresholdFunc(temperatureThresholds, n) -} - -// SetTemperatureThresholdCalls gets all the calls that were made to SetTemperatureThreshold. -// Check the length with: -// -// len(mockedDevice.SetTemperatureThresholdCalls()) -func (mock *Device) SetTemperatureThresholdCalls() []struct { - TemperatureThresholds nvml.TemperatureThresholds - N int -} { - var calls []struct { - TemperatureThresholds nvml.TemperatureThresholds - N int - } - mock.lockSetTemperatureThreshold.RLock() - calls = mock.calls.SetTemperatureThreshold - mock.lockSetTemperatureThreshold.RUnlock() - return calls -} - -// SetVgpuCapabilities calls SetVgpuCapabilitiesFunc. -func (mock *Device) SetVgpuCapabilities(deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return { - if mock.SetVgpuCapabilitiesFunc == nil { - panic("Device.SetVgpuCapabilitiesFunc: method is nil but Device.SetVgpuCapabilities was just called") - } - callInfo := struct { - DeviceVgpuCapability nvml.DeviceVgpuCapability - EnableState nvml.EnableState - }{ - DeviceVgpuCapability: deviceVgpuCapability, - EnableState: enableState, - } - mock.lockSetVgpuCapabilities.Lock() - mock.calls.SetVgpuCapabilities = append(mock.calls.SetVgpuCapabilities, callInfo) - mock.lockSetVgpuCapabilities.Unlock() - return mock.SetVgpuCapabilitiesFunc(deviceVgpuCapability, enableState) -} - -// SetVgpuCapabilitiesCalls gets all the calls that were made to SetVgpuCapabilities. -// Check the length with: -// -// len(mockedDevice.SetVgpuCapabilitiesCalls()) -func (mock *Device) SetVgpuCapabilitiesCalls() []struct { - DeviceVgpuCapability nvml.DeviceVgpuCapability - EnableState nvml.EnableState -} { - var calls []struct { - DeviceVgpuCapability nvml.DeviceVgpuCapability - EnableState nvml.EnableState - } - mock.lockSetVgpuCapabilities.RLock() - calls = mock.calls.SetVgpuCapabilities - mock.lockSetVgpuCapabilities.RUnlock() - return calls -} - -// SetVgpuHeterogeneousMode calls SetVgpuHeterogeneousModeFunc. -func (mock *Device) SetVgpuHeterogeneousMode(vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return { - if mock.SetVgpuHeterogeneousModeFunc == nil { - panic("Device.SetVgpuHeterogeneousModeFunc: method is nil but Device.SetVgpuHeterogeneousMode was just called") - } - callInfo := struct { - VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode - }{ - VgpuHeterogeneousMode: vgpuHeterogeneousMode, - } - mock.lockSetVgpuHeterogeneousMode.Lock() - mock.calls.SetVgpuHeterogeneousMode = append(mock.calls.SetVgpuHeterogeneousMode, callInfo) - mock.lockSetVgpuHeterogeneousMode.Unlock() - return mock.SetVgpuHeterogeneousModeFunc(vgpuHeterogeneousMode) -} - -// SetVgpuHeterogeneousModeCalls gets all the calls that were made to SetVgpuHeterogeneousMode. -// Check the length with: -// -// len(mockedDevice.SetVgpuHeterogeneousModeCalls()) -func (mock *Device) SetVgpuHeterogeneousModeCalls() []struct { - VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode -} { - var calls []struct { - VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode - } - mock.lockSetVgpuHeterogeneousMode.RLock() - calls = mock.calls.SetVgpuHeterogeneousMode - mock.lockSetVgpuHeterogeneousMode.RUnlock() - return calls -} - -// SetVgpuSchedulerState calls SetVgpuSchedulerStateFunc. -func (mock *Device) SetVgpuSchedulerState(vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return { - if mock.SetVgpuSchedulerStateFunc == nil { - panic("Device.SetVgpuSchedulerStateFunc: method is nil but Device.SetVgpuSchedulerState was just called") - } - callInfo := struct { - VgpuSchedulerSetState *nvml.VgpuSchedulerSetState - }{ - VgpuSchedulerSetState: vgpuSchedulerSetState, - } - mock.lockSetVgpuSchedulerState.Lock() - mock.calls.SetVgpuSchedulerState = append(mock.calls.SetVgpuSchedulerState, callInfo) - mock.lockSetVgpuSchedulerState.Unlock() - return mock.SetVgpuSchedulerStateFunc(vgpuSchedulerSetState) -} - -// SetVgpuSchedulerStateCalls gets all the calls that were made to SetVgpuSchedulerState. -// Check the length with: -// -// len(mockedDevice.SetVgpuSchedulerStateCalls()) -func (mock *Device) SetVgpuSchedulerStateCalls() []struct { - VgpuSchedulerSetState *nvml.VgpuSchedulerSetState -} { - var calls []struct { - VgpuSchedulerSetState *nvml.VgpuSchedulerSetState - } - mock.lockSetVgpuSchedulerState.RLock() - calls = mock.calls.SetVgpuSchedulerState - mock.lockSetVgpuSchedulerState.RUnlock() - return calls -} - -// SetVirtualizationMode calls SetVirtualizationModeFunc. -func (mock *Device) SetVirtualizationMode(gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { - if mock.SetVirtualizationModeFunc == nil { - panic("Device.SetVirtualizationModeFunc: method is nil but Device.SetVirtualizationMode was just called") - } - callInfo := struct { - GpuVirtualizationMode nvml.GpuVirtualizationMode - }{ - GpuVirtualizationMode: gpuVirtualizationMode, - } - mock.lockSetVirtualizationMode.Lock() - mock.calls.SetVirtualizationMode = append(mock.calls.SetVirtualizationMode, callInfo) - mock.lockSetVirtualizationMode.Unlock() - return mock.SetVirtualizationModeFunc(gpuVirtualizationMode) -} - -// SetVirtualizationModeCalls gets all the calls that were made to SetVirtualizationMode. -// Check the length with: -// -// len(mockedDevice.SetVirtualizationModeCalls()) -func (mock *Device) SetVirtualizationModeCalls() []struct { - GpuVirtualizationMode nvml.GpuVirtualizationMode -} { - var calls []struct { - GpuVirtualizationMode nvml.GpuVirtualizationMode - } - mock.lockSetVirtualizationMode.RLock() - calls = mock.calls.SetVirtualizationMode - mock.lockSetVirtualizationMode.RUnlock() - return calls -} - -// ValidateInforom calls ValidateInforomFunc. -func (mock *Device) ValidateInforom() nvml.Return { - if mock.ValidateInforomFunc == nil { - panic("Device.ValidateInforomFunc: method is nil but Device.ValidateInforom was just called") - } - callInfo := struct { - }{} - mock.lockValidateInforom.Lock() - mock.calls.ValidateInforom = append(mock.calls.ValidateInforom, callInfo) - mock.lockValidateInforom.Unlock() - return mock.ValidateInforomFunc() -} - -// ValidateInforomCalls gets all the calls that were made to ValidateInforom. -// Check the length with: -// -// len(mockedDevice.ValidateInforomCalls()) -func (mock *Device) ValidateInforomCalls() []struct { -} { - var calls []struct { - } - mock.lockValidateInforom.RLock() - calls = mock.calls.ValidateInforom - mock.lockValidateInforom.RUnlock() - return calls -} - -// VgpuTypeGetMaxInstances calls VgpuTypeGetMaxInstancesFunc. -func (mock *Device) VgpuTypeGetMaxInstances(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { - if mock.VgpuTypeGetMaxInstancesFunc == nil { - panic("Device.VgpuTypeGetMaxInstancesFunc: method is nil but Device.VgpuTypeGetMaxInstances was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockVgpuTypeGetMaxInstances.Lock() - mock.calls.VgpuTypeGetMaxInstances = append(mock.calls.VgpuTypeGetMaxInstances, callInfo) - mock.lockVgpuTypeGetMaxInstances.Unlock() - return mock.VgpuTypeGetMaxInstancesFunc(vgpuTypeId) -} - -// VgpuTypeGetMaxInstancesCalls gets all the calls that were made to VgpuTypeGetMaxInstances. -// Check the length with: -// -// len(mockedDevice.VgpuTypeGetMaxInstancesCalls()) -func (mock *Device) VgpuTypeGetMaxInstancesCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockVgpuTypeGetMaxInstances.RLock() - calls = mock.calls.VgpuTypeGetMaxInstances - mock.lockVgpuTypeGetMaxInstances.RUnlock() - return calls -} - -// WorkloadPowerProfileClearRequestedProfiles calls WorkloadPowerProfileClearRequestedProfilesFunc. -func (mock *Device) WorkloadPowerProfileClearRequestedProfiles(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { - if mock.WorkloadPowerProfileClearRequestedProfilesFunc == nil { - panic("Device.WorkloadPowerProfileClearRequestedProfilesFunc: method is nil but Device.WorkloadPowerProfileClearRequestedProfiles was just called") - } - callInfo := struct { - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles - }{ - WorkloadPowerProfileRequestedProfiles: workloadPowerProfileRequestedProfiles, - } - mock.lockWorkloadPowerProfileClearRequestedProfiles.Lock() - mock.calls.WorkloadPowerProfileClearRequestedProfiles = append(mock.calls.WorkloadPowerProfileClearRequestedProfiles, callInfo) - mock.lockWorkloadPowerProfileClearRequestedProfiles.Unlock() - return mock.WorkloadPowerProfileClearRequestedProfilesFunc(workloadPowerProfileRequestedProfiles) -} - -// WorkloadPowerProfileClearRequestedProfilesCalls gets all the calls that were made to WorkloadPowerProfileClearRequestedProfiles. -// Check the length with: -// -// len(mockedDevice.WorkloadPowerProfileClearRequestedProfilesCalls()) -func (mock *Device) WorkloadPowerProfileClearRequestedProfilesCalls() []struct { - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles -} { - var calls []struct { - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles - } - mock.lockWorkloadPowerProfileClearRequestedProfiles.RLock() - calls = mock.calls.WorkloadPowerProfileClearRequestedProfiles - mock.lockWorkloadPowerProfileClearRequestedProfiles.RUnlock() - return calls -} - -// WorkloadPowerProfileGetCurrentProfiles calls WorkloadPowerProfileGetCurrentProfilesFunc. -func (mock *Device) WorkloadPowerProfileGetCurrentProfiles() (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) { - if mock.WorkloadPowerProfileGetCurrentProfilesFunc == nil { - panic("Device.WorkloadPowerProfileGetCurrentProfilesFunc: method is nil but Device.WorkloadPowerProfileGetCurrentProfiles was just called") - } - callInfo := struct { - }{} - mock.lockWorkloadPowerProfileGetCurrentProfiles.Lock() - mock.calls.WorkloadPowerProfileGetCurrentProfiles = append(mock.calls.WorkloadPowerProfileGetCurrentProfiles, callInfo) - mock.lockWorkloadPowerProfileGetCurrentProfiles.Unlock() - return mock.WorkloadPowerProfileGetCurrentProfilesFunc() -} - -// WorkloadPowerProfileGetCurrentProfilesCalls gets all the calls that were made to WorkloadPowerProfileGetCurrentProfiles. -// Check the length with: -// -// len(mockedDevice.WorkloadPowerProfileGetCurrentProfilesCalls()) -func (mock *Device) WorkloadPowerProfileGetCurrentProfilesCalls() []struct { -} { - var calls []struct { - } - mock.lockWorkloadPowerProfileGetCurrentProfiles.RLock() - calls = mock.calls.WorkloadPowerProfileGetCurrentProfiles - mock.lockWorkloadPowerProfileGetCurrentProfiles.RUnlock() - return calls -} - -// WorkloadPowerProfileGetProfilesInfo calls WorkloadPowerProfileGetProfilesInfoFunc. -func (mock *Device) WorkloadPowerProfileGetProfilesInfo() (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) { - if mock.WorkloadPowerProfileGetProfilesInfoFunc == nil { - panic("Device.WorkloadPowerProfileGetProfilesInfoFunc: method is nil but Device.WorkloadPowerProfileGetProfilesInfo was just called") - } - callInfo := struct { - }{} - mock.lockWorkloadPowerProfileGetProfilesInfo.Lock() - mock.calls.WorkloadPowerProfileGetProfilesInfo = append(mock.calls.WorkloadPowerProfileGetProfilesInfo, callInfo) - mock.lockWorkloadPowerProfileGetProfilesInfo.Unlock() - return mock.WorkloadPowerProfileGetProfilesInfoFunc() -} - -// WorkloadPowerProfileGetProfilesInfoCalls gets all the calls that were made to WorkloadPowerProfileGetProfilesInfo. -// Check the length with: -// -// len(mockedDevice.WorkloadPowerProfileGetProfilesInfoCalls()) -func (mock *Device) WorkloadPowerProfileGetProfilesInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockWorkloadPowerProfileGetProfilesInfo.RLock() - calls = mock.calls.WorkloadPowerProfileGetProfilesInfo - mock.lockWorkloadPowerProfileGetProfilesInfo.RUnlock() - return calls -} - -// WorkloadPowerProfileSetRequestedProfiles calls WorkloadPowerProfileSetRequestedProfilesFunc. -func (mock *Device) WorkloadPowerProfileSetRequestedProfiles(workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { - if mock.WorkloadPowerProfileSetRequestedProfilesFunc == nil { - panic("Device.WorkloadPowerProfileSetRequestedProfilesFunc: method is nil but Device.WorkloadPowerProfileSetRequestedProfiles was just called") - } - callInfo := struct { - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles - }{ - WorkloadPowerProfileRequestedProfiles: workloadPowerProfileRequestedProfiles, - } - mock.lockWorkloadPowerProfileSetRequestedProfiles.Lock() - mock.calls.WorkloadPowerProfileSetRequestedProfiles = append(mock.calls.WorkloadPowerProfileSetRequestedProfiles, callInfo) - mock.lockWorkloadPowerProfileSetRequestedProfiles.Unlock() - return mock.WorkloadPowerProfileSetRequestedProfilesFunc(workloadPowerProfileRequestedProfiles) -} - -// WorkloadPowerProfileSetRequestedProfilesCalls gets all the calls that were made to WorkloadPowerProfileSetRequestedProfiles. -// Check the length with: -// -// len(mockedDevice.WorkloadPowerProfileSetRequestedProfilesCalls()) -func (mock *Device) WorkloadPowerProfileSetRequestedProfilesCalls() []struct { - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles -} { - var calls []struct { - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles - } - mock.lockWorkloadPowerProfileSetRequestedProfiles.RLock() - calls = mock.calls.WorkloadPowerProfileSetRequestedProfiles - mock.lockWorkloadPowerProfileSetRequestedProfiles.RUnlock() - return calls -} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/dgxa100.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/dgxa100.go deleted file mode 100644 index af6503702..000000000 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/dgxa100.go +++ /dev/null @@ -1,381 +0,0 @@ -/* - * Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. - * - * 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 dgxa100 - -import ( - "fmt" - "sync" - - "github.com/google/uuid" - - "github.com/NVIDIA/go-nvml/pkg/nvml" - "github.com/NVIDIA/go-nvml/pkg/nvml/mock" -) - -type Server struct { - mock.Interface - mock.ExtendedInterface - Devices [8]nvml.Device - DriverVersion string - NvmlVersion string - CudaDriverVersion int -} -type Device struct { - mock.Device - sync.RWMutex - UUID string - Name string - Brand nvml.BrandType - Architecture nvml.DeviceArchitecture - PciBusID string - Minor int - Index int - CudaComputeCapability CudaComputeCapability - MigMode int - GpuInstances map[*GpuInstance]struct{} - GpuInstanceCounter uint32 - MemoryInfo nvml.Memory -} - -type GpuInstance struct { - mock.GpuInstance - sync.RWMutex - Info nvml.GpuInstanceInfo - ComputeInstances map[*ComputeInstance]struct{} - ComputeInstanceCounter uint32 -} - -type ComputeInstance struct { - mock.ComputeInstance - Info nvml.ComputeInstanceInfo -} - -type CudaComputeCapability struct { - Major int - Minor int -} - -var _ nvml.Interface = (*Server)(nil) -var _ nvml.Device = (*Device)(nil) -var _ nvml.GpuInstance = (*GpuInstance)(nil) -var _ nvml.ComputeInstance = (*ComputeInstance)(nil) - -func New() *Server { - server := &Server{ - Devices: [8]nvml.Device{ - NewDevice(0), - NewDevice(1), - NewDevice(2), - NewDevice(3), - NewDevice(4), - NewDevice(5), - NewDevice(6), - NewDevice(7), - }, - DriverVersion: "550.54.15", - NvmlVersion: "12.550.54.15", - CudaDriverVersion: 12040, - } - server.setMockFuncs() - return server -} - -func NewDevice(index int) *Device { - device := &Device{ - UUID: "GPU-" + uuid.New().String(), - Name: "Mock NVIDIA A100-SXM4-40GB", - Brand: nvml.BRAND_NVIDIA, - Architecture: nvml.DEVICE_ARCH_AMPERE, - PciBusID: fmt.Sprintf("0000:%02x:00.0", index), - Minor: index, - Index: index, - CudaComputeCapability: CudaComputeCapability{ - Major: 8, - Minor: 0, - }, - GpuInstances: make(map[*GpuInstance]struct{}), - GpuInstanceCounter: 0, - MemoryInfo: nvml.Memory{Total: 42949672960, Free: 0, Used: 0}, - } - device.setMockFuncs() - return device -} - -func NewGpuInstance(info nvml.GpuInstanceInfo) *GpuInstance { - gi := &GpuInstance{ - Info: info, - ComputeInstances: make(map[*ComputeInstance]struct{}), - ComputeInstanceCounter: 0, - } - gi.setMockFuncs() - return gi -} - -func NewComputeInstance(info nvml.ComputeInstanceInfo) *ComputeInstance { - ci := &ComputeInstance{ - Info: info, - } - ci.setMockFuncs() - return ci -} - -func (s *Server) setMockFuncs() { - s.ExtensionsFunc = func() nvml.ExtendedInterface { - return s - } - - s.LookupSymbolFunc = func(symbol string) error { - return nil - } - - s.InitFunc = func() nvml.Return { - return nvml.SUCCESS - } - - s.ShutdownFunc = func() nvml.Return { - return nvml.SUCCESS - } - - s.SystemGetDriverVersionFunc = func() (string, nvml.Return) { - return s.DriverVersion, nvml.SUCCESS - } - - s.SystemGetNVMLVersionFunc = func() (string, nvml.Return) { - return s.NvmlVersion, nvml.SUCCESS - } - - s.SystemGetCudaDriverVersionFunc = func() (int, nvml.Return) { - return s.CudaDriverVersion, nvml.SUCCESS - } - - s.DeviceGetCountFunc = func() (int, nvml.Return) { - return len(s.Devices), nvml.SUCCESS - } - - s.DeviceGetHandleByIndexFunc = func(index int) (nvml.Device, nvml.Return) { - 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) { - for _, d := range s.Devices { - if uuid == d.(*Device).UUID { - return d, nvml.SUCCESS - } - } - return nil, nvml.ERROR_INVALID_ARGUMENT - } - - s.DeviceGetHandleByPciBusIdFunc = func(busID string) (nvml.Device, nvml.Return) { - for _, d := range s.Devices { - if busID == d.(*Device).PciBusID { - return d, nvml.SUCCESS - } - } - return nil, nvml.ERROR_INVALID_ARGUMENT - } -} - -func (d *Device) setMockFuncs() { - d.GetMinorNumberFunc = func() (int, nvml.Return) { - return d.Minor, nvml.SUCCESS - } - - d.GetIndexFunc = func() (int, nvml.Return) { - return d.Index, nvml.SUCCESS - } - - d.GetCudaComputeCapabilityFunc = func() (int, int, nvml.Return) { - return d.CudaComputeCapability.Major, d.CudaComputeCapability.Minor, nvml.SUCCESS - } - - d.GetUUIDFunc = func() (string, nvml.Return) { - return d.UUID, nvml.SUCCESS - } - - d.GetNameFunc = func() (string, nvml.Return) { - return d.Name, nvml.SUCCESS - } - - d.GetBrandFunc = func() (nvml.BrandType, nvml.Return) { - return d.Brand, nvml.SUCCESS - } - - d.GetArchitectureFunc = func() (nvml.DeviceArchitecture, nvml.Return) { - return d.Architecture, nvml.SUCCESS - } - - d.GetMemoryInfoFunc = func() (nvml.Memory, nvml.Return) { - return d.MemoryInfo, nvml.SUCCESS - } - - d.GetPciInfoFunc = func() (nvml.PciInfo, nvml.Return) { - p := nvml.PciInfo{ - PciDeviceId: 0x20B010DE, - } - return p, nvml.SUCCESS - } - - d.SetMigModeFunc = func(mode int) (nvml.Return, nvml.Return) { - d.MigMode = mode - return nvml.SUCCESS, nvml.SUCCESS - } - - d.GetMigModeFunc = func() (int, int, nvml.Return) { - return d.MigMode, d.MigMode, nvml.SUCCESS - } - - d.GetGpuInstanceProfileInfoFunc = func(giProfileId int) (nvml.GpuInstanceProfileInfo, nvml.Return) { - if giProfileId < 0 || giProfileId >= nvml.GPU_INSTANCE_PROFILE_COUNT { - return nvml.GpuInstanceProfileInfo{}, nvml.ERROR_INVALID_ARGUMENT - } - - if _, exists := MIGProfiles.GpuInstanceProfiles[giProfileId]; !exists { - return nvml.GpuInstanceProfileInfo{}, nvml.ERROR_NOT_SUPPORTED - } - - return MIGProfiles.GpuInstanceProfiles[giProfileId], nvml.SUCCESS - } - - d.GetGpuInstancePossiblePlacementsFunc = func(info *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { - return MIGPlacements.GpuInstancePossiblePlacements[int(info.Id)], nvml.SUCCESS - } - - d.CreateGpuInstanceFunc = func(info *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { - d.Lock() - defer d.Unlock() - giInfo := nvml.GpuInstanceInfo{ - Device: d, - Id: d.GpuInstanceCounter, - ProfileId: info.Id, - } - d.GpuInstanceCounter++ - gi := NewGpuInstance(giInfo) - d.GpuInstances[gi] = struct{}{} - return gi, nvml.SUCCESS - } - - d.CreateGpuInstanceWithPlacementFunc = func(info *nvml.GpuInstanceProfileInfo, placement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { - d.Lock() - defer d.Unlock() - giInfo := nvml.GpuInstanceInfo{ - Device: d, - Id: d.GpuInstanceCounter, - ProfileId: info.Id, - Placement: *placement, - } - d.GpuInstanceCounter++ - gi := NewGpuInstance(giInfo) - d.GpuInstances[gi] = struct{}{} - return gi, nvml.SUCCESS - } - - d.GetGpuInstancesFunc = func(info *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { - d.RLock() - defer d.RUnlock() - var gis []nvml.GpuInstance - for gi := range d.GpuInstances { - if gi.Info.ProfileId == info.Id { - gis = append(gis, gi) - } - } - return gis, nvml.SUCCESS - } -} - -func (gi *GpuInstance) setMockFuncs() { - gi.GetInfoFunc = func() (nvml.GpuInstanceInfo, nvml.Return) { - return gi.Info, nvml.SUCCESS - } - - gi.GetComputeInstanceProfileInfoFunc = func(ciProfileId int, ciEngProfileId int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { - if ciProfileId < 0 || ciProfileId >= nvml.COMPUTE_INSTANCE_PROFILE_COUNT { - return nvml.ComputeInstanceProfileInfo{}, nvml.ERROR_INVALID_ARGUMENT - } - - if ciEngProfileId != nvml.COMPUTE_INSTANCE_ENGINE_PROFILE_SHARED { - return nvml.ComputeInstanceProfileInfo{}, nvml.ERROR_NOT_SUPPORTED - } - - giProfileId := int(gi.Info.ProfileId) - - if _, exists := MIGProfiles.ComputeInstanceProfiles[giProfileId]; !exists { - return nvml.ComputeInstanceProfileInfo{}, nvml.ERROR_NOT_SUPPORTED - } - - if _, exists := MIGProfiles.ComputeInstanceProfiles[giProfileId][ciProfileId]; !exists { - return nvml.ComputeInstanceProfileInfo{}, nvml.ERROR_NOT_SUPPORTED - } - - return MIGProfiles.ComputeInstanceProfiles[giProfileId][ciProfileId], nvml.SUCCESS - } - - gi.GetComputeInstancePossiblePlacementsFunc = func(info *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { - return MIGPlacements.ComputeInstancePossiblePlacements[int(gi.Info.Id)][int(info.Id)], nvml.SUCCESS - } - - gi.CreateComputeInstanceFunc = func(info *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { - gi.Lock() - defer gi.Unlock() - ciInfo := nvml.ComputeInstanceInfo{ - Device: gi.Info.Device, - GpuInstance: gi, - Id: gi.ComputeInstanceCounter, - ProfileId: info.Id, - } - gi.ComputeInstanceCounter++ - ci := NewComputeInstance(ciInfo) - gi.ComputeInstances[ci] = struct{}{} - return ci, nvml.SUCCESS - } - - gi.GetComputeInstancesFunc = func(info *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { - gi.RLock() - defer gi.RUnlock() - var cis []nvml.ComputeInstance - for ci := range gi.ComputeInstances { - if ci.Info.ProfileId == info.Id { - cis = append(cis, ci) - } - } - return cis, nvml.SUCCESS - } - - gi.DestroyFunc = func() nvml.Return { - d := gi.Info.Device.(*Device) - d.Lock() - defer d.Unlock() - delete(d.GpuInstances, gi) - return nvml.SUCCESS - } -} - -func (ci *ComputeInstance) setMockFuncs() { - ci.GetInfoFunc = func() (nvml.ComputeInstanceInfo, nvml.Return) { - return ci.Info, nvml.SUCCESS - } - - ci.DestroyFunc = func() nvml.Return { - gi := ci.Info.GpuInstance.(*GpuInstance) - gi.Lock() - defer gi.Unlock() - delete(gi.ComputeInstances, ci) - return nvml.SUCCESS - } -} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/mig-profile.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/mig-profile.go deleted file mode 100644 index c4df4c833..000000000 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100/mig-profile.go +++ /dev/null @@ -1,471 +0,0 @@ -/* - * Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. - * - * 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 dgxa100 - -import ( - "github.com/NVIDIA/go-nvml/pkg/nvml" -) - -// MIGProfiles holds the profile information for GIs and CIs in this mock server. -// We should consider auto-generating this object in the future. -var MIGProfiles = struct { - GpuInstanceProfiles map[int]nvml.GpuInstanceProfileInfo - ComputeInstanceProfiles map[int]map[int]nvml.ComputeInstanceProfileInfo -}{ - GpuInstanceProfiles: map[int]nvml.GpuInstanceProfileInfo{ - nvml.GPU_INSTANCE_PROFILE_1_SLICE: { - Id: nvml.GPU_INSTANCE_PROFILE_1_SLICE, - IsP2pSupported: 0, - SliceCount: 1, - InstanceCount: 7, - MultiprocessorCount: 14, - CopyEngineCount: 1, - DecoderCount: 0, - EncoderCount: 0, - JpegCount: 0, - OfaCount: 0, - MemorySizeMB: 4864, - }, - nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV1: { - Id: nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV1, - IsP2pSupported: 0, - SliceCount: 1, - InstanceCount: 1, - MultiprocessorCount: 14, - CopyEngineCount: 1, - DecoderCount: 1, - EncoderCount: 0, - JpegCount: 1, - OfaCount: 1, - MemorySizeMB: 4864, - }, - nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV2: { - Id: nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV2, - IsP2pSupported: 0, - SliceCount: 1, - InstanceCount: 4, - MultiprocessorCount: 14, - CopyEngineCount: 1, - DecoderCount: 1, - EncoderCount: 0, - JpegCount: 0, - OfaCount: 0, - MemorySizeMB: 9856, - }, - nvml.GPU_INSTANCE_PROFILE_2_SLICE: { - Id: nvml.GPU_INSTANCE_PROFILE_2_SLICE, - IsP2pSupported: 0, - SliceCount: 2, - InstanceCount: 3, - MultiprocessorCount: 28, - CopyEngineCount: 2, - DecoderCount: 1, - EncoderCount: 0, - JpegCount: 0, - OfaCount: 0, - MemorySizeMB: 9856, - }, - nvml.GPU_INSTANCE_PROFILE_3_SLICE: { - Id: nvml.GPU_INSTANCE_PROFILE_3_SLICE, - IsP2pSupported: 0, - SliceCount: 3, - InstanceCount: 2, - MultiprocessorCount: 42, - CopyEngineCount: 3, - DecoderCount: 2, - EncoderCount: 0, - JpegCount: 0, - OfaCount: 0, - MemorySizeMB: 19968, - }, - nvml.GPU_INSTANCE_PROFILE_4_SLICE: { - Id: nvml.GPU_INSTANCE_PROFILE_4_SLICE, - IsP2pSupported: 0, - SliceCount: 4, - InstanceCount: 1, - MultiprocessorCount: 56, - CopyEngineCount: 4, - DecoderCount: 2, - EncoderCount: 0, - JpegCount: 0, - OfaCount: 0, - MemorySizeMB: 19968, - }, - nvml.GPU_INSTANCE_PROFILE_7_SLICE: { - Id: nvml.GPU_INSTANCE_PROFILE_7_SLICE, - IsP2pSupported: 0, - SliceCount: 7, - InstanceCount: 1, - MultiprocessorCount: 98, - CopyEngineCount: 7, - DecoderCount: 5, - EncoderCount: 0, - JpegCount: 1, - OfaCount: 1, - MemorySizeMB: 40192, - }, - }, - ComputeInstanceProfiles: map[int]map[int]nvml.ComputeInstanceProfileInfo{ - nvml.GPU_INSTANCE_PROFILE_1_SLICE: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, - SliceCount: 1, - InstanceCount: 1, - MultiprocessorCount: 14, - SharedCopyEngineCount: 1, - SharedDecoderCount: 0, - SharedEncoderCount: 0, - SharedJpegCount: 0, - SharedOfaCount: 0, - }, - }, - nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV1: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, - SliceCount: 1, - InstanceCount: 1, - MultiprocessorCount: 14, - SharedCopyEngineCount: 1, - SharedDecoderCount: 1, - SharedEncoderCount: 0, - SharedJpegCount: 1, - SharedOfaCount: 1, - }, - }, - nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV2: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, - SliceCount: 1, - InstanceCount: 1, - MultiprocessorCount: 14, - SharedCopyEngineCount: 1, - SharedDecoderCount: 1, - SharedEncoderCount: 0, - SharedJpegCount: 0, - SharedOfaCount: 0, - }, - }, - nvml.GPU_INSTANCE_PROFILE_2_SLICE: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, - SliceCount: 1, - InstanceCount: 2, - MultiprocessorCount: 14, - SharedCopyEngineCount: 2, - SharedDecoderCount: 1, - SharedEncoderCount: 0, - SharedJpegCount: 0, - SharedOfaCount: 0, - }, - nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE, - SliceCount: 2, - InstanceCount: 1, - MultiprocessorCount: 28, - SharedCopyEngineCount: 2, - SharedDecoderCount: 1, - SharedEncoderCount: 0, - SharedJpegCount: 0, - SharedOfaCount: 0, - }, - }, - nvml.GPU_INSTANCE_PROFILE_3_SLICE: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, - SliceCount: 1, - InstanceCount: 3, - MultiprocessorCount: 14, - SharedCopyEngineCount: 3, - SharedDecoderCount: 2, - SharedEncoderCount: 0, - SharedJpegCount: 0, - SharedOfaCount: 0, - }, - nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE, - SliceCount: 2, - InstanceCount: 1, - MultiprocessorCount: 28, - SharedCopyEngineCount: 3, - SharedDecoderCount: 2, - SharedEncoderCount: 0, - SharedJpegCount: 0, - SharedOfaCount: 0, - }, - nvml.COMPUTE_INSTANCE_PROFILE_3_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_3_SLICE, - SliceCount: 3, - InstanceCount: 1, - MultiprocessorCount: 42, - SharedCopyEngineCount: 3, - SharedDecoderCount: 2, - SharedEncoderCount: 0, - SharedJpegCount: 0, - SharedOfaCount: 0, - }, - }, - nvml.GPU_INSTANCE_PROFILE_4_SLICE: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, - SliceCount: 1, - InstanceCount: 4, - MultiprocessorCount: 14, - SharedCopyEngineCount: 4, - SharedDecoderCount: 2, - SharedEncoderCount: 0, - SharedJpegCount: 0, - SharedOfaCount: 0, - }, - nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE, - SliceCount: 2, - InstanceCount: 2, - MultiprocessorCount: 28, - SharedCopyEngineCount: 4, - SharedDecoderCount: 2, - SharedEncoderCount: 0, - SharedJpegCount: 0, - SharedOfaCount: 0, - }, - nvml.COMPUTE_INSTANCE_PROFILE_4_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_4_SLICE, - SliceCount: 4, - InstanceCount: 1, - MultiprocessorCount: 56, - SharedCopyEngineCount: 4, - SharedDecoderCount: 2, - SharedEncoderCount: 0, - SharedJpegCount: 0, - SharedOfaCount: 0, - }, - }, - nvml.GPU_INSTANCE_PROFILE_7_SLICE: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE, - SliceCount: 1, - InstanceCount: 7, - MultiprocessorCount: 14, - SharedCopyEngineCount: 7, - SharedDecoderCount: 5, - SharedEncoderCount: 0, - SharedJpegCount: 1, - SharedOfaCount: 1, - }, - nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE, - SliceCount: 2, - InstanceCount: 3, - MultiprocessorCount: 28, - SharedCopyEngineCount: 7, - SharedDecoderCount: 5, - SharedEncoderCount: 0, - SharedJpegCount: 1, - SharedOfaCount: 1, - }, - nvml.COMPUTE_INSTANCE_PROFILE_3_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_3_SLICE, - SliceCount: 3, - InstanceCount: 2, - MultiprocessorCount: 42, - SharedCopyEngineCount: 7, - SharedDecoderCount: 5, - SharedEncoderCount: 0, - SharedJpegCount: 1, - SharedOfaCount: 1, - }, - nvml.COMPUTE_INSTANCE_PROFILE_4_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_4_SLICE, - SliceCount: 4, - InstanceCount: 1, - MultiprocessorCount: 56, - SharedCopyEngineCount: 7, - SharedDecoderCount: 5, - SharedEncoderCount: 0, - SharedJpegCount: 1, - SharedOfaCount: 1, - }, - nvml.COMPUTE_INSTANCE_PROFILE_7_SLICE: { - Id: nvml.COMPUTE_INSTANCE_PROFILE_7_SLICE, - SliceCount: 7, - InstanceCount: 1, - MultiprocessorCount: 98, - SharedCopyEngineCount: 7, - SharedDecoderCount: 5, - SharedEncoderCount: 0, - SharedJpegCount: 1, - SharedOfaCount: 1, - }, - }, - }, -} - -// MIGPlacements holds the placement information for GIs and CIs in this mock server. -// We should consider auto-generating this object in the future. -var MIGPlacements = struct { - GpuInstancePossiblePlacements map[int][]nvml.GpuInstancePlacement - ComputeInstancePossiblePlacements map[int]map[int][]nvml.ComputeInstancePlacement -}{ - GpuInstancePossiblePlacements: map[int][]nvml.GpuInstancePlacement{ - nvml.GPU_INSTANCE_PROFILE_1_SLICE: { - { - Start: 0, - Size: 1, - }, - { - Start: 1, - Size: 1, - }, - { - Start: 2, - Size: 1, - }, - { - Start: 3, - Size: 1, - }, - { - Start: 4, - Size: 1, - }, - { - Start: 5, - Size: 1, - }, - { - Start: 6, - Size: 1, - }, - }, - nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV1: { - { - Start: 0, - Size: 1, - }, - { - Start: 1, - Size: 1, - }, - { - Start: 2, - Size: 1, - }, - { - Start: 3, - Size: 1, - }, - { - Start: 4, - Size: 1, - }, - { - Start: 5, - Size: 1, - }, - { - Start: 6, - Size: 1, - }, - }, - nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV2: { - { - Start: 0, - Size: 2, - }, - { - Start: 2, - Size: 2, - }, - { - Start: 4, - Size: 2, - }, - { - Start: 6, - Size: 2, - }, - }, - nvml.GPU_INSTANCE_PROFILE_2_SLICE: { - { - Start: 0, - Size: 2, - }, - { - Start: 2, - Size: 2, - }, - { - Start: 4, - Size: 2, - }, - }, - nvml.GPU_INSTANCE_PROFILE_3_SLICE: { - { - Start: 0, - Size: 4, - }, - { - Start: 4, - Size: 4, - }, - }, - nvml.GPU_INSTANCE_PROFILE_4_SLICE: { - { - Start: 0, - Size: 4, - }, - }, - nvml.GPU_INSTANCE_PROFILE_7_SLICE: { - { - Start: 0, - Size: 8, - }, - }, - }, - // TODO: Fill out ComputeInstancePossiblePlacements - ComputeInstancePossiblePlacements: map[int]map[int][]nvml.ComputeInstancePlacement{ - nvml.GPU_INSTANCE_PROFILE_1_SLICE: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, - }, - nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV1: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, - }, - nvml.GPU_INSTANCE_PROFILE_1_SLICE_REV2: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, - }, - nvml.GPU_INSTANCE_PROFILE_2_SLICE: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, - nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: {}, - }, - nvml.GPU_INSTANCE_PROFILE_3_SLICE: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, - nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: {}, - nvml.COMPUTE_INSTANCE_PROFILE_3_SLICE: {}, - }, - nvml.GPU_INSTANCE_PROFILE_4_SLICE: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, - nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: {}, - nvml.COMPUTE_INSTANCE_PROFILE_4_SLICE: {}, - }, - nvml.GPU_INSTANCE_PROFILE_7_SLICE: { - nvml.COMPUTE_INSTANCE_PROFILE_1_SLICE: {}, - nvml.COMPUTE_INSTANCE_PROFILE_2_SLICE: {}, - nvml.COMPUTE_INSTANCE_PROFILE_3_SLICE: {}, - nvml.COMPUTE_INSTANCE_PROFILE_4_SLICE: {}, - nvml.COMPUTE_INSTANCE_PROFILE_7_SLICE: {}, - }, - }, -} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/eventset.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/eventset.go deleted file mode 100644 index d452c4d42..000000000 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/eventset.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "github.com/NVIDIA/go-nvml/pkg/nvml" - "sync" -) - -// Ensure, that EventSet does implement nvml.EventSet. -// If this is not the case, regenerate this file with moq. -var _ nvml.EventSet = &EventSet{} - -// EventSet is a mock implementation of nvml.EventSet. -// -// func TestSomethingThatUsesEventSet(t *testing.T) { -// -// // make and configure a mocked nvml.EventSet -// mockedEventSet := &EventSet{ -// FreeFunc: func() nvml.Return { -// panic("mock out the Free method") -// }, -// WaitFunc: func(v uint32) (nvml.EventData, nvml.Return) { -// panic("mock out the Wait method") -// }, -// } -// -// // use mockedEventSet in code that requires nvml.EventSet -// // and then make assertions. -// -// } -type EventSet struct { - // FreeFunc mocks the Free method. - FreeFunc func() nvml.Return - - // WaitFunc mocks the Wait method. - WaitFunc func(v uint32) (nvml.EventData, nvml.Return) - - // calls tracks calls to the methods. - calls struct { - // Free holds details about calls to the Free method. - Free []struct { - } - // Wait holds details about calls to the Wait method. - Wait []struct { - // V is the v argument value. - V uint32 - } - } - lockFree sync.RWMutex - lockWait sync.RWMutex -} - -// Free calls FreeFunc. -func (mock *EventSet) Free() nvml.Return { - if mock.FreeFunc == nil { - panic("EventSet.FreeFunc: method is nil but EventSet.Free was just called") - } - callInfo := struct { - }{} - mock.lockFree.Lock() - mock.calls.Free = append(mock.calls.Free, callInfo) - mock.lockFree.Unlock() - return mock.FreeFunc() -} - -// FreeCalls gets all the calls that were made to Free. -// Check the length with: -// -// len(mockedEventSet.FreeCalls()) -func (mock *EventSet) FreeCalls() []struct { -} { - var calls []struct { - } - mock.lockFree.RLock() - calls = mock.calls.Free - mock.lockFree.RUnlock() - return calls -} - -// Wait calls WaitFunc. -func (mock *EventSet) Wait(v uint32) (nvml.EventData, nvml.Return) { - if mock.WaitFunc == nil { - panic("EventSet.WaitFunc: method is nil but EventSet.Wait was just called") - } - callInfo := struct { - V uint32 - }{ - V: v, - } - mock.lockWait.Lock() - mock.calls.Wait = append(mock.calls.Wait, callInfo) - mock.lockWait.Unlock() - return mock.WaitFunc(v) -} - -// WaitCalls gets all the calls that were made to Wait. -// Check the length with: -// -// len(mockedEventSet.WaitCalls()) -func (mock *EventSet) WaitCalls() []struct { - V uint32 -} { - var calls []struct { - V uint32 - } - mock.lockWait.RLock() - calls = mock.calls.Wait - mock.lockWait.RUnlock() - return calls -} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/extendedinterface.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/extendedinterface.go deleted file mode 100644 index 71634bfd0..000000000 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/extendedinterface.go +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "github.com/NVIDIA/go-nvml/pkg/nvml" - "sync" -) - -// Ensure, that ExtendedInterface does implement nvml.ExtendedInterface. -// If this is not the case, regenerate this file with moq. -var _ nvml.ExtendedInterface = &ExtendedInterface{} - -// ExtendedInterface is a mock implementation of nvml.ExtendedInterface. -// -// func TestSomethingThatUsesExtendedInterface(t *testing.T) { -// -// // make and configure a mocked nvml.ExtendedInterface -// mockedExtendedInterface := &ExtendedInterface{ -// LookupSymbolFunc: func(s string) error { -// panic("mock out the LookupSymbol method") -// }, -// } -// -// // use mockedExtendedInterface in code that requires nvml.ExtendedInterface -// // and then make assertions. -// -// } -type ExtendedInterface struct { - // LookupSymbolFunc mocks the LookupSymbol method. - LookupSymbolFunc func(s string) error - - // calls tracks calls to the methods. - calls struct { - // LookupSymbol holds details about calls to the LookupSymbol method. - LookupSymbol []struct { - // S is the s argument value. - S string - } - } - lockLookupSymbol sync.RWMutex -} - -// LookupSymbol calls LookupSymbolFunc. -func (mock *ExtendedInterface) LookupSymbol(s string) error { - if mock.LookupSymbolFunc == nil { - panic("ExtendedInterface.LookupSymbolFunc: method is nil but ExtendedInterface.LookupSymbol was just called") - } - callInfo := struct { - S string - }{ - S: s, - } - mock.lockLookupSymbol.Lock() - mock.calls.LookupSymbol = append(mock.calls.LookupSymbol, callInfo) - mock.lockLookupSymbol.Unlock() - return mock.LookupSymbolFunc(s) -} - -// LookupSymbolCalls gets all the calls that were made to LookupSymbol. -// Check the length with: -// -// len(mockedExtendedInterface.LookupSymbolCalls()) -func (mock *ExtendedInterface) LookupSymbolCalls() []struct { - S string -} { - var calls []struct { - S string - } - mock.lockLookupSymbol.RLock() - calls = mock.calls.LookupSymbol - mock.lockLookupSymbol.RUnlock() - return calls -} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpmsample.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpmsample.go deleted file mode 100644 index 1023c3443..000000000 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpmsample.go +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "github.com/NVIDIA/go-nvml/pkg/nvml" - "sync" -) - -// Ensure, that GpmSample does implement nvml.GpmSample. -// If this is not the case, regenerate this file with moq. -var _ nvml.GpmSample = &GpmSample{} - -// GpmSample is a mock implementation of nvml.GpmSample. -// -// func TestSomethingThatUsesGpmSample(t *testing.T) { -// -// // make and configure a mocked nvml.GpmSample -// mockedGpmSample := &GpmSample{ -// FreeFunc: func() nvml.Return { -// panic("mock out the Free method") -// }, -// GetFunc: func(device nvml.Device) nvml.Return { -// panic("mock out the Get method") -// }, -// MigGetFunc: func(device nvml.Device, n int) nvml.Return { -// panic("mock out the MigGet method") -// }, -// } -// -// // use mockedGpmSample in code that requires nvml.GpmSample -// // and then make assertions. -// -// } -type GpmSample struct { - // FreeFunc mocks the Free method. - FreeFunc func() nvml.Return - - // GetFunc mocks the Get method. - GetFunc func(device nvml.Device) nvml.Return - - // MigGetFunc mocks the MigGet method. - MigGetFunc func(device nvml.Device, n int) nvml.Return - - // calls tracks calls to the methods. - calls struct { - // Free holds details about calls to the Free method. - Free []struct { - } - // Get holds details about calls to the Get method. - Get []struct { - // Device is the device argument value. - Device nvml.Device - } - // MigGet holds details about calls to the MigGet method. - MigGet []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - } - lockFree sync.RWMutex - lockGet sync.RWMutex - lockMigGet sync.RWMutex -} - -// Free calls FreeFunc. -func (mock *GpmSample) Free() nvml.Return { - if mock.FreeFunc == nil { - panic("GpmSample.FreeFunc: method is nil but GpmSample.Free was just called") - } - callInfo := struct { - }{} - mock.lockFree.Lock() - mock.calls.Free = append(mock.calls.Free, callInfo) - mock.lockFree.Unlock() - return mock.FreeFunc() -} - -// FreeCalls gets all the calls that were made to Free. -// Check the length with: -// -// len(mockedGpmSample.FreeCalls()) -func (mock *GpmSample) FreeCalls() []struct { -} { - var calls []struct { - } - mock.lockFree.RLock() - calls = mock.calls.Free - mock.lockFree.RUnlock() - return calls -} - -// Get calls GetFunc. -func (mock *GpmSample) Get(device nvml.Device) nvml.Return { - if mock.GetFunc == nil { - panic("GpmSample.GetFunc: method is nil but GpmSample.Get was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockGet.Lock() - mock.calls.Get = append(mock.calls.Get, callInfo) - mock.lockGet.Unlock() - return mock.GetFunc(device) -} - -// GetCalls gets all the calls that were made to Get. -// Check the length with: -// -// len(mockedGpmSample.GetCalls()) -func (mock *GpmSample) GetCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockGet.RLock() - calls = mock.calls.Get - mock.lockGet.RUnlock() - return calls -} - -// MigGet calls MigGetFunc. -func (mock *GpmSample) MigGet(device nvml.Device, n int) nvml.Return { - if mock.MigGetFunc == nil { - panic("GpmSample.MigGetFunc: method is nil but GpmSample.MigGet was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockMigGet.Lock() - mock.calls.MigGet = append(mock.calls.MigGet, callInfo) - mock.lockMigGet.Unlock() - return mock.MigGetFunc(device, n) -} - -// MigGetCalls gets all the calls that were made to MigGet. -// Check the length with: -// -// len(mockedGpmSample.MigGetCalls()) -func (mock *GpmSample) MigGetCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockMigGet.RLock() - calls = mock.calls.MigGet - mock.lockMigGet.RUnlock() - return calls -} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpuinstance.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpuinstance.go deleted file mode 100644 index d05bc3487..000000000 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/gpuinstance.go +++ /dev/null @@ -1,785 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "github.com/NVIDIA/go-nvml/pkg/nvml" - "sync" -) - -// Ensure, that GpuInstance does implement nvml.GpuInstance. -// If this is not the case, regenerate this file with moq. -var _ nvml.GpuInstance = &GpuInstance{} - -// GpuInstance is a mock implementation of nvml.GpuInstance. -// -// func TestSomethingThatUsesGpuInstance(t *testing.T) { -// -// // make and configure a mocked nvml.GpuInstance -// mockedGpuInstance := &GpuInstance{ -// CreateComputeInstanceFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { -// panic("mock out the CreateComputeInstance method") -// }, -// CreateComputeInstanceWithPlacementFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) { -// panic("mock out the CreateComputeInstanceWithPlacement method") -// }, -// DestroyFunc: func() nvml.Return { -// panic("mock out the Destroy method") -// }, -// GetActiveVgpusFunc: func() (nvml.ActiveVgpuInstanceInfo, nvml.Return) { -// panic("mock out the GetActiveVgpus method") -// }, -// GetComputeInstanceByIdFunc: func(n int) (nvml.ComputeInstance, nvml.Return) { -// panic("mock out the GetComputeInstanceById method") -// }, -// GetComputeInstancePossiblePlacementsFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { -// panic("mock out the GetComputeInstancePossiblePlacements method") -// }, -// GetComputeInstanceProfileInfoFunc: func(n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { -// 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) { -// panic("mock out the GetComputeInstanceRemainingCapacity method") -// }, -// GetComputeInstancesFunc: func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { -// panic("mock out the GetComputeInstances method") -// }, -// GetCreatableVgpusFunc: func() (nvml.VgpuTypeIdInfo, nvml.Return) { -// panic("mock out the GetCreatableVgpus method") -// }, -// GetInfoFunc: func() (nvml.GpuInstanceInfo, nvml.Return) { -// panic("mock out the GetInfo method") -// }, -// GetVgpuHeterogeneousModeFunc: func() (nvml.VgpuHeterogeneousMode, nvml.Return) { -// panic("mock out the GetVgpuHeterogeneousMode method") -// }, -// GetVgpuSchedulerLogFunc: func() (nvml.VgpuSchedulerLogInfo, nvml.Return) { -// panic("mock out the GetVgpuSchedulerLog method") -// }, -// GetVgpuSchedulerStateFunc: func() (nvml.VgpuSchedulerStateInfo, nvml.Return) { -// panic("mock out the GetVgpuSchedulerState method") -// }, -// GetVgpuTypeCreatablePlacementsFunc: func() (nvml.VgpuCreatablePlacementInfo, nvml.Return) { -// panic("mock out the GetVgpuTypeCreatablePlacements method") -// }, -// SetVgpuHeterogeneousModeFunc: func(vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return { -// panic("mock out the SetVgpuHeterogeneousMode method") -// }, -// SetVgpuSchedulerStateFunc: func(vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return { -// panic("mock out the SetVgpuSchedulerState method") -// }, -// } -// -// // use mockedGpuInstance in code that requires nvml.GpuInstance -// // and then make assertions. -// -// } -type GpuInstance struct { - // CreateComputeInstanceFunc mocks the CreateComputeInstance method. - CreateComputeInstanceFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) - - // CreateComputeInstanceWithPlacementFunc mocks the CreateComputeInstanceWithPlacement method. - CreateComputeInstanceWithPlacementFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) - - // DestroyFunc mocks the Destroy method. - DestroyFunc func() nvml.Return - - // GetActiveVgpusFunc mocks the GetActiveVgpus method. - GetActiveVgpusFunc func() (nvml.ActiveVgpuInstanceInfo, nvml.Return) - - // GetComputeInstanceByIdFunc mocks the GetComputeInstanceById method. - GetComputeInstanceByIdFunc func(n int) (nvml.ComputeInstance, nvml.Return) - - // GetComputeInstancePossiblePlacementsFunc mocks the GetComputeInstancePossiblePlacements method. - GetComputeInstancePossiblePlacementsFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) - - // GetComputeInstanceProfileInfoFunc mocks the GetComputeInstanceProfileInfo method. - GetComputeInstanceProfileInfoFunc func(n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) - - // 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) - - // GetComputeInstancesFunc mocks the GetComputeInstances method. - GetComputeInstancesFunc func(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) - - // GetCreatableVgpusFunc mocks the GetCreatableVgpus method. - GetCreatableVgpusFunc func() (nvml.VgpuTypeIdInfo, nvml.Return) - - // GetInfoFunc mocks the GetInfo method. - GetInfoFunc func() (nvml.GpuInstanceInfo, nvml.Return) - - // GetVgpuHeterogeneousModeFunc mocks the GetVgpuHeterogeneousMode method. - GetVgpuHeterogeneousModeFunc func() (nvml.VgpuHeterogeneousMode, nvml.Return) - - // GetVgpuSchedulerLogFunc mocks the GetVgpuSchedulerLog method. - GetVgpuSchedulerLogFunc func() (nvml.VgpuSchedulerLogInfo, nvml.Return) - - // GetVgpuSchedulerStateFunc mocks the GetVgpuSchedulerState method. - GetVgpuSchedulerStateFunc func() (nvml.VgpuSchedulerStateInfo, nvml.Return) - - // GetVgpuTypeCreatablePlacementsFunc mocks the GetVgpuTypeCreatablePlacements method. - GetVgpuTypeCreatablePlacementsFunc func() (nvml.VgpuCreatablePlacementInfo, nvml.Return) - - // SetVgpuHeterogeneousModeFunc mocks the SetVgpuHeterogeneousMode method. - SetVgpuHeterogeneousModeFunc func(vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return - - // SetVgpuSchedulerStateFunc mocks the SetVgpuSchedulerState method. - SetVgpuSchedulerStateFunc func(vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return - - // calls tracks calls to the methods. - calls struct { - // CreateComputeInstance holds details about calls to the CreateComputeInstance method. - CreateComputeInstance []struct { - // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - // CreateComputeInstanceWithPlacement holds details about calls to the CreateComputeInstanceWithPlacement method. - CreateComputeInstanceWithPlacement []struct { - // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - // ComputeInstancePlacement is the computeInstancePlacement argument value. - ComputeInstancePlacement *nvml.ComputeInstancePlacement - } - // Destroy holds details about calls to the Destroy method. - Destroy []struct { - } - // GetActiveVgpus holds details about calls to the GetActiveVgpus method. - GetActiveVgpus []struct { - } - // GetComputeInstanceById holds details about calls to the GetComputeInstanceById method. - GetComputeInstanceById []struct { - // N is the n argument value. - N int - } - // GetComputeInstancePossiblePlacements holds details about calls to the GetComputeInstancePossiblePlacements method. - GetComputeInstancePossiblePlacements []struct { - // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - // GetComputeInstanceProfileInfo holds details about calls to the GetComputeInstanceProfileInfo method. - GetComputeInstanceProfileInfo []struct { - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - } - // GetComputeInstanceProfileInfoV holds details about calls to the GetComputeInstanceProfileInfoV method. - GetComputeInstanceProfileInfoV []struct { - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - } - // GetComputeInstanceRemainingCapacity holds details about calls to the GetComputeInstanceRemainingCapacity method. - GetComputeInstanceRemainingCapacity []struct { - // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - // GetComputeInstances holds details about calls to the GetComputeInstances method. - GetComputeInstances []struct { - // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - // GetCreatableVgpus holds details about calls to the GetCreatableVgpus method. - GetCreatableVgpus []struct { - } - // GetInfo holds details about calls to the GetInfo method. - GetInfo []struct { - } - // GetVgpuHeterogeneousMode holds details about calls to the GetVgpuHeterogeneousMode method. - GetVgpuHeterogeneousMode []struct { - } - // GetVgpuSchedulerLog holds details about calls to the GetVgpuSchedulerLog method. - GetVgpuSchedulerLog []struct { - } - // GetVgpuSchedulerState holds details about calls to the GetVgpuSchedulerState method. - GetVgpuSchedulerState []struct { - } - // GetVgpuTypeCreatablePlacements holds details about calls to the GetVgpuTypeCreatablePlacements method. - GetVgpuTypeCreatablePlacements []struct { - } - // SetVgpuHeterogeneousMode holds details about calls to the SetVgpuHeterogeneousMode method. - SetVgpuHeterogeneousMode []struct { - // VgpuHeterogeneousMode is the vgpuHeterogeneousMode argument value. - VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode - } - // SetVgpuSchedulerState holds details about calls to the SetVgpuSchedulerState method. - SetVgpuSchedulerState []struct { - // VgpuSchedulerState is the vgpuSchedulerState argument value. - VgpuSchedulerState *nvml.VgpuSchedulerState - } - } - lockCreateComputeInstance sync.RWMutex - lockCreateComputeInstanceWithPlacement sync.RWMutex - lockDestroy sync.RWMutex - lockGetActiveVgpus sync.RWMutex - lockGetComputeInstanceById sync.RWMutex - lockGetComputeInstancePossiblePlacements sync.RWMutex - lockGetComputeInstanceProfileInfo sync.RWMutex - lockGetComputeInstanceProfileInfoV sync.RWMutex - lockGetComputeInstanceRemainingCapacity sync.RWMutex - lockGetComputeInstances sync.RWMutex - lockGetCreatableVgpus sync.RWMutex - lockGetInfo sync.RWMutex - lockGetVgpuHeterogeneousMode sync.RWMutex - lockGetVgpuSchedulerLog sync.RWMutex - lockGetVgpuSchedulerState sync.RWMutex - lockGetVgpuTypeCreatablePlacements sync.RWMutex - lockSetVgpuHeterogeneousMode sync.RWMutex - lockSetVgpuSchedulerState sync.RWMutex -} - -// CreateComputeInstance calls CreateComputeInstanceFunc. -func (mock *GpuInstance) CreateComputeInstance(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { - if mock.CreateComputeInstanceFunc == nil { - panic("GpuInstance.CreateComputeInstanceFunc: method is nil but GpuInstance.CreateComputeInstance was just called") - } - callInfo := struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - }{ - ComputeInstanceProfileInfo: computeInstanceProfileInfo, - } - mock.lockCreateComputeInstance.Lock() - mock.calls.CreateComputeInstance = append(mock.calls.CreateComputeInstance, callInfo) - mock.lockCreateComputeInstance.Unlock() - return mock.CreateComputeInstanceFunc(computeInstanceProfileInfo) -} - -// CreateComputeInstanceCalls gets all the calls that were made to CreateComputeInstance. -// Check the length with: -// -// len(mockedGpuInstance.CreateComputeInstanceCalls()) -func (mock *GpuInstance) CreateComputeInstanceCalls() []struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo -} { - var calls []struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - mock.lockCreateComputeInstance.RLock() - calls = mock.calls.CreateComputeInstance - mock.lockCreateComputeInstance.RUnlock() - return calls -} - -// CreateComputeInstanceWithPlacement calls CreateComputeInstanceWithPlacementFunc. -func (mock *GpuInstance) CreateComputeInstanceWithPlacement(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) { - if mock.CreateComputeInstanceWithPlacementFunc == nil { - panic("GpuInstance.CreateComputeInstanceWithPlacementFunc: method is nil but GpuInstance.CreateComputeInstanceWithPlacement was just called") - } - callInfo := struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - ComputeInstancePlacement *nvml.ComputeInstancePlacement - }{ - ComputeInstanceProfileInfo: computeInstanceProfileInfo, - ComputeInstancePlacement: computeInstancePlacement, - } - mock.lockCreateComputeInstanceWithPlacement.Lock() - mock.calls.CreateComputeInstanceWithPlacement = append(mock.calls.CreateComputeInstanceWithPlacement, callInfo) - mock.lockCreateComputeInstanceWithPlacement.Unlock() - return mock.CreateComputeInstanceWithPlacementFunc(computeInstanceProfileInfo, computeInstancePlacement) -} - -// CreateComputeInstanceWithPlacementCalls gets all the calls that were made to CreateComputeInstanceWithPlacement. -// Check the length with: -// -// len(mockedGpuInstance.CreateComputeInstanceWithPlacementCalls()) -func (mock *GpuInstance) CreateComputeInstanceWithPlacementCalls() []struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - ComputeInstancePlacement *nvml.ComputeInstancePlacement -} { - var calls []struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - ComputeInstancePlacement *nvml.ComputeInstancePlacement - } - mock.lockCreateComputeInstanceWithPlacement.RLock() - calls = mock.calls.CreateComputeInstanceWithPlacement - mock.lockCreateComputeInstanceWithPlacement.RUnlock() - return calls -} - -// Destroy calls DestroyFunc. -func (mock *GpuInstance) Destroy() nvml.Return { - if mock.DestroyFunc == nil { - panic("GpuInstance.DestroyFunc: method is nil but GpuInstance.Destroy was just called") - } - callInfo := struct { - }{} - mock.lockDestroy.Lock() - mock.calls.Destroy = append(mock.calls.Destroy, callInfo) - mock.lockDestroy.Unlock() - return mock.DestroyFunc() -} - -// DestroyCalls gets all the calls that were made to Destroy. -// Check the length with: -// -// len(mockedGpuInstance.DestroyCalls()) -func (mock *GpuInstance) DestroyCalls() []struct { -} { - var calls []struct { - } - mock.lockDestroy.RLock() - calls = mock.calls.Destroy - mock.lockDestroy.RUnlock() - return calls -} - -// GetActiveVgpus calls GetActiveVgpusFunc. -func (mock *GpuInstance) GetActiveVgpus() (nvml.ActiveVgpuInstanceInfo, nvml.Return) { - if mock.GetActiveVgpusFunc == nil { - panic("GpuInstance.GetActiveVgpusFunc: method is nil but GpuInstance.GetActiveVgpus was just called") - } - callInfo := struct { - }{} - mock.lockGetActiveVgpus.Lock() - mock.calls.GetActiveVgpus = append(mock.calls.GetActiveVgpus, callInfo) - mock.lockGetActiveVgpus.Unlock() - return mock.GetActiveVgpusFunc() -} - -// GetActiveVgpusCalls gets all the calls that were made to GetActiveVgpus. -// Check the length with: -// -// len(mockedGpuInstance.GetActiveVgpusCalls()) -func (mock *GpuInstance) GetActiveVgpusCalls() []struct { -} { - var calls []struct { - } - mock.lockGetActiveVgpus.RLock() - calls = mock.calls.GetActiveVgpus - mock.lockGetActiveVgpus.RUnlock() - return calls -} - -// GetComputeInstanceById calls GetComputeInstanceByIdFunc. -func (mock *GpuInstance) GetComputeInstanceById(n int) (nvml.ComputeInstance, nvml.Return) { - if mock.GetComputeInstanceByIdFunc == nil { - panic("GpuInstance.GetComputeInstanceByIdFunc: method is nil but GpuInstance.GetComputeInstanceById was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetComputeInstanceById.Lock() - mock.calls.GetComputeInstanceById = append(mock.calls.GetComputeInstanceById, callInfo) - mock.lockGetComputeInstanceById.Unlock() - return mock.GetComputeInstanceByIdFunc(n) -} - -// GetComputeInstanceByIdCalls gets all the calls that were made to GetComputeInstanceById. -// Check the length with: -// -// len(mockedGpuInstance.GetComputeInstanceByIdCalls()) -func (mock *GpuInstance) GetComputeInstanceByIdCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetComputeInstanceById.RLock() - calls = mock.calls.GetComputeInstanceById - mock.lockGetComputeInstanceById.RUnlock() - return calls -} - -// GetComputeInstancePossiblePlacements calls GetComputeInstancePossiblePlacementsFunc. -func (mock *GpuInstance) GetComputeInstancePossiblePlacements(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { - if mock.GetComputeInstancePossiblePlacementsFunc == nil { - panic("GpuInstance.GetComputeInstancePossiblePlacementsFunc: method is nil but GpuInstance.GetComputeInstancePossiblePlacements was just called") - } - callInfo := struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - }{ - ComputeInstanceProfileInfo: computeInstanceProfileInfo, - } - mock.lockGetComputeInstancePossiblePlacements.Lock() - mock.calls.GetComputeInstancePossiblePlacements = append(mock.calls.GetComputeInstancePossiblePlacements, callInfo) - mock.lockGetComputeInstancePossiblePlacements.Unlock() - return mock.GetComputeInstancePossiblePlacementsFunc(computeInstanceProfileInfo) -} - -// GetComputeInstancePossiblePlacementsCalls gets all the calls that were made to GetComputeInstancePossiblePlacements. -// Check the length with: -// -// len(mockedGpuInstance.GetComputeInstancePossiblePlacementsCalls()) -func (mock *GpuInstance) GetComputeInstancePossiblePlacementsCalls() []struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo -} { - var calls []struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - mock.lockGetComputeInstancePossiblePlacements.RLock() - calls = mock.calls.GetComputeInstancePossiblePlacements - mock.lockGetComputeInstancePossiblePlacements.RUnlock() - return calls -} - -// GetComputeInstanceProfileInfo calls GetComputeInstanceProfileInfoFunc. -func (mock *GpuInstance) GetComputeInstanceProfileInfo(n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { - if mock.GetComputeInstanceProfileInfoFunc == nil { - panic("GpuInstance.GetComputeInstanceProfileInfoFunc: method is nil but GpuInstance.GetComputeInstanceProfileInfo was just called") - } - callInfo := struct { - N1 int - N2 int - }{ - N1: n1, - N2: n2, - } - mock.lockGetComputeInstanceProfileInfo.Lock() - mock.calls.GetComputeInstanceProfileInfo = append(mock.calls.GetComputeInstanceProfileInfo, callInfo) - mock.lockGetComputeInstanceProfileInfo.Unlock() - return mock.GetComputeInstanceProfileInfoFunc(n1, n2) -} - -// GetComputeInstanceProfileInfoCalls gets all the calls that were made to GetComputeInstanceProfileInfo. -// Check the length with: -// -// len(mockedGpuInstance.GetComputeInstanceProfileInfoCalls()) -func (mock *GpuInstance) GetComputeInstanceProfileInfoCalls() []struct { - N1 int - N2 int -} { - var calls []struct { - N1 int - N2 int - } - mock.lockGetComputeInstanceProfileInfo.RLock() - calls = mock.calls.GetComputeInstanceProfileInfo - mock.lockGetComputeInstanceProfileInfo.RUnlock() - return calls -} - -// GetComputeInstanceProfileInfoV calls GetComputeInstanceProfileInfoVFunc. -func (mock *GpuInstance) GetComputeInstanceProfileInfoV(n1 int, n2 int) nvml.ComputeInstanceProfileInfoHandler { - if mock.GetComputeInstanceProfileInfoVFunc == nil { - panic("GpuInstance.GetComputeInstanceProfileInfoVFunc: method is nil but GpuInstance.GetComputeInstanceProfileInfoV was just called") - } - callInfo := struct { - N1 int - N2 int - }{ - N1: n1, - N2: n2, - } - mock.lockGetComputeInstanceProfileInfoV.Lock() - mock.calls.GetComputeInstanceProfileInfoV = append(mock.calls.GetComputeInstanceProfileInfoV, callInfo) - mock.lockGetComputeInstanceProfileInfoV.Unlock() - return mock.GetComputeInstanceProfileInfoVFunc(n1, n2) -} - -// GetComputeInstanceProfileInfoVCalls gets all the calls that were made to GetComputeInstanceProfileInfoV. -// Check the length with: -// -// len(mockedGpuInstance.GetComputeInstanceProfileInfoVCalls()) -func (mock *GpuInstance) GetComputeInstanceProfileInfoVCalls() []struct { - N1 int - N2 int -} { - var calls []struct { - N1 int - N2 int - } - mock.lockGetComputeInstanceProfileInfoV.RLock() - calls = mock.calls.GetComputeInstanceProfileInfoV - mock.lockGetComputeInstanceProfileInfoV.RUnlock() - return calls -} - -// GetComputeInstanceRemainingCapacity calls GetComputeInstanceRemainingCapacityFunc. -func (mock *GpuInstance) GetComputeInstanceRemainingCapacity(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, nvml.Return) { - if mock.GetComputeInstanceRemainingCapacityFunc == nil { - panic("GpuInstance.GetComputeInstanceRemainingCapacityFunc: method is nil but GpuInstance.GetComputeInstanceRemainingCapacity was just called") - } - callInfo := struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - }{ - ComputeInstanceProfileInfo: computeInstanceProfileInfo, - } - mock.lockGetComputeInstanceRemainingCapacity.Lock() - mock.calls.GetComputeInstanceRemainingCapacity = append(mock.calls.GetComputeInstanceRemainingCapacity, callInfo) - mock.lockGetComputeInstanceRemainingCapacity.Unlock() - return mock.GetComputeInstanceRemainingCapacityFunc(computeInstanceProfileInfo) -} - -// GetComputeInstanceRemainingCapacityCalls gets all the calls that were made to GetComputeInstanceRemainingCapacity. -// Check the length with: -// -// len(mockedGpuInstance.GetComputeInstanceRemainingCapacityCalls()) -func (mock *GpuInstance) GetComputeInstanceRemainingCapacityCalls() []struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo -} { - var calls []struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - mock.lockGetComputeInstanceRemainingCapacity.RLock() - calls = mock.calls.GetComputeInstanceRemainingCapacity - mock.lockGetComputeInstanceRemainingCapacity.RUnlock() - return calls -} - -// GetComputeInstances calls GetComputeInstancesFunc. -func (mock *GpuInstance) GetComputeInstances(computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { - if mock.GetComputeInstancesFunc == nil { - panic("GpuInstance.GetComputeInstancesFunc: method is nil but GpuInstance.GetComputeInstances was just called") - } - callInfo := struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - }{ - ComputeInstanceProfileInfo: computeInstanceProfileInfo, - } - mock.lockGetComputeInstances.Lock() - mock.calls.GetComputeInstances = append(mock.calls.GetComputeInstances, callInfo) - mock.lockGetComputeInstances.Unlock() - return mock.GetComputeInstancesFunc(computeInstanceProfileInfo) -} - -// GetComputeInstancesCalls gets all the calls that were made to GetComputeInstances. -// Check the length with: -// -// len(mockedGpuInstance.GetComputeInstancesCalls()) -func (mock *GpuInstance) GetComputeInstancesCalls() []struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo -} { - var calls []struct { - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - mock.lockGetComputeInstances.RLock() - calls = mock.calls.GetComputeInstances - mock.lockGetComputeInstances.RUnlock() - return calls -} - -// GetCreatableVgpus calls GetCreatableVgpusFunc. -func (mock *GpuInstance) GetCreatableVgpus() (nvml.VgpuTypeIdInfo, nvml.Return) { - if mock.GetCreatableVgpusFunc == nil { - panic("GpuInstance.GetCreatableVgpusFunc: method is nil but GpuInstance.GetCreatableVgpus was just called") - } - callInfo := struct { - }{} - mock.lockGetCreatableVgpus.Lock() - mock.calls.GetCreatableVgpus = append(mock.calls.GetCreatableVgpus, callInfo) - mock.lockGetCreatableVgpus.Unlock() - return mock.GetCreatableVgpusFunc() -} - -// GetCreatableVgpusCalls gets all the calls that were made to GetCreatableVgpus. -// Check the length with: -// -// len(mockedGpuInstance.GetCreatableVgpusCalls()) -func (mock *GpuInstance) GetCreatableVgpusCalls() []struct { -} { - var calls []struct { - } - mock.lockGetCreatableVgpus.RLock() - calls = mock.calls.GetCreatableVgpus - mock.lockGetCreatableVgpus.RUnlock() - return calls -} - -// GetInfo calls GetInfoFunc. -func (mock *GpuInstance) GetInfo() (nvml.GpuInstanceInfo, nvml.Return) { - if mock.GetInfoFunc == nil { - panic("GpuInstance.GetInfoFunc: method is nil but GpuInstance.GetInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetInfo.Lock() - mock.calls.GetInfo = append(mock.calls.GetInfo, callInfo) - mock.lockGetInfo.Unlock() - return mock.GetInfoFunc() -} - -// GetInfoCalls gets all the calls that were made to GetInfo. -// Check the length with: -// -// len(mockedGpuInstance.GetInfoCalls()) -func (mock *GpuInstance) GetInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetInfo.RLock() - calls = mock.calls.GetInfo - mock.lockGetInfo.RUnlock() - return calls -} - -// GetVgpuHeterogeneousMode calls GetVgpuHeterogeneousModeFunc. -func (mock *GpuInstance) GetVgpuHeterogeneousMode() (nvml.VgpuHeterogeneousMode, nvml.Return) { - if mock.GetVgpuHeterogeneousModeFunc == nil { - panic("GpuInstance.GetVgpuHeterogeneousModeFunc: method is nil but GpuInstance.GetVgpuHeterogeneousMode was just called") - } - callInfo := struct { - }{} - mock.lockGetVgpuHeterogeneousMode.Lock() - mock.calls.GetVgpuHeterogeneousMode = append(mock.calls.GetVgpuHeterogeneousMode, callInfo) - mock.lockGetVgpuHeterogeneousMode.Unlock() - return mock.GetVgpuHeterogeneousModeFunc() -} - -// GetVgpuHeterogeneousModeCalls gets all the calls that were made to GetVgpuHeterogeneousMode. -// Check the length with: -// -// len(mockedGpuInstance.GetVgpuHeterogeneousModeCalls()) -func (mock *GpuInstance) GetVgpuHeterogeneousModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVgpuHeterogeneousMode.RLock() - calls = mock.calls.GetVgpuHeterogeneousMode - mock.lockGetVgpuHeterogeneousMode.RUnlock() - return calls -} - -// GetVgpuSchedulerLog calls GetVgpuSchedulerLogFunc. -func (mock *GpuInstance) GetVgpuSchedulerLog() (nvml.VgpuSchedulerLogInfo, nvml.Return) { - if mock.GetVgpuSchedulerLogFunc == nil { - panic("GpuInstance.GetVgpuSchedulerLogFunc: method is nil but GpuInstance.GetVgpuSchedulerLog was just called") - } - callInfo := struct { - }{} - mock.lockGetVgpuSchedulerLog.Lock() - mock.calls.GetVgpuSchedulerLog = append(mock.calls.GetVgpuSchedulerLog, callInfo) - mock.lockGetVgpuSchedulerLog.Unlock() - return mock.GetVgpuSchedulerLogFunc() -} - -// GetVgpuSchedulerLogCalls gets all the calls that were made to GetVgpuSchedulerLog. -// Check the length with: -// -// len(mockedGpuInstance.GetVgpuSchedulerLogCalls()) -func (mock *GpuInstance) GetVgpuSchedulerLogCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVgpuSchedulerLog.RLock() - calls = mock.calls.GetVgpuSchedulerLog - mock.lockGetVgpuSchedulerLog.RUnlock() - return calls -} - -// GetVgpuSchedulerState calls GetVgpuSchedulerStateFunc. -func (mock *GpuInstance) GetVgpuSchedulerState() (nvml.VgpuSchedulerStateInfo, nvml.Return) { - if mock.GetVgpuSchedulerStateFunc == nil { - panic("GpuInstance.GetVgpuSchedulerStateFunc: method is nil but GpuInstance.GetVgpuSchedulerState was just called") - } - callInfo := struct { - }{} - mock.lockGetVgpuSchedulerState.Lock() - mock.calls.GetVgpuSchedulerState = append(mock.calls.GetVgpuSchedulerState, callInfo) - mock.lockGetVgpuSchedulerState.Unlock() - return mock.GetVgpuSchedulerStateFunc() -} - -// GetVgpuSchedulerStateCalls gets all the calls that were made to GetVgpuSchedulerState. -// Check the length with: -// -// len(mockedGpuInstance.GetVgpuSchedulerStateCalls()) -func (mock *GpuInstance) GetVgpuSchedulerStateCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVgpuSchedulerState.RLock() - calls = mock.calls.GetVgpuSchedulerState - mock.lockGetVgpuSchedulerState.RUnlock() - return calls -} - -// GetVgpuTypeCreatablePlacements calls GetVgpuTypeCreatablePlacementsFunc. -func (mock *GpuInstance) GetVgpuTypeCreatablePlacements() (nvml.VgpuCreatablePlacementInfo, nvml.Return) { - if mock.GetVgpuTypeCreatablePlacementsFunc == nil { - panic("GpuInstance.GetVgpuTypeCreatablePlacementsFunc: method is nil but GpuInstance.GetVgpuTypeCreatablePlacements was just called") - } - callInfo := struct { - }{} - mock.lockGetVgpuTypeCreatablePlacements.Lock() - mock.calls.GetVgpuTypeCreatablePlacements = append(mock.calls.GetVgpuTypeCreatablePlacements, callInfo) - mock.lockGetVgpuTypeCreatablePlacements.Unlock() - return mock.GetVgpuTypeCreatablePlacementsFunc() -} - -// GetVgpuTypeCreatablePlacementsCalls gets all the calls that were made to GetVgpuTypeCreatablePlacements. -// Check the length with: -// -// len(mockedGpuInstance.GetVgpuTypeCreatablePlacementsCalls()) -func (mock *GpuInstance) GetVgpuTypeCreatablePlacementsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVgpuTypeCreatablePlacements.RLock() - calls = mock.calls.GetVgpuTypeCreatablePlacements - mock.lockGetVgpuTypeCreatablePlacements.RUnlock() - return calls -} - -// SetVgpuHeterogeneousMode calls SetVgpuHeterogeneousModeFunc. -func (mock *GpuInstance) SetVgpuHeterogeneousMode(vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return { - if mock.SetVgpuHeterogeneousModeFunc == nil { - panic("GpuInstance.SetVgpuHeterogeneousModeFunc: method is nil but GpuInstance.SetVgpuHeterogeneousMode was just called") - } - callInfo := struct { - VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode - }{ - VgpuHeterogeneousMode: vgpuHeterogeneousMode, - } - mock.lockSetVgpuHeterogeneousMode.Lock() - mock.calls.SetVgpuHeterogeneousMode = append(mock.calls.SetVgpuHeterogeneousMode, callInfo) - mock.lockSetVgpuHeterogeneousMode.Unlock() - return mock.SetVgpuHeterogeneousModeFunc(vgpuHeterogeneousMode) -} - -// SetVgpuHeterogeneousModeCalls gets all the calls that were made to SetVgpuHeterogeneousMode. -// Check the length with: -// -// len(mockedGpuInstance.SetVgpuHeterogeneousModeCalls()) -func (mock *GpuInstance) SetVgpuHeterogeneousModeCalls() []struct { - VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode -} { - var calls []struct { - VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode - } - mock.lockSetVgpuHeterogeneousMode.RLock() - calls = mock.calls.SetVgpuHeterogeneousMode - mock.lockSetVgpuHeterogeneousMode.RUnlock() - return calls -} - -// SetVgpuSchedulerState calls SetVgpuSchedulerStateFunc. -func (mock *GpuInstance) SetVgpuSchedulerState(vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return { - if mock.SetVgpuSchedulerStateFunc == nil { - panic("GpuInstance.SetVgpuSchedulerStateFunc: method is nil but GpuInstance.SetVgpuSchedulerState was just called") - } - callInfo := struct { - VgpuSchedulerState *nvml.VgpuSchedulerState - }{ - VgpuSchedulerState: vgpuSchedulerState, - } - mock.lockSetVgpuSchedulerState.Lock() - mock.calls.SetVgpuSchedulerState = append(mock.calls.SetVgpuSchedulerState, callInfo) - mock.lockSetVgpuSchedulerState.Unlock() - return mock.SetVgpuSchedulerStateFunc(vgpuSchedulerState) -} - -// SetVgpuSchedulerStateCalls gets all the calls that were made to SetVgpuSchedulerState. -// Check the length with: -// -// len(mockedGpuInstance.SetVgpuSchedulerStateCalls()) -func (mock *GpuInstance) SetVgpuSchedulerStateCalls() []struct { - VgpuSchedulerState *nvml.VgpuSchedulerState -} { - var calls []struct { - VgpuSchedulerState *nvml.VgpuSchedulerState - } - mock.lockSetVgpuSchedulerState.RLock() - calls = mock.calls.SetVgpuSchedulerState - mock.lockSetVgpuSchedulerState.RUnlock() - return calls -} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go deleted file mode 100644 index dc25ce219..000000000 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/interface.go +++ /dev/null @@ -1,17317 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "github.com/NVIDIA/go-nvml/pkg/nvml" - "sync" -) - -// Ensure, that Interface does implement nvml.Interface. -// If this is not the case, regenerate this file with moq. -var _ nvml.Interface = &Interface{} - -// Interface is a mock implementation of nvml.Interface. -// -// func TestSomethingThatUsesInterface(t *testing.T) { -// -// // make and configure a mocked nvml.Interface -// mockedInterface := &Interface{ -// ComputeInstanceDestroyFunc: func(computeInstance nvml.ComputeInstance) nvml.Return { -// panic("mock out the ComputeInstanceDestroy method") -// }, -// ComputeInstanceGetInfoFunc: func(computeInstance nvml.ComputeInstance) (nvml.ComputeInstanceInfo, nvml.Return) { -// panic("mock out the ComputeInstanceGetInfo method") -// }, -// DeviceClearAccountingPidsFunc: func(device nvml.Device) nvml.Return { -// panic("mock out the DeviceClearAccountingPids method") -// }, -// DeviceClearCpuAffinityFunc: func(device nvml.Device) nvml.Return { -// panic("mock out the DeviceClearCpuAffinity method") -// }, -// DeviceClearEccErrorCountsFunc: func(device nvml.Device, eccCounterType nvml.EccCounterType) nvml.Return { -// panic("mock out the DeviceClearEccErrorCounts method") -// }, -// DeviceClearFieldValuesFunc: func(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return { -// panic("mock out the DeviceClearFieldValues method") -// }, -// DeviceCreateGpuInstanceFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { -// panic("mock out the DeviceCreateGpuInstance method") -// }, -// DeviceCreateGpuInstanceWithPlacementFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { -// panic("mock out the DeviceCreateGpuInstanceWithPlacement method") -// }, -// DeviceDiscoverGpusFunc: func() (nvml.PciInfo, nvml.Return) { -// panic("mock out the DeviceDiscoverGpus method") -// }, -// DeviceFreezeNvLinkUtilizationCounterFunc: func(device nvml.Device, n1 int, n2 int, enableState nvml.EnableState) nvml.Return { -// panic("mock out the DeviceFreezeNvLinkUtilizationCounter method") -// }, -// DeviceGetAPIRestrictionFunc: func(device nvml.Device, restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) { -// panic("mock out the DeviceGetAPIRestriction method") -// }, -// DeviceGetAccountingBufferSizeFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetAccountingBufferSize method") -// }, -// DeviceGetAccountingModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { -// panic("mock out the DeviceGetAccountingMode method") -// }, -// DeviceGetAccountingPidsFunc: func(device nvml.Device) ([]int, nvml.Return) { -// panic("mock out the DeviceGetAccountingPids method") -// }, -// DeviceGetAccountingStatsFunc: func(device nvml.Device, v uint32) (nvml.AccountingStats, nvml.Return) { -// panic("mock out the DeviceGetAccountingStats method") -// }, -// DeviceGetActiveVgpusFunc: func(device nvml.Device) ([]nvml.VgpuInstance, nvml.Return) { -// panic("mock out the DeviceGetActiveVgpus method") -// }, -// DeviceGetAdaptiveClockInfoStatusFunc: func(device nvml.Device) (uint32, nvml.Return) { -// panic("mock out the DeviceGetAdaptiveClockInfoStatus method") -// }, -// DeviceGetAddressingModeFunc: func(device nvml.Device) (nvml.DeviceAddressingMode, nvml.Return) { -// panic("mock out the DeviceGetAddressingMode method") -// }, -// DeviceGetApplicationsClockFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { -// panic("mock out the DeviceGetApplicationsClock method") -// }, -// DeviceGetArchitectureFunc: func(device nvml.Device) (nvml.DeviceArchitecture, nvml.Return) { -// panic("mock out the DeviceGetArchitecture method") -// }, -// DeviceGetAttributesFunc: func(device nvml.Device) (nvml.DeviceAttributes, nvml.Return) { -// panic("mock out the DeviceGetAttributes method") -// }, -// DeviceGetAutoBoostedClocksEnabledFunc: func(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) { -// panic("mock out the DeviceGetAutoBoostedClocksEnabled method") -// }, -// DeviceGetBAR1MemoryInfoFunc: func(device nvml.Device) (nvml.BAR1Memory, nvml.Return) { -// panic("mock out the DeviceGetBAR1MemoryInfo method") -// }, -// DeviceGetBoardIdFunc: func(device nvml.Device) (uint32, nvml.Return) { -// panic("mock out the DeviceGetBoardId method") -// }, -// DeviceGetBoardPartNumberFunc: func(device nvml.Device) (string, nvml.Return) { -// panic("mock out the DeviceGetBoardPartNumber method") -// }, -// DeviceGetBrandFunc: func(device nvml.Device) (nvml.BrandType, nvml.Return) { -// panic("mock out the DeviceGetBrand method") -// }, -// DeviceGetBridgeChipInfoFunc: func(device nvml.Device) (nvml.BridgeChipHierarchy, nvml.Return) { -// panic("mock out the DeviceGetBridgeChipInfo method") -// }, -// DeviceGetBusTypeFunc: func(device nvml.Device) (nvml.BusType, nvml.Return) { -// panic("mock out the DeviceGetBusType method") -// }, -// DeviceGetC2cModeInfoVFunc: func(device nvml.Device) nvml.C2cModeInfoHandler { -// panic("mock out the DeviceGetC2cModeInfoV method") -// }, -// DeviceGetCapabilitiesFunc: func(device nvml.Device) (nvml.DeviceCapabilities, nvml.Return) { -// panic("mock out the DeviceGetCapabilities method") -// }, -// DeviceGetClkMonStatusFunc: func(device nvml.Device) (nvml.ClkMonStatus, nvml.Return) { -// panic("mock out the DeviceGetClkMonStatus method") -// }, -// DeviceGetClockFunc: func(device nvml.Device, clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) { -// panic("mock out the DeviceGetClock method") -// }, -// DeviceGetClockInfoFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { -// panic("mock out the DeviceGetClockInfo method") -// }, -// DeviceGetClockOffsetsFunc: func(device nvml.Device) (nvml.ClockOffset, nvml.Return) { -// panic("mock out the DeviceGetClockOffsets method") -// }, -// DeviceGetComputeInstanceIdFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetComputeInstanceId method") -// }, -// DeviceGetComputeModeFunc: func(device nvml.Device) (nvml.ComputeMode, nvml.Return) { -// panic("mock out the DeviceGetComputeMode method") -// }, -// DeviceGetComputeRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { -// panic("mock out the DeviceGetComputeRunningProcesses method") -// }, -// DeviceGetConfComputeGpuAttestationReportFunc: func(device nvml.Device, confComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport) nvml.Return { -// panic("mock out the DeviceGetConfComputeGpuAttestationReport method") -// }, -// DeviceGetConfComputeGpuCertificateFunc: func(device nvml.Device) (nvml.ConfComputeGpuCertificate, nvml.Return) { -// panic("mock out the DeviceGetConfComputeGpuCertificate method") -// }, -// DeviceGetConfComputeMemSizeInfoFunc: func(device nvml.Device) (nvml.ConfComputeMemSizeInfo, nvml.Return) { -// panic("mock out the DeviceGetConfComputeMemSizeInfo method") -// }, -// DeviceGetConfComputeProtectedMemoryUsageFunc: func(device nvml.Device) (nvml.Memory, nvml.Return) { -// panic("mock out the DeviceGetConfComputeProtectedMemoryUsage method") -// }, -// DeviceGetCoolerInfoFunc: func(device nvml.Device) (nvml.CoolerInfo, nvml.Return) { -// panic("mock out the DeviceGetCoolerInfo method") -// }, -// DeviceGetCountFunc: func() (int, nvml.Return) { -// panic("mock out the DeviceGetCount method") -// }, -// DeviceGetCpuAffinityFunc: func(device nvml.Device, n int) ([]uint, nvml.Return) { -// panic("mock out the DeviceGetCpuAffinity method") -// }, -// DeviceGetCpuAffinityWithinScopeFunc: func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { -// panic("mock out the DeviceGetCpuAffinityWithinScope method") -// }, -// DeviceGetCreatableVgpusFunc: func(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) { -// panic("mock out the DeviceGetCreatableVgpus method") -// }, -// DeviceGetCudaComputeCapabilityFunc: func(device nvml.Device) (int, int, nvml.Return) { -// panic("mock out the DeviceGetCudaComputeCapability method") -// }, -// DeviceGetCurrPcieLinkGenerationFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetCurrPcieLinkGeneration method") -// }, -// DeviceGetCurrPcieLinkWidthFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetCurrPcieLinkWidth method") -// }, -// DeviceGetCurrentClockFreqsFunc: func(device nvml.Device) (nvml.DeviceCurrentClockFreqs, nvml.Return) { -// panic("mock out the DeviceGetCurrentClockFreqs method") -// }, -// DeviceGetCurrentClocksEventReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { -// panic("mock out the DeviceGetCurrentClocksEventReasons method") -// }, -// DeviceGetCurrentClocksThrottleReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { -// panic("mock out the DeviceGetCurrentClocksThrottleReasons method") -// }, -// DeviceGetDecoderUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { -// panic("mock out the DeviceGetDecoderUtilization method") -// }, -// DeviceGetDefaultApplicationsClockFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { -// panic("mock out the DeviceGetDefaultApplicationsClock method") -// }, -// DeviceGetDefaultEccModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { -// panic("mock out the DeviceGetDefaultEccMode method") -// }, -// DeviceGetDetailedEccErrorsFunc: func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) { -// panic("mock out the DeviceGetDetailedEccErrors method") -// }, -// DeviceGetDeviceHandleFromMigDeviceHandleFunc: func(device nvml.Device) (nvml.Device, nvml.Return) { -// panic("mock out the DeviceGetDeviceHandleFromMigDeviceHandle method") -// }, -// DeviceGetDisplayActiveFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { -// panic("mock out the DeviceGetDisplayActive method") -// }, -// DeviceGetDisplayModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { -// panic("mock out the DeviceGetDisplayMode method") -// }, -// DeviceGetDramEncryptionModeFunc: func(device nvml.Device) (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) { -// panic("mock out the DeviceGetDramEncryptionMode method") -// }, -// DeviceGetDriverModelFunc: func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { -// panic("mock out the DeviceGetDriverModel method") -// }, -// DeviceGetDriverModel_v2Func: func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { -// panic("mock out the DeviceGetDriverModel_v2 method") -// }, -// DeviceGetDynamicPstatesInfoFunc: func(device nvml.Device) (nvml.GpuDynamicPstatesInfo, nvml.Return) { -// panic("mock out the DeviceGetDynamicPstatesInfo method") -// }, -// DeviceGetEccModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) { -// panic("mock out the DeviceGetEccMode method") -// }, -// DeviceGetEncoderCapacityFunc: func(device nvml.Device, encoderType nvml.EncoderType) (int, nvml.Return) { -// panic("mock out the DeviceGetEncoderCapacity method") -// }, -// DeviceGetEncoderSessionsFunc: func(device nvml.Device) ([]nvml.EncoderSessionInfo, nvml.Return) { -// panic("mock out the DeviceGetEncoderSessions method") -// }, -// DeviceGetEncoderStatsFunc: func(device nvml.Device) (int, uint32, uint32, nvml.Return) { -// panic("mock out the DeviceGetEncoderStats method") -// }, -// DeviceGetEncoderUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { -// panic("mock out the DeviceGetEncoderUtilization method") -// }, -// DeviceGetEnforcedPowerLimitFunc: func(device nvml.Device) (uint32, nvml.Return) { -// panic("mock out the DeviceGetEnforcedPowerLimit method") -// }, -// DeviceGetFBCSessionsFunc: func(device nvml.Device) ([]nvml.FBCSessionInfo, nvml.Return) { -// panic("mock out the DeviceGetFBCSessions method") -// }, -// DeviceGetFBCStatsFunc: func(device nvml.Device) (nvml.FBCStats, nvml.Return) { -// panic("mock out the DeviceGetFBCStats method") -// }, -// DeviceGetFanControlPolicy_v2Func: func(device nvml.Device, n int) (nvml.FanControlPolicy, nvml.Return) { -// panic("mock out the DeviceGetFanControlPolicy_v2 method") -// }, -// DeviceGetFanSpeedFunc: func(device nvml.Device) (uint32, nvml.Return) { -// panic("mock out the DeviceGetFanSpeed method") -// }, -// DeviceGetFanSpeedRPMFunc: func(device nvml.Device) (nvml.FanSpeedInfo, nvml.Return) { -// panic("mock out the DeviceGetFanSpeedRPM method") -// }, -// DeviceGetFanSpeed_v2Func: func(device nvml.Device, n int) (uint32, nvml.Return) { -// panic("mock out the DeviceGetFanSpeed_v2 method") -// }, -// DeviceGetFieldValuesFunc: func(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return { -// panic("mock out the DeviceGetFieldValues method") -// }, -// DeviceGetGpcClkMinMaxVfOffsetFunc: func(device nvml.Device) (int, int, nvml.Return) { -// panic("mock out the DeviceGetGpcClkMinMaxVfOffset method") -// }, -// DeviceGetGpcClkVfOffsetFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetGpcClkVfOffset method") -// }, -// DeviceGetGpuFabricInfoFunc: func(device nvml.Device) (nvml.GpuFabricInfo, nvml.Return) { -// 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) { -// panic("mock out the DeviceGetGpuInstanceById method") -// }, -// DeviceGetGpuInstanceIdFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetGpuInstanceId method") -// }, -// DeviceGetGpuInstancePossiblePlacementsFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { -// panic("mock out the DeviceGetGpuInstancePossiblePlacements method") -// }, -// DeviceGetGpuInstanceProfileInfoFunc: func(device nvml.Device, n int) (nvml.GpuInstanceProfileInfo, nvml.Return) { -// panic("mock out the DeviceGetGpuInstanceProfileInfo method") -// }, -// DeviceGetGpuInstanceProfileInfoByIdVFunc: func(device nvml.Device, n int) nvml.GpuInstanceProfileInfoByIdHandler { -// panic("mock out the DeviceGetGpuInstanceProfileInfoByIdV 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) { -// panic("mock out the DeviceGetGpuInstanceRemainingCapacity method") -// }, -// DeviceGetGpuInstancesFunc: func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { -// panic("mock out the DeviceGetGpuInstances method") -// }, -// DeviceGetGpuMaxPcieLinkGenerationFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetGpuMaxPcieLinkGeneration method") -// }, -// DeviceGetGpuOperationModeFunc: func(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { -// panic("mock out the DeviceGetGpuOperationMode method") -// }, -// DeviceGetGraphicsRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { -// panic("mock out the DeviceGetGraphicsRunningProcesses method") -// }, -// DeviceGetGridLicensableFeaturesFunc: func(device nvml.Device) (nvml.GridLicensableFeatures, nvml.Return) { -// panic("mock out the DeviceGetGridLicensableFeatures method") -// }, -// DeviceGetGspFirmwareModeFunc: func(device nvml.Device) (bool, bool, nvml.Return) { -// panic("mock out the DeviceGetGspFirmwareMode method") -// }, -// DeviceGetGspFirmwareVersionFunc: func(device nvml.Device) (string, nvml.Return) { -// panic("mock out the DeviceGetGspFirmwareVersion method") -// }, -// DeviceGetHandleByIndexFunc: func(n int) (nvml.Device, nvml.Return) { -// panic("mock out the DeviceGetHandleByIndex method") -// }, -// DeviceGetHandleByPciBusIdFunc: func(s string) (nvml.Device, nvml.Return) { -// panic("mock out the DeviceGetHandleByPciBusId method") -// }, -// DeviceGetHandleBySerialFunc: func(s string) (nvml.Device, nvml.Return) { -// panic("mock out the DeviceGetHandleBySerial method") -// }, -// DeviceGetHandleByUUIDFunc: func(s string) (nvml.Device, nvml.Return) { -// panic("mock out the DeviceGetHandleByUUID method") -// }, -// DeviceGetHandleByUUIDVFunc: func(uUID *nvml.UUID) (nvml.Device, nvml.Return) { -// panic("mock out the DeviceGetHandleByUUIDV method") -// }, -// DeviceGetHostVgpuModeFunc: func(device nvml.Device) (nvml.HostVgpuMode, nvml.Return) { -// panic("mock out the DeviceGetHostVgpuMode method") -// }, -// DeviceGetIndexFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetIndex method") -// }, -// DeviceGetInforomConfigurationChecksumFunc: func(device nvml.Device) (uint32, nvml.Return) { -// panic("mock out the DeviceGetInforomConfigurationChecksum method") -// }, -// DeviceGetInforomImageVersionFunc: func(device nvml.Device) (string, nvml.Return) { -// panic("mock out the DeviceGetInforomImageVersion method") -// }, -// DeviceGetInforomVersionFunc: func(device nvml.Device, inforomObject nvml.InforomObject) (string, nvml.Return) { -// panic("mock out the DeviceGetInforomVersion method") -// }, -// DeviceGetIrqNumFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetIrqNum method") -// }, -// DeviceGetJpgUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { -// panic("mock out the DeviceGetJpgUtilization method") -// }, -// DeviceGetLastBBXFlushTimeFunc: func(device nvml.Device) (uint64, uint, nvml.Return) { -// panic("mock out the DeviceGetLastBBXFlushTime method") -// }, -// DeviceGetMPSComputeRunningProcessesFunc: func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { -// panic("mock out the DeviceGetMPSComputeRunningProcesses method") -// }, -// DeviceGetMarginTemperatureFunc: func(device nvml.Device) (nvml.MarginTemperature, nvml.Return) { -// panic("mock out the DeviceGetMarginTemperature method") -// }, -// DeviceGetMaxClockInfoFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { -// panic("mock out the DeviceGetMaxClockInfo method") -// }, -// DeviceGetMaxCustomerBoostClockFunc: func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { -// panic("mock out the DeviceGetMaxCustomerBoostClock method") -// }, -// DeviceGetMaxMigDeviceCountFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetMaxMigDeviceCount method") -// }, -// DeviceGetMaxPcieLinkGenerationFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetMaxPcieLinkGeneration method") -// }, -// DeviceGetMaxPcieLinkWidthFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetMaxPcieLinkWidth method") -// }, -// DeviceGetMemClkMinMaxVfOffsetFunc: func(device nvml.Device) (int, int, nvml.Return) { -// panic("mock out the DeviceGetMemClkMinMaxVfOffset method") -// }, -// DeviceGetMemClkVfOffsetFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetMemClkVfOffset method") -// }, -// DeviceGetMemoryAffinityFunc: func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { -// panic("mock out the DeviceGetMemoryAffinity method") -// }, -// DeviceGetMemoryBusWidthFunc: func(device nvml.Device) (uint32, nvml.Return) { -// panic("mock out the DeviceGetMemoryBusWidth method") -// }, -// DeviceGetMemoryErrorCounterFunc: func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) { -// panic("mock out the DeviceGetMemoryErrorCounter method") -// }, -// DeviceGetMemoryInfoFunc: func(device nvml.Device) (nvml.Memory, nvml.Return) { -// panic("mock out the DeviceGetMemoryInfo method") -// }, -// DeviceGetMemoryInfo_v2Func: func(device nvml.Device) (nvml.Memory_v2, nvml.Return) { -// panic("mock out the DeviceGetMemoryInfo_v2 method") -// }, -// DeviceGetMigDeviceHandleByIndexFunc: func(device nvml.Device, n int) (nvml.Device, nvml.Return) { -// panic("mock out the DeviceGetMigDeviceHandleByIndex method") -// }, -// DeviceGetMigModeFunc: func(device nvml.Device) (int, int, nvml.Return) { -// panic("mock out the DeviceGetMigMode method") -// }, -// DeviceGetMinMaxClockOfPStateFunc: func(device nvml.Device, clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) { -// panic("mock out the DeviceGetMinMaxClockOfPState method") -// }, -// DeviceGetMinMaxFanSpeedFunc: func(device nvml.Device) (int, int, nvml.Return) { -// panic("mock out the DeviceGetMinMaxFanSpeed method") -// }, -// DeviceGetMinorNumberFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetMinorNumber method") -// }, -// DeviceGetModuleIdFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetModuleId method") -// }, -// DeviceGetMultiGpuBoardFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetMultiGpuBoard method") -// }, -// DeviceGetNameFunc: func(device nvml.Device) (string, nvml.Return) { -// panic("mock out the DeviceGetName method") -// }, -// DeviceGetNumFansFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetNumFans method") -// }, -// DeviceGetNumGpuCoresFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetNumGpuCores method") -// }, -// DeviceGetNumaNodeIdFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetNumaNodeId method") -// }, -// DeviceGetNvLinkCapabilityFunc: func(device nvml.Device, n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) { -// panic("mock out the DeviceGetNvLinkCapability method") -// }, -// DeviceGetNvLinkErrorCounterFunc: func(device nvml.Device, n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) { -// panic("mock out the DeviceGetNvLinkErrorCounter method") -// }, -// DeviceGetNvLinkInfoFunc: func(device nvml.Device) nvml.NvLinkInfoHandler { -// panic("mock out the DeviceGetNvLinkInfo method") -// }, -// DeviceGetNvLinkRemoteDeviceTypeFunc: func(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, nvml.Return) { -// panic("mock out the DeviceGetNvLinkRemoteDeviceType method") -// }, -// DeviceGetNvLinkRemotePciInfoFunc: func(device nvml.Device, n int) (nvml.PciInfo, nvml.Return) { -// panic("mock out the DeviceGetNvLinkRemotePciInfo method") -// }, -// DeviceGetNvLinkStateFunc: func(device nvml.Device, n int) (nvml.EnableState, nvml.Return) { -// panic("mock out the DeviceGetNvLinkState method") -// }, -// DeviceGetNvLinkUtilizationControlFunc: func(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { -// panic("mock out the DeviceGetNvLinkUtilizationControl method") -// }, -// DeviceGetNvLinkUtilizationCounterFunc: func(device nvml.Device, n1 int, n2 int) (uint64, uint64, nvml.Return) { -// panic("mock out the DeviceGetNvLinkUtilizationCounter method") -// }, -// DeviceGetNvLinkVersionFunc: func(device nvml.Device, n int) (uint32, nvml.Return) { -// panic("mock out the DeviceGetNvLinkVersion method") -// }, -// DeviceGetNvlinkBwModeFunc: func(device nvml.Device) (nvml.NvlinkGetBwMode, nvml.Return) { -// panic("mock out the DeviceGetNvlinkBwMode method") -// }, -// DeviceGetNvlinkSupportedBwModesFunc: func(device nvml.Device) (nvml.NvlinkSupportedBwModes, nvml.Return) { -// panic("mock out the DeviceGetNvlinkSupportedBwModes method") -// }, -// DeviceGetOfaUtilizationFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { -// panic("mock out the DeviceGetOfaUtilization method") -// }, -// DeviceGetP2PStatusFunc: func(device1 nvml.Device, device2 nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) { -// panic("mock out the DeviceGetP2PStatus method") -// }, -// DeviceGetPciInfoFunc: func(device nvml.Device) (nvml.PciInfo, nvml.Return) { -// panic("mock out the DeviceGetPciInfo method") -// }, -// DeviceGetPciInfoExtFunc: func(device nvml.Device) (nvml.PciInfoExt, nvml.Return) { -// panic("mock out the DeviceGetPciInfoExt method") -// }, -// DeviceGetPcieLinkMaxSpeedFunc: func(device nvml.Device) (uint32, nvml.Return) { -// panic("mock out the DeviceGetPcieLinkMaxSpeed method") -// }, -// DeviceGetPcieReplayCounterFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetPcieReplayCounter method") -// }, -// DeviceGetPcieSpeedFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceGetPcieSpeed method") -// }, -// DeviceGetPcieThroughputFunc: func(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { -// panic("mock out the DeviceGetPcieThroughput method") -// }, -// DeviceGetPdiFunc: func(device nvml.Device) (nvml.Pdi, nvml.Return) { -// panic("mock out the DeviceGetPdi method") -// }, -// DeviceGetPerformanceModesFunc: func(device nvml.Device) (nvml.DevicePerfModes, nvml.Return) { -// panic("mock out the DeviceGetPerformanceModes method") -// }, -// DeviceGetPerformanceStateFunc: func(device nvml.Device) (nvml.Pstates, nvml.Return) { -// panic("mock out the DeviceGetPerformanceState method") -// }, -// DeviceGetPersistenceModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { -// panic("mock out the DeviceGetPersistenceMode method") -// }, -// DeviceGetPgpuMetadataStringFunc: func(device nvml.Device) (string, nvml.Return) { -// panic("mock out the DeviceGetPgpuMetadataString method") -// }, -// DeviceGetPlatformInfoFunc: func(device nvml.Device) (nvml.PlatformInfo, nvml.Return) { -// panic("mock out the DeviceGetPlatformInfo method") -// }, -// DeviceGetPowerManagementDefaultLimitFunc: func(device nvml.Device) (uint32, nvml.Return) { -// panic("mock out the DeviceGetPowerManagementDefaultLimit method") -// }, -// DeviceGetPowerManagementLimitFunc: func(device nvml.Device) (uint32, nvml.Return) { -// panic("mock out the DeviceGetPowerManagementLimit method") -// }, -// DeviceGetPowerManagementLimitConstraintsFunc: func(device nvml.Device) (uint32, uint32, nvml.Return) { -// panic("mock out the DeviceGetPowerManagementLimitConstraints method") -// }, -// DeviceGetPowerManagementModeFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { -// panic("mock out the DeviceGetPowerManagementMode method") -// }, -// DeviceGetPowerMizerMode_v1Func: func(device nvml.Device) (nvml.DevicePowerMizerModes_v1, nvml.Return) { -// panic("mock out the DeviceGetPowerMizerMode_v1 method") -// }, -// DeviceGetPowerSourceFunc: func(device nvml.Device) (nvml.PowerSource, nvml.Return) { -// panic("mock out the DeviceGetPowerSource method") -// }, -// DeviceGetPowerStateFunc: func(device nvml.Device) (nvml.Pstates, nvml.Return) { -// panic("mock out the DeviceGetPowerState method") -// }, -// DeviceGetPowerUsageFunc: func(device nvml.Device) (uint32, nvml.Return) { -// panic("mock out the DeviceGetPowerUsage method") -// }, -// DeviceGetProcessUtilizationFunc: func(device nvml.Device, v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) { -// panic("mock out the DeviceGetProcessUtilization method") -// }, -// DeviceGetProcessesUtilizationInfoFunc: func(device nvml.Device) (nvml.ProcessesUtilizationInfo, nvml.Return) { -// panic("mock out the DeviceGetProcessesUtilizationInfo method") -// }, -// DeviceGetRemappedRowsFunc: func(device nvml.Device) (int, int, bool, bool, nvml.Return) { -// panic("mock out the DeviceGetRemappedRows method") -// }, -// DeviceGetRepairStatusFunc: func(device nvml.Device) (nvml.RepairStatus, nvml.Return) { -// panic("mock out the DeviceGetRepairStatus method") -// }, -// DeviceGetRetiredPagesFunc: func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) { -// panic("mock out the DeviceGetRetiredPages method") -// }, -// DeviceGetRetiredPagesPendingStatusFunc: func(device nvml.Device) (nvml.EnableState, nvml.Return) { -// panic("mock out the DeviceGetRetiredPagesPendingStatus method") -// }, -// DeviceGetRetiredPages_v2Func: func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) { -// panic("mock out the DeviceGetRetiredPages_v2 method") -// }, -// DeviceGetRowRemapperHistogramFunc: func(device nvml.Device) (nvml.RowRemapperHistogramValues, nvml.Return) { -// panic("mock out the DeviceGetRowRemapperHistogram method") -// }, -// DeviceGetRunningProcessDetailListFunc: func(device nvml.Device) (nvml.ProcessDetailList, nvml.Return) { -// panic("mock out the DeviceGetRunningProcessDetailList method") -// }, -// DeviceGetSamplesFunc: func(device nvml.Device, samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) { -// panic("mock out the DeviceGetSamples method") -// }, -// DeviceGetSerialFunc: func(device nvml.Device) (string, nvml.Return) { -// panic("mock out the DeviceGetSerial method") -// }, -// DeviceGetSramEccErrorStatusFunc: func(device nvml.Device) (nvml.EccSramErrorStatus, nvml.Return) { -// panic("mock out the DeviceGetSramEccErrorStatus method") -// }, -// DeviceGetSramUniqueUncorrectedEccErrorCountsFunc: func(device nvml.Device, eccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts) nvml.Return { -// panic("mock out the DeviceGetSramUniqueUncorrectedEccErrorCounts method") -// }, -// DeviceGetSupportedClocksEventReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { -// panic("mock out the DeviceGetSupportedClocksEventReasons method") -// }, -// DeviceGetSupportedClocksThrottleReasonsFunc: func(device nvml.Device) (uint64, nvml.Return) { -// panic("mock out the DeviceGetSupportedClocksThrottleReasons method") -// }, -// DeviceGetSupportedEventTypesFunc: func(device nvml.Device) (uint64, nvml.Return) { -// panic("mock out the DeviceGetSupportedEventTypes method") -// }, -// DeviceGetSupportedGraphicsClocksFunc: func(device nvml.Device, n int) (int, uint32, nvml.Return) { -// panic("mock out the DeviceGetSupportedGraphicsClocks method") -// }, -// DeviceGetSupportedMemoryClocksFunc: func(device nvml.Device) (int, uint32, nvml.Return) { -// panic("mock out the DeviceGetSupportedMemoryClocks method") -// }, -// DeviceGetSupportedPerformanceStatesFunc: func(device nvml.Device) ([]nvml.Pstates, nvml.Return) { -// panic("mock out the DeviceGetSupportedPerformanceStates method") -// }, -// DeviceGetSupportedVgpusFunc: func(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) { -// panic("mock out the DeviceGetSupportedVgpus method") -// }, -// DeviceGetTargetFanSpeedFunc: func(device nvml.Device, n int) (int, nvml.Return) { -// panic("mock out the DeviceGetTargetFanSpeed method") -// }, -// DeviceGetTemperatureFunc: func(device nvml.Device, temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) { -// panic("mock out the DeviceGetTemperature method") -// }, -// DeviceGetTemperatureThresholdFunc: func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { -// panic("mock out the DeviceGetTemperatureThreshold method") -// }, -// DeviceGetTemperatureVFunc: func(device nvml.Device) nvml.TemperatureHandler { -// panic("mock out the DeviceGetTemperatureV method") -// }, -// DeviceGetThermalSettingsFunc: func(device nvml.Device, v uint32) (nvml.GpuThermalSettings, nvml.Return) { -// panic("mock out the DeviceGetThermalSettings method") -// }, -// DeviceGetTopologyCommonAncestorFunc: func(device1 nvml.Device, device2 nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) { -// panic("mock out the DeviceGetTopologyCommonAncestor method") -// }, -// DeviceGetTopologyNearestGpusFunc: func(device nvml.Device, gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) { -// panic("mock out the DeviceGetTopologyNearestGpus method") -// }, -// DeviceGetTotalEccErrorsFunc: func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) { -// panic("mock out the DeviceGetTotalEccErrors method") -// }, -// DeviceGetTotalEnergyConsumptionFunc: func(device nvml.Device) (uint64, nvml.Return) { -// panic("mock out the DeviceGetTotalEnergyConsumption method") -// }, -// DeviceGetUUIDFunc: func(device nvml.Device) (string, nvml.Return) { -// panic("mock out the DeviceGetUUID method") -// }, -// DeviceGetUtilizationRatesFunc: func(device nvml.Device) (nvml.Utilization, nvml.Return) { -// panic("mock out the DeviceGetUtilizationRates method") -// }, -// DeviceGetVbiosVersionFunc: func(device nvml.Device) (string, nvml.Return) { -// panic("mock out the DeviceGetVbiosVersion method") -// }, -// DeviceGetVgpuCapabilitiesFunc: func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) { -// panic("mock out the DeviceGetVgpuCapabilities method") -// }, -// DeviceGetVgpuHeterogeneousModeFunc: func(device nvml.Device) (nvml.VgpuHeterogeneousMode, nvml.Return) { -// panic("mock out the DeviceGetVgpuHeterogeneousMode method") -// }, -// DeviceGetVgpuInstancesUtilizationInfoFunc: func(device nvml.Device) (nvml.VgpuInstancesUtilizationInfo, nvml.Return) { -// panic("mock out the DeviceGetVgpuInstancesUtilizationInfo method") -// }, -// DeviceGetVgpuMetadataFunc: func(device nvml.Device) (nvml.VgpuPgpuMetadata, nvml.Return) { -// panic("mock out the DeviceGetVgpuMetadata method") -// }, -// DeviceGetVgpuProcessUtilizationFunc: func(device nvml.Device, v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) { -// panic("mock out the DeviceGetVgpuProcessUtilization method") -// }, -// DeviceGetVgpuProcessesUtilizationInfoFunc: func(device nvml.Device) (nvml.VgpuProcessesUtilizationInfo, nvml.Return) { -// panic("mock out the DeviceGetVgpuProcessesUtilizationInfo method") -// }, -// DeviceGetVgpuSchedulerCapabilitiesFunc: func(device nvml.Device) (nvml.VgpuSchedulerCapabilities, nvml.Return) { -// panic("mock out the DeviceGetVgpuSchedulerCapabilities method") -// }, -// DeviceGetVgpuSchedulerLogFunc: func(device nvml.Device) (nvml.VgpuSchedulerLog, nvml.Return) { -// panic("mock out the DeviceGetVgpuSchedulerLog method") -// }, -// DeviceGetVgpuSchedulerStateFunc: func(device nvml.Device) (nvml.VgpuSchedulerGetState, nvml.Return) { -// panic("mock out the DeviceGetVgpuSchedulerState method") -// }, -// DeviceGetVgpuTypeCreatablePlacementsFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { -// panic("mock out the DeviceGetVgpuTypeCreatablePlacements method") -// }, -// DeviceGetVgpuTypeSupportedPlacementsFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { -// panic("mock out the DeviceGetVgpuTypeSupportedPlacements method") -// }, -// DeviceGetVgpuUtilizationFunc: func(device nvml.Device, v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) { -// panic("mock out the DeviceGetVgpuUtilization method") -// }, -// DeviceGetViolationStatusFunc: func(device nvml.Device, perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) { -// panic("mock out the DeviceGetViolationStatus method") -// }, -// DeviceGetVirtualizationModeFunc: func(device nvml.Device) (nvml.GpuVirtualizationMode, nvml.Return) { -// panic("mock out the DeviceGetVirtualizationMode method") -// }, -// DeviceIsMigDeviceHandleFunc: func(device nvml.Device) (bool, nvml.Return) { -// panic("mock out the DeviceIsMigDeviceHandle method") -// }, -// DeviceModifyDrainStateFunc: func(pciInfo *nvml.PciInfo, enableState nvml.EnableState) nvml.Return { -// panic("mock out the DeviceModifyDrainState method") -// }, -// DeviceOnSameBoardFunc: func(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) { -// panic("mock out the DeviceOnSameBoard method") -// }, -// DevicePowerSmoothingActivatePresetProfileFunc: func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { -// panic("mock out the DevicePowerSmoothingActivatePresetProfile method") -// }, -// DevicePowerSmoothingSetStateFunc: func(device nvml.Device, powerSmoothingState *nvml.PowerSmoothingState) nvml.Return { -// panic("mock out the DevicePowerSmoothingSetState method") -// }, -// DevicePowerSmoothingUpdatePresetProfileParamFunc: func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { -// panic("mock out the DevicePowerSmoothingUpdatePresetProfileParam method") -// }, -// DeviceQueryDrainStateFunc: func(pciInfo *nvml.PciInfo) (nvml.EnableState, nvml.Return) { -// panic("mock out the DeviceQueryDrainState method") -// }, -// DeviceReadWritePRM_v1Func: func(device nvml.Device, pRMTLV_v1 *nvml.PRMTLV_v1) nvml.Return { -// panic("mock out the DeviceReadWritePRM_v1 method") -// }, -// DeviceRegisterEventsFunc: func(device nvml.Device, v uint64, eventSet nvml.EventSet) nvml.Return { -// panic("mock out the DeviceRegisterEvents method") -// }, -// DeviceRemoveGpuFunc: func(pciInfo *nvml.PciInfo) nvml.Return { -// panic("mock out the DeviceRemoveGpu method") -// }, -// DeviceRemoveGpu_v2Func: func(pciInfo *nvml.PciInfo, detachGpuState nvml.DetachGpuState, pcieLinkState nvml.PcieLinkState) nvml.Return { -// panic("mock out the DeviceRemoveGpu_v2 method") -// }, -// DeviceResetApplicationsClocksFunc: func(device nvml.Device) nvml.Return { -// panic("mock out the DeviceResetApplicationsClocks method") -// }, -// DeviceResetGpuLockedClocksFunc: func(device nvml.Device) nvml.Return { -// panic("mock out the DeviceResetGpuLockedClocks method") -// }, -// DeviceResetMemoryLockedClocksFunc: func(device nvml.Device) nvml.Return { -// panic("mock out the DeviceResetMemoryLockedClocks method") -// }, -// DeviceResetNvLinkErrorCountersFunc: func(device nvml.Device, n int) nvml.Return { -// panic("mock out the DeviceResetNvLinkErrorCounters method") -// }, -// DeviceResetNvLinkUtilizationCounterFunc: func(device nvml.Device, n1 int, n2 int) nvml.Return { -// panic("mock out the DeviceResetNvLinkUtilizationCounter method") -// }, -// DeviceSetAPIRestrictionFunc: func(device nvml.Device, restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return { -// panic("mock out the DeviceSetAPIRestriction method") -// }, -// DeviceSetAccountingModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { -// panic("mock out the DeviceSetAccountingMode method") -// }, -// DeviceSetApplicationsClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { -// panic("mock out the DeviceSetApplicationsClocks method") -// }, -// DeviceSetAutoBoostedClocksEnabledFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { -// panic("mock out the DeviceSetAutoBoostedClocksEnabled method") -// }, -// DeviceSetClockOffsetsFunc: func(device nvml.Device, clockOffset nvml.ClockOffset) nvml.Return { -// panic("mock out the DeviceSetClockOffsets method") -// }, -// DeviceSetComputeModeFunc: func(device nvml.Device, computeMode nvml.ComputeMode) nvml.Return { -// panic("mock out the DeviceSetComputeMode method") -// }, -// DeviceSetConfComputeUnprotectedMemSizeFunc: func(device nvml.Device, v uint64) nvml.Return { -// panic("mock out the DeviceSetConfComputeUnprotectedMemSize method") -// }, -// DeviceSetCpuAffinityFunc: func(device nvml.Device) nvml.Return { -// panic("mock out the DeviceSetCpuAffinity method") -// }, -// DeviceSetDefaultAutoBoostedClocksEnabledFunc: func(device nvml.Device, enableState nvml.EnableState, v uint32) nvml.Return { -// panic("mock out the DeviceSetDefaultAutoBoostedClocksEnabled method") -// }, -// DeviceSetDefaultFanSpeed_v2Func: func(device nvml.Device, n int) nvml.Return { -// panic("mock out the DeviceSetDefaultFanSpeed_v2 method") -// }, -// DeviceSetDramEncryptionModeFunc: func(device nvml.Device, dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return { -// panic("mock out the DeviceSetDramEncryptionMode method") -// }, -// DeviceSetDriverModelFunc: func(device nvml.Device, driverModel nvml.DriverModel, v uint32) nvml.Return { -// panic("mock out the DeviceSetDriverModel method") -// }, -// DeviceSetEccModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { -// panic("mock out the DeviceSetEccMode method") -// }, -// DeviceSetFanControlPolicyFunc: func(device nvml.Device, n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return { -// panic("mock out the DeviceSetFanControlPolicy method") -// }, -// DeviceSetFanSpeed_v2Func: func(device nvml.Device, n1 int, n2 int) nvml.Return { -// panic("mock out the DeviceSetFanSpeed_v2 method") -// }, -// DeviceSetGpcClkVfOffsetFunc: func(device nvml.Device, n int) nvml.Return { -// panic("mock out the DeviceSetGpcClkVfOffset method") -// }, -// DeviceSetGpuLockedClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { -// panic("mock out the DeviceSetGpuLockedClocks method") -// }, -// DeviceSetGpuOperationModeFunc: func(device nvml.Device, gpuOperationMode nvml.GpuOperationMode) nvml.Return { -// panic("mock out the DeviceSetGpuOperationMode method") -// }, -// DeviceSetMemClkVfOffsetFunc: func(device nvml.Device, n int) nvml.Return { -// panic("mock out the DeviceSetMemClkVfOffset method") -// }, -// DeviceSetMemoryLockedClocksFunc: func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { -// panic("mock out the DeviceSetMemoryLockedClocks method") -// }, -// DeviceSetMigModeFunc: func(device nvml.Device, n int) (nvml.Return, nvml.Return) { -// panic("mock out the DeviceSetMigMode method") -// }, -// DeviceSetNvLinkDeviceLowPowerThresholdFunc: func(device nvml.Device, nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return { -// panic("mock out the DeviceSetNvLinkDeviceLowPowerThreshold method") -// }, -// DeviceSetNvLinkUtilizationControlFunc: func(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { -// panic("mock out the DeviceSetNvLinkUtilizationControl method") -// }, -// DeviceSetNvlinkBwModeFunc: func(device nvml.Device, nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { -// panic("mock out the DeviceSetNvlinkBwMode method") -// }, -// DeviceSetPersistenceModeFunc: func(device nvml.Device, enableState nvml.EnableState) nvml.Return { -// panic("mock out the DeviceSetPersistenceMode method") -// }, -// DeviceSetPowerManagementLimitFunc: func(device nvml.Device, v uint32) nvml.Return { -// panic("mock out the DeviceSetPowerManagementLimit method") -// }, -// DeviceSetPowerManagementLimit_v2Func: func(device nvml.Device, powerValue_v2 *nvml.PowerValue_v2) nvml.Return { -// panic("mock out the DeviceSetPowerManagementLimit_v2 method") -// }, -// DeviceSetTemperatureThresholdFunc: func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return { -// panic("mock out the DeviceSetTemperatureThreshold method") -// }, -// DeviceSetVgpuCapabilitiesFunc: func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return { -// panic("mock out the DeviceSetVgpuCapabilities method") -// }, -// DeviceSetVgpuHeterogeneousModeFunc: func(device nvml.Device, vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return { -// panic("mock out the DeviceSetVgpuHeterogeneousMode method") -// }, -// DeviceSetVgpuSchedulerStateFunc: func(device nvml.Device, vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return { -// panic("mock out the DeviceSetVgpuSchedulerState method") -// }, -// DeviceSetVirtualizationModeFunc: func(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { -// panic("mock out the DeviceSetVirtualizationMode method") -// }, -// DeviceValidateInforomFunc: func(device nvml.Device) nvml.Return { -// panic("mock out the DeviceValidateInforom method") -// }, -// DeviceWorkloadPowerProfileClearRequestedProfilesFunc: func(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { -// panic("mock out the DeviceWorkloadPowerProfileClearRequestedProfiles method") -// }, -// DeviceWorkloadPowerProfileGetCurrentProfilesFunc: func(device nvml.Device) (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) { -// panic("mock out the DeviceWorkloadPowerProfileGetCurrentProfiles method") -// }, -// DeviceWorkloadPowerProfileGetProfilesInfoFunc: func(device nvml.Device) (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) { -// panic("mock out the DeviceWorkloadPowerProfileGetProfilesInfo method") -// }, -// DeviceWorkloadPowerProfileSetRequestedProfilesFunc: func(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { -// panic("mock out the DeviceWorkloadPowerProfileSetRequestedProfiles method") -// }, -// ErrorStringFunc: func(returnMoqParam nvml.Return) string { -// panic("mock out the ErrorString method") -// }, -// EventSetCreateFunc: func() (nvml.EventSet, nvml.Return) { -// panic("mock out the EventSetCreate method") -// }, -// EventSetFreeFunc: func(eventSet nvml.EventSet) nvml.Return { -// panic("mock out the EventSetFree method") -// }, -// EventSetWaitFunc: func(eventSet nvml.EventSet, v uint32) (nvml.EventData, nvml.Return) { -// panic("mock out the EventSetWait method") -// }, -// ExtensionsFunc: func() nvml.ExtendedInterface { -// panic("mock out the Extensions method") -// }, -// GetExcludedDeviceCountFunc: func() (int, nvml.Return) { -// panic("mock out the GetExcludedDeviceCount method") -// }, -// GetExcludedDeviceInfoByIndexFunc: func(n int) (nvml.ExcludedDeviceInfo, nvml.Return) { -// panic("mock out the GetExcludedDeviceInfoByIndex method") -// }, -// GetVgpuCompatibilityFunc: func(vgpuMetadata *nvml.VgpuMetadata, vgpuPgpuMetadata *nvml.VgpuPgpuMetadata) (nvml.VgpuPgpuCompatibility, nvml.Return) { -// panic("mock out the GetVgpuCompatibility method") -// }, -// GetVgpuDriverCapabilitiesFunc: func(vgpuDriverCapability nvml.VgpuDriverCapability) (bool, nvml.Return) { -// panic("mock out the GetVgpuDriverCapabilities method") -// }, -// GetVgpuVersionFunc: func() (nvml.VgpuVersion, nvml.VgpuVersion, nvml.Return) { -// panic("mock out the GetVgpuVersion method") -// }, -// GpmMetricsGetFunc: func(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.Return { -// 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 { -// panic("mock out the GpmMigSampleGet method") -// }, -// GpmQueryDeviceSupportFunc: func(device nvml.Device) (nvml.GpmSupport, nvml.Return) { -// 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) { -// panic("mock out the GpmQueryIfStreamingEnabled method") -// }, -// GpmSampleAllocFunc: func() (nvml.GpmSample, nvml.Return) { -// panic("mock out the GpmSampleAlloc method") -// }, -// GpmSampleFreeFunc: func(gpmSample nvml.GpmSample) nvml.Return { -// panic("mock out the GpmSampleFree method") -// }, -// GpmSampleGetFunc: func(device nvml.Device, gpmSample nvml.GpmSample) nvml.Return { -// panic("mock out the GpmSampleGet method") -// }, -// GpmSetStreamingEnabledFunc: func(device nvml.Device, v uint32) nvml.Return { -// panic("mock out the GpmSetStreamingEnabled method") -// }, -// GpuInstanceCreateComputeInstanceFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { -// panic("mock out the GpuInstanceCreateComputeInstance method") -// }, -// GpuInstanceCreateComputeInstanceWithPlacementFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) { -// panic("mock out the GpuInstanceCreateComputeInstanceWithPlacement method") -// }, -// GpuInstanceDestroyFunc: func(gpuInstance nvml.GpuInstance) nvml.Return { -// panic("mock out the GpuInstanceDestroy method") -// }, -// GpuInstanceGetActiveVgpusFunc: func(gpuInstance nvml.GpuInstance) (nvml.ActiveVgpuInstanceInfo, nvml.Return) { -// panic("mock out the GpuInstanceGetActiveVgpus method") -// }, -// GpuInstanceGetComputeInstanceByIdFunc: func(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, nvml.Return) { -// panic("mock out the GpuInstanceGetComputeInstanceById method") -// }, -// GpuInstanceGetComputeInstancePossiblePlacementsFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { -// panic("mock out the GpuInstanceGetComputeInstancePossiblePlacements method") -// }, -// GpuInstanceGetComputeInstanceProfileInfoFunc: func(gpuInstance nvml.GpuInstance, n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { -// 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) { -// panic("mock out the GpuInstanceGetComputeInstanceRemainingCapacity method") -// }, -// GpuInstanceGetComputeInstancesFunc: func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { -// panic("mock out the GpuInstanceGetComputeInstances method") -// }, -// GpuInstanceGetCreatableVgpusFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuTypeIdInfo, nvml.Return) { -// panic("mock out the GpuInstanceGetCreatableVgpus method") -// }, -// GpuInstanceGetInfoFunc: func(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, nvml.Return) { -// panic("mock out the GpuInstanceGetInfo method") -// }, -// GpuInstanceGetVgpuHeterogeneousModeFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuHeterogeneousMode, nvml.Return) { -// panic("mock out the GpuInstanceGetVgpuHeterogeneousMode method") -// }, -// GpuInstanceGetVgpuSchedulerLogFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerLogInfo, nvml.Return) { -// panic("mock out the GpuInstanceGetVgpuSchedulerLog method") -// }, -// GpuInstanceGetVgpuSchedulerStateFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerStateInfo, nvml.Return) { -// panic("mock out the GpuInstanceGetVgpuSchedulerState method") -// }, -// GpuInstanceGetVgpuTypeCreatablePlacementsFunc: func(gpuInstance nvml.GpuInstance) (nvml.VgpuCreatablePlacementInfo, nvml.Return) { -// panic("mock out the GpuInstanceGetVgpuTypeCreatablePlacements method") -// }, -// GpuInstanceSetVgpuHeterogeneousModeFunc: func(gpuInstance nvml.GpuInstance, vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return { -// panic("mock out the GpuInstanceSetVgpuHeterogeneousMode method") -// }, -// GpuInstanceSetVgpuSchedulerStateFunc: func(gpuInstance nvml.GpuInstance, vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return { -// panic("mock out the GpuInstanceSetVgpuSchedulerState method") -// }, -// InitFunc: func() nvml.Return { -// panic("mock out the Init method") -// }, -// InitWithFlagsFunc: func(v uint32) nvml.Return { -// panic("mock out the InitWithFlags method") -// }, -// SetVgpuVersionFunc: func(vgpuVersion *nvml.VgpuVersion) nvml.Return { -// panic("mock out the SetVgpuVersion method") -// }, -// ShutdownFunc: func() nvml.Return { -// panic("mock out the Shutdown method") -// }, -// SystemEventSetCreateFunc: func(systemEventSetCreateRequest *nvml.SystemEventSetCreateRequest) nvml.Return { -// panic("mock out the SystemEventSetCreate method") -// }, -// SystemEventSetFreeFunc: func(systemEventSetFreeRequest *nvml.SystemEventSetFreeRequest) nvml.Return { -// panic("mock out the SystemEventSetFree method") -// }, -// SystemEventSetWaitFunc: func(systemEventSetWaitRequest *nvml.SystemEventSetWaitRequest) nvml.Return { -// panic("mock out the SystemEventSetWait method") -// }, -// SystemGetConfComputeCapabilitiesFunc: func() (nvml.ConfComputeSystemCaps, nvml.Return) { -// panic("mock out the SystemGetConfComputeCapabilities method") -// }, -// SystemGetConfComputeGpusReadyStateFunc: func() (uint32, nvml.Return) { -// panic("mock out the SystemGetConfComputeGpusReadyState method") -// }, -// SystemGetConfComputeKeyRotationThresholdInfoFunc: func() (nvml.ConfComputeGetKeyRotationThresholdInfo, nvml.Return) { -// panic("mock out the SystemGetConfComputeKeyRotationThresholdInfo method") -// }, -// SystemGetConfComputeSettingsFunc: func() (nvml.SystemConfComputeSettings, nvml.Return) { -// panic("mock out the SystemGetConfComputeSettings method") -// }, -// SystemGetConfComputeStateFunc: func() (nvml.ConfComputeSystemState, nvml.Return) { -// panic("mock out the SystemGetConfComputeState method") -// }, -// SystemGetCudaDriverVersionFunc: func() (int, nvml.Return) { -// panic("mock out the SystemGetCudaDriverVersion method") -// }, -// SystemGetCudaDriverVersion_v2Func: func() (int, nvml.Return) { -// panic("mock out the SystemGetCudaDriverVersion_v2 method") -// }, -// SystemGetDriverBranchFunc: func() (nvml.SystemDriverBranchInfo, nvml.Return) { -// panic("mock out the SystemGetDriverBranch method") -// }, -// SystemGetDriverVersionFunc: func() (string, nvml.Return) { -// panic("mock out the SystemGetDriverVersion method") -// }, -// SystemGetHicVersionFunc: func() ([]nvml.HwbcEntry, nvml.Return) { -// panic("mock out the SystemGetHicVersion method") -// }, -// SystemGetNVMLVersionFunc: func() (string, nvml.Return) { -// panic("mock out the SystemGetNVMLVersion method") -// }, -// SystemGetNvlinkBwModeFunc: func() (uint32, nvml.Return) { -// panic("mock out the SystemGetNvlinkBwMode method") -// }, -// SystemGetProcessNameFunc: func(n int) (string, nvml.Return) { -// panic("mock out the SystemGetProcessName method") -// }, -// SystemGetTopologyGpuSetFunc: func(n int) ([]nvml.Device, nvml.Return) { -// panic("mock out the SystemGetTopologyGpuSet method") -// }, -// SystemRegisterEventsFunc: func(systemRegisterEventRequest *nvml.SystemRegisterEventRequest) nvml.Return { -// panic("mock out the SystemRegisterEvents method") -// }, -// SystemSetConfComputeGpusReadyStateFunc: func(v uint32) nvml.Return { -// panic("mock out the SystemSetConfComputeGpusReadyState method") -// }, -// SystemSetConfComputeKeyRotationThresholdInfoFunc: func(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) nvml.Return { -// panic("mock out the SystemSetConfComputeKeyRotationThresholdInfo method") -// }, -// SystemSetNvlinkBwModeFunc: func(v uint32) nvml.Return { -// panic("mock out the SystemSetNvlinkBwMode method") -// }, -// UnitGetCountFunc: func() (int, nvml.Return) { -// panic("mock out the UnitGetCount method") -// }, -// UnitGetDevicesFunc: func(unit nvml.Unit) ([]nvml.Device, nvml.Return) { -// panic("mock out the UnitGetDevices method") -// }, -// UnitGetFanSpeedInfoFunc: func(unit nvml.Unit) (nvml.UnitFanSpeeds, nvml.Return) { -// panic("mock out the UnitGetFanSpeedInfo method") -// }, -// UnitGetHandleByIndexFunc: func(n int) (nvml.Unit, nvml.Return) { -// panic("mock out the UnitGetHandleByIndex method") -// }, -// UnitGetLedStateFunc: func(unit nvml.Unit) (nvml.LedState, nvml.Return) { -// panic("mock out the UnitGetLedState method") -// }, -// UnitGetPsuInfoFunc: func(unit nvml.Unit) (nvml.PSUInfo, nvml.Return) { -// panic("mock out the UnitGetPsuInfo method") -// }, -// UnitGetTemperatureFunc: func(unit nvml.Unit, n int) (uint32, nvml.Return) { -// panic("mock out the UnitGetTemperature method") -// }, -// UnitGetUnitInfoFunc: func(unit nvml.Unit) (nvml.UnitInfo, nvml.Return) { -// panic("mock out the UnitGetUnitInfo method") -// }, -// UnitSetLedStateFunc: func(unit nvml.Unit, ledColor nvml.LedColor) nvml.Return { -// panic("mock out the UnitSetLedState method") -// }, -// VgpuInstanceClearAccountingPidsFunc: func(vgpuInstance nvml.VgpuInstance) nvml.Return { -// panic("mock out the VgpuInstanceClearAccountingPids method") -// }, -// VgpuInstanceGetAccountingModeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) { -// panic("mock out the VgpuInstanceGetAccountingMode method") -// }, -// VgpuInstanceGetAccountingPidsFunc: func(vgpuInstance nvml.VgpuInstance) ([]int, nvml.Return) { -// panic("mock out the VgpuInstanceGetAccountingPids method") -// }, -// VgpuInstanceGetAccountingStatsFunc: func(vgpuInstance nvml.VgpuInstance, n int) (nvml.AccountingStats, nvml.Return) { -// panic("mock out the VgpuInstanceGetAccountingStats method") -// }, -// VgpuInstanceGetEccModeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) { -// panic("mock out the VgpuInstanceGetEccMode method") -// }, -// VgpuInstanceGetEncoderCapacityFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { -// panic("mock out the VgpuInstanceGetEncoderCapacity method") -// }, -// VgpuInstanceGetEncoderSessionsFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.EncoderSessionInfo, nvml.Return) { -// panic("mock out the VgpuInstanceGetEncoderSessions method") -// }, -// VgpuInstanceGetEncoderStatsFunc: func(vgpuInstance nvml.VgpuInstance) (int, uint32, uint32, nvml.Return) { -// panic("mock out the VgpuInstanceGetEncoderStats method") -// }, -// VgpuInstanceGetFBCSessionsFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.FBCSessionInfo, nvml.Return) { -// panic("mock out the VgpuInstanceGetFBCSessions method") -// }, -// VgpuInstanceGetFBCStatsFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.FBCStats, nvml.Return) { -// panic("mock out the VgpuInstanceGetFBCStats method") -// }, -// VgpuInstanceGetFbUsageFunc: func(vgpuInstance nvml.VgpuInstance) (uint64, nvml.Return) { -// panic("mock out the VgpuInstanceGetFbUsage method") -// }, -// VgpuInstanceGetFrameRateLimitFunc: func(vgpuInstance nvml.VgpuInstance) (uint32, nvml.Return) { -// panic("mock out the VgpuInstanceGetFrameRateLimit method") -// }, -// VgpuInstanceGetGpuInstanceIdFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { -// panic("mock out the VgpuInstanceGetGpuInstanceId method") -// }, -// VgpuInstanceGetGpuPciIdFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { -// panic("mock out the VgpuInstanceGetGpuPciId method") -// }, -// VgpuInstanceGetLicenseInfoFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuLicenseInfo, nvml.Return) { -// panic("mock out the VgpuInstanceGetLicenseInfo method") -// }, -// VgpuInstanceGetLicenseStatusFunc: func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { -// panic("mock out the VgpuInstanceGetLicenseStatus method") -// }, -// VgpuInstanceGetMdevUUIDFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { -// panic("mock out the VgpuInstanceGetMdevUUID method") -// }, -// VgpuInstanceGetMetadataFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, nvml.Return) { -// panic("mock out the VgpuInstanceGetMetadata method") -// }, -// VgpuInstanceGetRuntimeStateSizeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuRuntimeState, nvml.Return) { -// panic("mock out the VgpuInstanceGetRuntimeStateSize method") -// }, -// VgpuInstanceGetTypeFunc: func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, nvml.Return) { -// panic("mock out the VgpuInstanceGetType method") -// }, -// VgpuInstanceGetUUIDFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { -// panic("mock out the VgpuInstanceGetUUID method") -// }, -// VgpuInstanceGetVmDriverVersionFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { -// panic("mock out the VgpuInstanceGetVmDriverVersion method") -// }, -// VgpuInstanceGetVmIDFunc: func(vgpuInstance nvml.VgpuInstance) (string, nvml.VgpuVmIdType, nvml.Return) { -// panic("mock out the VgpuInstanceGetVmID method") -// }, -// VgpuInstanceSetEncoderCapacityFunc: func(vgpuInstance nvml.VgpuInstance, n int) nvml.Return { -// panic("mock out the VgpuInstanceSetEncoderCapacity method") -// }, -// VgpuTypeGetBAR1InfoFunc: func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuTypeBar1Info, nvml.Return) { -// panic("mock out the VgpuTypeGetBAR1Info method") -// }, -// VgpuTypeGetCapabilitiesFunc: func(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { -// panic("mock out the VgpuTypeGetCapabilities method") -// }, -// VgpuTypeGetClassFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { -// panic("mock out the VgpuTypeGetClass method") -// }, -// VgpuTypeGetDeviceIDFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint64, uint64, nvml.Return) { -// panic("mock out the VgpuTypeGetDeviceID method") -// }, -// VgpuTypeGetFrameRateLimitFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { -// panic("mock out the VgpuTypeGetFrameRateLimit method") -// }, -// VgpuTypeGetFramebufferSizeFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint64, nvml.Return) { -// panic("mock out the VgpuTypeGetFramebufferSize method") -// }, -// VgpuTypeGetGpuInstanceProfileIdFunc: func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { -// panic("mock out the VgpuTypeGetGpuInstanceProfileId method") -// }, -// VgpuTypeGetLicenseFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { -// panic("mock out the VgpuTypeGetLicense method") -// }, -// VgpuTypeGetMaxInstancesFunc: func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { -// panic("mock out the VgpuTypeGetMaxInstances method") -// }, -// VgpuTypeGetMaxInstancesPerGpuInstanceFunc: func(vgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance) nvml.Return { -// panic("mock out the VgpuTypeGetMaxInstancesPerGpuInstance method") -// }, -// VgpuTypeGetMaxInstancesPerVmFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { -// panic("mock out the VgpuTypeGetMaxInstancesPerVm method") -// }, -// VgpuTypeGetNameFunc: func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { -// panic("mock out the VgpuTypeGetName method") -// }, -// VgpuTypeGetNumDisplayHeadsFunc: func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { -// panic("mock out the VgpuTypeGetNumDisplayHeads method") -// }, -// VgpuTypeGetResolutionFunc: func(vgpuTypeId nvml.VgpuTypeId, n int) (uint32, uint32, nvml.Return) { -// panic("mock out the VgpuTypeGetResolution method") -// }, -// } -// -// // use mockedInterface in code that requires nvml.Interface -// // and then make assertions. -// -// } -type Interface struct { - // ComputeInstanceDestroyFunc mocks the ComputeInstanceDestroy method. - ComputeInstanceDestroyFunc func(computeInstance nvml.ComputeInstance) nvml.Return - - // ComputeInstanceGetInfoFunc mocks the ComputeInstanceGetInfo method. - ComputeInstanceGetInfoFunc func(computeInstance nvml.ComputeInstance) (nvml.ComputeInstanceInfo, nvml.Return) - - // DeviceClearAccountingPidsFunc mocks the DeviceClearAccountingPids method. - DeviceClearAccountingPidsFunc func(device nvml.Device) nvml.Return - - // DeviceClearCpuAffinityFunc mocks the DeviceClearCpuAffinity method. - DeviceClearCpuAffinityFunc func(device nvml.Device) nvml.Return - - // DeviceClearEccErrorCountsFunc mocks the DeviceClearEccErrorCounts method. - DeviceClearEccErrorCountsFunc func(device nvml.Device, eccCounterType nvml.EccCounterType) nvml.Return - - // DeviceClearFieldValuesFunc mocks the DeviceClearFieldValues method. - DeviceClearFieldValuesFunc func(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return - - // DeviceCreateGpuInstanceFunc mocks the DeviceCreateGpuInstance method. - DeviceCreateGpuInstanceFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) - - // DeviceCreateGpuInstanceWithPlacementFunc mocks the DeviceCreateGpuInstanceWithPlacement method. - DeviceCreateGpuInstanceWithPlacementFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) - - // DeviceDiscoverGpusFunc mocks the DeviceDiscoverGpus method. - DeviceDiscoverGpusFunc func() (nvml.PciInfo, nvml.Return) - - // DeviceFreezeNvLinkUtilizationCounterFunc mocks the DeviceFreezeNvLinkUtilizationCounter method. - DeviceFreezeNvLinkUtilizationCounterFunc func(device nvml.Device, n1 int, n2 int, enableState nvml.EnableState) nvml.Return - - // DeviceGetAPIRestrictionFunc mocks the DeviceGetAPIRestriction method. - DeviceGetAPIRestrictionFunc func(device nvml.Device, restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) - - // DeviceGetAccountingBufferSizeFunc mocks the DeviceGetAccountingBufferSize method. - DeviceGetAccountingBufferSizeFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetAccountingModeFunc mocks the DeviceGetAccountingMode method. - DeviceGetAccountingModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) - - // DeviceGetAccountingPidsFunc mocks the DeviceGetAccountingPids method. - DeviceGetAccountingPidsFunc func(device nvml.Device) ([]int, nvml.Return) - - // DeviceGetAccountingStatsFunc mocks the DeviceGetAccountingStats method. - DeviceGetAccountingStatsFunc func(device nvml.Device, v uint32) (nvml.AccountingStats, nvml.Return) - - // DeviceGetActiveVgpusFunc mocks the DeviceGetActiveVgpus method. - DeviceGetActiveVgpusFunc func(device nvml.Device) ([]nvml.VgpuInstance, nvml.Return) - - // DeviceGetAdaptiveClockInfoStatusFunc mocks the DeviceGetAdaptiveClockInfoStatus method. - DeviceGetAdaptiveClockInfoStatusFunc func(device nvml.Device) (uint32, nvml.Return) - - // DeviceGetAddressingModeFunc mocks the DeviceGetAddressingMode method. - DeviceGetAddressingModeFunc func(device nvml.Device) (nvml.DeviceAddressingMode, nvml.Return) - - // DeviceGetApplicationsClockFunc mocks the DeviceGetApplicationsClock method. - DeviceGetApplicationsClockFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) - - // DeviceGetArchitectureFunc mocks the DeviceGetArchitecture method. - DeviceGetArchitectureFunc func(device nvml.Device) (nvml.DeviceArchitecture, nvml.Return) - - // DeviceGetAttributesFunc mocks the DeviceGetAttributes method. - DeviceGetAttributesFunc func(device nvml.Device) (nvml.DeviceAttributes, nvml.Return) - - // DeviceGetAutoBoostedClocksEnabledFunc mocks the DeviceGetAutoBoostedClocksEnabled method. - DeviceGetAutoBoostedClocksEnabledFunc func(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) - - // DeviceGetBAR1MemoryInfoFunc mocks the DeviceGetBAR1MemoryInfo method. - DeviceGetBAR1MemoryInfoFunc func(device nvml.Device) (nvml.BAR1Memory, nvml.Return) - - // DeviceGetBoardIdFunc mocks the DeviceGetBoardId method. - DeviceGetBoardIdFunc func(device nvml.Device) (uint32, nvml.Return) - - // DeviceGetBoardPartNumberFunc mocks the DeviceGetBoardPartNumber method. - DeviceGetBoardPartNumberFunc func(device nvml.Device) (string, nvml.Return) - - // DeviceGetBrandFunc mocks the DeviceGetBrand method. - DeviceGetBrandFunc func(device nvml.Device) (nvml.BrandType, nvml.Return) - - // DeviceGetBridgeChipInfoFunc mocks the DeviceGetBridgeChipInfo method. - DeviceGetBridgeChipInfoFunc func(device nvml.Device) (nvml.BridgeChipHierarchy, nvml.Return) - - // DeviceGetBusTypeFunc mocks the DeviceGetBusType method. - DeviceGetBusTypeFunc func(device nvml.Device) (nvml.BusType, nvml.Return) - - // DeviceGetC2cModeInfoVFunc mocks the DeviceGetC2cModeInfoV method. - DeviceGetC2cModeInfoVFunc func(device nvml.Device) nvml.C2cModeInfoHandler - - // DeviceGetCapabilitiesFunc mocks the DeviceGetCapabilities method. - DeviceGetCapabilitiesFunc func(device nvml.Device) (nvml.DeviceCapabilities, nvml.Return) - - // DeviceGetClkMonStatusFunc mocks the DeviceGetClkMonStatus method. - DeviceGetClkMonStatusFunc func(device nvml.Device) (nvml.ClkMonStatus, nvml.Return) - - // DeviceGetClockFunc mocks the DeviceGetClock method. - DeviceGetClockFunc func(device nvml.Device, clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) - - // DeviceGetClockInfoFunc mocks the DeviceGetClockInfo method. - DeviceGetClockInfoFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) - - // DeviceGetClockOffsetsFunc mocks the DeviceGetClockOffsets method. - DeviceGetClockOffsetsFunc func(device nvml.Device) (nvml.ClockOffset, nvml.Return) - - // DeviceGetComputeInstanceIdFunc mocks the DeviceGetComputeInstanceId method. - DeviceGetComputeInstanceIdFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetComputeModeFunc mocks the DeviceGetComputeMode method. - DeviceGetComputeModeFunc func(device nvml.Device) (nvml.ComputeMode, nvml.Return) - - // DeviceGetComputeRunningProcessesFunc mocks the DeviceGetComputeRunningProcesses method. - DeviceGetComputeRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) - - // DeviceGetConfComputeGpuAttestationReportFunc mocks the DeviceGetConfComputeGpuAttestationReport method. - DeviceGetConfComputeGpuAttestationReportFunc func(device nvml.Device, confComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport) nvml.Return - - // DeviceGetConfComputeGpuCertificateFunc mocks the DeviceGetConfComputeGpuCertificate method. - DeviceGetConfComputeGpuCertificateFunc func(device nvml.Device) (nvml.ConfComputeGpuCertificate, nvml.Return) - - // DeviceGetConfComputeMemSizeInfoFunc mocks the DeviceGetConfComputeMemSizeInfo method. - DeviceGetConfComputeMemSizeInfoFunc func(device nvml.Device) (nvml.ConfComputeMemSizeInfo, nvml.Return) - - // DeviceGetConfComputeProtectedMemoryUsageFunc mocks the DeviceGetConfComputeProtectedMemoryUsage method. - DeviceGetConfComputeProtectedMemoryUsageFunc func(device nvml.Device) (nvml.Memory, nvml.Return) - - // DeviceGetCoolerInfoFunc mocks the DeviceGetCoolerInfo method. - DeviceGetCoolerInfoFunc func(device nvml.Device) (nvml.CoolerInfo, nvml.Return) - - // DeviceGetCountFunc mocks the DeviceGetCount method. - DeviceGetCountFunc func() (int, nvml.Return) - - // DeviceGetCpuAffinityFunc mocks the DeviceGetCpuAffinity method. - DeviceGetCpuAffinityFunc func(device nvml.Device, n int) ([]uint, nvml.Return) - - // DeviceGetCpuAffinityWithinScopeFunc mocks the DeviceGetCpuAffinityWithinScope method. - DeviceGetCpuAffinityWithinScopeFunc func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) - - // DeviceGetCreatableVgpusFunc mocks the DeviceGetCreatableVgpus method. - DeviceGetCreatableVgpusFunc func(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) - - // DeviceGetCudaComputeCapabilityFunc mocks the DeviceGetCudaComputeCapability method. - DeviceGetCudaComputeCapabilityFunc func(device nvml.Device) (int, int, nvml.Return) - - // DeviceGetCurrPcieLinkGenerationFunc mocks the DeviceGetCurrPcieLinkGeneration method. - DeviceGetCurrPcieLinkGenerationFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetCurrPcieLinkWidthFunc mocks the DeviceGetCurrPcieLinkWidth method. - DeviceGetCurrPcieLinkWidthFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetCurrentClockFreqsFunc mocks the DeviceGetCurrentClockFreqs method. - DeviceGetCurrentClockFreqsFunc func(device nvml.Device) (nvml.DeviceCurrentClockFreqs, nvml.Return) - - // DeviceGetCurrentClocksEventReasonsFunc mocks the DeviceGetCurrentClocksEventReasons method. - DeviceGetCurrentClocksEventReasonsFunc func(device nvml.Device) (uint64, nvml.Return) - - // DeviceGetCurrentClocksThrottleReasonsFunc mocks the DeviceGetCurrentClocksThrottleReasons method. - DeviceGetCurrentClocksThrottleReasonsFunc func(device nvml.Device) (uint64, nvml.Return) - - // DeviceGetDecoderUtilizationFunc mocks the DeviceGetDecoderUtilization method. - DeviceGetDecoderUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) - - // DeviceGetDefaultApplicationsClockFunc mocks the DeviceGetDefaultApplicationsClock method. - DeviceGetDefaultApplicationsClockFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) - - // DeviceGetDefaultEccModeFunc mocks the DeviceGetDefaultEccMode method. - DeviceGetDefaultEccModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) - - // DeviceGetDetailedEccErrorsFunc mocks the DeviceGetDetailedEccErrors method. - DeviceGetDetailedEccErrorsFunc func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) - - // DeviceGetDeviceHandleFromMigDeviceHandleFunc mocks the DeviceGetDeviceHandleFromMigDeviceHandle method. - DeviceGetDeviceHandleFromMigDeviceHandleFunc func(device nvml.Device) (nvml.Device, nvml.Return) - - // DeviceGetDisplayActiveFunc mocks the DeviceGetDisplayActive method. - DeviceGetDisplayActiveFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) - - // DeviceGetDisplayModeFunc mocks the DeviceGetDisplayMode method. - DeviceGetDisplayModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) - - // DeviceGetDramEncryptionModeFunc mocks the DeviceGetDramEncryptionMode method. - DeviceGetDramEncryptionModeFunc func(device nvml.Device) (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) - - // DeviceGetDriverModelFunc mocks the DeviceGetDriverModel method. - DeviceGetDriverModelFunc func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) - - // DeviceGetDriverModel_v2Func mocks the DeviceGetDriverModel_v2 method. - DeviceGetDriverModel_v2Func func(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) - - // DeviceGetDynamicPstatesInfoFunc mocks the DeviceGetDynamicPstatesInfo method. - DeviceGetDynamicPstatesInfoFunc func(device nvml.Device) (nvml.GpuDynamicPstatesInfo, nvml.Return) - - // DeviceGetEccModeFunc mocks the DeviceGetEccMode method. - DeviceGetEccModeFunc func(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) - - // DeviceGetEncoderCapacityFunc mocks the DeviceGetEncoderCapacity method. - DeviceGetEncoderCapacityFunc func(device nvml.Device, encoderType nvml.EncoderType) (int, nvml.Return) - - // DeviceGetEncoderSessionsFunc mocks the DeviceGetEncoderSessions method. - DeviceGetEncoderSessionsFunc func(device nvml.Device) ([]nvml.EncoderSessionInfo, nvml.Return) - - // DeviceGetEncoderStatsFunc mocks the DeviceGetEncoderStats method. - DeviceGetEncoderStatsFunc func(device nvml.Device) (int, uint32, uint32, nvml.Return) - - // DeviceGetEncoderUtilizationFunc mocks the DeviceGetEncoderUtilization method. - DeviceGetEncoderUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) - - // DeviceGetEnforcedPowerLimitFunc mocks the DeviceGetEnforcedPowerLimit method. - DeviceGetEnforcedPowerLimitFunc func(device nvml.Device) (uint32, nvml.Return) - - // DeviceGetFBCSessionsFunc mocks the DeviceGetFBCSessions method. - DeviceGetFBCSessionsFunc func(device nvml.Device) ([]nvml.FBCSessionInfo, nvml.Return) - - // DeviceGetFBCStatsFunc mocks the DeviceGetFBCStats method. - DeviceGetFBCStatsFunc func(device nvml.Device) (nvml.FBCStats, nvml.Return) - - // DeviceGetFanControlPolicy_v2Func mocks the DeviceGetFanControlPolicy_v2 method. - DeviceGetFanControlPolicy_v2Func func(device nvml.Device, n int) (nvml.FanControlPolicy, nvml.Return) - - // DeviceGetFanSpeedFunc mocks the DeviceGetFanSpeed method. - DeviceGetFanSpeedFunc func(device nvml.Device) (uint32, nvml.Return) - - // DeviceGetFanSpeedRPMFunc mocks the DeviceGetFanSpeedRPM method. - DeviceGetFanSpeedRPMFunc func(device nvml.Device) (nvml.FanSpeedInfo, nvml.Return) - - // DeviceGetFanSpeed_v2Func mocks the DeviceGetFanSpeed_v2 method. - DeviceGetFanSpeed_v2Func func(device nvml.Device, n int) (uint32, nvml.Return) - - // DeviceGetFieldValuesFunc mocks the DeviceGetFieldValues method. - DeviceGetFieldValuesFunc func(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return - - // DeviceGetGpcClkMinMaxVfOffsetFunc mocks the DeviceGetGpcClkMinMaxVfOffset method. - DeviceGetGpcClkMinMaxVfOffsetFunc func(device nvml.Device) (int, int, nvml.Return) - - // DeviceGetGpcClkVfOffsetFunc mocks the DeviceGetGpcClkVfOffset method. - DeviceGetGpcClkVfOffsetFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetGpuFabricInfoFunc mocks the DeviceGetGpuFabricInfo method. - DeviceGetGpuFabricInfoFunc func(device nvml.Device) (nvml.GpuFabricInfo, nvml.Return) - - // 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) - - // DeviceGetGpuInstanceIdFunc mocks the DeviceGetGpuInstanceId method. - DeviceGetGpuInstanceIdFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetGpuInstancePossiblePlacementsFunc mocks the DeviceGetGpuInstancePossiblePlacements method. - DeviceGetGpuInstancePossiblePlacementsFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) - - // DeviceGetGpuInstanceProfileInfoFunc mocks the DeviceGetGpuInstanceProfileInfo method. - DeviceGetGpuInstanceProfileInfoFunc func(device nvml.Device, n int) (nvml.GpuInstanceProfileInfo, nvml.Return) - - // DeviceGetGpuInstanceProfileInfoByIdVFunc mocks the DeviceGetGpuInstanceProfileInfoByIdV method. - DeviceGetGpuInstanceProfileInfoByIdVFunc func(device nvml.Device, n int) nvml.GpuInstanceProfileInfoByIdHandler - - // 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) - - // DeviceGetGpuInstancesFunc mocks the DeviceGetGpuInstances method. - DeviceGetGpuInstancesFunc func(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) - - // DeviceGetGpuMaxPcieLinkGenerationFunc mocks the DeviceGetGpuMaxPcieLinkGeneration method. - DeviceGetGpuMaxPcieLinkGenerationFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetGpuOperationModeFunc mocks the DeviceGetGpuOperationMode method. - DeviceGetGpuOperationModeFunc func(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) - - // DeviceGetGraphicsRunningProcessesFunc mocks the DeviceGetGraphicsRunningProcesses method. - DeviceGetGraphicsRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) - - // DeviceGetGridLicensableFeaturesFunc mocks the DeviceGetGridLicensableFeatures method. - DeviceGetGridLicensableFeaturesFunc func(device nvml.Device) (nvml.GridLicensableFeatures, nvml.Return) - - // DeviceGetGspFirmwareModeFunc mocks the DeviceGetGspFirmwareMode method. - DeviceGetGspFirmwareModeFunc func(device nvml.Device) (bool, bool, nvml.Return) - - // DeviceGetGspFirmwareVersionFunc mocks the DeviceGetGspFirmwareVersion method. - DeviceGetGspFirmwareVersionFunc func(device nvml.Device) (string, nvml.Return) - - // DeviceGetHandleByIndexFunc mocks the DeviceGetHandleByIndex method. - DeviceGetHandleByIndexFunc func(n int) (nvml.Device, nvml.Return) - - // DeviceGetHandleByPciBusIdFunc mocks the DeviceGetHandleByPciBusId method. - DeviceGetHandleByPciBusIdFunc func(s string) (nvml.Device, nvml.Return) - - // DeviceGetHandleBySerialFunc mocks the DeviceGetHandleBySerial method. - DeviceGetHandleBySerialFunc func(s string) (nvml.Device, nvml.Return) - - // DeviceGetHandleByUUIDFunc mocks the DeviceGetHandleByUUID method. - DeviceGetHandleByUUIDFunc func(s string) (nvml.Device, nvml.Return) - - // DeviceGetHandleByUUIDVFunc mocks the DeviceGetHandleByUUIDV method. - DeviceGetHandleByUUIDVFunc func(uUID *nvml.UUID) (nvml.Device, nvml.Return) - - // DeviceGetHostVgpuModeFunc mocks the DeviceGetHostVgpuMode method. - DeviceGetHostVgpuModeFunc func(device nvml.Device) (nvml.HostVgpuMode, nvml.Return) - - // DeviceGetIndexFunc mocks the DeviceGetIndex method. - DeviceGetIndexFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetInforomConfigurationChecksumFunc mocks the DeviceGetInforomConfigurationChecksum method. - DeviceGetInforomConfigurationChecksumFunc func(device nvml.Device) (uint32, nvml.Return) - - // DeviceGetInforomImageVersionFunc mocks the DeviceGetInforomImageVersion method. - DeviceGetInforomImageVersionFunc func(device nvml.Device) (string, nvml.Return) - - // DeviceGetInforomVersionFunc mocks the DeviceGetInforomVersion method. - DeviceGetInforomVersionFunc func(device nvml.Device, inforomObject nvml.InforomObject) (string, nvml.Return) - - // DeviceGetIrqNumFunc mocks the DeviceGetIrqNum method. - DeviceGetIrqNumFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetJpgUtilizationFunc mocks the DeviceGetJpgUtilization method. - DeviceGetJpgUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) - - // DeviceGetLastBBXFlushTimeFunc mocks the DeviceGetLastBBXFlushTime method. - DeviceGetLastBBXFlushTimeFunc func(device nvml.Device) (uint64, uint, nvml.Return) - - // DeviceGetMPSComputeRunningProcessesFunc mocks the DeviceGetMPSComputeRunningProcesses method. - DeviceGetMPSComputeRunningProcessesFunc func(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) - - // DeviceGetMarginTemperatureFunc mocks the DeviceGetMarginTemperature method. - DeviceGetMarginTemperatureFunc func(device nvml.Device) (nvml.MarginTemperature, nvml.Return) - - // DeviceGetMaxClockInfoFunc mocks the DeviceGetMaxClockInfo method. - DeviceGetMaxClockInfoFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) - - // DeviceGetMaxCustomerBoostClockFunc mocks the DeviceGetMaxCustomerBoostClock method. - DeviceGetMaxCustomerBoostClockFunc func(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) - - // DeviceGetMaxMigDeviceCountFunc mocks the DeviceGetMaxMigDeviceCount method. - DeviceGetMaxMigDeviceCountFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetMaxPcieLinkGenerationFunc mocks the DeviceGetMaxPcieLinkGeneration method. - DeviceGetMaxPcieLinkGenerationFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetMaxPcieLinkWidthFunc mocks the DeviceGetMaxPcieLinkWidth method. - DeviceGetMaxPcieLinkWidthFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetMemClkMinMaxVfOffsetFunc mocks the DeviceGetMemClkMinMaxVfOffset method. - DeviceGetMemClkMinMaxVfOffsetFunc func(device nvml.Device) (int, int, nvml.Return) - - // DeviceGetMemClkVfOffsetFunc mocks the DeviceGetMemClkVfOffset method. - DeviceGetMemClkVfOffsetFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetMemoryAffinityFunc mocks the DeviceGetMemoryAffinity method. - DeviceGetMemoryAffinityFunc func(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) - - // DeviceGetMemoryBusWidthFunc mocks the DeviceGetMemoryBusWidth method. - DeviceGetMemoryBusWidthFunc func(device nvml.Device) (uint32, nvml.Return) - - // DeviceGetMemoryErrorCounterFunc mocks the DeviceGetMemoryErrorCounter method. - DeviceGetMemoryErrorCounterFunc func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) - - // DeviceGetMemoryInfoFunc mocks the DeviceGetMemoryInfo method. - DeviceGetMemoryInfoFunc func(device nvml.Device) (nvml.Memory, nvml.Return) - - // DeviceGetMemoryInfo_v2Func mocks the DeviceGetMemoryInfo_v2 method. - DeviceGetMemoryInfo_v2Func func(device nvml.Device) (nvml.Memory_v2, nvml.Return) - - // DeviceGetMigDeviceHandleByIndexFunc mocks the DeviceGetMigDeviceHandleByIndex method. - DeviceGetMigDeviceHandleByIndexFunc func(device nvml.Device, n int) (nvml.Device, nvml.Return) - - // DeviceGetMigModeFunc mocks the DeviceGetMigMode method. - DeviceGetMigModeFunc func(device nvml.Device) (int, int, nvml.Return) - - // DeviceGetMinMaxClockOfPStateFunc mocks the DeviceGetMinMaxClockOfPState method. - DeviceGetMinMaxClockOfPStateFunc func(device nvml.Device, clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) - - // DeviceGetMinMaxFanSpeedFunc mocks the DeviceGetMinMaxFanSpeed method. - DeviceGetMinMaxFanSpeedFunc func(device nvml.Device) (int, int, nvml.Return) - - // DeviceGetMinorNumberFunc mocks the DeviceGetMinorNumber method. - DeviceGetMinorNumberFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetModuleIdFunc mocks the DeviceGetModuleId method. - DeviceGetModuleIdFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetMultiGpuBoardFunc mocks the DeviceGetMultiGpuBoard method. - DeviceGetMultiGpuBoardFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetNameFunc mocks the DeviceGetName method. - DeviceGetNameFunc func(device nvml.Device) (string, nvml.Return) - - // DeviceGetNumFansFunc mocks the DeviceGetNumFans method. - DeviceGetNumFansFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetNumGpuCoresFunc mocks the DeviceGetNumGpuCores method. - DeviceGetNumGpuCoresFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetNumaNodeIdFunc mocks the DeviceGetNumaNodeId method. - DeviceGetNumaNodeIdFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetNvLinkCapabilityFunc mocks the DeviceGetNvLinkCapability method. - DeviceGetNvLinkCapabilityFunc func(device nvml.Device, n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) - - // DeviceGetNvLinkErrorCounterFunc mocks the DeviceGetNvLinkErrorCounter method. - DeviceGetNvLinkErrorCounterFunc func(device nvml.Device, n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) - - // DeviceGetNvLinkInfoFunc mocks the DeviceGetNvLinkInfo method. - DeviceGetNvLinkInfoFunc func(device nvml.Device) nvml.NvLinkInfoHandler - - // DeviceGetNvLinkRemoteDeviceTypeFunc mocks the DeviceGetNvLinkRemoteDeviceType method. - DeviceGetNvLinkRemoteDeviceTypeFunc func(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, nvml.Return) - - // DeviceGetNvLinkRemotePciInfoFunc mocks the DeviceGetNvLinkRemotePciInfo method. - DeviceGetNvLinkRemotePciInfoFunc func(device nvml.Device, n int) (nvml.PciInfo, nvml.Return) - - // DeviceGetNvLinkStateFunc mocks the DeviceGetNvLinkState method. - DeviceGetNvLinkStateFunc func(device nvml.Device, n int) (nvml.EnableState, nvml.Return) - - // DeviceGetNvLinkUtilizationControlFunc mocks the DeviceGetNvLinkUtilizationControl method. - DeviceGetNvLinkUtilizationControlFunc func(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) - - // DeviceGetNvLinkUtilizationCounterFunc mocks the DeviceGetNvLinkUtilizationCounter method. - DeviceGetNvLinkUtilizationCounterFunc func(device nvml.Device, n1 int, n2 int) (uint64, uint64, nvml.Return) - - // DeviceGetNvLinkVersionFunc mocks the DeviceGetNvLinkVersion method. - DeviceGetNvLinkVersionFunc func(device nvml.Device, n int) (uint32, nvml.Return) - - // DeviceGetNvlinkBwModeFunc mocks the DeviceGetNvlinkBwMode method. - DeviceGetNvlinkBwModeFunc func(device nvml.Device) (nvml.NvlinkGetBwMode, nvml.Return) - - // DeviceGetNvlinkSupportedBwModesFunc mocks the DeviceGetNvlinkSupportedBwModes method. - DeviceGetNvlinkSupportedBwModesFunc func(device nvml.Device) (nvml.NvlinkSupportedBwModes, nvml.Return) - - // DeviceGetOfaUtilizationFunc mocks the DeviceGetOfaUtilization method. - DeviceGetOfaUtilizationFunc func(device nvml.Device) (uint32, uint32, nvml.Return) - - // DeviceGetP2PStatusFunc mocks the DeviceGetP2PStatus method. - DeviceGetP2PStatusFunc func(device1 nvml.Device, device2 nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) - - // DeviceGetPciInfoFunc mocks the DeviceGetPciInfo method. - DeviceGetPciInfoFunc func(device nvml.Device) (nvml.PciInfo, nvml.Return) - - // DeviceGetPciInfoExtFunc mocks the DeviceGetPciInfoExt method. - DeviceGetPciInfoExtFunc func(device nvml.Device) (nvml.PciInfoExt, nvml.Return) - - // DeviceGetPcieLinkMaxSpeedFunc mocks the DeviceGetPcieLinkMaxSpeed method. - DeviceGetPcieLinkMaxSpeedFunc func(device nvml.Device) (uint32, nvml.Return) - - // DeviceGetPcieReplayCounterFunc mocks the DeviceGetPcieReplayCounter method. - DeviceGetPcieReplayCounterFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetPcieSpeedFunc mocks the DeviceGetPcieSpeed method. - DeviceGetPcieSpeedFunc func(device nvml.Device) (int, nvml.Return) - - // DeviceGetPcieThroughputFunc mocks the DeviceGetPcieThroughput method. - DeviceGetPcieThroughputFunc func(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) - - // DeviceGetPdiFunc mocks the DeviceGetPdi method. - DeviceGetPdiFunc func(device nvml.Device) (nvml.Pdi, nvml.Return) - - // DeviceGetPerformanceModesFunc mocks the DeviceGetPerformanceModes method. - DeviceGetPerformanceModesFunc func(device nvml.Device) (nvml.DevicePerfModes, nvml.Return) - - // DeviceGetPerformanceStateFunc mocks the DeviceGetPerformanceState method. - DeviceGetPerformanceStateFunc func(device nvml.Device) (nvml.Pstates, nvml.Return) - - // DeviceGetPersistenceModeFunc mocks the DeviceGetPersistenceMode method. - DeviceGetPersistenceModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) - - // DeviceGetPgpuMetadataStringFunc mocks the DeviceGetPgpuMetadataString method. - DeviceGetPgpuMetadataStringFunc func(device nvml.Device) (string, nvml.Return) - - // DeviceGetPlatformInfoFunc mocks the DeviceGetPlatformInfo method. - DeviceGetPlatformInfoFunc func(device nvml.Device) (nvml.PlatformInfo, nvml.Return) - - // DeviceGetPowerManagementDefaultLimitFunc mocks the DeviceGetPowerManagementDefaultLimit method. - DeviceGetPowerManagementDefaultLimitFunc func(device nvml.Device) (uint32, nvml.Return) - - // DeviceGetPowerManagementLimitFunc mocks the DeviceGetPowerManagementLimit method. - DeviceGetPowerManagementLimitFunc func(device nvml.Device) (uint32, nvml.Return) - - // DeviceGetPowerManagementLimitConstraintsFunc mocks the DeviceGetPowerManagementLimitConstraints method. - DeviceGetPowerManagementLimitConstraintsFunc func(device nvml.Device) (uint32, uint32, nvml.Return) - - // DeviceGetPowerManagementModeFunc mocks the DeviceGetPowerManagementMode method. - DeviceGetPowerManagementModeFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) - - // DeviceGetPowerMizerMode_v1Func mocks the DeviceGetPowerMizerMode_v1 method. - DeviceGetPowerMizerMode_v1Func func(device nvml.Device) (nvml.DevicePowerMizerModes_v1, nvml.Return) - - // DeviceGetPowerSourceFunc mocks the DeviceGetPowerSource method. - DeviceGetPowerSourceFunc func(device nvml.Device) (nvml.PowerSource, nvml.Return) - - // DeviceGetPowerStateFunc mocks the DeviceGetPowerState method. - DeviceGetPowerStateFunc func(device nvml.Device) (nvml.Pstates, nvml.Return) - - // DeviceGetPowerUsageFunc mocks the DeviceGetPowerUsage method. - DeviceGetPowerUsageFunc func(device nvml.Device) (uint32, nvml.Return) - - // DeviceGetProcessUtilizationFunc mocks the DeviceGetProcessUtilization method. - DeviceGetProcessUtilizationFunc func(device nvml.Device, v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) - - // DeviceGetProcessesUtilizationInfoFunc mocks the DeviceGetProcessesUtilizationInfo method. - DeviceGetProcessesUtilizationInfoFunc func(device nvml.Device) (nvml.ProcessesUtilizationInfo, nvml.Return) - - // DeviceGetRemappedRowsFunc mocks the DeviceGetRemappedRows method. - DeviceGetRemappedRowsFunc func(device nvml.Device) (int, int, bool, bool, nvml.Return) - - // DeviceGetRepairStatusFunc mocks the DeviceGetRepairStatus method. - DeviceGetRepairStatusFunc func(device nvml.Device) (nvml.RepairStatus, nvml.Return) - - // DeviceGetRetiredPagesFunc mocks the DeviceGetRetiredPages method. - DeviceGetRetiredPagesFunc func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) - - // DeviceGetRetiredPagesPendingStatusFunc mocks the DeviceGetRetiredPagesPendingStatus method. - DeviceGetRetiredPagesPendingStatusFunc func(device nvml.Device) (nvml.EnableState, nvml.Return) - - // DeviceGetRetiredPages_v2Func mocks the DeviceGetRetiredPages_v2 method. - DeviceGetRetiredPages_v2Func func(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) - - // DeviceGetRowRemapperHistogramFunc mocks the DeviceGetRowRemapperHistogram method. - DeviceGetRowRemapperHistogramFunc func(device nvml.Device) (nvml.RowRemapperHistogramValues, nvml.Return) - - // DeviceGetRunningProcessDetailListFunc mocks the DeviceGetRunningProcessDetailList method. - DeviceGetRunningProcessDetailListFunc func(device nvml.Device) (nvml.ProcessDetailList, nvml.Return) - - // DeviceGetSamplesFunc mocks the DeviceGetSamples method. - DeviceGetSamplesFunc func(device nvml.Device, samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) - - // DeviceGetSerialFunc mocks the DeviceGetSerial method. - DeviceGetSerialFunc func(device nvml.Device) (string, nvml.Return) - - // DeviceGetSramEccErrorStatusFunc mocks the DeviceGetSramEccErrorStatus method. - DeviceGetSramEccErrorStatusFunc func(device nvml.Device) (nvml.EccSramErrorStatus, nvml.Return) - - // DeviceGetSramUniqueUncorrectedEccErrorCountsFunc mocks the DeviceGetSramUniqueUncorrectedEccErrorCounts method. - DeviceGetSramUniqueUncorrectedEccErrorCountsFunc func(device nvml.Device, eccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts) nvml.Return - - // DeviceGetSupportedClocksEventReasonsFunc mocks the DeviceGetSupportedClocksEventReasons method. - DeviceGetSupportedClocksEventReasonsFunc func(device nvml.Device) (uint64, nvml.Return) - - // DeviceGetSupportedClocksThrottleReasonsFunc mocks the DeviceGetSupportedClocksThrottleReasons method. - DeviceGetSupportedClocksThrottleReasonsFunc func(device nvml.Device) (uint64, nvml.Return) - - // DeviceGetSupportedEventTypesFunc mocks the DeviceGetSupportedEventTypes method. - DeviceGetSupportedEventTypesFunc func(device nvml.Device) (uint64, nvml.Return) - - // DeviceGetSupportedGraphicsClocksFunc mocks the DeviceGetSupportedGraphicsClocks method. - DeviceGetSupportedGraphicsClocksFunc func(device nvml.Device, n int) (int, uint32, nvml.Return) - - // DeviceGetSupportedMemoryClocksFunc mocks the DeviceGetSupportedMemoryClocks method. - DeviceGetSupportedMemoryClocksFunc func(device nvml.Device) (int, uint32, nvml.Return) - - // DeviceGetSupportedPerformanceStatesFunc mocks the DeviceGetSupportedPerformanceStates method. - DeviceGetSupportedPerformanceStatesFunc func(device nvml.Device) ([]nvml.Pstates, nvml.Return) - - // DeviceGetSupportedVgpusFunc mocks the DeviceGetSupportedVgpus method. - DeviceGetSupportedVgpusFunc func(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) - - // DeviceGetTargetFanSpeedFunc mocks the DeviceGetTargetFanSpeed method. - DeviceGetTargetFanSpeedFunc func(device nvml.Device, n int) (int, nvml.Return) - - // DeviceGetTemperatureFunc mocks the DeviceGetTemperature method. - DeviceGetTemperatureFunc func(device nvml.Device, temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) - - // DeviceGetTemperatureThresholdFunc mocks the DeviceGetTemperatureThreshold method. - DeviceGetTemperatureThresholdFunc func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) - - // DeviceGetTemperatureVFunc mocks the DeviceGetTemperatureV method. - DeviceGetTemperatureVFunc func(device nvml.Device) nvml.TemperatureHandler - - // DeviceGetThermalSettingsFunc mocks the DeviceGetThermalSettings method. - DeviceGetThermalSettingsFunc func(device nvml.Device, v uint32) (nvml.GpuThermalSettings, nvml.Return) - - // DeviceGetTopologyCommonAncestorFunc mocks the DeviceGetTopologyCommonAncestor method. - DeviceGetTopologyCommonAncestorFunc func(device1 nvml.Device, device2 nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) - - // DeviceGetTopologyNearestGpusFunc mocks the DeviceGetTopologyNearestGpus method. - DeviceGetTopologyNearestGpusFunc func(device nvml.Device, gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) - - // DeviceGetTotalEccErrorsFunc mocks the DeviceGetTotalEccErrors method. - DeviceGetTotalEccErrorsFunc func(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) - - // DeviceGetTotalEnergyConsumptionFunc mocks the DeviceGetTotalEnergyConsumption method. - DeviceGetTotalEnergyConsumptionFunc func(device nvml.Device) (uint64, nvml.Return) - - // DeviceGetUUIDFunc mocks the DeviceGetUUID method. - DeviceGetUUIDFunc func(device nvml.Device) (string, nvml.Return) - - // DeviceGetUtilizationRatesFunc mocks the DeviceGetUtilizationRates method. - DeviceGetUtilizationRatesFunc func(device nvml.Device) (nvml.Utilization, nvml.Return) - - // DeviceGetVbiosVersionFunc mocks the DeviceGetVbiosVersion method. - DeviceGetVbiosVersionFunc func(device nvml.Device) (string, nvml.Return) - - // DeviceGetVgpuCapabilitiesFunc mocks the DeviceGetVgpuCapabilities method. - DeviceGetVgpuCapabilitiesFunc func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) - - // DeviceGetVgpuHeterogeneousModeFunc mocks the DeviceGetVgpuHeterogeneousMode method. - DeviceGetVgpuHeterogeneousModeFunc func(device nvml.Device) (nvml.VgpuHeterogeneousMode, nvml.Return) - - // DeviceGetVgpuInstancesUtilizationInfoFunc mocks the DeviceGetVgpuInstancesUtilizationInfo method. - DeviceGetVgpuInstancesUtilizationInfoFunc func(device nvml.Device) (nvml.VgpuInstancesUtilizationInfo, nvml.Return) - - // DeviceGetVgpuMetadataFunc mocks the DeviceGetVgpuMetadata method. - DeviceGetVgpuMetadataFunc func(device nvml.Device) (nvml.VgpuPgpuMetadata, nvml.Return) - - // DeviceGetVgpuProcessUtilizationFunc mocks the DeviceGetVgpuProcessUtilization method. - DeviceGetVgpuProcessUtilizationFunc func(device nvml.Device, v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) - - // DeviceGetVgpuProcessesUtilizationInfoFunc mocks the DeviceGetVgpuProcessesUtilizationInfo method. - DeviceGetVgpuProcessesUtilizationInfoFunc func(device nvml.Device) (nvml.VgpuProcessesUtilizationInfo, nvml.Return) - - // DeviceGetVgpuSchedulerCapabilitiesFunc mocks the DeviceGetVgpuSchedulerCapabilities method. - DeviceGetVgpuSchedulerCapabilitiesFunc func(device nvml.Device) (nvml.VgpuSchedulerCapabilities, nvml.Return) - - // DeviceGetVgpuSchedulerLogFunc mocks the DeviceGetVgpuSchedulerLog method. - DeviceGetVgpuSchedulerLogFunc func(device nvml.Device) (nvml.VgpuSchedulerLog, nvml.Return) - - // DeviceGetVgpuSchedulerStateFunc mocks the DeviceGetVgpuSchedulerState method. - DeviceGetVgpuSchedulerStateFunc func(device nvml.Device) (nvml.VgpuSchedulerGetState, nvml.Return) - - // DeviceGetVgpuTypeCreatablePlacementsFunc mocks the DeviceGetVgpuTypeCreatablePlacements method. - DeviceGetVgpuTypeCreatablePlacementsFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) - - // DeviceGetVgpuTypeSupportedPlacementsFunc mocks the DeviceGetVgpuTypeSupportedPlacements method. - DeviceGetVgpuTypeSupportedPlacementsFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) - - // DeviceGetVgpuUtilizationFunc mocks the DeviceGetVgpuUtilization method. - DeviceGetVgpuUtilizationFunc func(device nvml.Device, v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) - - // DeviceGetViolationStatusFunc mocks the DeviceGetViolationStatus method. - DeviceGetViolationStatusFunc func(device nvml.Device, perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) - - // DeviceGetVirtualizationModeFunc mocks the DeviceGetVirtualizationMode method. - DeviceGetVirtualizationModeFunc func(device nvml.Device) (nvml.GpuVirtualizationMode, nvml.Return) - - // DeviceIsMigDeviceHandleFunc mocks the DeviceIsMigDeviceHandle method. - DeviceIsMigDeviceHandleFunc func(device nvml.Device) (bool, nvml.Return) - - // DeviceModifyDrainStateFunc mocks the DeviceModifyDrainState method. - DeviceModifyDrainStateFunc func(pciInfo *nvml.PciInfo, enableState nvml.EnableState) nvml.Return - - // DeviceOnSameBoardFunc mocks the DeviceOnSameBoard method. - DeviceOnSameBoardFunc func(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) - - // DevicePowerSmoothingActivatePresetProfileFunc mocks the DevicePowerSmoothingActivatePresetProfile method. - DevicePowerSmoothingActivatePresetProfileFunc func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return - - // DevicePowerSmoothingSetStateFunc mocks the DevicePowerSmoothingSetState method. - DevicePowerSmoothingSetStateFunc func(device nvml.Device, powerSmoothingState *nvml.PowerSmoothingState) nvml.Return - - // DevicePowerSmoothingUpdatePresetProfileParamFunc mocks the DevicePowerSmoothingUpdatePresetProfileParam method. - DevicePowerSmoothingUpdatePresetProfileParamFunc func(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return - - // DeviceQueryDrainStateFunc mocks the DeviceQueryDrainState method. - DeviceQueryDrainStateFunc func(pciInfo *nvml.PciInfo) (nvml.EnableState, nvml.Return) - - // DeviceReadWritePRM_v1Func mocks the DeviceReadWritePRM_v1 method. - DeviceReadWritePRM_v1Func func(device nvml.Device, pRMTLV_v1 *nvml.PRMTLV_v1) nvml.Return - - // DeviceRegisterEventsFunc mocks the DeviceRegisterEvents method. - DeviceRegisterEventsFunc func(device nvml.Device, v uint64, eventSet nvml.EventSet) nvml.Return - - // DeviceRemoveGpuFunc mocks the DeviceRemoveGpu method. - DeviceRemoveGpuFunc func(pciInfo *nvml.PciInfo) nvml.Return - - // DeviceRemoveGpu_v2Func mocks the DeviceRemoveGpu_v2 method. - DeviceRemoveGpu_v2Func func(pciInfo *nvml.PciInfo, detachGpuState nvml.DetachGpuState, pcieLinkState nvml.PcieLinkState) nvml.Return - - // DeviceResetApplicationsClocksFunc mocks the DeviceResetApplicationsClocks method. - DeviceResetApplicationsClocksFunc func(device nvml.Device) nvml.Return - - // DeviceResetGpuLockedClocksFunc mocks the DeviceResetGpuLockedClocks method. - DeviceResetGpuLockedClocksFunc func(device nvml.Device) nvml.Return - - // DeviceResetMemoryLockedClocksFunc mocks the DeviceResetMemoryLockedClocks method. - DeviceResetMemoryLockedClocksFunc func(device nvml.Device) nvml.Return - - // DeviceResetNvLinkErrorCountersFunc mocks the DeviceResetNvLinkErrorCounters method. - DeviceResetNvLinkErrorCountersFunc func(device nvml.Device, n int) nvml.Return - - // DeviceResetNvLinkUtilizationCounterFunc mocks the DeviceResetNvLinkUtilizationCounter method. - DeviceResetNvLinkUtilizationCounterFunc func(device nvml.Device, n1 int, n2 int) nvml.Return - - // DeviceSetAPIRestrictionFunc mocks the DeviceSetAPIRestriction method. - DeviceSetAPIRestrictionFunc func(device nvml.Device, restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return - - // DeviceSetAccountingModeFunc mocks the DeviceSetAccountingMode method. - DeviceSetAccountingModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return - - // DeviceSetApplicationsClocksFunc mocks the DeviceSetApplicationsClocks method. - DeviceSetApplicationsClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return - - // DeviceSetAutoBoostedClocksEnabledFunc mocks the DeviceSetAutoBoostedClocksEnabled method. - DeviceSetAutoBoostedClocksEnabledFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return - - // DeviceSetClockOffsetsFunc mocks the DeviceSetClockOffsets method. - DeviceSetClockOffsetsFunc func(device nvml.Device, clockOffset nvml.ClockOffset) nvml.Return - - // DeviceSetComputeModeFunc mocks the DeviceSetComputeMode method. - DeviceSetComputeModeFunc func(device nvml.Device, computeMode nvml.ComputeMode) nvml.Return - - // DeviceSetConfComputeUnprotectedMemSizeFunc mocks the DeviceSetConfComputeUnprotectedMemSize method. - DeviceSetConfComputeUnprotectedMemSizeFunc func(device nvml.Device, v uint64) nvml.Return - - // DeviceSetCpuAffinityFunc mocks the DeviceSetCpuAffinity method. - DeviceSetCpuAffinityFunc func(device nvml.Device) nvml.Return - - // DeviceSetDefaultAutoBoostedClocksEnabledFunc mocks the DeviceSetDefaultAutoBoostedClocksEnabled method. - DeviceSetDefaultAutoBoostedClocksEnabledFunc func(device nvml.Device, enableState nvml.EnableState, v uint32) nvml.Return - - // DeviceSetDefaultFanSpeed_v2Func mocks the DeviceSetDefaultFanSpeed_v2 method. - DeviceSetDefaultFanSpeed_v2Func func(device nvml.Device, n int) nvml.Return - - // DeviceSetDramEncryptionModeFunc mocks the DeviceSetDramEncryptionMode method. - DeviceSetDramEncryptionModeFunc func(device nvml.Device, dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return - - // DeviceSetDriverModelFunc mocks the DeviceSetDriverModel method. - DeviceSetDriverModelFunc func(device nvml.Device, driverModel nvml.DriverModel, v uint32) nvml.Return - - // DeviceSetEccModeFunc mocks the DeviceSetEccMode method. - DeviceSetEccModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return - - // DeviceSetFanControlPolicyFunc mocks the DeviceSetFanControlPolicy method. - DeviceSetFanControlPolicyFunc func(device nvml.Device, n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return - - // DeviceSetFanSpeed_v2Func mocks the DeviceSetFanSpeed_v2 method. - DeviceSetFanSpeed_v2Func func(device nvml.Device, n1 int, n2 int) nvml.Return - - // DeviceSetGpcClkVfOffsetFunc mocks the DeviceSetGpcClkVfOffset method. - DeviceSetGpcClkVfOffsetFunc func(device nvml.Device, n int) nvml.Return - - // DeviceSetGpuLockedClocksFunc mocks the DeviceSetGpuLockedClocks method. - DeviceSetGpuLockedClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return - - // DeviceSetGpuOperationModeFunc mocks the DeviceSetGpuOperationMode method. - DeviceSetGpuOperationModeFunc func(device nvml.Device, gpuOperationMode nvml.GpuOperationMode) nvml.Return - - // DeviceSetMemClkVfOffsetFunc mocks the DeviceSetMemClkVfOffset method. - DeviceSetMemClkVfOffsetFunc func(device nvml.Device, n int) nvml.Return - - // DeviceSetMemoryLockedClocksFunc mocks the DeviceSetMemoryLockedClocks method. - DeviceSetMemoryLockedClocksFunc func(device nvml.Device, v1 uint32, v2 uint32) nvml.Return - - // DeviceSetMigModeFunc mocks the DeviceSetMigMode method. - DeviceSetMigModeFunc func(device nvml.Device, n int) (nvml.Return, nvml.Return) - - // DeviceSetNvLinkDeviceLowPowerThresholdFunc mocks the DeviceSetNvLinkDeviceLowPowerThreshold method. - DeviceSetNvLinkDeviceLowPowerThresholdFunc func(device nvml.Device, nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return - - // DeviceSetNvLinkUtilizationControlFunc mocks the DeviceSetNvLinkUtilizationControl method. - DeviceSetNvLinkUtilizationControlFunc func(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return - - // DeviceSetNvlinkBwModeFunc mocks the DeviceSetNvlinkBwMode method. - DeviceSetNvlinkBwModeFunc func(device nvml.Device, nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return - - // DeviceSetPersistenceModeFunc mocks the DeviceSetPersistenceMode method. - DeviceSetPersistenceModeFunc func(device nvml.Device, enableState nvml.EnableState) nvml.Return - - // DeviceSetPowerManagementLimitFunc mocks the DeviceSetPowerManagementLimit method. - DeviceSetPowerManagementLimitFunc func(device nvml.Device, v uint32) nvml.Return - - // DeviceSetPowerManagementLimit_v2Func mocks the DeviceSetPowerManagementLimit_v2 method. - DeviceSetPowerManagementLimit_v2Func func(device nvml.Device, powerValue_v2 *nvml.PowerValue_v2) nvml.Return - - // DeviceSetTemperatureThresholdFunc mocks the DeviceSetTemperatureThreshold method. - DeviceSetTemperatureThresholdFunc func(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return - - // DeviceSetVgpuCapabilitiesFunc mocks the DeviceSetVgpuCapabilities method. - DeviceSetVgpuCapabilitiesFunc func(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return - - // DeviceSetVgpuHeterogeneousModeFunc mocks the DeviceSetVgpuHeterogeneousMode method. - DeviceSetVgpuHeterogeneousModeFunc func(device nvml.Device, vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return - - // DeviceSetVgpuSchedulerStateFunc mocks the DeviceSetVgpuSchedulerState method. - DeviceSetVgpuSchedulerStateFunc func(device nvml.Device, vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return - - // DeviceSetVirtualizationModeFunc mocks the DeviceSetVirtualizationMode method. - DeviceSetVirtualizationModeFunc func(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return - - // DeviceValidateInforomFunc mocks the DeviceValidateInforom method. - DeviceValidateInforomFunc func(device nvml.Device) nvml.Return - - // DeviceWorkloadPowerProfileClearRequestedProfilesFunc mocks the DeviceWorkloadPowerProfileClearRequestedProfiles method. - DeviceWorkloadPowerProfileClearRequestedProfilesFunc func(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return - - // DeviceWorkloadPowerProfileGetCurrentProfilesFunc mocks the DeviceWorkloadPowerProfileGetCurrentProfiles method. - DeviceWorkloadPowerProfileGetCurrentProfilesFunc func(device nvml.Device) (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) - - // DeviceWorkloadPowerProfileGetProfilesInfoFunc mocks the DeviceWorkloadPowerProfileGetProfilesInfo method. - DeviceWorkloadPowerProfileGetProfilesInfoFunc func(device nvml.Device) (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) - - // DeviceWorkloadPowerProfileSetRequestedProfilesFunc mocks the DeviceWorkloadPowerProfileSetRequestedProfiles method. - DeviceWorkloadPowerProfileSetRequestedProfilesFunc func(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return - - // ErrorStringFunc mocks the ErrorString method. - ErrorStringFunc func(returnMoqParam nvml.Return) string - - // EventSetCreateFunc mocks the EventSetCreate method. - EventSetCreateFunc func() (nvml.EventSet, nvml.Return) - - // EventSetFreeFunc mocks the EventSetFree method. - EventSetFreeFunc func(eventSet nvml.EventSet) nvml.Return - - // EventSetWaitFunc mocks the EventSetWait method. - EventSetWaitFunc func(eventSet nvml.EventSet, v uint32) (nvml.EventData, nvml.Return) - - // ExtensionsFunc mocks the Extensions method. - ExtensionsFunc func() nvml.ExtendedInterface - - // GetExcludedDeviceCountFunc mocks the GetExcludedDeviceCount method. - GetExcludedDeviceCountFunc func() (int, nvml.Return) - - // GetExcludedDeviceInfoByIndexFunc mocks the GetExcludedDeviceInfoByIndex method. - GetExcludedDeviceInfoByIndexFunc func(n int) (nvml.ExcludedDeviceInfo, nvml.Return) - - // GetVgpuCompatibilityFunc mocks the GetVgpuCompatibility method. - GetVgpuCompatibilityFunc func(vgpuMetadata *nvml.VgpuMetadata, vgpuPgpuMetadata *nvml.VgpuPgpuMetadata) (nvml.VgpuPgpuCompatibility, nvml.Return) - - // GetVgpuDriverCapabilitiesFunc mocks the GetVgpuDriverCapabilities method. - GetVgpuDriverCapabilitiesFunc func(vgpuDriverCapability nvml.VgpuDriverCapability) (bool, nvml.Return) - - // GetVgpuVersionFunc mocks the GetVgpuVersion method. - GetVgpuVersionFunc func() (nvml.VgpuVersion, nvml.VgpuVersion, nvml.Return) - - // GpmMetricsGetFunc mocks the GpmMetricsGet method. - GpmMetricsGetFunc func(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.Return - - // 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 - - // GpmQueryDeviceSupportFunc mocks the GpmQueryDeviceSupport method. - GpmQueryDeviceSupportFunc func(device nvml.Device) (nvml.GpmSupport, nvml.Return) - - // 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) - - // GpmSampleAllocFunc mocks the GpmSampleAlloc method. - GpmSampleAllocFunc func() (nvml.GpmSample, nvml.Return) - - // GpmSampleFreeFunc mocks the GpmSampleFree method. - GpmSampleFreeFunc func(gpmSample nvml.GpmSample) nvml.Return - - // GpmSampleGetFunc mocks the GpmSampleGet method. - GpmSampleGetFunc func(device nvml.Device, gpmSample nvml.GpmSample) nvml.Return - - // GpmSetStreamingEnabledFunc mocks the GpmSetStreamingEnabled method. - GpmSetStreamingEnabledFunc func(device nvml.Device, v uint32) nvml.Return - - // GpuInstanceCreateComputeInstanceFunc mocks the GpuInstanceCreateComputeInstance method. - GpuInstanceCreateComputeInstanceFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) - - // GpuInstanceCreateComputeInstanceWithPlacementFunc mocks the GpuInstanceCreateComputeInstanceWithPlacement method. - GpuInstanceCreateComputeInstanceWithPlacementFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) - - // GpuInstanceDestroyFunc mocks the GpuInstanceDestroy method. - GpuInstanceDestroyFunc func(gpuInstance nvml.GpuInstance) nvml.Return - - // GpuInstanceGetActiveVgpusFunc mocks the GpuInstanceGetActiveVgpus method. - GpuInstanceGetActiveVgpusFunc func(gpuInstance nvml.GpuInstance) (nvml.ActiveVgpuInstanceInfo, nvml.Return) - - // GpuInstanceGetComputeInstanceByIdFunc mocks the GpuInstanceGetComputeInstanceById method. - GpuInstanceGetComputeInstanceByIdFunc func(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, nvml.Return) - - // GpuInstanceGetComputeInstancePossiblePlacementsFunc mocks the GpuInstanceGetComputeInstancePossiblePlacements method. - GpuInstanceGetComputeInstancePossiblePlacementsFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) - - // GpuInstanceGetComputeInstanceProfileInfoFunc mocks the GpuInstanceGetComputeInstanceProfileInfo method. - GpuInstanceGetComputeInstanceProfileInfoFunc func(gpuInstance nvml.GpuInstance, n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) - - // 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) - - // GpuInstanceGetComputeInstancesFunc mocks the GpuInstanceGetComputeInstances method. - GpuInstanceGetComputeInstancesFunc func(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) - - // GpuInstanceGetCreatableVgpusFunc mocks the GpuInstanceGetCreatableVgpus method. - GpuInstanceGetCreatableVgpusFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuTypeIdInfo, nvml.Return) - - // GpuInstanceGetInfoFunc mocks the GpuInstanceGetInfo method. - GpuInstanceGetInfoFunc func(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, nvml.Return) - - // GpuInstanceGetVgpuHeterogeneousModeFunc mocks the GpuInstanceGetVgpuHeterogeneousMode method. - GpuInstanceGetVgpuHeterogeneousModeFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuHeterogeneousMode, nvml.Return) - - // GpuInstanceGetVgpuSchedulerLogFunc mocks the GpuInstanceGetVgpuSchedulerLog method. - GpuInstanceGetVgpuSchedulerLogFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerLogInfo, nvml.Return) - - // GpuInstanceGetVgpuSchedulerStateFunc mocks the GpuInstanceGetVgpuSchedulerState method. - GpuInstanceGetVgpuSchedulerStateFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerStateInfo, nvml.Return) - - // GpuInstanceGetVgpuTypeCreatablePlacementsFunc mocks the GpuInstanceGetVgpuTypeCreatablePlacements method. - GpuInstanceGetVgpuTypeCreatablePlacementsFunc func(gpuInstance nvml.GpuInstance) (nvml.VgpuCreatablePlacementInfo, nvml.Return) - - // GpuInstanceSetVgpuHeterogeneousModeFunc mocks the GpuInstanceSetVgpuHeterogeneousMode method. - GpuInstanceSetVgpuHeterogeneousModeFunc func(gpuInstance nvml.GpuInstance, vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return - - // GpuInstanceSetVgpuSchedulerStateFunc mocks the GpuInstanceSetVgpuSchedulerState method. - GpuInstanceSetVgpuSchedulerStateFunc func(gpuInstance nvml.GpuInstance, vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return - - // InitFunc mocks the Init method. - InitFunc func() nvml.Return - - // InitWithFlagsFunc mocks the InitWithFlags method. - InitWithFlagsFunc func(v uint32) nvml.Return - - // SetVgpuVersionFunc mocks the SetVgpuVersion method. - SetVgpuVersionFunc func(vgpuVersion *nvml.VgpuVersion) nvml.Return - - // ShutdownFunc mocks the Shutdown method. - ShutdownFunc func() nvml.Return - - // SystemEventSetCreateFunc mocks the SystemEventSetCreate method. - SystemEventSetCreateFunc func(systemEventSetCreateRequest *nvml.SystemEventSetCreateRequest) nvml.Return - - // SystemEventSetFreeFunc mocks the SystemEventSetFree method. - SystemEventSetFreeFunc func(systemEventSetFreeRequest *nvml.SystemEventSetFreeRequest) nvml.Return - - // SystemEventSetWaitFunc mocks the SystemEventSetWait method. - SystemEventSetWaitFunc func(systemEventSetWaitRequest *nvml.SystemEventSetWaitRequest) nvml.Return - - // SystemGetConfComputeCapabilitiesFunc mocks the SystemGetConfComputeCapabilities method. - SystemGetConfComputeCapabilitiesFunc func() (nvml.ConfComputeSystemCaps, nvml.Return) - - // SystemGetConfComputeGpusReadyStateFunc mocks the SystemGetConfComputeGpusReadyState method. - SystemGetConfComputeGpusReadyStateFunc func() (uint32, nvml.Return) - - // SystemGetConfComputeKeyRotationThresholdInfoFunc mocks the SystemGetConfComputeKeyRotationThresholdInfo method. - SystemGetConfComputeKeyRotationThresholdInfoFunc func() (nvml.ConfComputeGetKeyRotationThresholdInfo, nvml.Return) - - // SystemGetConfComputeSettingsFunc mocks the SystemGetConfComputeSettings method. - SystemGetConfComputeSettingsFunc func() (nvml.SystemConfComputeSettings, nvml.Return) - - // SystemGetConfComputeStateFunc mocks the SystemGetConfComputeState method. - SystemGetConfComputeStateFunc func() (nvml.ConfComputeSystemState, nvml.Return) - - // SystemGetCudaDriverVersionFunc mocks the SystemGetCudaDriverVersion method. - SystemGetCudaDriverVersionFunc func() (int, nvml.Return) - - // SystemGetCudaDriverVersion_v2Func mocks the SystemGetCudaDriverVersion_v2 method. - SystemGetCudaDriverVersion_v2Func func() (int, nvml.Return) - - // SystemGetDriverBranchFunc mocks the SystemGetDriverBranch method. - SystemGetDriverBranchFunc func() (nvml.SystemDriverBranchInfo, nvml.Return) - - // SystemGetDriverVersionFunc mocks the SystemGetDriverVersion method. - SystemGetDriverVersionFunc func() (string, nvml.Return) - - // SystemGetHicVersionFunc mocks the SystemGetHicVersion method. - SystemGetHicVersionFunc func() ([]nvml.HwbcEntry, nvml.Return) - - // SystemGetNVMLVersionFunc mocks the SystemGetNVMLVersion method. - SystemGetNVMLVersionFunc func() (string, nvml.Return) - - // SystemGetNvlinkBwModeFunc mocks the SystemGetNvlinkBwMode method. - SystemGetNvlinkBwModeFunc func() (uint32, nvml.Return) - - // SystemGetProcessNameFunc mocks the SystemGetProcessName method. - SystemGetProcessNameFunc func(n int) (string, nvml.Return) - - // SystemGetTopologyGpuSetFunc mocks the SystemGetTopologyGpuSet method. - SystemGetTopologyGpuSetFunc func(n int) ([]nvml.Device, nvml.Return) - - // SystemRegisterEventsFunc mocks the SystemRegisterEvents method. - SystemRegisterEventsFunc func(systemRegisterEventRequest *nvml.SystemRegisterEventRequest) nvml.Return - - // SystemSetConfComputeGpusReadyStateFunc mocks the SystemSetConfComputeGpusReadyState method. - SystemSetConfComputeGpusReadyStateFunc func(v uint32) nvml.Return - - // SystemSetConfComputeKeyRotationThresholdInfoFunc mocks the SystemSetConfComputeKeyRotationThresholdInfo method. - SystemSetConfComputeKeyRotationThresholdInfoFunc func(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) nvml.Return - - // SystemSetNvlinkBwModeFunc mocks the SystemSetNvlinkBwMode method. - SystemSetNvlinkBwModeFunc func(v uint32) nvml.Return - - // UnitGetCountFunc mocks the UnitGetCount method. - UnitGetCountFunc func() (int, nvml.Return) - - // UnitGetDevicesFunc mocks the UnitGetDevices method. - UnitGetDevicesFunc func(unit nvml.Unit) ([]nvml.Device, nvml.Return) - - // UnitGetFanSpeedInfoFunc mocks the UnitGetFanSpeedInfo method. - UnitGetFanSpeedInfoFunc func(unit nvml.Unit) (nvml.UnitFanSpeeds, nvml.Return) - - // UnitGetHandleByIndexFunc mocks the UnitGetHandleByIndex method. - UnitGetHandleByIndexFunc func(n int) (nvml.Unit, nvml.Return) - - // UnitGetLedStateFunc mocks the UnitGetLedState method. - UnitGetLedStateFunc func(unit nvml.Unit) (nvml.LedState, nvml.Return) - - // UnitGetPsuInfoFunc mocks the UnitGetPsuInfo method. - UnitGetPsuInfoFunc func(unit nvml.Unit) (nvml.PSUInfo, nvml.Return) - - // UnitGetTemperatureFunc mocks the UnitGetTemperature method. - UnitGetTemperatureFunc func(unit nvml.Unit, n int) (uint32, nvml.Return) - - // UnitGetUnitInfoFunc mocks the UnitGetUnitInfo method. - UnitGetUnitInfoFunc func(unit nvml.Unit) (nvml.UnitInfo, nvml.Return) - - // UnitSetLedStateFunc mocks the UnitSetLedState method. - UnitSetLedStateFunc func(unit nvml.Unit, ledColor nvml.LedColor) nvml.Return - - // VgpuInstanceClearAccountingPidsFunc mocks the VgpuInstanceClearAccountingPids method. - VgpuInstanceClearAccountingPidsFunc func(vgpuInstance nvml.VgpuInstance) nvml.Return - - // VgpuInstanceGetAccountingModeFunc mocks the VgpuInstanceGetAccountingMode method. - VgpuInstanceGetAccountingModeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) - - // VgpuInstanceGetAccountingPidsFunc mocks the VgpuInstanceGetAccountingPids method. - VgpuInstanceGetAccountingPidsFunc func(vgpuInstance nvml.VgpuInstance) ([]int, nvml.Return) - - // VgpuInstanceGetAccountingStatsFunc mocks the VgpuInstanceGetAccountingStats method. - VgpuInstanceGetAccountingStatsFunc func(vgpuInstance nvml.VgpuInstance, n int) (nvml.AccountingStats, nvml.Return) - - // VgpuInstanceGetEccModeFunc mocks the VgpuInstanceGetEccMode method. - VgpuInstanceGetEccModeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) - - // VgpuInstanceGetEncoderCapacityFunc mocks the VgpuInstanceGetEncoderCapacity method. - VgpuInstanceGetEncoderCapacityFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) - - // VgpuInstanceGetEncoderSessionsFunc mocks the VgpuInstanceGetEncoderSessions method. - VgpuInstanceGetEncoderSessionsFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.EncoderSessionInfo, nvml.Return) - - // VgpuInstanceGetEncoderStatsFunc mocks the VgpuInstanceGetEncoderStats method. - VgpuInstanceGetEncoderStatsFunc func(vgpuInstance nvml.VgpuInstance) (int, uint32, uint32, nvml.Return) - - // VgpuInstanceGetFBCSessionsFunc mocks the VgpuInstanceGetFBCSessions method. - VgpuInstanceGetFBCSessionsFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.FBCSessionInfo, nvml.Return) - - // VgpuInstanceGetFBCStatsFunc mocks the VgpuInstanceGetFBCStats method. - VgpuInstanceGetFBCStatsFunc func(vgpuInstance nvml.VgpuInstance) (nvml.FBCStats, nvml.Return) - - // VgpuInstanceGetFbUsageFunc mocks the VgpuInstanceGetFbUsage method. - VgpuInstanceGetFbUsageFunc func(vgpuInstance nvml.VgpuInstance) (uint64, nvml.Return) - - // VgpuInstanceGetFrameRateLimitFunc mocks the VgpuInstanceGetFrameRateLimit method. - VgpuInstanceGetFrameRateLimitFunc func(vgpuInstance nvml.VgpuInstance) (uint32, nvml.Return) - - // VgpuInstanceGetGpuInstanceIdFunc mocks the VgpuInstanceGetGpuInstanceId method. - VgpuInstanceGetGpuInstanceIdFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) - - // VgpuInstanceGetGpuPciIdFunc mocks the VgpuInstanceGetGpuPciId method. - VgpuInstanceGetGpuPciIdFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) - - // VgpuInstanceGetLicenseInfoFunc mocks the VgpuInstanceGetLicenseInfo method. - VgpuInstanceGetLicenseInfoFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuLicenseInfo, nvml.Return) - - // VgpuInstanceGetLicenseStatusFunc mocks the VgpuInstanceGetLicenseStatus method. - VgpuInstanceGetLicenseStatusFunc func(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) - - // VgpuInstanceGetMdevUUIDFunc mocks the VgpuInstanceGetMdevUUID method. - VgpuInstanceGetMdevUUIDFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) - - // VgpuInstanceGetMetadataFunc mocks the VgpuInstanceGetMetadata method. - VgpuInstanceGetMetadataFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, nvml.Return) - - // VgpuInstanceGetRuntimeStateSizeFunc mocks the VgpuInstanceGetRuntimeStateSize method. - VgpuInstanceGetRuntimeStateSizeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuRuntimeState, nvml.Return) - - // VgpuInstanceGetTypeFunc mocks the VgpuInstanceGetType method. - VgpuInstanceGetTypeFunc func(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, nvml.Return) - - // VgpuInstanceGetUUIDFunc mocks the VgpuInstanceGetUUID method. - VgpuInstanceGetUUIDFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) - - // VgpuInstanceGetVmDriverVersionFunc mocks the VgpuInstanceGetVmDriverVersion method. - VgpuInstanceGetVmDriverVersionFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) - - // VgpuInstanceGetVmIDFunc mocks the VgpuInstanceGetVmID method. - VgpuInstanceGetVmIDFunc func(vgpuInstance nvml.VgpuInstance) (string, nvml.VgpuVmIdType, nvml.Return) - - // VgpuInstanceSetEncoderCapacityFunc mocks the VgpuInstanceSetEncoderCapacity method. - VgpuInstanceSetEncoderCapacityFunc func(vgpuInstance nvml.VgpuInstance, n int) nvml.Return - - // VgpuTypeGetBAR1InfoFunc mocks the VgpuTypeGetBAR1Info method. - VgpuTypeGetBAR1InfoFunc func(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuTypeBar1Info, nvml.Return) - - // VgpuTypeGetCapabilitiesFunc mocks the VgpuTypeGetCapabilities method. - VgpuTypeGetCapabilitiesFunc func(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) - - // VgpuTypeGetClassFunc mocks the VgpuTypeGetClass method. - VgpuTypeGetClassFunc func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) - - // VgpuTypeGetDeviceIDFunc mocks the VgpuTypeGetDeviceID method. - VgpuTypeGetDeviceIDFunc func(vgpuTypeId nvml.VgpuTypeId) (uint64, uint64, nvml.Return) - - // VgpuTypeGetFrameRateLimitFunc mocks the VgpuTypeGetFrameRateLimit method. - VgpuTypeGetFrameRateLimitFunc func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) - - // VgpuTypeGetFramebufferSizeFunc mocks the VgpuTypeGetFramebufferSize method. - VgpuTypeGetFramebufferSizeFunc func(vgpuTypeId nvml.VgpuTypeId) (uint64, nvml.Return) - - // VgpuTypeGetGpuInstanceProfileIdFunc mocks the VgpuTypeGetGpuInstanceProfileId method. - VgpuTypeGetGpuInstanceProfileIdFunc func(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) - - // VgpuTypeGetLicenseFunc mocks the VgpuTypeGetLicense method. - VgpuTypeGetLicenseFunc func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) - - // VgpuTypeGetMaxInstancesFunc mocks the VgpuTypeGetMaxInstances method. - VgpuTypeGetMaxInstancesFunc func(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) - - // VgpuTypeGetMaxInstancesPerGpuInstanceFunc mocks the VgpuTypeGetMaxInstancesPerGpuInstance method. - VgpuTypeGetMaxInstancesPerGpuInstanceFunc func(vgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance) nvml.Return - - // VgpuTypeGetMaxInstancesPerVmFunc mocks the VgpuTypeGetMaxInstancesPerVm method. - VgpuTypeGetMaxInstancesPerVmFunc func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) - - // VgpuTypeGetNameFunc mocks the VgpuTypeGetName method. - VgpuTypeGetNameFunc func(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) - - // VgpuTypeGetNumDisplayHeadsFunc mocks the VgpuTypeGetNumDisplayHeads method. - VgpuTypeGetNumDisplayHeadsFunc func(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) - - // VgpuTypeGetResolutionFunc mocks the VgpuTypeGetResolution method. - VgpuTypeGetResolutionFunc func(vgpuTypeId nvml.VgpuTypeId, n int) (uint32, uint32, nvml.Return) - - // calls tracks calls to the methods. - calls struct { - // ComputeInstanceDestroy holds details about calls to the ComputeInstanceDestroy method. - ComputeInstanceDestroy []struct { - // ComputeInstance is the computeInstance argument value. - ComputeInstance nvml.ComputeInstance - } - // ComputeInstanceGetInfo holds details about calls to the ComputeInstanceGetInfo method. - ComputeInstanceGetInfo []struct { - // ComputeInstance is the computeInstance argument value. - ComputeInstance nvml.ComputeInstance - } - // DeviceClearAccountingPids holds details about calls to the DeviceClearAccountingPids method. - DeviceClearAccountingPids []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceClearCpuAffinity holds details about calls to the DeviceClearCpuAffinity method. - DeviceClearCpuAffinity []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceClearEccErrorCounts holds details about calls to the DeviceClearEccErrorCounts method. - DeviceClearEccErrorCounts []struct { - // Device is the device argument value. - Device nvml.Device - // EccCounterType is the eccCounterType argument value. - EccCounterType nvml.EccCounterType - } - // DeviceClearFieldValues holds details about calls to the DeviceClearFieldValues method. - DeviceClearFieldValues []struct { - // Device is the device argument value. - Device nvml.Device - // FieldValues is the fieldValues argument value. - FieldValues []nvml.FieldValue - } - // DeviceCreateGpuInstance holds details about calls to the DeviceCreateGpuInstance method. - DeviceCreateGpuInstance []struct { - // Device is the device argument value. - Device nvml.Device - // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - // DeviceCreateGpuInstanceWithPlacement holds details about calls to the DeviceCreateGpuInstanceWithPlacement method. - DeviceCreateGpuInstanceWithPlacement []struct { - // Device is the device argument value. - Device nvml.Device - // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - // GpuInstancePlacement is the gpuInstancePlacement argument value. - GpuInstancePlacement *nvml.GpuInstancePlacement - } - // DeviceDiscoverGpus holds details about calls to the DeviceDiscoverGpus method. - DeviceDiscoverGpus []struct { - } - // DeviceFreezeNvLinkUtilizationCounter holds details about calls to the DeviceFreezeNvLinkUtilizationCounter method. - DeviceFreezeNvLinkUtilizationCounter []struct { - // Device is the device argument value. - Device nvml.Device - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // DeviceGetAPIRestriction holds details about calls to the DeviceGetAPIRestriction method. - DeviceGetAPIRestriction []struct { - // Device is the device argument value. - Device nvml.Device - // RestrictedAPI is the restrictedAPI argument value. - RestrictedAPI nvml.RestrictedAPI - } - // DeviceGetAccountingBufferSize holds details about calls to the DeviceGetAccountingBufferSize method. - DeviceGetAccountingBufferSize []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetAccountingMode holds details about calls to the DeviceGetAccountingMode method. - DeviceGetAccountingMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetAccountingPids holds details about calls to the DeviceGetAccountingPids method. - DeviceGetAccountingPids []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetAccountingStats holds details about calls to the DeviceGetAccountingStats method. - DeviceGetAccountingStats []struct { - // Device is the device argument value. - Device nvml.Device - // V is the v argument value. - V uint32 - } - // DeviceGetActiveVgpus holds details about calls to the DeviceGetActiveVgpus method. - DeviceGetActiveVgpus []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetAdaptiveClockInfoStatus holds details about calls to the DeviceGetAdaptiveClockInfoStatus method. - DeviceGetAdaptiveClockInfoStatus []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetAddressingMode holds details about calls to the DeviceGetAddressingMode method. - DeviceGetAddressingMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetApplicationsClock holds details about calls to the DeviceGetApplicationsClock method. - DeviceGetApplicationsClock []struct { - // Device is the device argument value. - Device nvml.Device - // ClockType is the clockType argument value. - ClockType nvml.ClockType - } - // DeviceGetArchitecture holds details about calls to the DeviceGetArchitecture method. - DeviceGetArchitecture []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetAttributes holds details about calls to the DeviceGetAttributes method. - DeviceGetAttributes []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetAutoBoostedClocksEnabled holds details about calls to the DeviceGetAutoBoostedClocksEnabled method. - DeviceGetAutoBoostedClocksEnabled []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetBAR1MemoryInfo holds details about calls to the DeviceGetBAR1MemoryInfo method. - DeviceGetBAR1MemoryInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetBoardId holds details about calls to the DeviceGetBoardId method. - DeviceGetBoardId []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetBoardPartNumber holds details about calls to the DeviceGetBoardPartNumber method. - DeviceGetBoardPartNumber []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetBrand holds details about calls to the DeviceGetBrand method. - DeviceGetBrand []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetBridgeChipInfo holds details about calls to the DeviceGetBridgeChipInfo method. - DeviceGetBridgeChipInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetBusType holds details about calls to the DeviceGetBusType method. - DeviceGetBusType []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetC2cModeInfoV holds details about calls to the DeviceGetC2cModeInfoV method. - DeviceGetC2cModeInfoV []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetCapabilities holds details about calls to the DeviceGetCapabilities method. - DeviceGetCapabilities []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetClkMonStatus holds details about calls to the DeviceGetClkMonStatus method. - DeviceGetClkMonStatus []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetClock holds details about calls to the DeviceGetClock method. - DeviceGetClock []struct { - // Device is the device argument value. - Device nvml.Device - // ClockType is the clockType argument value. - ClockType nvml.ClockType - // ClockId is the clockId argument value. - ClockId nvml.ClockId - } - // DeviceGetClockInfo holds details about calls to the DeviceGetClockInfo method. - DeviceGetClockInfo []struct { - // Device is the device argument value. - Device nvml.Device - // ClockType is the clockType argument value. - ClockType nvml.ClockType - } - // DeviceGetClockOffsets holds details about calls to the DeviceGetClockOffsets method. - DeviceGetClockOffsets []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetComputeInstanceId holds details about calls to the DeviceGetComputeInstanceId method. - DeviceGetComputeInstanceId []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetComputeMode holds details about calls to the DeviceGetComputeMode method. - DeviceGetComputeMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetComputeRunningProcesses holds details about calls to the DeviceGetComputeRunningProcesses method. - DeviceGetComputeRunningProcesses []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetConfComputeGpuAttestationReport holds details about calls to the DeviceGetConfComputeGpuAttestationReport method. - DeviceGetConfComputeGpuAttestationReport []struct { - // Device is the device argument value. - Device nvml.Device - // ConfComputeGpuAttestationReport is the confComputeGpuAttestationReport argument value. - ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport - } - // DeviceGetConfComputeGpuCertificate holds details about calls to the DeviceGetConfComputeGpuCertificate method. - DeviceGetConfComputeGpuCertificate []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetConfComputeMemSizeInfo holds details about calls to the DeviceGetConfComputeMemSizeInfo method. - DeviceGetConfComputeMemSizeInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetConfComputeProtectedMemoryUsage holds details about calls to the DeviceGetConfComputeProtectedMemoryUsage method. - DeviceGetConfComputeProtectedMemoryUsage []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetCoolerInfo holds details about calls to the DeviceGetCoolerInfo method. - DeviceGetCoolerInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetCount holds details about calls to the DeviceGetCount method. - DeviceGetCount []struct { - } - // DeviceGetCpuAffinity holds details about calls to the DeviceGetCpuAffinity method. - DeviceGetCpuAffinity []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetCpuAffinityWithinScope holds details about calls to the DeviceGetCpuAffinityWithinScope method. - DeviceGetCpuAffinityWithinScope []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - // AffinityScope is the affinityScope argument value. - AffinityScope nvml.AffinityScope - } - // DeviceGetCreatableVgpus holds details about calls to the DeviceGetCreatableVgpus method. - DeviceGetCreatableVgpus []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetCudaComputeCapability holds details about calls to the DeviceGetCudaComputeCapability method. - DeviceGetCudaComputeCapability []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetCurrPcieLinkGeneration holds details about calls to the DeviceGetCurrPcieLinkGeneration method. - DeviceGetCurrPcieLinkGeneration []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetCurrPcieLinkWidth holds details about calls to the DeviceGetCurrPcieLinkWidth method. - DeviceGetCurrPcieLinkWidth []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetCurrentClockFreqs holds details about calls to the DeviceGetCurrentClockFreqs method. - DeviceGetCurrentClockFreqs []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetCurrentClocksEventReasons holds details about calls to the DeviceGetCurrentClocksEventReasons method. - DeviceGetCurrentClocksEventReasons []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetCurrentClocksThrottleReasons holds details about calls to the DeviceGetCurrentClocksThrottleReasons method. - DeviceGetCurrentClocksThrottleReasons []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetDecoderUtilization holds details about calls to the DeviceGetDecoderUtilization method. - DeviceGetDecoderUtilization []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetDefaultApplicationsClock holds details about calls to the DeviceGetDefaultApplicationsClock method. - DeviceGetDefaultApplicationsClock []struct { - // Device is the device argument value. - Device nvml.Device - // ClockType is the clockType argument value. - ClockType nvml.ClockType - } - // DeviceGetDefaultEccMode holds details about calls to the DeviceGetDefaultEccMode method. - DeviceGetDefaultEccMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetDetailedEccErrors holds details about calls to the DeviceGetDetailedEccErrors method. - DeviceGetDetailedEccErrors []struct { - // Device is the device argument value. - Device nvml.Device - // MemoryErrorType is the memoryErrorType argument value. - MemoryErrorType nvml.MemoryErrorType - // EccCounterType is the eccCounterType argument value. - EccCounterType nvml.EccCounterType - } - // DeviceGetDeviceHandleFromMigDeviceHandle holds details about calls to the DeviceGetDeviceHandleFromMigDeviceHandle method. - DeviceGetDeviceHandleFromMigDeviceHandle []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetDisplayActive holds details about calls to the DeviceGetDisplayActive method. - DeviceGetDisplayActive []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetDisplayMode holds details about calls to the DeviceGetDisplayMode method. - DeviceGetDisplayMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetDramEncryptionMode holds details about calls to the DeviceGetDramEncryptionMode method. - DeviceGetDramEncryptionMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetDriverModel holds details about calls to the DeviceGetDriverModel method. - DeviceGetDriverModel []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetDriverModel_v2 holds details about calls to the DeviceGetDriverModel_v2 method. - DeviceGetDriverModel_v2 []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetDynamicPstatesInfo holds details about calls to the DeviceGetDynamicPstatesInfo method. - DeviceGetDynamicPstatesInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetEccMode holds details about calls to the DeviceGetEccMode method. - DeviceGetEccMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetEncoderCapacity holds details about calls to the DeviceGetEncoderCapacity method. - DeviceGetEncoderCapacity []struct { - // Device is the device argument value. - Device nvml.Device - // EncoderType is the encoderType argument value. - EncoderType nvml.EncoderType - } - // DeviceGetEncoderSessions holds details about calls to the DeviceGetEncoderSessions method. - DeviceGetEncoderSessions []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetEncoderStats holds details about calls to the DeviceGetEncoderStats method. - DeviceGetEncoderStats []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetEncoderUtilization holds details about calls to the DeviceGetEncoderUtilization method. - DeviceGetEncoderUtilization []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetEnforcedPowerLimit holds details about calls to the DeviceGetEnforcedPowerLimit method. - DeviceGetEnforcedPowerLimit []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetFBCSessions holds details about calls to the DeviceGetFBCSessions method. - DeviceGetFBCSessions []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetFBCStats holds details about calls to the DeviceGetFBCStats method. - DeviceGetFBCStats []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetFanControlPolicy_v2 holds details about calls to the DeviceGetFanControlPolicy_v2 method. - DeviceGetFanControlPolicy_v2 []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetFanSpeed holds details about calls to the DeviceGetFanSpeed method. - DeviceGetFanSpeed []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetFanSpeedRPM holds details about calls to the DeviceGetFanSpeedRPM method. - DeviceGetFanSpeedRPM []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetFanSpeed_v2 holds details about calls to the DeviceGetFanSpeed_v2 method. - DeviceGetFanSpeed_v2 []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetFieldValues holds details about calls to the DeviceGetFieldValues method. - DeviceGetFieldValues []struct { - // Device is the device argument value. - Device nvml.Device - // FieldValues is the fieldValues argument value. - FieldValues []nvml.FieldValue - } - // DeviceGetGpcClkMinMaxVfOffset holds details about calls to the DeviceGetGpcClkMinMaxVfOffset method. - DeviceGetGpcClkMinMaxVfOffset []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetGpcClkVfOffset holds details about calls to the DeviceGetGpcClkVfOffset method. - DeviceGetGpcClkVfOffset []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetGpuFabricInfo holds details about calls to the DeviceGetGpuFabricInfo method. - DeviceGetGpuFabricInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetGpuFabricInfoV holds details about calls to the DeviceGetGpuFabricInfoV method. - DeviceGetGpuFabricInfoV []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetGpuInstanceById holds details about calls to the DeviceGetGpuInstanceById method. - DeviceGetGpuInstanceById []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetGpuInstanceId holds details about calls to the DeviceGetGpuInstanceId method. - DeviceGetGpuInstanceId []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetGpuInstancePossiblePlacements holds details about calls to the DeviceGetGpuInstancePossiblePlacements method. - DeviceGetGpuInstancePossiblePlacements []struct { - // Device is the device argument value. - Device nvml.Device - // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - // DeviceGetGpuInstanceProfileInfo holds details about calls to the DeviceGetGpuInstanceProfileInfo method. - DeviceGetGpuInstanceProfileInfo []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetGpuInstanceProfileInfoByIdV holds details about calls to the DeviceGetGpuInstanceProfileInfoByIdV method. - DeviceGetGpuInstanceProfileInfoByIdV []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetGpuInstanceProfileInfoV holds details about calls to the DeviceGetGpuInstanceProfileInfoV method. - DeviceGetGpuInstanceProfileInfoV []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetGpuInstanceRemainingCapacity holds details about calls to the DeviceGetGpuInstanceRemainingCapacity method. - DeviceGetGpuInstanceRemainingCapacity []struct { - // Device is the device argument value. - Device nvml.Device - // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - // DeviceGetGpuInstances holds details about calls to the DeviceGetGpuInstances method. - DeviceGetGpuInstances []struct { - // Device is the device argument value. - Device nvml.Device - // GpuInstanceProfileInfo is the gpuInstanceProfileInfo argument value. - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - // DeviceGetGpuMaxPcieLinkGeneration holds details about calls to the DeviceGetGpuMaxPcieLinkGeneration method. - DeviceGetGpuMaxPcieLinkGeneration []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetGpuOperationMode holds details about calls to the DeviceGetGpuOperationMode method. - DeviceGetGpuOperationMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetGraphicsRunningProcesses holds details about calls to the DeviceGetGraphicsRunningProcesses method. - DeviceGetGraphicsRunningProcesses []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetGridLicensableFeatures holds details about calls to the DeviceGetGridLicensableFeatures method. - DeviceGetGridLicensableFeatures []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetGspFirmwareMode holds details about calls to the DeviceGetGspFirmwareMode method. - DeviceGetGspFirmwareMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetGspFirmwareVersion holds details about calls to the DeviceGetGspFirmwareVersion method. - DeviceGetGspFirmwareVersion []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetHandleByIndex holds details about calls to the DeviceGetHandleByIndex method. - DeviceGetHandleByIndex []struct { - // N is the n argument value. - N int - } - // DeviceGetHandleByPciBusId holds details about calls to the DeviceGetHandleByPciBusId method. - DeviceGetHandleByPciBusId []struct { - // S is the s argument value. - S string - } - // DeviceGetHandleBySerial holds details about calls to the DeviceGetHandleBySerial method. - DeviceGetHandleBySerial []struct { - // S is the s argument value. - S string - } - // DeviceGetHandleByUUID holds details about calls to the DeviceGetHandleByUUID method. - DeviceGetHandleByUUID []struct { - // S is the s argument value. - S string - } - // DeviceGetHandleByUUIDV holds details about calls to the DeviceGetHandleByUUIDV method. - DeviceGetHandleByUUIDV []struct { - // UUID is the uUID argument value. - UUID *nvml.UUID - } - // DeviceGetHostVgpuMode holds details about calls to the DeviceGetHostVgpuMode method. - DeviceGetHostVgpuMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetIndex holds details about calls to the DeviceGetIndex method. - DeviceGetIndex []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetInforomConfigurationChecksum holds details about calls to the DeviceGetInforomConfigurationChecksum method. - DeviceGetInforomConfigurationChecksum []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetInforomImageVersion holds details about calls to the DeviceGetInforomImageVersion method. - DeviceGetInforomImageVersion []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetInforomVersion holds details about calls to the DeviceGetInforomVersion method. - DeviceGetInforomVersion []struct { - // Device is the device argument value. - Device nvml.Device - // InforomObject is the inforomObject argument value. - InforomObject nvml.InforomObject - } - // DeviceGetIrqNum holds details about calls to the DeviceGetIrqNum method. - DeviceGetIrqNum []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetJpgUtilization holds details about calls to the DeviceGetJpgUtilization method. - DeviceGetJpgUtilization []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetLastBBXFlushTime holds details about calls to the DeviceGetLastBBXFlushTime method. - DeviceGetLastBBXFlushTime []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMPSComputeRunningProcesses holds details about calls to the DeviceGetMPSComputeRunningProcesses method. - DeviceGetMPSComputeRunningProcesses []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMarginTemperature holds details about calls to the DeviceGetMarginTemperature method. - DeviceGetMarginTemperature []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMaxClockInfo holds details about calls to the DeviceGetMaxClockInfo method. - DeviceGetMaxClockInfo []struct { - // Device is the device argument value. - Device nvml.Device - // ClockType is the clockType argument value. - ClockType nvml.ClockType - } - // DeviceGetMaxCustomerBoostClock holds details about calls to the DeviceGetMaxCustomerBoostClock method. - DeviceGetMaxCustomerBoostClock []struct { - // Device is the device argument value. - Device nvml.Device - // ClockType is the clockType argument value. - ClockType nvml.ClockType - } - // DeviceGetMaxMigDeviceCount holds details about calls to the DeviceGetMaxMigDeviceCount method. - DeviceGetMaxMigDeviceCount []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMaxPcieLinkGeneration holds details about calls to the DeviceGetMaxPcieLinkGeneration method. - DeviceGetMaxPcieLinkGeneration []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMaxPcieLinkWidth holds details about calls to the DeviceGetMaxPcieLinkWidth method. - DeviceGetMaxPcieLinkWidth []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMemClkMinMaxVfOffset holds details about calls to the DeviceGetMemClkMinMaxVfOffset method. - DeviceGetMemClkMinMaxVfOffset []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMemClkVfOffset holds details about calls to the DeviceGetMemClkVfOffset method. - DeviceGetMemClkVfOffset []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMemoryAffinity holds details about calls to the DeviceGetMemoryAffinity method. - DeviceGetMemoryAffinity []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - // AffinityScope is the affinityScope argument value. - AffinityScope nvml.AffinityScope - } - // DeviceGetMemoryBusWidth holds details about calls to the DeviceGetMemoryBusWidth method. - DeviceGetMemoryBusWidth []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMemoryErrorCounter holds details about calls to the DeviceGetMemoryErrorCounter method. - DeviceGetMemoryErrorCounter []struct { - // Device is the device argument value. - Device nvml.Device - // MemoryErrorType is the memoryErrorType argument value. - MemoryErrorType nvml.MemoryErrorType - // EccCounterType is the eccCounterType argument value. - EccCounterType nvml.EccCounterType - // MemoryLocation is the memoryLocation argument value. - MemoryLocation nvml.MemoryLocation - } - // DeviceGetMemoryInfo holds details about calls to the DeviceGetMemoryInfo method. - DeviceGetMemoryInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMemoryInfo_v2 holds details about calls to the DeviceGetMemoryInfo_v2 method. - DeviceGetMemoryInfo_v2 []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMigDeviceHandleByIndex holds details about calls to the DeviceGetMigDeviceHandleByIndex method. - DeviceGetMigDeviceHandleByIndex []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetMigMode holds details about calls to the DeviceGetMigMode method. - DeviceGetMigMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMinMaxClockOfPState holds details about calls to the DeviceGetMinMaxClockOfPState method. - DeviceGetMinMaxClockOfPState []struct { - // Device is the device argument value. - Device nvml.Device - // ClockType is the clockType argument value. - ClockType nvml.ClockType - // Pstates is the pstates argument value. - Pstates nvml.Pstates - } - // DeviceGetMinMaxFanSpeed holds details about calls to the DeviceGetMinMaxFanSpeed method. - DeviceGetMinMaxFanSpeed []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMinorNumber holds details about calls to the DeviceGetMinorNumber method. - DeviceGetMinorNumber []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetModuleId holds details about calls to the DeviceGetModuleId method. - DeviceGetModuleId []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetMultiGpuBoard holds details about calls to the DeviceGetMultiGpuBoard method. - DeviceGetMultiGpuBoard []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetName holds details about calls to the DeviceGetName method. - DeviceGetName []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetNumFans holds details about calls to the DeviceGetNumFans method. - DeviceGetNumFans []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetNumGpuCores holds details about calls to the DeviceGetNumGpuCores method. - DeviceGetNumGpuCores []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetNumaNodeId holds details about calls to the DeviceGetNumaNodeId method. - DeviceGetNumaNodeId []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetNvLinkCapability holds details about calls to the DeviceGetNvLinkCapability method. - DeviceGetNvLinkCapability []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - // NvLinkCapability is the nvLinkCapability argument value. - NvLinkCapability nvml.NvLinkCapability - } - // DeviceGetNvLinkErrorCounter holds details about calls to the DeviceGetNvLinkErrorCounter method. - DeviceGetNvLinkErrorCounter []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - // NvLinkErrorCounter is the nvLinkErrorCounter argument value. - NvLinkErrorCounter nvml.NvLinkErrorCounter - } - // DeviceGetNvLinkInfo holds details about calls to the DeviceGetNvLinkInfo method. - DeviceGetNvLinkInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetNvLinkRemoteDeviceType holds details about calls to the DeviceGetNvLinkRemoteDeviceType method. - DeviceGetNvLinkRemoteDeviceType []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetNvLinkRemotePciInfo holds details about calls to the DeviceGetNvLinkRemotePciInfo method. - DeviceGetNvLinkRemotePciInfo []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetNvLinkState holds details about calls to the DeviceGetNvLinkState method. - DeviceGetNvLinkState []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetNvLinkUtilizationControl holds details about calls to the DeviceGetNvLinkUtilizationControl method. - DeviceGetNvLinkUtilizationControl []struct { - // Device is the device argument value. - Device nvml.Device - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - } - // DeviceGetNvLinkUtilizationCounter holds details about calls to the DeviceGetNvLinkUtilizationCounter method. - DeviceGetNvLinkUtilizationCounter []struct { - // Device is the device argument value. - Device nvml.Device - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - } - // DeviceGetNvLinkVersion holds details about calls to the DeviceGetNvLinkVersion method. - DeviceGetNvLinkVersion []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetNvlinkBwMode holds details about calls to the DeviceGetNvlinkBwMode method. - DeviceGetNvlinkBwMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetNvlinkSupportedBwModes holds details about calls to the DeviceGetNvlinkSupportedBwModes method. - DeviceGetNvlinkSupportedBwModes []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetOfaUtilization holds details about calls to the DeviceGetOfaUtilization method. - DeviceGetOfaUtilization []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetP2PStatus holds details about calls to the DeviceGetP2PStatus method. - DeviceGetP2PStatus []struct { - // Device1 is the device1 argument value. - Device1 nvml.Device - // Device2 is the device2 argument value. - Device2 nvml.Device - // GpuP2PCapsIndex is the gpuP2PCapsIndex argument value. - GpuP2PCapsIndex nvml.GpuP2PCapsIndex - } - // DeviceGetPciInfo holds details about calls to the DeviceGetPciInfo method. - DeviceGetPciInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPciInfoExt holds details about calls to the DeviceGetPciInfoExt method. - DeviceGetPciInfoExt []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPcieLinkMaxSpeed holds details about calls to the DeviceGetPcieLinkMaxSpeed method. - DeviceGetPcieLinkMaxSpeed []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPcieReplayCounter holds details about calls to the DeviceGetPcieReplayCounter method. - DeviceGetPcieReplayCounter []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPcieSpeed holds details about calls to the DeviceGetPcieSpeed method. - DeviceGetPcieSpeed []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPcieThroughput holds details about calls to the DeviceGetPcieThroughput method. - DeviceGetPcieThroughput []struct { - // Device is the device argument value. - Device nvml.Device - // PcieUtilCounter is the pcieUtilCounter argument value. - PcieUtilCounter nvml.PcieUtilCounter - } - // DeviceGetPdi holds details about calls to the DeviceGetPdi method. - DeviceGetPdi []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPerformanceModes holds details about calls to the DeviceGetPerformanceModes method. - DeviceGetPerformanceModes []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPerformanceState holds details about calls to the DeviceGetPerformanceState method. - DeviceGetPerformanceState []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPersistenceMode holds details about calls to the DeviceGetPersistenceMode method. - DeviceGetPersistenceMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPgpuMetadataString holds details about calls to the DeviceGetPgpuMetadataString method. - DeviceGetPgpuMetadataString []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPlatformInfo holds details about calls to the DeviceGetPlatformInfo method. - DeviceGetPlatformInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPowerManagementDefaultLimit holds details about calls to the DeviceGetPowerManagementDefaultLimit method. - DeviceGetPowerManagementDefaultLimit []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPowerManagementLimit holds details about calls to the DeviceGetPowerManagementLimit method. - DeviceGetPowerManagementLimit []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPowerManagementLimitConstraints holds details about calls to the DeviceGetPowerManagementLimitConstraints method. - DeviceGetPowerManagementLimitConstraints []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPowerManagementMode holds details about calls to the DeviceGetPowerManagementMode method. - DeviceGetPowerManagementMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPowerMizerMode_v1 holds details about calls to the DeviceGetPowerMizerMode_v1 method. - DeviceGetPowerMizerMode_v1 []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPowerSource holds details about calls to the DeviceGetPowerSource method. - DeviceGetPowerSource []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPowerState holds details about calls to the DeviceGetPowerState method. - DeviceGetPowerState []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetPowerUsage holds details about calls to the DeviceGetPowerUsage method. - DeviceGetPowerUsage []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetProcessUtilization holds details about calls to the DeviceGetProcessUtilization method. - DeviceGetProcessUtilization []struct { - // Device is the device argument value. - Device nvml.Device - // V is the v argument value. - V uint64 - } - // DeviceGetProcessesUtilizationInfo holds details about calls to the DeviceGetProcessesUtilizationInfo method. - DeviceGetProcessesUtilizationInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetRemappedRows holds details about calls to the DeviceGetRemappedRows method. - DeviceGetRemappedRows []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetRepairStatus holds details about calls to the DeviceGetRepairStatus method. - DeviceGetRepairStatus []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetRetiredPages holds details about calls to the DeviceGetRetiredPages method. - DeviceGetRetiredPages []struct { - // Device is the device argument value. - Device nvml.Device - // PageRetirementCause is the pageRetirementCause argument value. - PageRetirementCause nvml.PageRetirementCause - } - // DeviceGetRetiredPagesPendingStatus holds details about calls to the DeviceGetRetiredPagesPendingStatus method. - DeviceGetRetiredPagesPendingStatus []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetRetiredPages_v2 holds details about calls to the DeviceGetRetiredPages_v2 method. - DeviceGetRetiredPages_v2 []struct { - // Device is the device argument value. - Device nvml.Device - // PageRetirementCause is the pageRetirementCause argument value. - PageRetirementCause nvml.PageRetirementCause - } - // DeviceGetRowRemapperHistogram holds details about calls to the DeviceGetRowRemapperHistogram method. - DeviceGetRowRemapperHistogram []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetRunningProcessDetailList holds details about calls to the DeviceGetRunningProcessDetailList method. - DeviceGetRunningProcessDetailList []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetSamples holds details about calls to the DeviceGetSamples method. - DeviceGetSamples []struct { - // Device is the device argument value. - Device nvml.Device - // SamplingType is the samplingType argument value. - SamplingType nvml.SamplingType - // V is the v argument value. - V uint64 - } - // DeviceGetSerial holds details about calls to the DeviceGetSerial method. - DeviceGetSerial []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetSramEccErrorStatus holds details about calls to the DeviceGetSramEccErrorStatus method. - DeviceGetSramEccErrorStatus []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetSramUniqueUncorrectedEccErrorCounts holds details about calls to the DeviceGetSramUniqueUncorrectedEccErrorCounts method. - DeviceGetSramUniqueUncorrectedEccErrorCounts []struct { - // Device is the device argument value. - Device nvml.Device - // EccSramUniqueUncorrectedErrorCounts is the eccSramUniqueUncorrectedErrorCounts argument value. - EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts - } - // DeviceGetSupportedClocksEventReasons holds details about calls to the DeviceGetSupportedClocksEventReasons method. - DeviceGetSupportedClocksEventReasons []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetSupportedClocksThrottleReasons holds details about calls to the DeviceGetSupportedClocksThrottleReasons method. - DeviceGetSupportedClocksThrottleReasons []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetSupportedEventTypes holds details about calls to the DeviceGetSupportedEventTypes method. - DeviceGetSupportedEventTypes []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetSupportedGraphicsClocks holds details about calls to the DeviceGetSupportedGraphicsClocks method. - DeviceGetSupportedGraphicsClocks []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetSupportedMemoryClocks holds details about calls to the DeviceGetSupportedMemoryClocks method. - DeviceGetSupportedMemoryClocks []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetSupportedPerformanceStates holds details about calls to the DeviceGetSupportedPerformanceStates method. - DeviceGetSupportedPerformanceStates []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetSupportedVgpus holds details about calls to the DeviceGetSupportedVgpus method. - DeviceGetSupportedVgpus []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetTargetFanSpeed holds details about calls to the DeviceGetTargetFanSpeed method. - DeviceGetTargetFanSpeed []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceGetTemperature holds details about calls to the DeviceGetTemperature method. - DeviceGetTemperature []struct { - // Device is the device argument value. - Device nvml.Device - // TemperatureSensors is the temperatureSensors argument value. - TemperatureSensors nvml.TemperatureSensors - } - // DeviceGetTemperatureThreshold holds details about calls to the DeviceGetTemperatureThreshold method. - DeviceGetTemperatureThreshold []struct { - // Device is the device argument value. - Device nvml.Device - // TemperatureThresholds is the temperatureThresholds argument value. - TemperatureThresholds nvml.TemperatureThresholds - } - // DeviceGetTemperatureV holds details about calls to the DeviceGetTemperatureV method. - DeviceGetTemperatureV []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetThermalSettings holds details about calls to the DeviceGetThermalSettings method. - DeviceGetThermalSettings []struct { - // Device is the device argument value. - Device nvml.Device - // V is the v argument value. - V uint32 - } - // DeviceGetTopologyCommonAncestor holds details about calls to the DeviceGetTopologyCommonAncestor method. - DeviceGetTopologyCommonAncestor []struct { - // Device1 is the device1 argument value. - Device1 nvml.Device - // Device2 is the device2 argument value. - Device2 nvml.Device - } - // DeviceGetTopologyNearestGpus holds details about calls to the DeviceGetTopologyNearestGpus method. - DeviceGetTopologyNearestGpus []struct { - // Device is the device argument value. - Device nvml.Device - // GpuTopologyLevel is the gpuTopologyLevel argument value. - GpuTopologyLevel nvml.GpuTopologyLevel - } - // DeviceGetTotalEccErrors holds details about calls to the DeviceGetTotalEccErrors method. - DeviceGetTotalEccErrors []struct { - // Device is the device argument value. - Device nvml.Device - // MemoryErrorType is the memoryErrorType argument value. - MemoryErrorType nvml.MemoryErrorType - // EccCounterType is the eccCounterType argument value. - EccCounterType nvml.EccCounterType - } - // DeviceGetTotalEnergyConsumption holds details about calls to the DeviceGetTotalEnergyConsumption method. - DeviceGetTotalEnergyConsumption []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetUUID holds details about calls to the DeviceGetUUID method. - DeviceGetUUID []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetUtilizationRates holds details about calls to the DeviceGetUtilizationRates method. - DeviceGetUtilizationRates []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetVbiosVersion holds details about calls to the DeviceGetVbiosVersion method. - DeviceGetVbiosVersion []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetVgpuCapabilities holds details about calls to the DeviceGetVgpuCapabilities method. - DeviceGetVgpuCapabilities []struct { - // Device is the device argument value. - Device nvml.Device - // DeviceVgpuCapability is the deviceVgpuCapability argument value. - DeviceVgpuCapability nvml.DeviceVgpuCapability - } - // DeviceGetVgpuHeterogeneousMode holds details about calls to the DeviceGetVgpuHeterogeneousMode method. - DeviceGetVgpuHeterogeneousMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetVgpuInstancesUtilizationInfo holds details about calls to the DeviceGetVgpuInstancesUtilizationInfo method. - DeviceGetVgpuInstancesUtilizationInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetVgpuMetadata holds details about calls to the DeviceGetVgpuMetadata method. - DeviceGetVgpuMetadata []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetVgpuProcessUtilization holds details about calls to the DeviceGetVgpuProcessUtilization method. - DeviceGetVgpuProcessUtilization []struct { - // Device is the device argument value. - Device nvml.Device - // V is the v argument value. - V uint64 - } - // DeviceGetVgpuProcessesUtilizationInfo holds details about calls to the DeviceGetVgpuProcessesUtilizationInfo method. - DeviceGetVgpuProcessesUtilizationInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetVgpuSchedulerCapabilities holds details about calls to the DeviceGetVgpuSchedulerCapabilities method. - DeviceGetVgpuSchedulerCapabilities []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetVgpuSchedulerLog holds details about calls to the DeviceGetVgpuSchedulerLog method. - DeviceGetVgpuSchedulerLog []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetVgpuSchedulerState holds details about calls to the DeviceGetVgpuSchedulerState method. - DeviceGetVgpuSchedulerState []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceGetVgpuTypeCreatablePlacements holds details about calls to the DeviceGetVgpuTypeCreatablePlacements method. - DeviceGetVgpuTypeCreatablePlacements []struct { - // Device is the device argument value. - Device nvml.Device - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // DeviceGetVgpuTypeSupportedPlacements holds details about calls to the DeviceGetVgpuTypeSupportedPlacements method. - DeviceGetVgpuTypeSupportedPlacements []struct { - // Device is the device argument value. - Device nvml.Device - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // DeviceGetVgpuUtilization holds details about calls to the DeviceGetVgpuUtilization method. - DeviceGetVgpuUtilization []struct { - // Device is the device argument value. - Device nvml.Device - // V is the v argument value. - V uint64 - } - // DeviceGetViolationStatus holds details about calls to the DeviceGetViolationStatus method. - DeviceGetViolationStatus []struct { - // Device is the device argument value. - Device nvml.Device - // PerfPolicyType is the perfPolicyType argument value. - PerfPolicyType nvml.PerfPolicyType - } - // DeviceGetVirtualizationMode holds details about calls to the DeviceGetVirtualizationMode method. - DeviceGetVirtualizationMode []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceIsMigDeviceHandle holds details about calls to the DeviceIsMigDeviceHandle method. - DeviceIsMigDeviceHandle []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceModifyDrainState holds details about calls to the DeviceModifyDrainState method. - DeviceModifyDrainState []struct { - // PciInfo is the pciInfo argument value. - PciInfo *nvml.PciInfo - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // DeviceOnSameBoard holds details about calls to the DeviceOnSameBoard method. - DeviceOnSameBoard []struct { - // Device1 is the device1 argument value. - Device1 nvml.Device - // Device2 is the device2 argument value. - Device2 nvml.Device - } - // DevicePowerSmoothingActivatePresetProfile holds details about calls to the DevicePowerSmoothingActivatePresetProfile method. - DevicePowerSmoothingActivatePresetProfile []struct { - // Device is the device argument value. - Device nvml.Device - // PowerSmoothingProfile is the powerSmoothingProfile argument value. - PowerSmoothingProfile *nvml.PowerSmoothingProfile - } - // DevicePowerSmoothingSetState holds details about calls to the DevicePowerSmoothingSetState method. - DevicePowerSmoothingSetState []struct { - // Device is the device argument value. - Device nvml.Device - // PowerSmoothingState is the powerSmoothingState argument value. - PowerSmoothingState *nvml.PowerSmoothingState - } - // DevicePowerSmoothingUpdatePresetProfileParam holds details about calls to the DevicePowerSmoothingUpdatePresetProfileParam method. - DevicePowerSmoothingUpdatePresetProfileParam []struct { - // Device is the device argument value. - Device nvml.Device - // PowerSmoothingProfile is the powerSmoothingProfile argument value. - PowerSmoothingProfile *nvml.PowerSmoothingProfile - } - // DeviceQueryDrainState holds details about calls to the DeviceQueryDrainState method. - DeviceQueryDrainState []struct { - // PciInfo is the pciInfo argument value. - PciInfo *nvml.PciInfo - } - // DeviceReadWritePRM_v1 holds details about calls to the DeviceReadWritePRM_v1 method. - DeviceReadWritePRM_v1 []struct { - // Device is the device argument value. - Device nvml.Device - // PRMTLV_v1 is the pRMTLV_v1 argument value. - PRMTLV_v1 *nvml.PRMTLV_v1 - } - // DeviceRegisterEvents holds details about calls to the DeviceRegisterEvents method. - DeviceRegisterEvents []struct { - // Device is the device argument value. - Device nvml.Device - // V is the v argument value. - V uint64 - // EventSet is the eventSet argument value. - EventSet nvml.EventSet - } - // DeviceRemoveGpu holds details about calls to the DeviceRemoveGpu method. - DeviceRemoveGpu []struct { - // PciInfo is the pciInfo argument value. - PciInfo *nvml.PciInfo - } - // DeviceRemoveGpu_v2 holds details about calls to the DeviceRemoveGpu_v2 method. - DeviceRemoveGpu_v2 []struct { - // PciInfo is the pciInfo argument value. - PciInfo *nvml.PciInfo - // DetachGpuState is the detachGpuState argument value. - DetachGpuState nvml.DetachGpuState - // PcieLinkState is the pcieLinkState argument value. - PcieLinkState nvml.PcieLinkState - } - // DeviceResetApplicationsClocks holds details about calls to the DeviceResetApplicationsClocks method. - DeviceResetApplicationsClocks []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceResetGpuLockedClocks holds details about calls to the DeviceResetGpuLockedClocks method. - DeviceResetGpuLockedClocks []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceResetMemoryLockedClocks holds details about calls to the DeviceResetMemoryLockedClocks method. - DeviceResetMemoryLockedClocks []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceResetNvLinkErrorCounters holds details about calls to the DeviceResetNvLinkErrorCounters method. - DeviceResetNvLinkErrorCounters []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceResetNvLinkUtilizationCounter holds details about calls to the DeviceResetNvLinkUtilizationCounter method. - DeviceResetNvLinkUtilizationCounter []struct { - // Device is the device argument value. - Device nvml.Device - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - } - // DeviceSetAPIRestriction holds details about calls to the DeviceSetAPIRestriction method. - DeviceSetAPIRestriction []struct { - // Device is the device argument value. - Device nvml.Device - // RestrictedAPI is the restrictedAPI argument value. - RestrictedAPI nvml.RestrictedAPI - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // DeviceSetAccountingMode holds details about calls to the DeviceSetAccountingMode method. - DeviceSetAccountingMode []struct { - // Device is the device argument value. - Device nvml.Device - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // DeviceSetApplicationsClocks holds details about calls to the DeviceSetApplicationsClocks method. - DeviceSetApplicationsClocks []struct { - // Device is the device argument value. - Device nvml.Device - // V1 is the v1 argument value. - V1 uint32 - // V2 is the v2 argument value. - V2 uint32 - } - // DeviceSetAutoBoostedClocksEnabled holds details about calls to the DeviceSetAutoBoostedClocksEnabled method. - DeviceSetAutoBoostedClocksEnabled []struct { - // Device is the device argument value. - Device nvml.Device - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // DeviceSetClockOffsets holds details about calls to the DeviceSetClockOffsets method. - DeviceSetClockOffsets []struct { - // Device is the device argument value. - Device nvml.Device - // ClockOffset is the clockOffset argument value. - ClockOffset nvml.ClockOffset - } - // DeviceSetComputeMode holds details about calls to the DeviceSetComputeMode method. - DeviceSetComputeMode []struct { - // Device is the device argument value. - Device nvml.Device - // ComputeMode is the computeMode argument value. - ComputeMode nvml.ComputeMode - } - // DeviceSetConfComputeUnprotectedMemSize holds details about calls to the DeviceSetConfComputeUnprotectedMemSize method. - DeviceSetConfComputeUnprotectedMemSize []struct { - // Device is the device argument value. - Device nvml.Device - // V is the v argument value. - V uint64 - } - // DeviceSetCpuAffinity holds details about calls to the DeviceSetCpuAffinity method. - DeviceSetCpuAffinity []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceSetDefaultAutoBoostedClocksEnabled holds details about calls to the DeviceSetDefaultAutoBoostedClocksEnabled method. - DeviceSetDefaultAutoBoostedClocksEnabled []struct { - // Device is the device argument value. - Device nvml.Device - // EnableState is the enableState argument value. - EnableState nvml.EnableState - // V is the v argument value. - V uint32 - } - // DeviceSetDefaultFanSpeed_v2 holds details about calls to the DeviceSetDefaultFanSpeed_v2 method. - DeviceSetDefaultFanSpeed_v2 []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceSetDramEncryptionMode holds details about calls to the DeviceSetDramEncryptionMode method. - DeviceSetDramEncryptionMode []struct { - // Device is the device argument value. - Device nvml.Device - // DramEncryptionInfo is the dramEncryptionInfo argument value. - DramEncryptionInfo *nvml.DramEncryptionInfo - } - // DeviceSetDriverModel holds details about calls to the DeviceSetDriverModel method. - DeviceSetDriverModel []struct { - // Device is the device argument value. - Device nvml.Device - // DriverModel is the driverModel argument value. - DriverModel nvml.DriverModel - // V is the v argument value. - V uint32 - } - // DeviceSetEccMode holds details about calls to the DeviceSetEccMode method. - DeviceSetEccMode []struct { - // Device is the device argument value. - Device nvml.Device - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // DeviceSetFanControlPolicy holds details about calls to the DeviceSetFanControlPolicy method. - DeviceSetFanControlPolicy []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - // FanControlPolicy is the fanControlPolicy argument value. - FanControlPolicy nvml.FanControlPolicy - } - // DeviceSetFanSpeed_v2 holds details about calls to the DeviceSetFanSpeed_v2 method. - DeviceSetFanSpeed_v2 []struct { - // Device is the device argument value. - Device nvml.Device - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - } - // DeviceSetGpcClkVfOffset holds details about calls to the DeviceSetGpcClkVfOffset method. - DeviceSetGpcClkVfOffset []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceSetGpuLockedClocks holds details about calls to the DeviceSetGpuLockedClocks method. - DeviceSetGpuLockedClocks []struct { - // Device is the device argument value. - Device nvml.Device - // V1 is the v1 argument value. - V1 uint32 - // V2 is the v2 argument value. - V2 uint32 - } - // DeviceSetGpuOperationMode holds details about calls to the DeviceSetGpuOperationMode method. - DeviceSetGpuOperationMode []struct { - // Device is the device argument value. - Device nvml.Device - // GpuOperationMode is the gpuOperationMode argument value. - GpuOperationMode nvml.GpuOperationMode - } - // DeviceSetMemClkVfOffset holds details about calls to the DeviceSetMemClkVfOffset method. - DeviceSetMemClkVfOffset []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceSetMemoryLockedClocks holds details about calls to the DeviceSetMemoryLockedClocks method. - DeviceSetMemoryLockedClocks []struct { - // Device is the device argument value. - Device nvml.Device - // V1 is the v1 argument value. - V1 uint32 - // V2 is the v2 argument value. - V2 uint32 - } - // DeviceSetMigMode holds details about calls to the DeviceSetMigMode method. - DeviceSetMigMode []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - } - // DeviceSetNvLinkDeviceLowPowerThreshold holds details about calls to the DeviceSetNvLinkDeviceLowPowerThreshold method. - DeviceSetNvLinkDeviceLowPowerThreshold []struct { - // Device is the device argument value. - Device nvml.Device - // NvLinkPowerThres is the nvLinkPowerThres argument value. - NvLinkPowerThres *nvml.NvLinkPowerThres - } - // DeviceSetNvLinkUtilizationControl holds details about calls to the DeviceSetNvLinkUtilizationControl method. - DeviceSetNvLinkUtilizationControl []struct { - // Device is the device argument value. - Device nvml.Device - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - // NvLinkUtilizationControl is the nvLinkUtilizationControl argument value. - NvLinkUtilizationControl *nvml.NvLinkUtilizationControl - // B is the b argument value. - B bool - } - // DeviceSetNvlinkBwMode holds details about calls to the DeviceSetNvlinkBwMode method. - DeviceSetNvlinkBwMode []struct { - // Device is the device argument value. - Device nvml.Device - // NvlinkSetBwMode is the nvlinkSetBwMode argument value. - NvlinkSetBwMode *nvml.NvlinkSetBwMode - } - // DeviceSetPersistenceMode holds details about calls to the DeviceSetPersistenceMode method. - DeviceSetPersistenceMode []struct { - // Device is the device argument value. - Device nvml.Device - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // DeviceSetPowerManagementLimit holds details about calls to the DeviceSetPowerManagementLimit method. - DeviceSetPowerManagementLimit []struct { - // Device is the device argument value. - Device nvml.Device - // V is the v argument value. - V uint32 - } - // DeviceSetPowerManagementLimit_v2 holds details about calls to the DeviceSetPowerManagementLimit_v2 method. - DeviceSetPowerManagementLimit_v2 []struct { - // Device is the device argument value. - Device nvml.Device - // PowerValue_v2 is the powerValue_v2 argument value. - PowerValue_v2 *nvml.PowerValue_v2 - } - // DeviceSetTemperatureThreshold holds details about calls to the DeviceSetTemperatureThreshold method. - DeviceSetTemperatureThreshold []struct { - // Device is the device argument value. - Device nvml.Device - // TemperatureThresholds is the temperatureThresholds argument value. - TemperatureThresholds nvml.TemperatureThresholds - // N is the n argument value. - N int - } - // DeviceSetVgpuCapabilities holds details about calls to the DeviceSetVgpuCapabilities method. - DeviceSetVgpuCapabilities []struct { - // Device is the device argument value. - Device nvml.Device - // DeviceVgpuCapability is the deviceVgpuCapability argument value. - DeviceVgpuCapability nvml.DeviceVgpuCapability - // EnableState is the enableState argument value. - EnableState nvml.EnableState - } - // DeviceSetVgpuHeterogeneousMode holds details about calls to the DeviceSetVgpuHeterogeneousMode method. - DeviceSetVgpuHeterogeneousMode []struct { - // Device is the device argument value. - Device nvml.Device - // VgpuHeterogeneousMode is the vgpuHeterogeneousMode argument value. - VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode - } - // DeviceSetVgpuSchedulerState holds details about calls to the DeviceSetVgpuSchedulerState method. - DeviceSetVgpuSchedulerState []struct { - // Device is the device argument value. - Device nvml.Device - // VgpuSchedulerSetState is the vgpuSchedulerSetState argument value. - VgpuSchedulerSetState *nvml.VgpuSchedulerSetState - } - // DeviceSetVirtualizationMode holds details about calls to the DeviceSetVirtualizationMode method. - DeviceSetVirtualizationMode []struct { - // Device is the device argument value. - Device nvml.Device - // GpuVirtualizationMode is the gpuVirtualizationMode argument value. - GpuVirtualizationMode nvml.GpuVirtualizationMode - } - // DeviceValidateInforom holds details about calls to the DeviceValidateInforom method. - DeviceValidateInforom []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceWorkloadPowerProfileClearRequestedProfiles holds details about calls to the DeviceWorkloadPowerProfileClearRequestedProfiles method. - DeviceWorkloadPowerProfileClearRequestedProfiles []struct { - // Device is the device argument value. - Device nvml.Device - // WorkloadPowerProfileRequestedProfiles is the workloadPowerProfileRequestedProfiles argument value. - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles - } - // DeviceWorkloadPowerProfileGetCurrentProfiles holds details about calls to the DeviceWorkloadPowerProfileGetCurrentProfiles method. - DeviceWorkloadPowerProfileGetCurrentProfiles []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceWorkloadPowerProfileGetProfilesInfo holds details about calls to the DeviceWorkloadPowerProfileGetProfilesInfo method. - DeviceWorkloadPowerProfileGetProfilesInfo []struct { - // Device is the device argument value. - Device nvml.Device - } - // DeviceWorkloadPowerProfileSetRequestedProfiles holds details about calls to the DeviceWorkloadPowerProfileSetRequestedProfiles method. - DeviceWorkloadPowerProfileSetRequestedProfiles []struct { - // Device is the device argument value. - Device nvml.Device - // WorkloadPowerProfileRequestedProfiles is the workloadPowerProfileRequestedProfiles argument value. - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles - } - // ErrorString holds details about calls to the ErrorString method. - ErrorString []struct { - // ReturnMoqParam is the returnMoqParam argument value. - ReturnMoqParam nvml.Return - } - // EventSetCreate holds details about calls to the EventSetCreate method. - EventSetCreate []struct { - } - // EventSetFree holds details about calls to the EventSetFree method. - EventSetFree []struct { - // EventSet is the eventSet argument value. - EventSet nvml.EventSet - } - // EventSetWait holds details about calls to the EventSetWait method. - EventSetWait []struct { - // EventSet is the eventSet argument value. - EventSet nvml.EventSet - // V is the v argument value. - V uint32 - } - // Extensions holds details about calls to the Extensions method. - Extensions []struct { - } - // GetExcludedDeviceCount holds details about calls to the GetExcludedDeviceCount method. - GetExcludedDeviceCount []struct { - } - // GetExcludedDeviceInfoByIndex holds details about calls to the GetExcludedDeviceInfoByIndex method. - GetExcludedDeviceInfoByIndex []struct { - // N is the n argument value. - N int - } - // GetVgpuCompatibility holds details about calls to the GetVgpuCompatibility method. - GetVgpuCompatibility []struct { - // VgpuMetadata is the vgpuMetadata argument value. - VgpuMetadata *nvml.VgpuMetadata - // VgpuPgpuMetadata is the vgpuPgpuMetadata argument value. - VgpuPgpuMetadata *nvml.VgpuPgpuMetadata - } - // GetVgpuDriverCapabilities holds details about calls to the GetVgpuDriverCapabilities method. - GetVgpuDriverCapabilities []struct { - // VgpuDriverCapability is the vgpuDriverCapability argument value. - VgpuDriverCapability nvml.VgpuDriverCapability - } - // GetVgpuVersion holds details about calls to the GetVgpuVersion method. - GetVgpuVersion []struct { - } - // GpmMetricsGet holds details about calls to the GpmMetricsGet method. - GpmMetricsGet []struct { - // GpmMetricsGetType is the gpmMetricsGetType argument value. - GpmMetricsGetType *nvml.GpmMetricsGetType - } - // GpmMetricsGetV holds details about calls to the GpmMetricsGetV method. - GpmMetricsGetV []struct { - // GpmMetricsGetType is the gpmMetricsGetType argument value. - GpmMetricsGetType *nvml.GpmMetricsGetType - } - // GpmMigSampleGet holds details about calls to the GpmMigSampleGet method. - GpmMigSampleGet []struct { - // Device is the device argument value. - Device nvml.Device - // N is the n argument value. - N int - // GpmSample is the gpmSample argument value. - GpmSample nvml.GpmSample - } - // GpmQueryDeviceSupport holds details about calls to the GpmQueryDeviceSupport method. - GpmQueryDeviceSupport []struct { - // Device is the device argument value. - Device nvml.Device - } - // GpmQueryDeviceSupportV holds details about calls to the GpmQueryDeviceSupportV method. - GpmQueryDeviceSupportV []struct { - // Device is the device argument value. - Device nvml.Device - } - // GpmQueryIfStreamingEnabled holds details about calls to the GpmQueryIfStreamingEnabled method. - GpmQueryIfStreamingEnabled []struct { - // Device is the device argument value. - Device nvml.Device - } - // GpmSampleAlloc holds details about calls to the GpmSampleAlloc method. - GpmSampleAlloc []struct { - } - // GpmSampleFree holds details about calls to the GpmSampleFree method. - GpmSampleFree []struct { - // GpmSample is the gpmSample argument value. - GpmSample nvml.GpmSample - } - // GpmSampleGet holds details about calls to the GpmSampleGet method. - GpmSampleGet []struct { - // Device is the device argument value. - Device nvml.Device - // GpmSample is the gpmSample argument value. - GpmSample nvml.GpmSample - } - // GpmSetStreamingEnabled holds details about calls to the GpmSetStreamingEnabled method. - GpmSetStreamingEnabled []struct { - // Device is the device argument value. - Device nvml.Device - // V is the v argument value. - V uint32 - } - // GpuInstanceCreateComputeInstance holds details about calls to the GpuInstanceCreateComputeInstance method. - GpuInstanceCreateComputeInstance []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - // GpuInstanceCreateComputeInstanceWithPlacement holds details about calls to the GpuInstanceCreateComputeInstanceWithPlacement method. - GpuInstanceCreateComputeInstanceWithPlacement []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - // ComputeInstancePlacement is the computeInstancePlacement argument value. - ComputeInstancePlacement *nvml.ComputeInstancePlacement - } - // GpuInstanceDestroy holds details about calls to the GpuInstanceDestroy method. - GpuInstanceDestroy []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - } - // GpuInstanceGetActiveVgpus holds details about calls to the GpuInstanceGetActiveVgpus method. - GpuInstanceGetActiveVgpus []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - } - // GpuInstanceGetComputeInstanceById holds details about calls to the GpuInstanceGetComputeInstanceById method. - GpuInstanceGetComputeInstanceById []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - // N is the n argument value. - N int - } - // GpuInstanceGetComputeInstancePossiblePlacements holds details about calls to the GpuInstanceGetComputeInstancePossiblePlacements method. - GpuInstanceGetComputeInstancePossiblePlacements []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - // GpuInstanceGetComputeInstanceProfileInfo holds details about calls to the GpuInstanceGetComputeInstanceProfileInfo method. - GpuInstanceGetComputeInstanceProfileInfo []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - } - // GpuInstanceGetComputeInstanceProfileInfoV holds details about calls to the GpuInstanceGetComputeInstanceProfileInfoV method. - GpuInstanceGetComputeInstanceProfileInfoV []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - // N1 is the n1 argument value. - N1 int - // N2 is the n2 argument value. - N2 int - } - // GpuInstanceGetComputeInstanceRemainingCapacity holds details about calls to the GpuInstanceGetComputeInstanceRemainingCapacity method. - GpuInstanceGetComputeInstanceRemainingCapacity []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - // GpuInstanceGetComputeInstances holds details about calls to the GpuInstanceGetComputeInstances method. - GpuInstanceGetComputeInstances []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - // ComputeInstanceProfileInfo is the computeInstanceProfileInfo argument value. - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - // GpuInstanceGetCreatableVgpus holds details about calls to the GpuInstanceGetCreatableVgpus method. - GpuInstanceGetCreatableVgpus []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - } - // GpuInstanceGetInfo holds details about calls to the GpuInstanceGetInfo method. - GpuInstanceGetInfo []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - } - // GpuInstanceGetVgpuHeterogeneousMode holds details about calls to the GpuInstanceGetVgpuHeterogeneousMode method. - GpuInstanceGetVgpuHeterogeneousMode []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - } - // GpuInstanceGetVgpuSchedulerLog holds details about calls to the GpuInstanceGetVgpuSchedulerLog method. - GpuInstanceGetVgpuSchedulerLog []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - } - // GpuInstanceGetVgpuSchedulerState holds details about calls to the GpuInstanceGetVgpuSchedulerState method. - GpuInstanceGetVgpuSchedulerState []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - } - // GpuInstanceGetVgpuTypeCreatablePlacements holds details about calls to the GpuInstanceGetVgpuTypeCreatablePlacements method. - GpuInstanceGetVgpuTypeCreatablePlacements []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - } - // GpuInstanceSetVgpuHeterogeneousMode holds details about calls to the GpuInstanceSetVgpuHeterogeneousMode method. - GpuInstanceSetVgpuHeterogeneousMode []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - // VgpuHeterogeneousMode is the vgpuHeterogeneousMode argument value. - VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode - } - // GpuInstanceSetVgpuSchedulerState holds details about calls to the GpuInstanceSetVgpuSchedulerState method. - GpuInstanceSetVgpuSchedulerState []struct { - // GpuInstance is the gpuInstance argument value. - GpuInstance nvml.GpuInstance - // VgpuSchedulerState is the vgpuSchedulerState argument value. - VgpuSchedulerState *nvml.VgpuSchedulerState - } - // Init holds details about calls to the Init method. - Init []struct { - } - // InitWithFlags holds details about calls to the InitWithFlags method. - InitWithFlags []struct { - // V is the v argument value. - V uint32 - } - // SetVgpuVersion holds details about calls to the SetVgpuVersion method. - SetVgpuVersion []struct { - // VgpuVersion is the vgpuVersion argument value. - VgpuVersion *nvml.VgpuVersion - } - // Shutdown holds details about calls to the Shutdown method. - Shutdown []struct { - } - // SystemEventSetCreate holds details about calls to the SystemEventSetCreate method. - SystemEventSetCreate []struct { - // SystemEventSetCreateRequest is the systemEventSetCreateRequest argument value. - SystemEventSetCreateRequest *nvml.SystemEventSetCreateRequest - } - // SystemEventSetFree holds details about calls to the SystemEventSetFree method. - SystemEventSetFree []struct { - // SystemEventSetFreeRequest is the systemEventSetFreeRequest argument value. - SystemEventSetFreeRequest *nvml.SystemEventSetFreeRequest - } - // SystemEventSetWait holds details about calls to the SystemEventSetWait method. - SystemEventSetWait []struct { - // SystemEventSetWaitRequest is the systemEventSetWaitRequest argument value. - SystemEventSetWaitRequest *nvml.SystemEventSetWaitRequest - } - // SystemGetConfComputeCapabilities holds details about calls to the SystemGetConfComputeCapabilities method. - SystemGetConfComputeCapabilities []struct { - } - // SystemGetConfComputeGpusReadyState holds details about calls to the SystemGetConfComputeGpusReadyState method. - SystemGetConfComputeGpusReadyState []struct { - } - // SystemGetConfComputeKeyRotationThresholdInfo holds details about calls to the SystemGetConfComputeKeyRotationThresholdInfo method. - SystemGetConfComputeKeyRotationThresholdInfo []struct { - } - // SystemGetConfComputeSettings holds details about calls to the SystemGetConfComputeSettings method. - SystemGetConfComputeSettings []struct { - } - // SystemGetConfComputeState holds details about calls to the SystemGetConfComputeState method. - SystemGetConfComputeState []struct { - } - // SystemGetCudaDriverVersion holds details about calls to the SystemGetCudaDriverVersion method. - SystemGetCudaDriverVersion []struct { - } - // SystemGetCudaDriverVersion_v2 holds details about calls to the SystemGetCudaDriverVersion_v2 method. - SystemGetCudaDriverVersion_v2 []struct { - } - // SystemGetDriverBranch holds details about calls to the SystemGetDriverBranch method. - SystemGetDriverBranch []struct { - } - // SystemGetDriverVersion holds details about calls to the SystemGetDriverVersion method. - SystemGetDriverVersion []struct { - } - // SystemGetHicVersion holds details about calls to the SystemGetHicVersion method. - SystemGetHicVersion []struct { - } - // SystemGetNVMLVersion holds details about calls to the SystemGetNVMLVersion method. - SystemGetNVMLVersion []struct { - } - // SystemGetNvlinkBwMode holds details about calls to the SystemGetNvlinkBwMode method. - SystemGetNvlinkBwMode []struct { - } - // SystemGetProcessName holds details about calls to the SystemGetProcessName method. - SystemGetProcessName []struct { - // N is the n argument value. - N int - } - // SystemGetTopologyGpuSet holds details about calls to the SystemGetTopologyGpuSet method. - SystemGetTopologyGpuSet []struct { - // N is the n argument value. - N int - } - // SystemRegisterEvents holds details about calls to the SystemRegisterEvents method. - SystemRegisterEvents []struct { - // SystemRegisterEventRequest is the systemRegisterEventRequest argument value. - SystemRegisterEventRequest *nvml.SystemRegisterEventRequest - } - // SystemSetConfComputeGpusReadyState holds details about calls to the SystemSetConfComputeGpusReadyState method. - SystemSetConfComputeGpusReadyState []struct { - // V is the v argument value. - V uint32 - } - // SystemSetConfComputeKeyRotationThresholdInfo holds details about calls to the SystemSetConfComputeKeyRotationThresholdInfo method. - SystemSetConfComputeKeyRotationThresholdInfo []struct { - // ConfComputeSetKeyRotationThresholdInfo is the confComputeSetKeyRotationThresholdInfo argument value. - ConfComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo - } - // SystemSetNvlinkBwMode holds details about calls to the SystemSetNvlinkBwMode method. - SystemSetNvlinkBwMode []struct { - // V is the v argument value. - V uint32 - } - // UnitGetCount holds details about calls to the UnitGetCount method. - UnitGetCount []struct { - } - // UnitGetDevices holds details about calls to the UnitGetDevices method. - UnitGetDevices []struct { - // Unit is the unit argument value. - Unit nvml.Unit - } - // UnitGetFanSpeedInfo holds details about calls to the UnitGetFanSpeedInfo method. - UnitGetFanSpeedInfo []struct { - // Unit is the unit argument value. - Unit nvml.Unit - } - // UnitGetHandleByIndex holds details about calls to the UnitGetHandleByIndex method. - UnitGetHandleByIndex []struct { - // N is the n argument value. - N int - } - // UnitGetLedState holds details about calls to the UnitGetLedState method. - UnitGetLedState []struct { - // Unit is the unit argument value. - Unit nvml.Unit - } - // UnitGetPsuInfo holds details about calls to the UnitGetPsuInfo method. - UnitGetPsuInfo []struct { - // Unit is the unit argument value. - Unit nvml.Unit - } - // UnitGetTemperature holds details about calls to the UnitGetTemperature method. - UnitGetTemperature []struct { - // Unit is the unit argument value. - Unit nvml.Unit - // N is the n argument value. - N int - } - // UnitGetUnitInfo holds details about calls to the UnitGetUnitInfo method. - UnitGetUnitInfo []struct { - // Unit is the unit argument value. - Unit nvml.Unit - } - // UnitSetLedState holds details about calls to the UnitSetLedState method. - UnitSetLedState []struct { - // Unit is the unit argument value. - Unit nvml.Unit - // LedColor is the ledColor argument value. - LedColor nvml.LedColor - } - // VgpuInstanceClearAccountingPids holds details about calls to the VgpuInstanceClearAccountingPids method. - VgpuInstanceClearAccountingPids []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetAccountingMode holds details about calls to the VgpuInstanceGetAccountingMode method. - VgpuInstanceGetAccountingMode []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetAccountingPids holds details about calls to the VgpuInstanceGetAccountingPids method. - VgpuInstanceGetAccountingPids []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetAccountingStats holds details about calls to the VgpuInstanceGetAccountingStats method. - VgpuInstanceGetAccountingStats []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - // N is the n argument value. - N int - } - // VgpuInstanceGetEccMode holds details about calls to the VgpuInstanceGetEccMode method. - VgpuInstanceGetEccMode []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetEncoderCapacity holds details about calls to the VgpuInstanceGetEncoderCapacity method. - VgpuInstanceGetEncoderCapacity []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetEncoderSessions holds details about calls to the VgpuInstanceGetEncoderSessions method. - VgpuInstanceGetEncoderSessions []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetEncoderStats holds details about calls to the VgpuInstanceGetEncoderStats method. - VgpuInstanceGetEncoderStats []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetFBCSessions holds details about calls to the VgpuInstanceGetFBCSessions method. - VgpuInstanceGetFBCSessions []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetFBCStats holds details about calls to the VgpuInstanceGetFBCStats method. - VgpuInstanceGetFBCStats []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetFbUsage holds details about calls to the VgpuInstanceGetFbUsage method. - VgpuInstanceGetFbUsage []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetFrameRateLimit holds details about calls to the VgpuInstanceGetFrameRateLimit method. - VgpuInstanceGetFrameRateLimit []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetGpuInstanceId holds details about calls to the VgpuInstanceGetGpuInstanceId method. - VgpuInstanceGetGpuInstanceId []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetGpuPciId holds details about calls to the VgpuInstanceGetGpuPciId method. - VgpuInstanceGetGpuPciId []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetLicenseInfo holds details about calls to the VgpuInstanceGetLicenseInfo method. - VgpuInstanceGetLicenseInfo []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetLicenseStatus holds details about calls to the VgpuInstanceGetLicenseStatus method. - VgpuInstanceGetLicenseStatus []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetMdevUUID holds details about calls to the VgpuInstanceGetMdevUUID method. - VgpuInstanceGetMdevUUID []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetMetadata holds details about calls to the VgpuInstanceGetMetadata method. - VgpuInstanceGetMetadata []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetRuntimeStateSize holds details about calls to the VgpuInstanceGetRuntimeStateSize method. - VgpuInstanceGetRuntimeStateSize []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetType holds details about calls to the VgpuInstanceGetType method. - VgpuInstanceGetType []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetUUID holds details about calls to the VgpuInstanceGetUUID method. - VgpuInstanceGetUUID []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetVmDriverVersion holds details about calls to the VgpuInstanceGetVmDriverVersion method. - VgpuInstanceGetVmDriverVersion []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceGetVmID holds details about calls to the VgpuInstanceGetVmID method. - VgpuInstanceGetVmID []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - } - // VgpuInstanceSetEncoderCapacity holds details about calls to the VgpuInstanceSetEncoderCapacity method. - VgpuInstanceSetEncoderCapacity []struct { - // VgpuInstance is the vgpuInstance argument value. - VgpuInstance nvml.VgpuInstance - // N is the n argument value. - N int - } - // VgpuTypeGetBAR1Info holds details about calls to the VgpuTypeGetBAR1Info method. - VgpuTypeGetBAR1Info []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // VgpuTypeGetCapabilities holds details about calls to the VgpuTypeGetCapabilities method. - VgpuTypeGetCapabilities []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - // VgpuCapability is the vgpuCapability argument value. - VgpuCapability nvml.VgpuCapability - } - // VgpuTypeGetClass holds details about calls to the VgpuTypeGetClass method. - VgpuTypeGetClass []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // VgpuTypeGetDeviceID holds details about calls to the VgpuTypeGetDeviceID method. - VgpuTypeGetDeviceID []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // VgpuTypeGetFrameRateLimit holds details about calls to the VgpuTypeGetFrameRateLimit method. - VgpuTypeGetFrameRateLimit []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // VgpuTypeGetFramebufferSize holds details about calls to the VgpuTypeGetFramebufferSize method. - VgpuTypeGetFramebufferSize []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // VgpuTypeGetGpuInstanceProfileId holds details about calls to the VgpuTypeGetGpuInstanceProfileId method. - VgpuTypeGetGpuInstanceProfileId []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // VgpuTypeGetLicense holds details about calls to the VgpuTypeGetLicense method. - VgpuTypeGetLicense []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // VgpuTypeGetMaxInstances holds details about calls to the VgpuTypeGetMaxInstances method. - VgpuTypeGetMaxInstances []struct { - // Device is the device argument value. - Device nvml.Device - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // VgpuTypeGetMaxInstancesPerGpuInstance holds details about calls to the VgpuTypeGetMaxInstancesPerGpuInstance method. - VgpuTypeGetMaxInstancesPerGpuInstance []struct { - // VgpuTypeMaxInstance is the vgpuTypeMaxInstance argument value. - VgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance - } - // VgpuTypeGetMaxInstancesPerVm holds details about calls to the VgpuTypeGetMaxInstancesPerVm method. - VgpuTypeGetMaxInstancesPerVm []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // VgpuTypeGetName holds details about calls to the VgpuTypeGetName method. - VgpuTypeGetName []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // VgpuTypeGetNumDisplayHeads holds details about calls to the VgpuTypeGetNumDisplayHeads method. - VgpuTypeGetNumDisplayHeads []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - } - // VgpuTypeGetResolution holds details about calls to the VgpuTypeGetResolution method. - VgpuTypeGetResolution []struct { - // VgpuTypeId is the vgpuTypeId argument value. - VgpuTypeId nvml.VgpuTypeId - // N is the n argument value. - N int - } - } - lockComputeInstanceDestroy sync.RWMutex - lockComputeInstanceGetInfo sync.RWMutex - lockDeviceClearAccountingPids sync.RWMutex - lockDeviceClearCpuAffinity sync.RWMutex - lockDeviceClearEccErrorCounts sync.RWMutex - lockDeviceClearFieldValues sync.RWMutex - lockDeviceCreateGpuInstance sync.RWMutex - lockDeviceCreateGpuInstanceWithPlacement sync.RWMutex - lockDeviceDiscoverGpus sync.RWMutex - lockDeviceFreezeNvLinkUtilizationCounter sync.RWMutex - lockDeviceGetAPIRestriction sync.RWMutex - lockDeviceGetAccountingBufferSize sync.RWMutex - lockDeviceGetAccountingMode sync.RWMutex - lockDeviceGetAccountingPids sync.RWMutex - lockDeviceGetAccountingStats sync.RWMutex - lockDeviceGetActiveVgpus sync.RWMutex - lockDeviceGetAdaptiveClockInfoStatus sync.RWMutex - lockDeviceGetAddressingMode sync.RWMutex - lockDeviceGetApplicationsClock sync.RWMutex - lockDeviceGetArchitecture sync.RWMutex - lockDeviceGetAttributes sync.RWMutex - lockDeviceGetAutoBoostedClocksEnabled sync.RWMutex - lockDeviceGetBAR1MemoryInfo sync.RWMutex - lockDeviceGetBoardId sync.RWMutex - lockDeviceGetBoardPartNumber sync.RWMutex - lockDeviceGetBrand sync.RWMutex - lockDeviceGetBridgeChipInfo sync.RWMutex - lockDeviceGetBusType sync.RWMutex - lockDeviceGetC2cModeInfoV sync.RWMutex - lockDeviceGetCapabilities sync.RWMutex - lockDeviceGetClkMonStatus sync.RWMutex - lockDeviceGetClock sync.RWMutex - lockDeviceGetClockInfo sync.RWMutex - lockDeviceGetClockOffsets sync.RWMutex - lockDeviceGetComputeInstanceId sync.RWMutex - lockDeviceGetComputeMode sync.RWMutex - lockDeviceGetComputeRunningProcesses sync.RWMutex - lockDeviceGetConfComputeGpuAttestationReport sync.RWMutex - lockDeviceGetConfComputeGpuCertificate sync.RWMutex - lockDeviceGetConfComputeMemSizeInfo sync.RWMutex - lockDeviceGetConfComputeProtectedMemoryUsage sync.RWMutex - lockDeviceGetCoolerInfo sync.RWMutex - lockDeviceGetCount sync.RWMutex - lockDeviceGetCpuAffinity sync.RWMutex - lockDeviceGetCpuAffinityWithinScope sync.RWMutex - lockDeviceGetCreatableVgpus sync.RWMutex - lockDeviceGetCudaComputeCapability sync.RWMutex - lockDeviceGetCurrPcieLinkGeneration sync.RWMutex - lockDeviceGetCurrPcieLinkWidth sync.RWMutex - lockDeviceGetCurrentClockFreqs sync.RWMutex - lockDeviceGetCurrentClocksEventReasons sync.RWMutex - lockDeviceGetCurrentClocksThrottleReasons sync.RWMutex - lockDeviceGetDecoderUtilization sync.RWMutex - lockDeviceGetDefaultApplicationsClock sync.RWMutex - lockDeviceGetDefaultEccMode sync.RWMutex - lockDeviceGetDetailedEccErrors sync.RWMutex - lockDeviceGetDeviceHandleFromMigDeviceHandle sync.RWMutex - lockDeviceGetDisplayActive sync.RWMutex - lockDeviceGetDisplayMode sync.RWMutex - lockDeviceGetDramEncryptionMode sync.RWMutex - lockDeviceGetDriverModel sync.RWMutex - lockDeviceGetDriverModel_v2 sync.RWMutex - lockDeviceGetDynamicPstatesInfo sync.RWMutex - lockDeviceGetEccMode sync.RWMutex - lockDeviceGetEncoderCapacity sync.RWMutex - lockDeviceGetEncoderSessions sync.RWMutex - lockDeviceGetEncoderStats sync.RWMutex - lockDeviceGetEncoderUtilization sync.RWMutex - lockDeviceGetEnforcedPowerLimit sync.RWMutex - lockDeviceGetFBCSessions sync.RWMutex - lockDeviceGetFBCStats sync.RWMutex - lockDeviceGetFanControlPolicy_v2 sync.RWMutex - lockDeviceGetFanSpeed sync.RWMutex - lockDeviceGetFanSpeedRPM sync.RWMutex - lockDeviceGetFanSpeed_v2 sync.RWMutex - lockDeviceGetFieldValues sync.RWMutex - lockDeviceGetGpcClkMinMaxVfOffset sync.RWMutex - lockDeviceGetGpcClkVfOffset sync.RWMutex - lockDeviceGetGpuFabricInfo sync.RWMutex - lockDeviceGetGpuFabricInfoV sync.RWMutex - lockDeviceGetGpuInstanceById sync.RWMutex - lockDeviceGetGpuInstanceId sync.RWMutex - lockDeviceGetGpuInstancePossiblePlacements sync.RWMutex - lockDeviceGetGpuInstanceProfileInfo sync.RWMutex - lockDeviceGetGpuInstanceProfileInfoByIdV sync.RWMutex - lockDeviceGetGpuInstanceProfileInfoV sync.RWMutex - lockDeviceGetGpuInstanceRemainingCapacity sync.RWMutex - lockDeviceGetGpuInstances sync.RWMutex - lockDeviceGetGpuMaxPcieLinkGeneration sync.RWMutex - lockDeviceGetGpuOperationMode sync.RWMutex - lockDeviceGetGraphicsRunningProcesses sync.RWMutex - lockDeviceGetGridLicensableFeatures sync.RWMutex - lockDeviceGetGspFirmwareMode sync.RWMutex - lockDeviceGetGspFirmwareVersion sync.RWMutex - lockDeviceGetHandleByIndex sync.RWMutex - lockDeviceGetHandleByPciBusId sync.RWMutex - lockDeviceGetHandleBySerial sync.RWMutex - lockDeviceGetHandleByUUID sync.RWMutex - lockDeviceGetHandleByUUIDV sync.RWMutex - lockDeviceGetHostVgpuMode sync.RWMutex - lockDeviceGetIndex sync.RWMutex - lockDeviceGetInforomConfigurationChecksum sync.RWMutex - lockDeviceGetInforomImageVersion sync.RWMutex - lockDeviceGetInforomVersion sync.RWMutex - lockDeviceGetIrqNum sync.RWMutex - lockDeviceGetJpgUtilization sync.RWMutex - lockDeviceGetLastBBXFlushTime sync.RWMutex - lockDeviceGetMPSComputeRunningProcesses sync.RWMutex - lockDeviceGetMarginTemperature sync.RWMutex - lockDeviceGetMaxClockInfo sync.RWMutex - lockDeviceGetMaxCustomerBoostClock sync.RWMutex - lockDeviceGetMaxMigDeviceCount sync.RWMutex - lockDeviceGetMaxPcieLinkGeneration sync.RWMutex - lockDeviceGetMaxPcieLinkWidth sync.RWMutex - lockDeviceGetMemClkMinMaxVfOffset sync.RWMutex - lockDeviceGetMemClkVfOffset sync.RWMutex - lockDeviceGetMemoryAffinity sync.RWMutex - lockDeviceGetMemoryBusWidth sync.RWMutex - lockDeviceGetMemoryErrorCounter sync.RWMutex - lockDeviceGetMemoryInfo sync.RWMutex - lockDeviceGetMemoryInfo_v2 sync.RWMutex - lockDeviceGetMigDeviceHandleByIndex sync.RWMutex - lockDeviceGetMigMode sync.RWMutex - lockDeviceGetMinMaxClockOfPState sync.RWMutex - lockDeviceGetMinMaxFanSpeed sync.RWMutex - lockDeviceGetMinorNumber sync.RWMutex - lockDeviceGetModuleId sync.RWMutex - lockDeviceGetMultiGpuBoard sync.RWMutex - lockDeviceGetName sync.RWMutex - lockDeviceGetNumFans sync.RWMutex - lockDeviceGetNumGpuCores sync.RWMutex - lockDeviceGetNumaNodeId sync.RWMutex - lockDeviceGetNvLinkCapability sync.RWMutex - lockDeviceGetNvLinkErrorCounter sync.RWMutex - lockDeviceGetNvLinkInfo sync.RWMutex - lockDeviceGetNvLinkRemoteDeviceType sync.RWMutex - lockDeviceGetNvLinkRemotePciInfo sync.RWMutex - lockDeviceGetNvLinkState sync.RWMutex - lockDeviceGetNvLinkUtilizationControl sync.RWMutex - lockDeviceGetNvLinkUtilizationCounter sync.RWMutex - lockDeviceGetNvLinkVersion sync.RWMutex - lockDeviceGetNvlinkBwMode sync.RWMutex - lockDeviceGetNvlinkSupportedBwModes sync.RWMutex - lockDeviceGetOfaUtilization sync.RWMutex - lockDeviceGetP2PStatus sync.RWMutex - lockDeviceGetPciInfo sync.RWMutex - lockDeviceGetPciInfoExt sync.RWMutex - lockDeviceGetPcieLinkMaxSpeed sync.RWMutex - lockDeviceGetPcieReplayCounter sync.RWMutex - lockDeviceGetPcieSpeed sync.RWMutex - lockDeviceGetPcieThroughput sync.RWMutex - lockDeviceGetPdi sync.RWMutex - lockDeviceGetPerformanceModes sync.RWMutex - lockDeviceGetPerformanceState sync.RWMutex - lockDeviceGetPersistenceMode sync.RWMutex - lockDeviceGetPgpuMetadataString sync.RWMutex - lockDeviceGetPlatformInfo sync.RWMutex - lockDeviceGetPowerManagementDefaultLimit sync.RWMutex - lockDeviceGetPowerManagementLimit sync.RWMutex - lockDeviceGetPowerManagementLimitConstraints sync.RWMutex - lockDeviceGetPowerManagementMode sync.RWMutex - lockDeviceGetPowerMizerMode_v1 sync.RWMutex - lockDeviceGetPowerSource sync.RWMutex - lockDeviceGetPowerState sync.RWMutex - lockDeviceGetPowerUsage sync.RWMutex - lockDeviceGetProcessUtilization sync.RWMutex - lockDeviceGetProcessesUtilizationInfo sync.RWMutex - lockDeviceGetRemappedRows sync.RWMutex - lockDeviceGetRepairStatus sync.RWMutex - lockDeviceGetRetiredPages sync.RWMutex - lockDeviceGetRetiredPagesPendingStatus sync.RWMutex - lockDeviceGetRetiredPages_v2 sync.RWMutex - lockDeviceGetRowRemapperHistogram sync.RWMutex - lockDeviceGetRunningProcessDetailList sync.RWMutex - lockDeviceGetSamples sync.RWMutex - lockDeviceGetSerial sync.RWMutex - lockDeviceGetSramEccErrorStatus sync.RWMutex - lockDeviceGetSramUniqueUncorrectedEccErrorCounts sync.RWMutex - lockDeviceGetSupportedClocksEventReasons sync.RWMutex - lockDeviceGetSupportedClocksThrottleReasons sync.RWMutex - lockDeviceGetSupportedEventTypes sync.RWMutex - lockDeviceGetSupportedGraphicsClocks sync.RWMutex - lockDeviceGetSupportedMemoryClocks sync.RWMutex - lockDeviceGetSupportedPerformanceStates sync.RWMutex - lockDeviceGetSupportedVgpus sync.RWMutex - lockDeviceGetTargetFanSpeed sync.RWMutex - lockDeviceGetTemperature sync.RWMutex - lockDeviceGetTemperatureThreshold sync.RWMutex - lockDeviceGetTemperatureV sync.RWMutex - lockDeviceGetThermalSettings sync.RWMutex - lockDeviceGetTopologyCommonAncestor sync.RWMutex - lockDeviceGetTopologyNearestGpus sync.RWMutex - lockDeviceGetTotalEccErrors sync.RWMutex - lockDeviceGetTotalEnergyConsumption sync.RWMutex - lockDeviceGetUUID sync.RWMutex - lockDeviceGetUtilizationRates sync.RWMutex - lockDeviceGetVbiosVersion sync.RWMutex - lockDeviceGetVgpuCapabilities sync.RWMutex - lockDeviceGetVgpuHeterogeneousMode sync.RWMutex - lockDeviceGetVgpuInstancesUtilizationInfo sync.RWMutex - lockDeviceGetVgpuMetadata sync.RWMutex - lockDeviceGetVgpuProcessUtilization sync.RWMutex - lockDeviceGetVgpuProcessesUtilizationInfo sync.RWMutex - lockDeviceGetVgpuSchedulerCapabilities sync.RWMutex - lockDeviceGetVgpuSchedulerLog sync.RWMutex - lockDeviceGetVgpuSchedulerState sync.RWMutex - lockDeviceGetVgpuTypeCreatablePlacements sync.RWMutex - lockDeviceGetVgpuTypeSupportedPlacements sync.RWMutex - lockDeviceGetVgpuUtilization sync.RWMutex - lockDeviceGetViolationStatus sync.RWMutex - lockDeviceGetVirtualizationMode sync.RWMutex - lockDeviceIsMigDeviceHandle sync.RWMutex - lockDeviceModifyDrainState sync.RWMutex - lockDeviceOnSameBoard sync.RWMutex - lockDevicePowerSmoothingActivatePresetProfile sync.RWMutex - lockDevicePowerSmoothingSetState sync.RWMutex - lockDevicePowerSmoothingUpdatePresetProfileParam sync.RWMutex - lockDeviceQueryDrainState sync.RWMutex - lockDeviceReadWritePRM_v1 sync.RWMutex - lockDeviceRegisterEvents sync.RWMutex - lockDeviceRemoveGpu sync.RWMutex - lockDeviceRemoveGpu_v2 sync.RWMutex - lockDeviceResetApplicationsClocks sync.RWMutex - lockDeviceResetGpuLockedClocks sync.RWMutex - lockDeviceResetMemoryLockedClocks sync.RWMutex - lockDeviceResetNvLinkErrorCounters sync.RWMutex - lockDeviceResetNvLinkUtilizationCounter sync.RWMutex - lockDeviceSetAPIRestriction sync.RWMutex - lockDeviceSetAccountingMode sync.RWMutex - lockDeviceSetApplicationsClocks sync.RWMutex - lockDeviceSetAutoBoostedClocksEnabled sync.RWMutex - lockDeviceSetClockOffsets sync.RWMutex - lockDeviceSetComputeMode sync.RWMutex - lockDeviceSetConfComputeUnprotectedMemSize sync.RWMutex - lockDeviceSetCpuAffinity sync.RWMutex - lockDeviceSetDefaultAutoBoostedClocksEnabled sync.RWMutex - lockDeviceSetDefaultFanSpeed_v2 sync.RWMutex - lockDeviceSetDramEncryptionMode sync.RWMutex - lockDeviceSetDriverModel sync.RWMutex - lockDeviceSetEccMode sync.RWMutex - lockDeviceSetFanControlPolicy sync.RWMutex - lockDeviceSetFanSpeed_v2 sync.RWMutex - lockDeviceSetGpcClkVfOffset sync.RWMutex - lockDeviceSetGpuLockedClocks sync.RWMutex - lockDeviceSetGpuOperationMode sync.RWMutex - lockDeviceSetMemClkVfOffset sync.RWMutex - lockDeviceSetMemoryLockedClocks sync.RWMutex - lockDeviceSetMigMode sync.RWMutex - lockDeviceSetNvLinkDeviceLowPowerThreshold sync.RWMutex - lockDeviceSetNvLinkUtilizationControl sync.RWMutex - lockDeviceSetNvlinkBwMode sync.RWMutex - lockDeviceSetPersistenceMode sync.RWMutex - lockDeviceSetPowerManagementLimit sync.RWMutex - lockDeviceSetPowerManagementLimit_v2 sync.RWMutex - lockDeviceSetTemperatureThreshold sync.RWMutex - lockDeviceSetVgpuCapabilities sync.RWMutex - lockDeviceSetVgpuHeterogeneousMode sync.RWMutex - lockDeviceSetVgpuSchedulerState sync.RWMutex - lockDeviceSetVirtualizationMode sync.RWMutex - lockDeviceValidateInforom sync.RWMutex - lockDeviceWorkloadPowerProfileClearRequestedProfiles sync.RWMutex - lockDeviceWorkloadPowerProfileGetCurrentProfiles sync.RWMutex - lockDeviceWorkloadPowerProfileGetProfilesInfo sync.RWMutex - lockDeviceWorkloadPowerProfileSetRequestedProfiles sync.RWMutex - lockErrorString sync.RWMutex - lockEventSetCreate sync.RWMutex - lockEventSetFree sync.RWMutex - lockEventSetWait sync.RWMutex - lockExtensions sync.RWMutex - lockGetExcludedDeviceCount sync.RWMutex - lockGetExcludedDeviceInfoByIndex sync.RWMutex - lockGetVgpuCompatibility sync.RWMutex - lockGetVgpuDriverCapabilities sync.RWMutex - lockGetVgpuVersion sync.RWMutex - lockGpmMetricsGet sync.RWMutex - lockGpmMetricsGetV sync.RWMutex - lockGpmMigSampleGet sync.RWMutex - lockGpmQueryDeviceSupport sync.RWMutex - lockGpmQueryDeviceSupportV sync.RWMutex - lockGpmQueryIfStreamingEnabled sync.RWMutex - lockGpmSampleAlloc sync.RWMutex - lockGpmSampleFree sync.RWMutex - lockGpmSampleGet sync.RWMutex - lockGpmSetStreamingEnabled sync.RWMutex - lockGpuInstanceCreateComputeInstance sync.RWMutex - lockGpuInstanceCreateComputeInstanceWithPlacement sync.RWMutex - lockGpuInstanceDestroy sync.RWMutex - lockGpuInstanceGetActiveVgpus sync.RWMutex - lockGpuInstanceGetComputeInstanceById sync.RWMutex - lockGpuInstanceGetComputeInstancePossiblePlacements sync.RWMutex - lockGpuInstanceGetComputeInstanceProfileInfo sync.RWMutex - lockGpuInstanceGetComputeInstanceProfileInfoV sync.RWMutex - lockGpuInstanceGetComputeInstanceRemainingCapacity sync.RWMutex - lockGpuInstanceGetComputeInstances sync.RWMutex - lockGpuInstanceGetCreatableVgpus sync.RWMutex - lockGpuInstanceGetInfo sync.RWMutex - lockGpuInstanceGetVgpuHeterogeneousMode sync.RWMutex - lockGpuInstanceGetVgpuSchedulerLog sync.RWMutex - lockGpuInstanceGetVgpuSchedulerState sync.RWMutex - lockGpuInstanceGetVgpuTypeCreatablePlacements sync.RWMutex - lockGpuInstanceSetVgpuHeterogeneousMode sync.RWMutex - lockGpuInstanceSetVgpuSchedulerState sync.RWMutex - lockInit sync.RWMutex - lockInitWithFlags sync.RWMutex - lockSetVgpuVersion sync.RWMutex - lockShutdown sync.RWMutex - lockSystemEventSetCreate sync.RWMutex - lockSystemEventSetFree sync.RWMutex - lockSystemEventSetWait sync.RWMutex - lockSystemGetConfComputeCapabilities sync.RWMutex - lockSystemGetConfComputeGpusReadyState sync.RWMutex - lockSystemGetConfComputeKeyRotationThresholdInfo sync.RWMutex - lockSystemGetConfComputeSettings sync.RWMutex - lockSystemGetConfComputeState sync.RWMutex - lockSystemGetCudaDriverVersion sync.RWMutex - lockSystemGetCudaDriverVersion_v2 sync.RWMutex - lockSystemGetDriverBranch sync.RWMutex - lockSystemGetDriverVersion sync.RWMutex - lockSystemGetHicVersion sync.RWMutex - lockSystemGetNVMLVersion sync.RWMutex - lockSystemGetNvlinkBwMode sync.RWMutex - lockSystemGetProcessName sync.RWMutex - lockSystemGetTopologyGpuSet sync.RWMutex - lockSystemRegisterEvents sync.RWMutex - lockSystemSetConfComputeGpusReadyState sync.RWMutex - lockSystemSetConfComputeKeyRotationThresholdInfo sync.RWMutex - lockSystemSetNvlinkBwMode sync.RWMutex - lockUnitGetCount sync.RWMutex - lockUnitGetDevices sync.RWMutex - lockUnitGetFanSpeedInfo sync.RWMutex - lockUnitGetHandleByIndex sync.RWMutex - lockUnitGetLedState sync.RWMutex - lockUnitGetPsuInfo sync.RWMutex - lockUnitGetTemperature sync.RWMutex - lockUnitGetUnitInfo sync.RWMutex - lockUnitSetLedState sync.RWMutex - lockVgpuInstanceClearAccountingPids sync.RWMutex - lockVgpuInstanceGetAccountingMode sync.RWMutex - lockVgpuInstanceGetAccountingPids sync.RWMutex - lockVgpuInstanceGetAccountingStats sync.RWMutex - lockVgpuInstanceGetEccMode sync.RWMutex - lockVgpuInstanceGetEncoderCapacity sync.RWMutex - lockVgpuInstanceGetEncoderSessions sync.RWMutex - lockVgpuInstanceGetEncoderStats sync.RWMutex - lockVgpuInstanceGetFBCSessions sync.RWMutex - lockVgpuInstanceGetFBCStats sync.RWMutex - lockVgpuInstanceGetFbUsage sync.RWMutex - lockVgpuInstanceGetFrameRateLimit sync.RWMutex - lockVgpuInstanceGetGpuInstanceId sync.RWMutex - lockVgpuInstanceGetGpuPciId sync.RWMutex - lockVgpuInstanceGetLicenseInfo sync.RWMutex - lockVgpuInstanceGetLicenseStatus sync.RWMutex - lockVgpuInstanceGetMdevUUID sync.RWMutex - lockVgpuInstanceGetMetadata sync.RWMutex - lockVgpuInstanceGetRuntimeStateSize sync.RWMutex - lockVgpuInstanceGetType sync.RWMutex - lockVgpuInstanceGetUUID sync.RWMutex - lockVgpuInstanceGetVmDriverVersion sync.RWMutex - lockVgpuInstanceGetVmID sync.RWMutex - lockVgpuInstanceSetEncoderCapacity sync.RWMutex - lockVgpuTypeGetBAR1Info sync.RWMutex - lockVgpuTypeGetCapabilities sync.RWMutex - lockVgpuTypeGetClass sync.RWMutex - lockVgpuTypeGetDeviceID sync.RWMutex - lockVgpuTypeGetFrameRateLimit sync.RWMutex - lockVgpuTypeGetFramebufferSize sync.RWMutex - lockVgpuTypeGetGpuInstanceProfileId sync.RWMutex - lockVgpuTypeGetLicense sync.RWMutex - lockVgpuTypeGetMaxInstances sync.RWMutex - lockVgpuTypeGetMaxInstancesPerGpuInstance sync.RWMutex - lockVgpuTypeGetMaxInstancesPerVm sync.RWMutex - lockVgpuTypeGetName sync.RWMutex - lockVgpuTypeGetNumDisplayHeads sync.RWMutex - lockVgpuTypeGetResolution sync.RWMutex -} - -// ComputeInstanceDestroy calls ComputeInstanceDestroyFunc. -func (mock *Interface) ComputeInstanceDestroy(computeInstance nvml.ComputeInstance) nvml.Return { - if mock.ComputeInstanceDestroyFunc == nil { - panic("Interface.ComputeInstanceDestroyFunc: method is nil but Interface.ComputeInstanceDestroy was just called") - } - callInfo := struct { - ComputeInstance nvml.ComputeInstance - }{ - ComputeInstance: computeInstance, - } - mock.lockComputeInstanceDestroy.Lock() - mock.calls.ComputeInstanceDestroy = append(mock.calls.ComputeInstanceDestroy, callInfo) - mock.lockComputeInstanceDestroy.Unlock() - return mock.ComputeInstanceDestroyFunc(computeInstance) -} - -// ComputeInstanceDestroyCalls gets all the calls that were made to ComputeInstanceDestroy. -// Check the length with: -// -// len(mockedInterface.ComputeInstanceDestroyCalls()) -func (mock *Interface) ComputeInstanceDestroyCalls() []struct { - ComputeInstance nvml.ComputeInstance -} { - var calls []struct { - ComputeInstance nvml.ComputeInstance - } - mock.lockComputeInstanceDestroy.RLock() - calls = mock.calls.ComputeInstanceDestroy - mock.lockComputeInstanceDestroy.RUnlock() - return calls -} - -// ComputeInstanceGetInfo calls ComputeInstanceGetInfoFunc. -func (mock *Interface) ComputeInstanceGetInfo(computeInstance nvml.ComputeInstance) (nvml.ComputeInstanceInfo, nvml.Return) { - if mock.ComputeInstanceGetInfoFunc == nil { - panic("Interface.ComputeInstanceGetInfoFunc: method is nil but Interface.ComputeInstanceGetInfo was just called") - } - callInfo := struct { - ComputeInstance nvml.ComputeInstance - }{ - ComputeInstance: computeInstance, - } - mock.lockComputeInstanceGetInfo.Lock() - mock.calls.ComputeInstanceGetInfo = append(mock.calls.ComputeInstanceGetInfo, callInfo) - mock.lockComputeInstanceGetInfo.Unlock() - return mock.ComputeInstanceGetInfoFunc(computeInstance) -} - -// ComputeInstanceGetInfoCalls gets all the calls that were made to ComputeInstanceGetInfo. -// Check the length with: -// -// len(mockedInterface.ComputeInstanceGetInfoCalls()) -func (mock *Interface) ComputeInstanceGetInfoCalls() []struct { - ComputeInstance nvml.ComputeInstance -} { - var calls []struct { - ComputeInstance nvml.ComputeInstance - } - mock.lockComputeInstanceGetInfo.RLock() - calls = mock.calls.ComputeInstanceGetInfo - mock.lockComputeInstanceGetInfo.RUnlock() - return calls -} - -// DeviceClearAccountingPids calls DeviceClearAccountingPidsFunc. -func (mock *Interface) DeviceClearAccountingPids(device nvml.Device) nvml.Return { - if mock.DeviceClearAccountingPidsFunc == nil { - panic("Interface.DeviceClearAccountingPidsFunc: method is nil but Interface.DeviceClearAccountingPids was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceClearAccountingPids.Lock() - mock.calls.DeviceClearAccountingPids = append(mock.calls.DeviceClearAccountingPids, callInfo) - mock.lockDeviceClearAccountingPids.Unlock() - return mock.DeviceClearAccountingPidsFunc(device) -} - -// DeviceClearAccountingPidsCalls gets all the calls that were made to DeviceClearAccountingPids. -// Check the length with: -// -// len(mockedInterface.DeviceClearAccountingPidsCalls()) -func (mock *Interface) DeviceClearAccountingPidsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceClearAccountingPids.RLock() - calls = mock.calls.DeviceClearAccountingPids - mock.lockDeviceClearAccountingPids.RUnlock() - return calls -} - -// DeviceClearCpuAffinity calls DeviceClearCpuAffinityFunc. -func (mock *Interface) DeviceClearCpuAffinity(device nvml.Device) nvml.Return { - if mock.DeviceClearCpuAffinityFunc == nil { - panic("Interface.DeviceClearCpuAffinityFunc: method is nil but Interface.DeviceClearCpuAffinity was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceClearCpuAffinity.Lock() - mock.calls.DeviceClearCpuAffinity = append(mock.calls.DeviceClearCpuAffinity, callInfo) - mock.lockDeviceClearCpuAffinity.Unlock() - return mock.DeviceClearCpuAffinityFunc(device) -} - -// DeviceClearCpuAffinityCalls gets all the calls that were made to DeviceClearCpuAffinity. -// Check the length with: -// -// len(mockedInterface.DeviceClearCpuAffinityCalls()) -func (mock *Interface) DeviceClearCpuAffinityCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceClearCpuAffinity.RLock() - calls = mock.calls.DeviceClearCpuAffinity - mock.lockDeviceClearCpuAffinity.RUnlock() - return calls -} - -// DeviceClearEccErrorCounts calls DeviceClearEccErrorCountsFunc. -func (mock *Interface) DeviceClearEccErrorCounts(device nvml.Device, eccCounterType nvml.EccCounterType) nvml.Return { - if mock.DeviceClearEccErrorCountsFunc == nil { - panic("Interface.DeviceClearEccErrorCountsFunc: method is nil but Interface.DeviceClearEccErrorCounts was just called") - } - callInfo := struct { - Device nvml.Device - EccCounterType nvml.EccCounterType - }{ - Device: device, - EccCounterType: eccCounterType, - } - mock.lockDeviceClearEccErrorCounts.Lock() - mock.calls.DeviceClearEccErrorCounts = append(mock.calls.DeviceClearEccErrorCounts, callInfo) - mock.lockDeviceClearEccErrorCounts.Unlock() - return mock.DeviceClearEccErrorCountsFunc(device, eccCounterType) -} - -// DeviceClearEccErrorCountsCalls gets all the calls that were made to DeviceClearEccErrorCounts. -// Check the length with: -// -// len(mockedInterface.DeviceClearEccErrorCountsCalls()) -func (mock *Interface) DeviceClearEccErrorCountsCalls() []struct { - Device nvml.Device - EccCounterType nvml.EccCounterType -} { - var calls []struct { - Device nvml.Device - EccCounterType nvml.EccCounterType - } - mock.lockDeviceClearEccErrorCounts.RLock() - calls = mock.calls.DeviceClearEccErrorCounts - mock.lockDeviceClearEccErrorCounts.RUnlock() - return calls -} - -// DeviceClearFieldValues calls DeviceClearFieldValuesFunc. -func (mock *Interface) DeviceClearFieldValues(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return { - if mock.DeviceClearFieldValuesFunc == nil { - panic("Interface.DeviceClearFieldValuesFunc: method is nil but Interface.DeviceClearFieldValues was just called") - } - callInfo := struct { - Device nvml.Device - FieldValues []nvml.FieldValue - }{ - Device: device, - FieldValues: fieldValues, - } - mock.lockDeviceClearFieldValues.Lock() - mock.calls.DeviceClearFieldValues = append(mock.calls.DeviceClearFieldValues, callInfo) - mock.lockDeviceClearFieldValues.Unlock() - return mock.DeviceClearFieldValuesFunc(device, fieldValues) -} - -// DeviceClearFieldValuesCalls gets all the calls that were made to DeviceClearFieldValues. -// Check the length with: -// -// len(mockedInterface.DeviceClearFieldValuesCalls()) -func (mock *Interface) DeviceClearFieldValuesCalls() []struct { - Device nvml.Device - FieldValues []nvml.FieldValue -} { - var calls []struct { - Device nvml.Device - FieldValues []nvml.FieldValue - } - mock.lockDeviceClearFieldValues.RLock() - calls = mock.calls.DeviceClearFieldValues - mock.lockDeviceClearFieldValues.RUnlock() - return calls -} - -// DeviceCreateGpuInstance calls DeviceCreateGpuInstanceFunc. -func (mock *Interface) DeviceCreateGpuInstance(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (nvml.GpuInstance, nvml.Return) { - if mock.DeviceCreateGpuInstanceFunc == nil { - panic("Interface.DeviceCreateGpuInstanceFunc: method is nil but Interface.DeviceCreateGpuInstance was just called") - } - callInfo := struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - }{ - Device: device, - GpuInstanceProfileInfo: gpuInstanceProfileInfo, - } - mock.lockDeviceCreateGpuInstance.Lock() - mock.calls.DeviceCreateGpuInstance = append(mock.calls.DeviceCreateGpuInstance, callInfo) - mock.lockDeviceCreateGpuInstance.Unlock() - return mock.DeviceCreateGpuInstanceFunc(device, gpuInstanceProfileInfo) -} - -// DeviceCreateGpuInstanceCalls gets all the calls that were made to DeviceCreateGpuInstance. -// Check the length with: -// -// len(mockedInterface.DeviceCreateGpuInstanceCalls()) -func (mock *Interface) DeviceCreateGpuInstanceCalls() []struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo -} { - var calls []struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - mock.lockDeviceCreateGpuInstance.RLock() - calls = mock.calls.DeviceCreateGpuInstance - mock.lockDeviceCreateGpuInstance.RUnlock() - return calls -} - -// DeviceCreateGpuInstanceWithPlacement calls DeviceCreateGpuInstanceWithPlacementFunc. -func (mock *Interface) DeviceCreateGpuInstanceWithPlacement(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo, gpuInstancePlacement *nvml.GpuInstancePlacement) (nvml.GpuInstance, nvml.Return) { - if mock.DeviceCreateGpuInstanceWithPlacementFunc == nil { - panic("Interface.DeviceCreateGpuInstanceWithPlacementFunc: method is nil but Interface.DeviceCreateGpuInstanceWithPlacement was just called") - } - callInfo := struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - GpuInstancePlacement *nvml.GpuInstancePlacement - }{ - Device: device, - GpuInstanceProfileInfo: gpuInstanceProfileInfo, - GpuInstancePlacement: gpuInstancePlacement, - } - mock.lockDeviceCreateGpuInstanceWithPlacement.Lock() - mock.calls.DeviceCreateGpuInstanceWithPlacement = append(mock.calls.DeviceCreateGpuInstanceWithPlacement, callInfo) - mock.lockDeviceCreateGpuInstanceWithPlacement.Unlock() - return mock.DeviceCreateGpuInstanceWithPlacementFunc(device, gpuInstanceProfileInfo, gpuInstancePlacement) -} - -// DeviceCreateGpuInstanceWithPlacementCalls gets all the calls that were made to DeviceCreateGpuInstanceWithPlacement. -// Check the length with: -// -// len(mockedInterface.DeviceCreateGpuInstanceWithPlacementCalls()) -func (mock *Interface) DeviceCreateGpuInstanceWithPlacementCalls() []struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - GpuInstancePlacement *nvml.GpuInstancePlacement -} { - var calls []struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - GpuInstancePlacement *nvml.GpuInstancePlacement - } - mock.lockDeviceCreateGpuInstanceWithPlacement.RLock() - calls = mock.calls.DeviceCreateGpuInstanceWithPlacement - mock.lockDeviceCreateGpuInstanceWithPlacement.RUnlock() - return calls -} - -// DeviceDiscoverGpus calls DeviceDiscoverGpusFunc. -func (mock *Interface) DeviceDiscoverGpus() (nvml.PciInfo, nvml.Return) { - if mock.DeviceDiscoverGpusFunc == nil { - panic("Interface.DeviceDiscoverGpusFunc: method is nil but Interface.DeviceDiscoverGpus was just called") - } - callInfo := struct { - }{} - mock.lockDeviceDiscoverGpus.Lock() - mock.calls.DeviceDiscoverGpus = append(mock.calls.DeviceDiscoverGpus, callInfo) - mock.lockDeviceDiscoverGpus.Unlock() - return mock.DeviceDiscoverGpusFunc() -} - -// DeviceDiscoverGpusCalls gets all the calls that were made to DeviceDiscoverGpus. -// Check the length with: -// -// len(mockedInterface.DeviceDiscoverGpusCalls()) -func (mock *Interface) DeviceDiscoverGpusCalls() []struct { -} { - var calls []struct { - } - mock.lockDeviceDiscoverGpus.RLock() - calls = mock.calls.DeviceDiscoverGpus - mock.lockDeviceDiscoverGpus.RUnlock() - return calls -} - -// DeviceFreezeNvLinkUtilizationCounter calls DeviceFreezeNvLinkUtilizationCounterFunc. -func (mock *Interface) DeviceFreezeNvLinkUtilizationCounter(device nvml.Device, n1 int, n2 int, enableState nvml.EnableState) nvml.Return { - if mock.DeviceFreezeNvLinkUtilizationCounterFunc == nil { - panic("Interface.DeviceFreezeNvLinkUtilizationCounterFunc: method is nil but Interface.DeviceFreezeNvLinkUtilizationCounter was just called") - } - callInfo := struct { - Device nvml.Device - N1 int - N2 int - EnableState nvml.EnableState - }{ - Device: device, - N1: n1, - N2: n2, - EnableState: enableState, - } - mock.lockDeviceFreezeNvLinkUtilizationCounter.Lock() - mock.calls.DeviceFreezeNvLinkUtilizationCounter = append(mock.calls.DeviceFreezeNvLinkUtilizationCounter, callInfo) - mock.lockDeviceFreezeNvLinkUtilizationCounter.Unlock() - return mock.DeviceFreezeNvLinkUtilizationCounterFunc(device, n1, n2, enableState) -} - -// DeviceFreezeNvLinkUtilizationCounterCalls gets all the calls that were made to DeviceFreezeNvLinkUtilizationCounter. -// Check the length with: -// -// len(mockedInterface.DeviceFreezeNvLinkUtilizationCounterCalls()) -func (mock *Interface) DeviceFreezeNvLinkUtilizationCounterCalls() []struct { - Device nvml.Device - N1 int - N2 int - EnableState nvml.EnableState -} { - var calls []struct { - Device nvml.Device - N1 int - N2 int - EnableState nvml.EnableState - } - mock.lockDeviceFreezeNvLinkUtilizationCounter.RLock() - calls = mock.calls.DeviceFreezeNvLinkUtilizationCounter - mock.lockDeviceFreezeNvLinkUtilizationCounter.RUnlock() - return calls -} - -// DeviceGetAPIRestriction calls DeviceGetAPIRestrictionFunc. -func (mock *Interface) DeviceGetAPIRestriction(device nvml.Device, restrictedAPI nvml.RestrictedAPI) (nvml.EnableState, nvml.Return) { - if mock.DeviceGetAPIRestrictionFunc == nil { - panic("Interface.DeviceGetAPIRestrictionFunc: method is nil but Interface.DeviceGetAPIRestriction was just called") - } - callInfo := struct { - Device nvml.Device - RestrictedAPI nvml.RestrictedAPI - }{ - Device: device, - RestrictedAPI: restrictedAPI, - } - mock.lockDeviceGetAPIRestriction.Lock() - mock.calls.DeviceGetAPIRestriction = append(mock.calls.DeviceGetAPIRestriction, callInfo) - mock.lockDeviceGetAPIRestriction.Unlock() - return mock.DeviceGetAPIRestrictionFunc(device, restrictedAPI) -} - -// DeviceGetAPIRestrictionCalls gets all the calls that were made to DeviceGetAPIRestriction. -// Check the length with: -// -// len(mockedInterface.DeviceGetAPIRestrictionCalls()) -func (mock *Interface) DeviceGetAPIRestrictionCalls() []struct { - Device nvml.Device - RestrictedAPI nvml.RestrictedAPI -} { - var calls []struct { - Device nvml.Device - RestrictedAPI nvml.RestrictedAPI - } - mock.lockDeviceGetAPIRestriction.RLock() - calls = mock.calls.DeviceGetAPIRestriction - mock.lockDeviceGetAPIRestriction.RUnlock() - return calls -} - -// DeviceGetAccountingBufferSize calls DeviceGetAccountingBufferSizeFunc. -func (mock *Interface) DeviceGetAccountingBufferSize(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetAccountingBufferSizeFunc == nil { - panic("Interface.DeviceGetAccountingBufferSizeFunc: method is nil but Interface.DeviceGetAccountingBufferSize was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetAccountingBufferSize.Lock() - mock.calls.DeviceGetAccountingBufferSize = append(mock.calls.DeviceGetAccountingBufferSize, callInfo) - mock.lockDeviceGetAccountingBufferSize.Unlock() - return mock.DeviceGetAccountingBufferSizeFunc(device) -} - -// DeviceGetAccountingBufferSizeCalls gets all the calls that were made to DeviceGetAccountingBufferSize. -// Check the length with: -// -// len(mockedInterface.DeviceGetAccountingBufferSizeCalls()) -func (mock *Interface) DeviceGetAccountingBufferSizeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetAccountingBufferSize.RLock() - calls = mock.calls.DeviceGetAccountingBufferSize - mock.lockDeviceGetAccountingBufferSize.RUnlock() - return calls -} - -// DeviceGetAccountingMode calls DeviceGetAccountingModeFunc. -func (mock *Interface) DeviceGetAccountingMode(device nvml.Device) (nvml.EnableState, nvml.Return) { - if mock.DeviceGetAccountingModeFunc == nil { - panic("Interface.DeviceGetAccountingModeFunc: method is nil but Interface.DeviceGetAccountingMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetAccountingMode.Lock() - mock.calls.DeviceGetAccountingMode = append(mock.calls.DeviceGetAccountingMode, callInfo) - mock.lockDeviceGetAccountingMode.Unlock() - return mock.DeviceGetAccountingModeFunc(device) -} - -// DeviceGetAccountingModeCalls gets all the calls that were made to DeviceGetAccountingMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetAccountingModeCalls()) -func (mock *Interface) DeviceGetAccountingModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetAccountingMode.RLock() - calls = mock.calls.DeviceGetAccountingMode - mock.lockDeviceGetAccountingMode.RUnlock() - return calls -} - -// DeviceGetAccountingPids calls DeviceGetAccountingPidsFunc. -func (mock *Interface) DeviceGetAccountingPids(device nvml.Device) ([]int, nvml.Return) { - if mock.DeviceGetAccountingPidsFunc == nil { - panic("Interface.DeviceGetAccountingPidsFunc: method is nil but Interface.DeviceGetAccountingPids was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetAccountingPids.Lock() - mock.calls.DeviceGetAccountingPids = append(mock.calls.DeviceGetAccountingPids, callInfo) - mock.lockDeviceGetAccountingPids.Unlock() - return mock.DeviceGetAccountingPidsFunc(device) -} - -// DeviceGetAccountingPidsCalls gets all the calls that were made to DeviceGetAccountingPids. -// Check the length with: -// -// len(mockedInterface.DeviceGetAccountingPidsCalls()) -func (mock *Interface) DeviceGetAccountingPidsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetAccountingPids.RLock() - calls = mock.calls.DeviceGetAccountingPids - mock.lockDeviceGetAccountingPids.RUnlock() - return calls -} - -// DeviceGetAccountingStats calls DeviceGetAccountingStatsFunc. -func (mock *Interface) DeviceGetAccountingStats(device nvml.Device, v uint32) (nvml.AccountingStats, nvml.Return) { - if mock.DeviceGetAccountingStatsFunc == nil { - panic("Interface.DeviceGetAccountingStatsFunc: method is nil but Interface.DeviceGetAccountingStats was just called") - } - callInfo := struct { - Device nvml.Device - V uint32 - }{ - Device: device, - V: v, - } - mock.lockDeviceGetAccountingStats.Lock() - mock.calls.DeviceGetAccountingStats = append(mock.calls.DeviceGetAccountingStats, callInfo) - mock.lockDeviceGetAccountingStats.Unlock() - return mock.DeviceGetAccountingStatsFunc(device, v) -} - -// DeviceGetAccountingStatsCalls gets all the calls that were made to DeviceGetAccountingStats. -// Check the length with: -// -// len(mockedInterface.DeviceGetAccountingStatsCalls()) -func (mock *Interface) DeviceGetAccountingStatsCalls() []struct { - Device nvml.Device - V uint32 -} { - var calls []struct { - Device nvml.Device - V uint32 - } - mock.lockDeviceGetAccountingStats.RLock() - calls = mock.calls.DeviceGetAccountingStats - mock.lockDeviceGetAccountingStats.RUnlock() - return calls -} - -// DeviceGetActiveVgpus calls DeviceGetActiveVgpusFunc. -func (mock *Interface) DeviceGetActiveVgpus(device nvml.Device) ([]nvml.VgpuInstance, nvml.Return) { - if mock.DeviceGetActiveVgpusFunc == nil { - panic("Interface.DeviceGetActiveVgpusFunc: method is nil but Interface.DeviceGetActiveVgpus was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetActiveVgpus.Lock() - mock.calls.DeviceGetActiveVgpus = append(mock.calls.DeviceGetActiveVgpus, callInfo) - mock.lockDeviceGetActiveVgpus.Unlock() - return mock.DeviceGetActiveVgpusFunc(device) -} - -// DeviceGetActiveVgpusCalls gets all the calls that were made to DeviceGetActiveVgpus. -// Check the length with: -// -// len(mockedInterface.DeviceGetActiveVgpusCalls()) -func (mock *Interface) DeviceGetActiveVgpusCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetActiveVgpus.RLock() - calls = mock.calls.DeviceGetActiveVgpus - mock.lockDeviceGetActiveVgpus.RUnlock() - return calls -} - -// DeviceGetAdaptiveClockInfoStatus calls DeviceGetAdaptiveClockInfoStatusFunc. -func (mock *Interface) DeviceGetAdaptiveClockInfoStatus(device nvml.Device) (uint32, nvml.Return) { - if mock.DeviceGetAdaptiveClockInfoStatusFunc == nil { - panic("Interface.DeviceGetAdaptiveClockInfoStatusFunc: method is nil but Interface.DeviceGetAdaptiveClockInfoStatus was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetAdaptiveClockInfoStatus.Lock() - mock.calls.DeviceGetAdaptiveClockInfoStatus = append(mock.calls.DeviceGetAdaptiveClockInfoStatus, callInfo) - mock.lockDeviceGetAdaptiveClockInfoStatus.Unlock() - return mock.DeviceGetAdaptiveClockInfoStatusFunc(device) -} - -// DeviceGetAdaptiveClockInfoStatusCalls gets all the calls that were made to DeviceGetAdaptiveClockInfoStatus. -// Check the length with: -// -// len(mockedInterface.DeviceGetAdaptiveClockInfoStatusCalls()) -func (mock *Interface) DeviceGetAdaptiveClockInfoStatusCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetAdaptiveClockInfoStatus.RLock() - calls = mock.calls.DeviceGetAdaptiveClockInfoStatus - mock.lockDeviceGetAdaptiveClockInfoStatus.RUnlock() - return calls -} - -// DeviceGetAddressingMode calls DeviceGetAddressingModeFunc. -func (mock *Interface) DeviceGetAddressingMode(device nvml.Device) (nvml.DeviceAddressingMode, nvml.Return) { - if mock.DeviceGetAddressingModeFunc == nil { - panic("Interface.DeviceGetAddressingModeFunc: method is nil but Interface.DeviceGetAddressingMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetAddressingMode.Lock() - mock.calls.DeviceGetAddressingMode = append(mock.calls.DeviceGetAddressingMode, callInfo) - mock.lockDeviceGetAddressingMode.Unlock() - return mock.DeviceGetAddressingModeFunc(device) -} - -// DeviceGetAddressingModeCalls gets all the calls that were made to DeviceGetAddressingMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetAddressingModeCalls()) -func (mock *Interface) DeviceGetAddressingModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetAddressingMode.RLock() - calls = mock.calls.DeviceGetAddressingMode - mock.lockDeviceGetAddressingMode.RUnlock() - return calls -} - -// DeviceGetApplicationsClock calls DeviceGetApplicationsClockFunc. -func (mock *Interface) DeviceGetApplicationsClock(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { - if mock.DeviceGetApplicationsClockFunc == nil { - panic("Interface.DeviceGetApplicationsClockFunc: method is nil but Interface.DeviceGetApplicationsClock was just called") - } - callInfo := struct { - Device nvml.Device - ClockType nvml.ClockType - }{ - Device: device, - ClockType: clockType, - } - mock.lockDeviceGetApplicationsClock.Lock() - mock.calls.DeviceGetApplicationsClock = append(mock.calls.DeviceGetApplicationsClock, callInfo) - mock.lockDeviceGetApplicationsClock.Unlock() - return mock.DeviceGetApplicationsClockFunc(device, clockType) -} - -// DeviceGetApplicationsClockCalls gets all the calls that were made to DeviceGetApplicationsClock. -// Check the length with: -// -// len(mockedInterface.DeviceGetApplicationsClockCalls()) -func (mock *Interface) DeviceGetApplicationsClockCalls() []struct { - Device nvml.Device - ClockType nvml.ClockType -} { - var calls []struct { - Device nvml.Device - ClockType nvml.ClockType - } - mock.lockDeviceGetApplicationsClock.RLock() - calls = mock.calls.DeviceGetApplicationsClock - mock.lockDeviceGetApplicationsClock.RUnlock() - return calls -} - -// DeviceGetArchitecture calls DeviceGetArchitectureFunc. -func (mock *Interface) DeviceGetArchitecture(device nvml.Device) (nvml.DeviceArchitecture, nvml.Return) { - if mock.DeviceGetArchitectureFunc == nil { - panic("Interface.DeviceGetArchitectureFunc: method is nil but Interface.DeviceGetArchitecture was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetArchitecture.Lock() - mock.calls.DeviceGetArchitecture = append(mock.calls.DeviceGetArchitecture, callInfo) - mock.lockDeviceGetArchitecture.Unlock() - return mock.DeviceGetArchitectureFunc(device) -} - -// DeviceGetArchitectureCalls gets all the calls that were made to DeviceGetArchitecture. -// Check the length with: -// -// len(mockedInterface.DeviceGetArchitectureCalls()) -func (mock *Interface) DeviceGetArchitectureCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetArchitecture.RLock() - calls = mock.calls.DeviceGetArchitecture - mock.lockDeviceGetArchitecture.RUnlock() - return calls -} - -// DeviceGetAttributes calls DeviceGetAttributesFunc. -func (mock *Interface) DeviceGetAttributes(device nvml.Device) (nvml.DeviceAttributes, nvml.Return) { - if mock.DeviceGetAttributesFunc == nil { - panic("Interface.DeviceGetAttributesFunc: method is nil but Interface.DeviceGetAttributes was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetAttributes.Lock() - mock.calls.DeviceGetAttributes = append(mock.calls.DeviceGetAttributes, callInfo) - mock.lockDeviceGetAttributes.Unlock() - return mock.DeviceGetAttributesFunc(device) -} - -// DeviceGetAttributesCalls gets all the calls that were made to DeviceGetAttributes. -// Check the length with: -// -// len(mockedInterface.DeviceGetAttributesCalls()) -func (mock *Interface) DeviceGetAttributesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetAttributes.RLock() - calls = mock.calls.DeviceGetAttributes - mock.lockDeviceGetAttributes.RUnlock() - return calls -} - -// DeviceGetAutoBoostedClocksEnabled calls DeviceGetAutoBoostedClocksEnabledFunc. -func (mock *Interface) DeviceGetAutoBoostedClocksEnabled(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) { - if mock.DeviceGetAutoBoostedClocksEnabledFunc == nil { - panic("Interface.DeviceGetAutoBoostedClocksEnabledFunc: method is nil but Interface.DeviceGetAutoBoostedClocksEnabled was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetAutoBoostedClocksEnabled.Lock() - mock.calls.DeviceGetAutoBoostedClocksEnabled = append(mock.calls.DeviceGetAutoBoostedClocksEnabled, callInfo) - mock.lockDeviceGetAutoBoostedClocksEnabled.Unlock() - return mock.DeviceGetAutoBoostedClocksEnabledFunc(device) -} - -// DeviceGetAutoBoostedClocksEnabledCalls gets all the calls that were made to DeviceGetAutoBoostedClocksEnabled. -// Check the length with: -// -// len(mockedInterface.DeviceGetAutoBoostedClocksEnabledCalls()) -func (mock *Interface) DeviceGetAutoBoostedClocksEnabledCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetAutoBoostedClocksEnabled.RLock() - calls = mock.calls.DeviceGetAutoBoostedClocksEnabled - mock.lockDeviceGetAutoBoostedClocksEnabled.RUnlock() - return calls -} - -// DeviceGetBAR1MemoryInfo calls DeviceGetBAR1MemoryInfoFunc. -func (mock *Interface) DeviceGetBAR1MemoryInfo(device nvml.Device) (nvml.BAR1Memory, nvml.Return) { - if mock.DeviceGetBAR1MemoryInfoFunc == nil { - panic("Interface.DeviceGetBAR1MemoryInfoFunc: method is nil but Interface.DeviceGetBAR1MemoryInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetBAR1MemoryInfo.Lock() - mock.calls.DeviceGetBAR1MemoryInfo = append(mock.calls.DeviceGetBAR1MemoryInfo, callInfo) - mock.lockDeviceGetBAR1MemoryInfo.Unlock() - return mock.DeviceGetBAR1MemoryInfoFunc(device) -} - -// DeviceGetBAR1MemoryInfoCalls gets all the calls that were made to DeviceGetBAR1MemoryInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetBAR1MemoryInfoCalls()) -func (mock *Interface) DeviceGetBAR1MemoryInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetBAR1MemoryInfo.RLock() - calls = mock.calls.DeviceGetBAR1MemoryInfo - mock.lockDeviceGetBAR1MemoryInfo.RUnlock() - return calls -} - -// DeviceGetBoardId calls DeviceGetBoardIdFunc. -func (mock *Interface) DeviceGetBoardId(device nvml.Device) (uint32, nvml.Return) { - if mock.DeviceGetBoardIdFunc == nil { - panic("Interface.DeviceGetBoardIdFunc: method is nil but Interface.DeviceGetBoardId was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetBoardId.Lock() - mock.calls.DeviceGetBoardId = append(mock.calls.DeviceGetBoardId, callInfo) - mock.lockDeviceGetBoardId.Unlock() - return mock.DeviceGetBoardIdFunc(device) -} - -// DeviceGetBoardIdCalls gets all the calls that were made to DeviceGetBoardId. -// Check the length with: -// -// len(mockedInterface.DeviceGetBoardIdCalls()) -func (mock *Interface) DeviceGetBoardIdCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetBoardId.RLock() - calls = mock.calls.DeviceGetBoardId - mock.lockDeviceGetBoardId.RUnlock() - return calls -} - -// DeviceGetBoardPartNumber calls DeviceGetBoardPartNumberFunc. -func (mock *Interface) DeviceGetBoardPartNumber(device nvml.Device) (string, nvml.Return) { - if mock.DeviceGetBoardPartNumberFunc == nil { - panic("Interface.DeviceGetBoardPartNumberFunc: method is nil but Interface.DeviceGetBoardPartNumber was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetBoardPartNumber.Lock() - mock.calls.DeviceGetBoardPartNumber = append(mock.calls.DeviceGetBoardPartNumber, callInfo) - mock.lockDeviceGetBoardPartNumber.Unlock() - return mock.DeviceGetBoardPartNumberFunc(device) -} - -// DeviceGetBoardPartNumberCalls gets all the calls that were made to DeviceGetBoardPartNumber. -// Check the length with: -// -// len(mockedInterface.DeviceGetBoardPartNumberCalls()) -func (mock *Interface) DeviceGetBoardPartNumberCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetBoardPartNumber.RLock() - calls = mock.calls.DeviceGetBoardPartNumber - mock.lockDeviceGetBoardPartNumber.RUnlock() - return calls -} - -// DeviceGetBrand calls DeviceGetBrandFunc. -func (mock *Interface) DeviceGetBrand(device nvml.Device) (nvml.BrandType, nvml.Return) { - if mock.DeviceGetBrandFunc == nil { - panic("Interface.DeviceGetBrandFunc: method is nil but Interface.DeviceGetBrand was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetBrand.Lock() - mock.calls.DeviceGetBrand = append(mock.calls.DeviceGetBrand, callInfo) - mock.lockDeviceGetBrand.Unlock() - return mock.DeviceGetBrandFunc(device) -} - -// DeviceGetBrandCalls gets all the calls that were made to DeviceGetBrand. -// Check the length with: -// -// len(mockedInterface.DeviceGetBrandCalls()) -func (mock *Interface) DeviceGetBrandCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetBrand.RLock() - calls = mock.calls.DeviceGetBrand - mock.lockDeviceGetBrand.RUnlock() - return calls -} - -// DeviceGetBridgeChipInfo calls DeviceGetBridgeChipInfoFunc. -func (mock *Interface) DeviceGetBridgeChipInfo(device nvml.Device) (nvml.BridgeChipHierarchy, nvml.Return) { - if mock.DeviceGetBridgeChipInfoFunc == nil { - panic("Interface.DeviceGetBridgeChipInfoFunc: method is nil but Interface.DeviceGetBridgeChipInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetBridgeChipInfo.Lock() - mock.calls.DeviceGetBridgeChipInfo = append(mock.calls.DeviceGetBridgeChipInfo, callInfo) - mock.lockDeviceGetBridgeChipInfo.Unlock() - return mock.DeviceGetBridgeChipInfoFunc(device) -} - -// DeviceGetBridgeChipInfoCalls gets all the calls that were made to DeviceGetBridgeChipInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetBridgeChipInfoCalls()) -func (mock *Interface) DeviceGetBridgeChipInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetBridgeChipInfo.RLock() - calls = mock.calls.DeviceGetBridgeChipInfo - mock.lockDeviceGetBridgeChipInfo.RUnlock() - return calls -} - -// DeviceGetBusType calls DeviceGetBusTypeFunc. -func (mock *Interface) DeviceGetBusType(device nvml.Device) (nvml.BusType, nvml.Return) { - if mock.DeviceGetBusTypeFunc == nil { - panic("Interface.DeviceGetBusTypeFunc: method is nil but Interface.DeviceGetBusType was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetBusType.Lock() - mock.calls.DeviceGetBusType = append(mock.calls.DeviceGetBusType, callInfo) - mock.lockDeviceGetBusType.Unlock() - return mock.DeviceGetBusTypeFunc(device) -} - -// DeviceGetBusTypeCalls gets all the calls that were made to DeviceGetBusType. -// Check the length with: -// -// len(mockedInterface.DeviceGetBusTypeCalls()) -func (mock *Interface) DeviceGetBusTypeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetBusType.RLock() - calls = mock.calls.DeviceGetBusType - mock.lockDeviceGetBusType.RUnlock() - return calls -} - -// DeviceGetC2cModeInfoV calls DeviceGetC2cModeInfoVFunc. -func (mock *Interface) DeviceGetC2cModeInfoV(device nvml.Device) nvml.C2cModeInfoHandler { - if mock.DeviceGetC2cModeInfoVFunc == nil { - panic("Interface.DeviceGetC2cModeInfoVFunc: method is nil but Interface.DeviceGetC2cModeInfoV was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetC2cModeInfoV.Lock() - mock.calls.DeviceGetC2cModeInfoV = append(mock.calls.DeviceGetC2cModeInfoV, callInfo) - mock.lockDeviceGetC2cModeInfoV.Unlock() - return mock.DeviceGetC2cModeInfoVFunc(device) -} - -// DeviceGetC2cModeInfoVCalls gets all the calls that were made to DeviceGetC2cModeInfoV. -// Check the length with: -// -// len(mockedInterface.DeviceGetC2cModeInfoVCalls()) -func (mock *Interface) DeviceGetC2cModeInfoVCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetC2cModeInfoV.RLock() - calls = mock.calls.DeviceGetC2cModeInfoV - mock.lockDeviceGetC2cModeInfoV.RUnlock() - return calls -} - -// DeviceGetCapabilities calls DeviceGetCapabilitiesFunc. -func (mock *Interface) DeviceGetCapabilities(device nvml.Device) (nvml.DeviceCapabilities, nvml.Return) { - if mock.DeviceGetCapabilitiesFunc == nil { - panic("Interface.DeviceGetCapabilitiesFunc: method is nil but Interface.DeviceGetCapabilities was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetCapabilities.Lock() - mock.calls.DeviceGetCapabilities = append(mock.calls.DeviceGetCapabilities, callInfo) - mock.lockDeviceGetCapabilities.Unlock() - return mock.DeviceGetCapabilitiesFunc(device) -} - -// DeviceGetCapabilitiesCalls gets all the calls that were made to DeviceGetCapabilities. -// Check the length with: -// -// len(mockedInterface.DeviceGetCapabilitiesCalls()) -func (mock *Interface) DeviceGetCapabilitiesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetCapabilities.RLock() - calls = mock.calls.DeviceGetCapabilities - mock.lockDeviceGetCapabilities.RUnlock() - return calls -} - -// DeviceGetClkMonStatus calls DeviceGetClkMonStatusFunc. -func (mock *Interface) DeviceGetClkMonStatus(device nvml.Device) (nvml.ClkMonStatus, nvml.Return) { - if mock.DeviceGetClkMonStatusFunc == nil { - panic("Interface.DeviceGetClkMonStatusFunc: method is nil but Interface.DeviceGetClkMonStatus was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetClkMonStatus.Lock() - mock.calls.DeviceGetClkMonStatus = append(mock.calls.DeviceGetClkMonStatus, callInfo) - mock.lockDeviceGetClkMonStatus.Unlock() - return mock.DeviceGetClkMonStatusFunc(device) -} - -// DeviceGetClkMonStatusCalls gets all the calls that were made to DeviceGetClkMonStatus. -// Check the length with: -// -// len(mockedInterface.DeviceGetClkMonStatusCalls()) -func (mock *Interface) DeviceGetClkMonStatusCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetClkMonStatus.RLock() - calls = mock.calls.DeviceGetClkMonStatus - mock.lockDeviceGetClkMonStatus.RUnlock() - return calls -} - -// DeviceGetClock calls DeviceGetClockFunc. -func (mock *Interface) DeviceGetClock(device nvml.Device, clockType nvml.ClockType, clockId nvml.ClockId) (uint32, nvml.Return) { - if mock.DeviceGetClockFunc == nil { - panic("Interface.DeviceGetClockFunc: method is nil but Interface.DeviceGetClock was just called") - } - callInfo := struct { - Device nvml.Device - ClockType nvml.ClockType - ClockId nvml.ClockId - }{ - Device: device, - ClockType: clockType, - ClockId: clockId, - } - mock.lockDeviceGetClock.Lock() - mock.calls.DeviceGetClock = append(mock.calls.DeviceGetClock, callInfo) - mock.lockDeviceGetClock.Unlock() - return mock.DeviceGetClockFunc(device, clockType, clockId) -} - -// DeviceGetClockCalls gets all the calls that were made to DeviceGetClock. -// Check the length with: -// -// len(mockedInterface.DeviceGetClockCalls()) -func (mock *Interface) DeviceGetClockCalls() []struct { - Device nvml.Device - ClockType nvml.ClockType - ClockId nvml.ClockId -} { - var calls []struct { - Device nvml.Device - ClockType nvml.ClockType - ClockId nvml.ClockId - } - mock.lockDeviceGetClock.RLock() - calls = mock.calls.DeviceGetClock - mock.lockDeviceGetClock.RUnlock() - return calls -} - -// DeviceGetClockInfo calls DeviceGetClockInfoFunc. -func (mock *Interface) DeviceGetClockInfo(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { - if mock.DeviceGetClockInfoFunc == nil { - panic("Interface.DeviceGetClockInfoFunc: method is nil but Interface.DeviceGetClockInfo was just called") - } - callInfo := struct { - Device nvml.Device - ClockType nvml.ClockType - }{ - Device: device, - ClockType: clockType, - } - mock.lockDeviceGetClockInfo.Lock() - mock.calls.DeviceGetClockInfo = append(mock.calls.DeviceGetClockInfo, callInfo) - mock.lockDeviceGetClockInfo.Unlock() - return mock.DeviceGetClockInfoFunc(device, clockType) -} - -// DeviceGetClockInfoCalls gets all the calls that were made to DeviceGetClockInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetClockInfoCalls()) -func (mock *Interface) DeviceGetClockInfoCalls() []struct { - Device nvml.Device - ClockType nvml.ClockType -} { - var calls []struct { - Device nvml.Device - ClockType nvml.ClockType - } - mock.lockDeviceGetClockInfo.RLock() - calls = mock.calls.DeviceGetClockInfo - mock.lockDeviceGetClockInfo.RUnlock() - return calls -} - -// DeviceGetClockOffsets calls DeviceGetClockOffsetsFunc. -func (mock *Interface) DeviceGetClockOffsets(device nvml.Device) (nvml.ClockOffset, nvml.Return) { - if mock.DeviceGetClockOffsetsFunc == nil { - panic("Interface.DeviceGetClockOffsetsFunc: method is nil but Interface.DeviceGetClockOffsets was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetClockOffsets.Lock() - mock.calls.DeviceGetClockOffsets = append(mock.calls.DeviceGetClockOffsets, callInfo) - mock.lockDeviceGetClockOffsets.Unlock() - return mock.DeviceGetClockOffsetsFunc(device) -} - -// DeviceGetClockOffsetsCalls gets all the calls that were made to DeviceGetClockOffsets. -// Check the length with: -// -// len(mockedInterface.DeviceGetClockOffsetsCalls()) -func (mock *Interface) DeviceGetClockOffsetsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetClockOffsets.RLock() - calls = mock.calls.DeviceGetClockOffsets - mock.lockDeviceGetClockOffsets.RUnlock() - return calls -} - -// DeviceGetComputeInstanceId calls DeviceGetComputeInstanceIdFunc. -func (mock *Interface) DeviceGetComputeInstanceId(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetComputeInstanceIdFunc == nil { - panic("Interface.DeviceGetComputeInstanceIdFunc: method is nil but Interface.DeviceGetComputeInstanceId was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetComputeInstanceId.Lock() - mock.calls.DeviceGetComputeInstanceId = append(mock.calls.DeviceGetComputeInstanceId, callInfo) - mock.lockDeviceGetComputeInstanceId.Unlock() - return mock.DeviceGetComputeInstanceIdFunc(device) -} - -// DeviceGetComputeInstanceIdCalls gets all the calls that were made to DeviceGetComputeInstanceId. -// Check the length with: -// -// len(mockedInterface.DeviceGetComputeInstanceIdCalls()) -func (mock *Interface) DeviceGetComputeInstanceIdCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetComputeInstanceId.RLock() - calls = mock.calls.DeviceGetComputeInstanceId - mock.lockDeviceGetComputeInstanceId.RUnlock() - return calls -} - -// DeviceGetComputeMode calls DeviceGetComputeModeFunc. -func (mock *Interface) DeviceGetComputeMode(device nvml.Device) (nvml.ComputeMode, nvml.Return) { - if mock.DeviceGetComputeModeFunc == nil { - panic("Interface.DeviceGetComputeModeFunc: method is nil but Interface.DeviceGetComputeMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetComputeMode.Lock() - mock.calls.DeviceGetComputeMode = append(mock.calls.DeviceGetComputeMode, callInfo) - mock.lockDeviceGetComputeMode.Unlock() - return mock.DeviceGetComputeModeFunc(device) -} - -// DeviceGetComputeModeCalls gets all the calls that were made to DeviceGetComputeMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetComputeModeCalls()) -func (mock *Interface) DeviceGetComputeModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetComputeMode.RLock() - calls = mock.calls.DeviceGetComputeMode - mock.lockDeviceGetComputeMode.RUnlock() - return calls -} - -// DeviceGetComputeRunningProcesses calls DeviceGetComputeRunningProcessesFunc. -func (mock *Interface) DeviceGetComputeRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { - if mock.DeviceGetComputeRunningProcessesFunc == nil { - panic("Interface.DeviceGetComputeRunningProcessesFunc: method is nil but Interface.DeviceGetComputeRunningProcesses was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetComputeRunningProcesses.Lock() - mock.calls.DeviceGetComputeRunningProcesses = append(mock.calls.DeviceGetComputeRunningProcesses, callInfo) - mock.lockDeviceGetComputeRunningProcesses.Unlock() - return mock.DeviceGetComputeRunningProcessesFunc(device) -} - -// DeviceGetComputeRunningProcessesCalls gets all the calls that were made to DeviceGetComputeRunningProcesses. -// Check the length with: -// -// len(mockedInterface.DeviceGetComputeRunningProcessesCalls()) -func (mock *Interface) DeviceGetComputeRunningProcessesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetComputeRunningProcesses.RLock() - calls = mock.calls.DeviceGetComputeRunningProcesses - mock.lockDeviceGetComputeRunningProcesses.RUnlock() - return calls -} - -// DeviceGetConfComputeGpuAttestationReport calls DeviceGetConfComputeGpuAttestationReportFunc. -func (mock *Interface) DeviceGetConfComputeGpuAttestationReport(device nvml.Device, confComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport) nvml.Return { - if mock.DeviceGetConfComputeGpuAttestationReportFunc == nil { - panic("Interface.DeviceGetConfComputeGpuAttestationReportFunc: method is nil but Interface.DeviceGetConfComputeGpuAttestationReport was just called") - } - callInfo := struct { - Device nvml.Device - ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport - }{ - Device: device, - ConfComputeGpuAttestationReport: confComputeGpuAttestationReport, - } - mock.lockDeviceGetConfComputeGpuAttestationReport.Lock() - mock.calls.DeviceGetConfComputeGpuAttestationReport = append(mock.calls.DeviceGetConfComputeGpuAttestationReport, callInfo) - mock.lockDeviceGetConfComputeGpuAttestationReport.Unlock() - return mock.DeviceGetConfComputeGpuAttestationReportFunc(device, confComputeGpuAttestationReport) -} - -// DeviceGetConfComputeGpuAttestationReportCalls gets all the calls that were made to DeviceGetConfComputeGpuAttestationReport. -// Check the length with: -// -// len(mockedInterface.DeviceGetConfComputeGpuAttestationReportCalls()) -func (mock *Interface) DeviceGetConfComputeGpuAttestationReportCalls() []struct { - Device nvml.Device - ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport -} { - var calls []struct { - Device nvml.Device - ConfComputeGpuAttestationReport *nvml.ConfComputeGpuAttestationReport - } - mock.lockDeviceGetConfComputeGpuAttestationReport.RLock() - calls = mock.calls.DeviceGetConfComputeGpuAttestationReport - mock.lockDeviceGetConfComputeGpuAttestationReport.RUnlock() - return calls -} - -// DeviceGetConfComputeGpuCertificate calls DeviceGetConfComputeGpuCertificateFunc. -func (mock *Interface) DeviceGetConfComputeGpuCertificate(device nvml.Device) (nvml.ConfComputeGpuCertificate, nvml.Return) { - if mock.DeviceGetConfComputeGpuCertificateFunc == nil { - panic("Interface.DeviceGetConfComputeGpuCertificateFunc: method is nil but Interface.DeviceGetConfComputeGpuCertificate was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetConfComputeGpuCertificate.Lock() - mock.calls.DeviceGetConfComputeGpuCertificate = append(mock.calls.DeviceGetConfComputeGpuCertificate, callInfo) - mock.lockDeviceGetConfComputeGpuCertificate.Unlock() - return mock.DeviceGetConfComputeGpuCertificateFunc(device) -} - -// DeviceGetConfComputeGpuCertificateCalls gets all the calls that were made to DeviceGetConfComputeGpuCertificate. -// Check the length with: -// -// len(mockedInterface.DeviceGetConfComputeGpuCertificateCalls()) -func (mock *Interface) DeviceGetConfComputeGpuCertificateCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetConfComputeGpuCertificate.RLock() - calls = mock.calls.DeviceGetConfComputeGpuCertificate - mock.lockDeviceGetConfComputeGpuCertificate.RUnlock() - return calls -} - -// DeviceGetConfComputeMemSizeInfo calls DeviceGetConfComputeMemSizeInfoFunc. -func (mock *Interface) DeviceGetConfComputeMemSizeInfo(device nvml.Device) (nvml.ConfComputeMemSizeInfo, nvml.Return) { - if mock.DeviceGetConfComputeMemSizeInfoFunc == nil { - panic("Interface.DeviceGetConfComputeMemSizeInfoFunc: method is nil but Interface.DeviceGetConfComputeMemSizeInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetConfComputeMemSizeInfo.Lock() - mock.calls.DeviceGetConfComputeMemSizeInfo = append(mock.calls.DeviceGetConfComputeMemSizeInfo, callInfo) - mock.lockDeviceGetConfComputeMemSizeInfo.Unlock() - return mock.DeviceGetConfComputeMemSizeInfoFunc(device) -} - -// DeviceGetConfComputeMemSizeInfoCalls gets all the calls that were made to DeviceGetConfComputeMemSizeInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetConfComputeMemSizeInfoCalls()) -func (mock *Interface) DeviceGetConfComputeMemSizeInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetConfComputeMemSizeInfo.RLock() - calls = mock.calls.DeviceGetConfComputeMemSizeInfo - mock.lockDeviceGetConfComputeMemSizeInfo.RUnlock() - return calls -} - -// DeviceGetConfComputeProtectedMemoryUsage calls DeviceGetConfComputeProtectedMemoryUsageFunc. -func (mock *Interface) DeviceGetConfComputeProtectedMemoryUsage(device nvml.Device) (nvml.Memory, nvml.Return) { - if mock.DeviceGetConfComputeProtectedMemoryUsageFunc == nil { - panic("Interface.DeviceGetConfComputeProtectedMemoryUsageFunc: method is nil but Interface.DeviceGetConfComputeProtectedMemoryUsage was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetConfComputeProtectedMemoryUsage.Lock() - mock.calls.DeviceGetConfComputeProtectedMemoryUsage = append(mock.calls.DeviceGetConfComputeProtectedMemoryUsage, callInfo) - mock.lockDeviceGetConfComputeProtectedMemoryUsage.Unlock() - return mock.DeviceGetConfComputeProtectedMemoryUsageFunc(device) -} - -// DeviceGetConfComputeProtectedMemoryUsageCalls gets all the calls that were made to DeviceGetConfComputeProtectedMemoryUsage. -// Check the length with: -// -// len(mockedInterface.DeviceGetConfComputeProtectedMemoryUsageCalls()) -func (mock *Interface) DeviceGetConfComputeProtectedMemoryUsageCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetConfComputeProtectedMemoryUsage.RLock() - calls = mock.calls.DeviceGetConfComputeProtectedMemoryUsage - mock.lockDeviceGetConfComputeProtectedMemoryUsage.RUnlock() - return calls -} - -// DeviceGetCoolerInfo calls DeviceGetCoolerInfoFunc. -func (mock *Interface) DeviceGetCoolerInfo(device nvml.Device) (nvml.CoolerInfo, nvml.Return) { - if mock.DeviceGetCoolerInfoFunc == nil { - panic("Interface.DeviceGetCoolerInfoFunc: method is nil but Interface.DeviceGetCoolerInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetCoolerInfo.Lock() - mock.calls.DeviceGetCoolerInfo = append(mock.calls.DeviceGetCoolerInfo, callInfo) - mock.lockDeviceGetCoolerInfo.Unlock() - return mock.DeviceGetCoolerInfoFunc(device) -} - -// DeviceGetCoolerInfoCalls gets all the calls that were made to DeviceGetCoolerInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetCoolerInfoCalls()) -func (mock *Interface) DeviceGetCoolerInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetCoolerInfo.RLock() - calls = mock.calls.DeviceGetCoolerInfo - mock.lockDeviceGetCoolerInfo.RUnlock() - return calls -} - -// DeviceGetCount calls DeviceGetCountFunc. -func (mock *Interface) DeviceGetCount() (int, nvml.Return) { - if mock.DeviceGetCountFunc == nil { - panic("Interface.DeviceGetCountFunc: method is nil but Interface.DeviceGetCount was just called") - } - callInfo := struct { - }{} - mock.lockDeviceGetCount.Lock() - mock.calls.DeviceGetCount = append(mock.calls.DeviceGetCount, callInfo) - mock.lockDeviceGetCount.Unlock() - return mock.DeviceGetCountFunc() -} - -// DeviceGetCountCalls gets all the calls that were made to DeviceGetCount. -// Check the length with: -// -// len(mockedInterface.DeviceGetCountCalls()) -func (mock *Interface) DeviceGetCountCalls() []struct { -} { - var calls []struct { - } - mock.lockDeviceGetCount.RLock() - calls = mock.calls.DeviceGetCount - mock.lockDeviceGetCount.RUnlock() - return calls -} - -// DeviceGetCpuAffinity calls DeviceGetCpuAffinityFunc. -func (mock *Interface) DeviceGetCpuAffinity(device nvml.Device, n int) ([]uint, nvml.Return) { - if mock.DeviceGetCpuAffinityFunc == nil { - panic("Interface.DeviceGetCpuAffinityFunc: method is nil but Interface.DeviceGetCpuAffinity was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetCpuAffinity.Lock() - mock.calls.DeviceGetCpuAffinity = append(mock.calls.DeviceGetCpuAffinity, callInfo) - mock.lockDeviceGetCpuAffinity.Unlock() - return mock.DeviceGetCpuAffinityFunc(device, n) -} - -// DeviceGetCpuAffinityCalls gets all the calls that were made to DeviceGetCpuAffinity. -// Check the length with: -// -// len(mockedInterface.DeviceGetCpuAffinityCalls()) -func (mock *Interface) DeviceGetCpuAffinityCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetCpuAffinity.RLock() - calls = mock.calls.DeviceGetCpuAffinity - mock.lockDeviceGetCpuAffinity.RUnlock() - return calls -} - -// DeviceGetCpuAffinityWithinScope calls DeviceGetCpuAffinityWithinScopeFunc. -func (mock *Interface) DeviceGetCpuAffinityWithinScope(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { - if mock.DeviceGetCpuAffinityWithinScopeFunc == nil { - panic("Interface.DeviceGetCpuAffinityWithinScopeFunc: method is nil but Interface.DeviceGetCpuAffinityWithinScope was just called") - } - callInfo := struct { - Device nvml.Device - N int - AffinityScope nvml.AffinityScope - }{ - Device: device, - N: n, - AffinityScope: affinityScope, - } - mock.lockDeviceGetCpuAffinityWithinScope.Lock() - mock.calls.DeviceGetCpuAffinityWithinScope = append(mock.calls.DeviceGetCpuAffinityWithinScope, callInfo) - mock.lockDeviceGetCpuAffinityWithinScope.Unlock() - return mock.DeviceGetCpuAffinityWithinScopeFunc(device, n, affinityScope) -} - -// DeviceGetCpuAffinityWithinScopeCalls gets all the calls that were made to DeviceGetCpuAffinityWithinScope. -// Check the length with: -// -// len(mockedInterface.DeviceGetCpuAffinityWithinScopeCalls()) -func (mock *Interface) DeviceGetCpuAffinityWithinScopeCalls() []struct { - Device nvml.Device - N int - AffinityScope nvml.AffinityScope -} { - var calls []struct { - Device nvml.Device - N int - AffinityScope nvml.AffinityScope - } - mock.lockDeviceGetCpuAffinityWithinScope.RLock() - calls = mock.calls.DeviceGetCpuAffinityWithinScope - mock.lockDeviceGetCpuAffinityWithinScope.RUnlock() - return calls -} - -// DeviceGetCreatableVgpus calls DeviceGetCreatableVgpusFunc. -func (mock *Interface) DeviceGetCreatableVgpus(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) { - if mock.DeviceGetCreatableVgpusFunc == nil { - panic("Interface.DeviceGetCreatableVgpusFunc: method is nil but Interface.DeviceGetCreatableVgpus was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetCreatableVgpus.Lock() - mock.calls.DeviceGetCreatableVgpus = append(mock.calls.DeviceGetCreatableVgpus, callInfo) - mock.lockDeviceGetCreatableVgpus.Unlock() - return mock.DeviceGetCreatableVgpusFunc(device) -} - -// DeviceGetCreatableVgpusCalls gets all the calls that were made to DeviceGetCreatableVgpus. -// Check the length with: -// -// len(mockedInterface.DeviceGetCreatableVgpusCalls()) -func (mock *Interface) DeviceGetCreatableVgpusCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetCreatableVgpus.RLock() - calls = mock.calls.DeviceGetCreatableVgpus - mock.lockDeviceGetCreatableVgpus.RUnlock() - return calls -} - -// DeviceGetCudaComputeCapability calls DeviceGetCudaComputeCapabilityFunc. -func (mock *Interface) DeviceGetCudaComputeCapability(device nvml.Device) (int, int, nvml.Return) { - if mock.DeviceGetCudaComputeCapabilityFunc == nil { - panic("Interface.DeviceGetCudaComputeCapabilityFunc: method is nil but Interface.DeviceGetCudaComputeCapability was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetCudaComputeCapability.Lock() - mock.calls.DeviceGetCudaComputeCapability = append(mock.calls.DeviceGetCudaComputeCapability, callInfo) - mock.lockDeviceGetCudaComputeCapability.Unlock() - return mock.DeviceGetCudaComputeCapabilityFunc(device) -} - -// DeviceGetCudaComputeCapabilityCalls gets all the calls that were made to DeviceGetCudaComputeCapability. -// Check the length with: -// -// len(mockedInterface.DeviceGetCudaComputeCapabilityCalls()) -func (mock *Interface) DeviceGetCudaComputeCapabilityCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetCudaComputeCapability.RLock() - calls = mock.calls.DeviceGetCudaComputeCapability - mock.lockDeviceGetCudaComputeCapability.RUnlock() - return calls -} - -// DeviceGetCurrPcieLinkGeneration calls DeviceGetCurrPcieLinkGenerationFunc. -func (mock *Interface) DeviceGetCurrPcieLinkGeneration(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetCurrPcieLinkGenerationFunc == nil { - panic("Interface.DeviceGetCurrPcieLinkGenerationFunc: method is nil but Interface.DeviceGetCurrPcieLinkGeneration was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetCurrPcieLinkGeneration.Lock() - mock.calls.DeviceGetCurrPcieLinkGeneration = append(mock.calls.DeviceGetCurrPcieLinkGeneration, callInfo) - mock.lockDeviceGetCurrPcieLinkGeneration.Unlock() - return mock.DeviceGetCurrPcieLinkGenerationFunc(device) -} - -// DeviceGetCurrPcieLinkGenerationCalls gets all the calls that were made to DeviceGetCurrPcieLinkGeneration. -// Check the length with: -// -// len(mockedInterface.DeviceGetCurrPcieLinkGenerationCalls()) -func (mock *Interface) DeviceGetCurrPcieLinkGenerationCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetCurrPcieLinkGeneration.RLock() - calls = mock.calls.DeviceGetCurrPcieLinkGeneration - mock.lockDeviceGetCurrPcieLinkGeneration.RUnlock() - return calls -} - -// DeviceGetCurrPcieLinkWidth calls DeviceGetCurrPcieLinkWidthFunc. -func (mock *Interface) DeviceGetCurrPcieLinkWidth(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetCurrPcieLinkWidthFunc == nil { - panic("Interface.DeviceGetCurrPcieLinkWidthFunc: method is nil but Interface.DeviceGetCurrPcieLinkWidth was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetCurrPcieLinkWidth.Lock() - mock.calls.DeviceGetCurrPcieLinkWidth = append(mock.calls.DeviceGetCurrPcieLinkWidth, callInfo) - mock.lockDeviceGetCurrPcieLinkWidth.Unlock() - return mock.DeviceGetCurrPcieLinkWidthFunc(device) -} - -// DeviceGetCurrPcieLinkWidthCalls gets all the calls that were made to DeviceGetCurrPcieLinkWidth. -// Check the length with: -// -// len(mockedInterface.DeviceGetCurrPcieLinkWidthCalls()) -func (mock *Interface) DeviceGetCurrPcieLinkWidthCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetCurrPcieLinkWidth.RLock() - calls = mock.calls.DeviceGetCurrPcieLinkWidth - mock.lockDeviceGetCurrPcieLinkWidth.RUnlock() - return calls -} - -// DeviceGetCurrentClockFreqs calls DeviceGetCurrentClockFreqsFunc. -func (mock *Interface) DeviceGetCurrentClockFreqs(device nvml.Device) (nvml.DeviceCurrentClockFreqs, nvml.Return) { - if mock.DeviceGetCurrentClockFreqsFunc == nil { - panic("Interface.DeviceGetCurrentClockFreqsFunc: method is nil but Interface.DeviceGetCurrentClockFreqs was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetCurrentClockFreqs.Lock() - mock.calls.DeviceGetCurrentClockFreqs = append(mock.calls.DeviceGetCurrentClockFreqs, callInfo) - mock.lockDeviceGetCurrentClockFreqs.Unlock() - return mock.DeviceGetCurrentClockFreqsFunc(device) -} - -// DeviceGetCurrentClockFreqsCalls gets all the calls that were made to DeviceGetCurrentClockFreqs. -// Check the length with: -// -// len(mockedInterface.DeviceGetCurrentClockFreqsCalls()) -func (mock *Interface) DeviceGetCurrentClockFreqsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetCurrentClockFreqs.RLock() - calls = mock.calls.DeviceGetCurrentClockFreqs - mock.lockDeviceGetCurrentClockFreqs.RUnlock() - return calls -} - -// DeviceGetCurrentClocksEventReasons calls DeviceGetCurrentClocksEventReasonsFunc. -func (mock *Interface) DeviceGetCurrentClocksEventReasons(device nvml.Device) (uint64, nvml.Return) { - if mock.DeviceGetCurrentClocksEventReasonsFunc == nil { - panic("Interface.DeviceGetCurrentClocksEventReasonsFunc: method is nil but Interface.DeviceGetCurrentClocksEventReasons was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetCurrentClocksEventReasons.Lock() - mock.calls.DeviceGetCurrentClocksEventReasons = append(mock.calls.DeviceGetCurrentClocksEventReasons, callInfo) - mock.lockDeviceGetCurrentClocksEventReasons.Unlock() - return mock.DeviceGetCurrentClocksEventReasonsFunc(device) -} - -// DeviceGetCurrentClocksEventReasonsCalls gets all the calls that were made to DeviceGetCurrentClocksEventReasons. -// Check the length with: -// -// len(mockedInterface.DeviceGetCurrentClocksEventReasonsCalls()) -func (mock *Interface) DeviceGetCurrentClocksEventReasonsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetCurrentClocksEventReasons.RLock() - calls = mock.calls.DeviceGetCurrentClocksEventReasons - mock.lockDeviceGetCurrentClocksEventReasons.RUnlock() - return calls -} - -// DeviceGetCurrentClocksThrottleReasons calls DeviceGetCurrentClocksThrottleReasonsFunc. -func (mock *Interface) DeviceGetCurrentClocksThrottleReasons(device nvml.Device) (uint64, nvml.Return) { - if mock.DeviceGetCurrentClocksThrottleReasonsFunc == nil { - panic("Interface.DeviceGetCurrentClocksThrottleReasonsFunc: method is nil but Interface.DeviceGetCurrentClocksThrottleReasons was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetCurrentClocksThrottleReasons.Lock() - mock.calls.DeviceGetCurrentClocksThrottleReasons = append(mock.calls.DeviceGetCurrentClocksThrottleReasons, callInfo) - mock.lockDeviceGetCurrentClocksThrottleReasons.Unlock() - return mock.DeviceGetCurrentClocksThrottleReasonsFunc(device) -} - -// DeviceGetCurrentClocksThrottleReasonsCalls gets all the calls that were made to DeviceGetCurrentClocksThrottleReasons. -// Check the length with: -// -// len(mockedInterface.DeviceGetCurrentClocksThrottleReasonsCalls()) -func (mock *Interface) DeviceGetCurrentClocksThrottleReasonsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetCurrentClocksThrottleReasons.RLock() - calls = mock.calls.DeviceGetCurrentClocksThrottleReasons - mock.lockDeviceGetCurrentClocksThrottleReasons.RUnlock() - return calls -} - -// DeviceGetDecoderUtilization calls DeviceGetDecoderUtilizationFunc. -func (mock *Interface) DeviceGetDecoderUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { - if mock.DeviceGetDecoderUtilizationFunc == nil { - panic("Interface.DeviceGetDecoderUtilizationFunc: method is nil but Interface.DeviceGetDecoderUtilization was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetDecoderUtilization.Lock() - mock.calls.DeviceGetDecoderUtilization = append(mock.calls.DeviceGetDecoderUtilization, callInfo) - mock.lockDeviceGetDecoderUtilization.Unlock() - return mock.DeviceGetDecoderUtilizationFunc(device) -} - -// DeviceGetDecoderUtilizationCalls gets all the calls that were made to DeviceGetDecoderUtilization. -// Check the length with: -// -// len(mockedInterface.DeviceGetDecoderUtilizationCalls()) -func (mock *Interface) DeviceGetDecoderUtilizationCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetDecoderUtilization.RLock() - calls = mock.calls.DeviceGetDecoderUtilization - mock.lockDeviceGetDecoderUtilization.RUnlock() - return calls -} - -// DeviceGetDefaultApplicationsClock calls DeviceGetDefaultApplicationsClockFunc. -func (mock *Interface) DeviceGetDefaultApplicationsClock(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { - if mock.DeviceGetDefaultApplicationsClockFunc == nil { - panic("Interface.DeviceGetDefaultApplicationsClockFunc: method is nil but Interface.DeviceGetDefaultApplicationsClock was just called") - } - callInfo := struct { - Device nvml.Device - ClockType nvml.ClockType - }{ - Device: device, - ClockType: clockType, - } - mock.lockDeviceGetDefaultApplicationsClock.Lock() - mock.calls.DeviceGetDefaultApplicationsClock = append(mock.calls.DeviceGetDefaultApplicationsClock, callInfo) - mock.lockDeviceGetDefaultApplicationsClock.Unlock() - return mock.DeviceGetDefaultApplicationsClockFunc(device, clockType) -} - -// DeviceGetDefaultApplicationsClockCalls gets all the calls that were made to DeviceGetDefaultApplicationsClock. -// Check the length with: -// -// len(mockedInterface.DeviceGetDefaultApplicationsClockCalls()) -func (mock *Interface) DeviceGetDefaultApplicationsClockCalls() []struct { - Device nvml.Device - ClockType nvml.ClockType -} { - var calls []struct { - Device nvml.Device - ClockType nvml.ClockType - } - mock.lockDeviceGetDefaultApplicationsClock.RLock() - calls = mock.calls.DeviceGetDefaultApplicationsClock - mock.lockDeviceGetDefaultApplicationsClock.RUnlock() - return calls -} - -// DeviceGetDefaultEccMode calls DeviceGetDefaultEccModeFunc. -func (mock *Interface) DeviceGetDefaultEccMode(device nvml.Device) (nvml.EnableState, nvml.Return) { - if mock.DeviceGetDefaultEccModeFunc == nil { - panic("Interface.DeviceGetDefaultEccModeFunc: method is nil but Interface.DeviceGetDefaultEccMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetDefaultEccMode.Lock() - mock.calls.DeviceGetDefaultEccMode = append(mock.calls.DeviceGetDefaultEccMode, callInfo) - mock.lockDeviceGetDefaultEccMode.Unlock() - return mock.DeviceGetDefaultEccModeFunc(device) -} - -// DeviceGetDefaultEccModeCalls gets all the calls that were made to DeviceGetDefaultEccMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetDefaultEccModeCalls()) -func (mock *Interface) DeviceGetDefaultEccModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetDefaultEccMode.RLock() - calls = mock.calls.DeviceGetDefaultEccMode - mock.lockDeviceGetDefaultEccMode.RUnlock() - return calls -} - -// DeviceGetDetailedEccErrors calls DeviceGetDetailedEccErrorsFunc. -func (mock *Interface) DeviceGetDetailedEccErrors(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (nvml.EccErrorCounts, nvml.Return) { - if mock.DeviceGetDetailedEccErrorsFunc == nil { - panic("Interface.DeviceGetDetailedEccErrorsFunc: method is nil but Interface.DeviceGetDetailedEccErrors was just called") - } - callInfo := struct { - Device nvml.Device - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - }{ - Device: device, - MemoryErrorType: memoryErrorType, - EccCounterType: eccCounterType, - } - mock.lockDeviceGetDetailedEccErrors.Lock() - mock.calls.DeviceGetDetailedEccErrors = append(mock.calls.DeviceGetDetailedEccErrors, callInfo) - mock.lockDeviceGetDetailedEccErrors.Unlock() - return mock.DeviceGetDetailedEccErrorsFunc(device, memoryErrorType, eccCounterType) -} - -// DeviceGetDetailedEccErrorsCalls gets all the calls that were made to DeviceGetDetailedEccErrors. -// Check the length with: -// -// len(mockedInterface.DeviceGetDetailedEccErrorsCalls()) -func (mock *Interface) DeviceGetDetailedEccErrorsCalls() []struct { - Device nvml.Device - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType -} { - var calls []struct { - Device nvml.Device - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - } - mock.lockDeviceGetDetailedEccErrors.RLock() - calls = mock.calls.DeviceGetDetailedEccErrors - mock.lockDeviceGetDetailedEccErrors.RUnlock() - return calls -} - -// DeviceGetDeviceHandleFromMigDeviceHandle calls DeviceGetDeviceHandleFromMigDeviceHandleFunc. -func (mock *Interface) DeviceGetDeviceHandleFromMigDeviceHandle(device nvml.Device) (nvml.Device, nvml.Return) { - if mock.DeviceGetDeviceHandleFromMigDeviceHandleFunc == nil { - panic("Interface.DeviceGetDeviceHandleFromMigDeviceHandleFunc: method is nil but Interface.DeviceGetDeviceHandleFromMigDeviceHandle was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetDeviceHandleFromMigDeviceHandle.Lock() - mock.calls.DeviceGetDeviceHandleFromMigDeviceHandle = append(mock.calls.DeviceGetDeviceHandleFromMigDeviceHandle, callInfo) - mock.lockDeviceGetDeviceHandleFromMigDeviceHandle.Unlock() - return mock.DeviceGetDeviceHandleFromMigDeviceHandleFunc(device) -} - -// DeviceGetDeviceHandleFromMigDeviceHandleCalls gets all the calls that were made to DeviceGetDeviceHandleFromMigDeviceHandle. -// Check the length with: -// -// len(mockedInterface.DeviceGetDeviceHandleFromMigDeviceHandleCalls()) -func (mock *Interface) DeviceGetDeviceHandleFromMigDeviceHandleCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetDeviceHandleFromMigDeviceHandle.RLock() - calls = mock.calls.DeviceGetDeviceHandleFromMigDeviceHandle - mock.lockDeviceGetDeviceHandleFromMigDeviceHandle.RUnlock() - return calls -} - -// DeviceGetDisplayActive calls DeviceGetDisplayActiveFunc. -func (mock *Interface) DeviceGetDisplayActive(device nvml.Device) (nvml.EnableState, nvml.Return) { - if mock.DeviceGetDisplayActiveFunc == nil { - panic("Interface.DeviceGetDisplayActiveFunc: method is nil but Interface.DeviceGetDisplayActive was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetDisplayActive.Lock() - mock.calls.DeviceGetDisplayActive = append(mock.calls.DeviceGetDisplayActive, callInfo) - mock.lockDeviceGetDisplayActive.Unlock() - return mock.DeviceGetDisplayActiveFunc(device) -} - -// DeviceGetDisplayActiveCalls gets all the calls that were made to DeviceGetDisplayActive. -// Check the length with: -// -// len(mockedInterface.DeviceGetDisplayActiveCalls()) -func (mock *Interface) DeviceGetDisplayActiveCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetDisplayActive.RLock() - calls = mock.calls.DeviceGetDisplayActive - mock.lockDeviceGetDisplayActive.RUnlock() - return calls -} - -// DeviceGetDisplayMode calls DeviceGetDisplayModeFunc. -func (mock *Interface) DeviceGetDisplayMode(device nvml.Device) (nvml.EnableState, nvml.Return) { - if mock.DeviceGetDisplayModeFunc == nil { - panic("Interface.DeviceGetDisplayModeFunc: method is nil but Interface.DeviceGetDisplayMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetDisplayMode.Lock() - mock.calls.DeviceGetDisplayMode = append(mock.calls.DeviceGetDisplayMode, callInfo) - mock.lockDeviceGetDisplayMode.Unlock() - return mock.DeviceGetDisplayModeFunc(device) -} - -// DeviceGetDisplayModeCalls gets all the calls that were made to DeviceGetDisplayMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetDisplayModeCalls()) -func (mock *Interface) DeviceGetDisplayModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetDisplayMode.RLock() - calls = mock.calls.DeviceGetDisplayMode - mock.lockDeviceGetDisplayMode.RUnlock() - return calls -} - -// DeviceGetDramEncryptionMode calls DeviceGetDramEncryptionModeFunc. -func (mock *Interface) DeviceGetDramEncryptionMode(device nvml.Device) (nvml.DramEncryptionInfo, nvml.DramEncryptionInfo, nvml.Return) { - if mock.DeviceGetDramEncryptionModeFunc == nil { - panic("Interface.DeviceGetDramEncryptionModeFunc: method is nil but Interface.DeviceGetDramEncryptionMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetDramEncryptionMode.Lock() - mock.calls.DeviceGetDramEncryptionMode = append(mock.calls.DeviceGetDramEncryptionMode, callInfo) - mock.lockDeviceGetDramEncryptionMode.Unlock() - return mock.DeviceGetDramEncryptionModeFunc(device) -} - -// DeviceGetDramEncryptionModeCalls gets all the calls that were made to DeviceGetDramEncryptionMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetDramEncryptionModeCalls()) -func (mock *Interface) DeviceGetDramEncryptionModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetDramEncryptionMode.RLock() - calls = mock.calls.DeviceGetDramEncryptionMode - mock.lockDeviceGetDramEncryptionMode.RUnlock() - return calls -} - -// DeviceGetDriverModel calls DeviceGetDriverModelFunc. -func (mock *Interface) DeviceGetDriverModel(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { - if mock.DeviceGetDriverModelFunc == nil { - panic("Interface.DeviceGetDriverModelFunc: method is nil but Interface.DeviceGetDriverModel was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetDriverModel.Lock() - mock.calls.DeviceGetDriverModel = append(mock.calls.DeviceGetDriverModel, callInfo) - mock.lockDeviceGetDriverModel.Unlock() - return mock.DeviceGetDriverModelFunc(device) -} - -// DeviceGetDriverModelCalls gets all the calls that were made to DeviceGetDriverModel. -// Check the length with: -// -// len(mockedInterface.DeviceGetDriverModelCalls()) -func (mock *Interface) DeviceGetDriverModelCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetDriverModel.RLock() - calls = mock.calls.DeviceGetDriverModel - mock.lockDeviceGetDriverModel.RUnlock() - return calls -} - -// DeviceGetDriverModel_v2 calls DeviceGetDriverModel_v2Func. -func (mock *Interface) DeviceGetDriverModel_v2(device nvml.Device) (nvml.DriverModel, nvml.DriverModel, nvml.Return) { - if mock.DeviceGetDriverModel_v2Func == nil { - panic("Interface.DeviceGetDriverModel_v2Func: method is nil but Interface.DeviceGetDriverModel_v2 was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetDriverModel_v2.Lock() - mock.calls.DeviceGetDriverModel_v2 = append(mock.calls.DeviceGetDriverModel_v2, callInfo) - mock.lockDeviceGetDriverModel_v2.Unlock() - return mock.DeviceGetDriverModel_v2Func(device) -} - -// DeviceGetDriverModel_v2Calls gets all the calls that were made to DeviceGetDriverModel_v2. -// Check the length with: -// -// len(mockedInterface.DeviceGetDriverModel_v2Calls()) -func (mock *Interface) DeviceGetDriverModel_v2Calls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetDriverModel_v2.RLock() - calls = mock.calls.DeviceGetDriverModel_v2 - mock.lockDeviceGetDriverModel_v2.RUnlock() - return calls -} - -// DeviceGetDynamicPstatesInfo calls DeviceGetDynamicPstatesInfoFunc. -func (mock *Interface) DeviceGetDynamicPstatesInfo(device nvml.Device) (nvml.GpuDynamicPstatesInfo, nvml.Return) { - if mock.DeviceGetDynamicPstatesInfoFunc == nil { - panic("Interface.DeviceGetDynamicPstatesInfoFunc: method is nil but Interface.DeviceGetDynamicPstatesInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetDynamicPstatesInfo.Lock() - mock.calls.DeviceGetDynamicPstatesInfo = append(mock.calls.DeviceGetDynamicPstatesInfo, callInfo) - mock.lockDeviceGetDynamicPstatesInfo.Unlock() - return mock.DeviceGetDynamicPstatesInfoFunc(device) -} - -// DeviceGetDynamicPstatesInfoCalls gets all the calls that were made to DeviceGetDynamicPstatesInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetDynamicPstatesInfoCalls()) -func (mock *Interface) DeviceGetDynamicPstatesInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetDynamicPstatesInfo.RLock() - calls = mock.calls.DeviceGetDynamicPstatesInfo - mock.lockDeviceGetDynamicPstatesInfo.RUnlock() - return calls -} - -// DeviceGetEccMode calls DeviceGetEccModeFunc. -func (mock *Interface) DeviceGetEccMode(device nvml.Device) (nvml.EnableState, nvml.EnableState, nvml.Return) { - if mock.DeviceGetEccModeFunc == nil { - panic("Interface.DeviceGetEccModeFunc: method is nil but Interface.DeviceGetEccMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetEccMode.Lock() - mock.calls.DeviceGetEccMode = append(mock.calls.DeviceGetEccMode, callInfo) - mock.lockDeviceGetEccMode.Unlock() - return mock.DeviceGetEccModeFunc(device) -} - -// DeviceGetEccModeCalls gets all the calls that were made to DeviceGetEccMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetEccModeCalls()) -func (mock *Interface) DeviceGetEccModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetEccMode.RLock() - calls = mock.calls.DeviceGetEccMode - mock.lockDeviceGetEccMode.RUnlock() - return calls -} - -// DeviceGetEncoderCapacity calls DeviceGetEncoderCapacityFunc. -func (mock *Interface) DeviceGetEncoderCapacity(device nvml.Device, encoderType nvml.EncoderType) (int, nvml.Return) { - if mock.DeviceGetEncoderCapacityFunc == nil { - panic("Interface.DeviceGetEncoderCapacityFunc: method is nil but Interface.DeviceGetEncoderCapacity was just called") - } - callInfo := struct { - Device nvml.Device - EncoderType nvml.EncoderType - }{ - Device: device, - EncoderType: encoderType, - } - mock.lockDeviceGetEncoderCapacity.Lock() - mock.calls.DeviceGetEncoderCapacity = append(mock.calls.DeviceGetEncoderCapacity, callInfo) - mock.lockDeviceGetEncoderCapacity.Unlock() - return mock.DeviceGetEncoderCapacityFunc(device, encoderType) -} - -// DeviceGetEncoderCapacityCalls gets all the calls that were made to DeviceGetEncoderCapacity. -// Check the length with: -// -// len(mockedInterface.DeviceGetEncoderCapacityCalls()) -func (mock *Interface) DeviceGetEncoderCapacityCalls() []struct { - Device nvml.Device - EncoderType nvml.EncoderType -} { - var calls []struct { - Device nvml.Device - EncoderType nvml.EncoderType - } - mock.lockDeviceGetEncoderCapacity.RLock() - calls = mock.calls.DeviceGetEncoderCapacity - mock.lockDeviceGetEncoderCapacity.RUnlock() - return calls -} - -// DeviceGetEncoderSessions calls DeviceGetEncoderSessionsFunc. -func (mock *Interface) DeviceGetEncoderSessions(device nvml.Device) ([]nvml.EncoderSessionInfo, nvml.Return) { - if mock.DeviceGetEncoderSessionsFunc == nil { - panic("Interface.DeviceGetEncoderSessionsFunc: method is nil but Interface.DeviceGetEncoderSessions was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetEncoderSessions.Lock() - mock.calls.DeviceGetEncoderSessions = append(mock.calls.DeviceGetEncoderSessions, callInfo) - mock.lockDeviceGetEncoderSessions.Unlock() - return mock.DeviceGetEncoderSessionsFunc(device) -} - -// DeviceGetEncoderSessionsCalls gets all the calls that were made to DeviceGetEncoderSessions. -// Check the length with: -// -// len(mockedInterface.DeviceGetEncoderSessionsCalls()) -func (mock *Interface) DeviceGetEncoderSessionsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetEncoderSessions.RLock() - calls = mock.calls.DeviceGetEncoderSessions - mock.lockDeviceGetEncoderSessions.RUnlock() - return calls -} - -// DeviceGetEncoderStats calls DeviceGetEncoderStatsFunc. -func (mock *Interface) DeviceGetEncoderStats(device nvml.Device) (int, uint32, uint32, nvml.Return) { - if mock.DeviceGetEncoderStatsFunc == nil { - panic("Interface.DeviceGetEncoderStatsFunc: method is nil but Interface.DeviceGetEncoderStats was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetEncoderStats.Lock() - mock.calls.DeviceGetEncoderStats = append(mock.calls.DeviceGetEncoderStats, callInfo) - mock.lockDeviceGetEncoderStats.Unlock() - return mock.DeviceGetEncoderStatsFunc(device) -} - -// DeviceGetEncoderStatsCalls gets all the calls that were made to DeviceGetEncoderStats. -// Check the length with: -// -// len(mockedInterface.DeviceGetEncoderStatsCalls()) -func (mock *Interface) DeviceGetEncoderStatsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetEncoderStats.RLock() - calls = mock.calls.DeviceGetEncoderStats - mock.lockDeviceGetEncoderStats.RUnlock() - return calls -} - -// DeviceGetEncoderUtilization calls DeviceGetEncoderUtilizationFunc. -func (mock *Interface) DeviceGetEncoderUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { - if mock.DeviceGetEncoderUtilizationFunc == nil { - panic("Interface.DeviceGetEncoderUtilizationFunc: method is nil but Interface.DeviceGetEncoderUtilization was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetEncoderUtilization.Lock() - mock.calls.DeviceGetEncoderUtilization = append(mock.calls.DeviceGetEncoderUtilization, callInfo) - mock.lockDeviceGetEncoderUtilization.Unlock() - return mock.DeviceGetEncoderUtilizationFunc(device) -} - -// DeviceGetEncoderUtilizationCalls gets all the calls that were made to DeviceGetEncoderUtilization. -// Check the length with: -// -// len(mockedInterface.DeviceGetEncoderUtilizationCalls()) -func (mock *Interface) DeviceGetEncoderUtilizationCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetEncoderUtilization.RLock() - calls = mock.calls.DeviceGetEncoderUtilization - mock.lockDeviceGetEncoderUtilization.RUnlock() - return calls -} - -// DeviceGetEnforcedPowerLimit calls DeviceGetEnforcedPowerLimitFunc. -func (mock *Interface) DeviceGetEnforcedPowerLimit(device nvml.Device) (uint32, nvml.Return) { - if mock.DeviceGetEnforcedPowerLimitFunc == nil { - panic("Interface.DeviceGetEnforcedPowerLimitFunc: method is nil but Interface.DeviceGetEnforcedPowerLimit was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetEnforcedPowerLimit.Lock() - mock.calls.DeviceGetEnforcedPowerLimit = append(mock.calls.DeviceGetEnforcedPowerLimit, callInfo) - mock.lockDeviceGetEnforcedPowerLimit.Unlock() - return mock.DeviceGetEnforcedPowerLimitFunc(device) -} - -// DeviceGetEnforcedPowerLimitCalls gets all the calls that were made to DeviceGetEnforcedPowerLimit. -// Check the length with: -// -// len(mockedInterface.DeviceGetEnforcedPowerLimitCalls()) -func (mock *Interface) DeviceGetEnforcedPowerLimitCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetEnforcedPowerLimit.RLock() - calls = mock.calls.DeviceGetEnforcedPowerLimit - mock.lockDeviceGetEnforcedPowerLimit.RUnlock() - return calls -} - -// DeviceGetFBCSessions calls DeviceGetFBCSessionsFunc. -func (mock *Interface) DeviceGetFBCSessions(device nvml.Device) ([]nvml.FBCSessionInfo, nvml.Return) { - if mock.DeviceGetFBCSessionsFunc == nil { - panic("Interface.DeviceGetFBCSessionsFunc: method is nil but Interface.DeviceGetFBCSessions was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetFBCSessions.Lock() - mock.calls.DeviceGetFBCSessions = append(mock.calls.DeviceGetFBCSessions, callInfo) - mock.lockDeviceGetFBCSessions.Unlock() - return mock.DeviceGetFBCSessionsFunc(device) -} - -// DeviceGetFBCSessionsCalls gets all the calls that were made to DeviceGetFBCSessions. -// Check the length with: -// -// len(mockedInterface.DeviceGetFBCSessionsCalls()) -func (mock *Interface) DeviceGetFBCSessionsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetFBCSessions.RLock() - calls = mock.calls.DeviceGetFBCSessions - mock.lockDeviceGetFBCSessions.RUnlock() - return calls -} - -// DeviceGetFBCStats calls DeviceGetFBCStatsFunc. -func (mock *Interface) DeviceGetFBCStats(device nvml.Device) (nvml.FBCStats, nvml.Return) { - if mock.DeviceGetFBCStatsFunc == nil { - panic("Interface.DeviceGetFBCStatsFunc: method is nil but Interface.DeviceGetFBCStats was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetFBCStats.Lock() - mock.calls.DeviceGetFBCStats = append(mock.calls.DeviceGetFBCStats, callInfo) - mock.lockDeviceGetFBCStats.Unlock() - return mock.DeviceGetFBCStatsFunc(device) -} - -// DeviceGetFBCStatsCalls gets all the calls that were made to DeviceGetFBCStats. -// Check the length with: -// -// len(mockedInterface.DeviceGetFBCStatsCalls()) -func (mock *Interface) DeviceGetFBCStatsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetFBCStats.RLock() - calls = mock.calls.DeviceGetFBCStats - mock.lockDeviceGetFBCStats.RUnlock() - return calls -} - -// DeviceGetFanControlPolicy_v2 calls DeviceGetFanControlPolicy_v2Func. -func (mock *Interface) DeviceGetFanControlPolicy_v2(device nvml.Device, n int) (nvml.FanControlPolicy, nvml.Return) { - if mock.DeviceGetFanControlPolicy_v2Func == nil { - panic("Interface.DeviceGetFanControlPolicy_v2Func: method is nil but Interface.DeviceGetFanControlPolicy_v2 was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetFanControlPolicy_v2.Lock() - mock.calls.DeviceGetFanControlPolicy_v2 = append(mock.calls.DeviceGetFanControlPolicy_v2, callInfo) - mock.lockDeviceGetFanControlPolicy_v2.Unlock() - return mock.DeviceGetFanControlPolicy_v2Func(device, n) -} - -// DeviceGetFanControlPolicy_v2Calls gets all the calls that were made to DeviceGetFanControlPolicy_v2. -// Check the length with: -// -// len(mockedInterface.DeviceGetFanControlPolicy_v2Calls()) -func (mock *Interface) DeviceGetFanControlPolicy_v2Calls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetFanControlPolicy_v2.RLock() - calls = mock.calls.DeviceGetFanControlPolicy_v2 - mock.lockDeviceGetFanControlPolicy_v2.RUnlock() - return calls -} - -// DeviceGetFanSpeed calls DeviceGetFanSpeedFunc. -func (mock *Interface) DeviceGetFanSpeed(device nvml.Device) (uint32, nvml.Return) { - if mock.DeviceGetFanSpeedFunc == nil { - panic("Interface.DeviceGetFanSpeedFunc: method is nil but Interface.DeviceGetFanSpeed was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetFanSpeed.Lock() - mock.calls.DeviceGetFanSpeed = append(mock.calls.DeviceGetFanSpeed, callInfo) - mock.lockDeviceGetFanSpeed.Unlock() - return mock.DeviceGetFanSpeedFunc(device) -} - -// DeviceGetFanSpeedCalls gets all the calls that were made to DeviceGetFanSpeed. -// Check the length with: -// -// len(mockedInterface.DeviceGetFanSpeedCalls()) -func (mock *Interface) DeviceGetFanSpeedCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetFanSpeed.RLock() - calls = mock.calls.DeviceGetFanSpeed - mock.lockDeviceGetFanSpeed.RUnlock() - return calls -} - -// DeviceGetFanSpeedRPM calls DeviceGetFanSpeedRPMFunc. -func (mock *Interface) DeviceGetFanSpeedRPM(device nvml.Device) (nvml.FanSpeedInfo, nvml.Return) { - if mock.DeviceGetFanSpeedRPMFunc == nil { - panic("Interface.DeviceGetFanSpeedRPMFunc: method is nil but Interface.DeviceGetFanSpeedRPM was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetFanSpeedRPM.Lock() - mock.calls.DeviceGetFanSpeedRPM = append(mock.calls.DeviceGetFanSpeedRPM, callInfo) - mock.lockDeviceGetFanSpeedRPM.Unlock() - return mock.DeviceGetFanSpeedRPMFunc(device) -} - -// DeviceGetFanSpeedRPMCalls gets all the calls that were made to DeviceGetFanSpeedRPM. -// Check the length with: -// -// len(mockedInterface.DeviceGetFanSpeedRPMCalls()) -func (mock *Interface) DeviceGetFanSpeedRPMCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetFanSpeedRPM.RLock() - calls = mock.calls.DeviceGetFanSpeedRPM - mock.lockDeviceGetFanSpeedRPM.RUnlock() - return calls -} - -// DeviceGetFanSpeed_v2 calls DeviceGetFanSpeed_v2Func. -func (mock *Interface) DeviceGetFanSpeed_v2(device nvml.Device, n int) (uint32, nvml.Return) { - if mock.DeviceGetFanSpeed_v2Func == nil { - panic("Interface.DeviceGetFanSpeed_v2Func: method is nil but Interface.DeviceGetFanSpeed_v2 was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetFanSpeed_v2.Lock() - mock.calls.DeviceGetFanSpeed_v2 = append(mock.calls.DeviceGetFanSpeed_v2, callInfo) - mock.lockDeviceGetFanSpeed_v2.Unlock() - return mock.DeviceGetFanSpeed_v2Func(device, n) -} - -// DeviceGetFanSpeed_v2Calls gets all the calls that were made to DeviceGetFanSpeed_v2. -// Check the length with: -// -// len(mockedInterface.DeviceGetFanSpeed_v2Calls()) -func (mock *Interface) DeviceGetFanSpeed_v2Calls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetFanSpeed_v2.RLock() - calls = mock.calls.DeviceGetFanSpeed_v2 - mock.lockDeviceGetFanSpeed_v2.RUnlock() - return calls -} - -// DeviceGetFieldValues calls DeviceGetFieldValuesFunc. -func (mock *Interface) DeviceGetFieldValues(device nvml.Device, fieldValues []nvml.FieldValue) nvml.Return { - if mock.DeviceGetFieldValuesFunc == nil { - panic("Interface.DeviceGetFieldValuesFunc: method is nil but Interface.DeviceGetFieldValues was just called") - } - callInfo := struct { - Device nvml.Device - FieldValues []nvml.FieldValue - }{ - Device: device, - FieldValues: fieldValues, - } - mock.lockDeviceGetFieldValues.Lock() - mock.calls.DeviceGetFieldValues = append(mock.calls.DeviceGetFieldValues, callInfo) - mock.lockDeviceGetFieldValues.Unlock() - return mock.DeviceGetFieldValuesFunc(device, fieldValues) -} - -// DeviceGetFieldValuesCalls gets all the calls that were made to DeviceGetFieldValues. -// Check the length with: -// -// len(mockedInterface.DeviceGetFieldValuesCalls()) -func (mock *Interface) DeviceGetFieldValuesCalls() []struct { - Device nvml.Device - FieldValues []nvml.FieldValue -} { - var calls []struct { - Device nvml.Device - FieldValues []nvml.FieldValue - } - mock.lockDeviceGetFieldValues.RLock() - calls = mock.calls.DeviceGetFieldValues - mock.lockDeviceGetFieldValues.RUnlock() - return calls -} - -// DeviceGetGpcClkMinMaxVfOffset calls DeviceGetGpcClkMinMaxVfOffsetFunc. -func (mock *Interface) DeviceGetGpcClkMinMaxVfOffset(device nvml.Device) (int, int, nvml.Return) { - if mock.DeviceGetGpcClkMinMaxVfOffsetFunc == nil { - panic("Interface.DeviceGetGpcClkMinMaxVfOffsetFunc: method is nil but Interface.DeviceGetGpcClkMinMaxVfOffset was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetGpcClkMinMaxVfOffset.Lock() - mock.calls.DeviceGetGpcClkMinMaxVfOffset = append(mock.calls.DeviceGetGpcClkMinMaxVfOffset, callInfo) - mock.lockDeviceGetGpcClkMinMaxVfOffset.Unlock() - return mock.DeviceGetGpcClkMinMaxVfOffsetFunc(device) -} - -// DeviceGetGpcClkMinMaxVfOffsetCalls gets all the calls that were made to DeviceGetGpcClkMinMaxVfOffset. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpcClkMinMaxVfOffsetCalls()) -func (mock *Interface) DeviceGetGpcClkMinMaxVfOffsetCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetGpcClkMinMaxVfOffset.RLock() - calls = mock.calls.DeviceGetGpcClkMinMaxVfOffset - mock.lockDeviceGetGpcClkMinMaxVfOffset.RUnlock() - return calls -} - -// DeviceGetGpcClkVfOffset calls DeviceGetGpcClkVfOffsetFunc. -func (mock *Interface) DeviceGetGpcClkVfOffset(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetGpcClkVfOffsetFunc == nil { - panic("Interface.DeviceGetGpcClkVfOffsetFunc: method is nil but Interface.DeviceGetGpcClkVfOffset was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetGpcClkVfOffset.Lock() - mock.calls.DeviceGetGpcClkVfOffset = append(mock.calls.DeviceGetGpcClkVfOffset, callInfo) - mock.lockDeviceGetGpcClkVfOffset.Unlock() - return mock.DeviceGetGpcClkVfOffsetFunc(device) -} - -// DeviceGetGpcClkVfOffsetCalls gets all the calls that were made to DeviceGetGpcClkVfOffset. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpcClkVfOffsetCalls()) -func (mock *Interface) DeviceGetGpcClkVfOffsetCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetGpcClkVfOffset.RLock() - calls = mock.calls.DeviceGetGpcClkVfOffset - mock.lockDeviceGetGpcClkVfOffset.RUnlock() - return calls -} - -// DeviceGetGpuFabricInfo calls DeviceGetGpuFabricInfoFunc. -func (mock *Interface) DeviceGetGpuFabricInfo(device nvml.Device) (nvml.GpuFabricInfo, nvml.Return) { - if mock.DeviceGetGpuFabricInfoFunc == nil { - panic("Interface.DeviceGetGpuFabricInfoFunc: method is nil but Interface.DeviceGetGpuFabricInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetGpuFabricInfo.Lock() - mock.calls.DeviceGetGpuFabricInfo = append(mock.calls.DeviceGetGpuFabricInfo, callInfo) - mock.lockDeviceGetGpuFabricInfo.Unlock() - return mock.DeviceGetGpuFabricInfoFunc(device) -} - -// DeviceGetGpuFabricInfoCalls gets all the calls that were made to DeviceGetGpuFabricInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpuFabricInfoCalls()) -func (mock *Interface) DeviceGetGpuFabricInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetGpuFabricInfo.RLock() - calls = mock.calls.DeviceGetGpuFabricInfo - mock.lockDeviceGetGpuFabricInfo.RUnlock() - return calls -} - -// DeviceGetGpuFabricInfoV calls DeviceGetGpuFabricInfoVFunc. -func (mock *Interface) DeviceGetGpuFabricInfoV(device nvml.Device) nvml.GpuFabricInfoHandler { - if mock.DeviceGetGpuFabricInfoVFunc == nil { - panic("Interface.DeviceGetGpuFabricInfoVFunc: method is nil but Interface.DeviceGetGpuFabricInfoV was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetGpuFabricInfoV.Lock() - mock.calls.DeviceGetGpuFabricInfoV = append(mock.calls.DeviceGetGpuFabricInfoV, callInfo) - mock.lockDeviceGetGpuFabricInfoV.Unlock() - return mock.DeviceGetGpuFabricInfoVFunc(device) -} - -// DeviceGetGpuFabricInfoVCalls gets all the calls that were made to DeviceGetGpuFabricInfoV. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpuFabricInfoVCalls()) -func (mock *Interface) DeviceGetGpuFabricInfoVCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetGpuFabricInfoV.RLock() - calls = mock.calls.DeviceGetGpuFabricInfoV - mock.lockDeviceGetGpuFabricInfoV.RUnlock() - return calls -} - -// DeviceGetGpuInstanceById calls DeviceGetGpuInstanceByIdFunc. -func (mock *Interface) DeviceGetGpuInstanceById(device nvml.Device, n int) (nvml.GpuInstance, nvml.Return) { - if mock.DeviceGetGpuInstanceByIdFunc == nil { - panic("Interface.DeviceGetGpuInstanceByIdFunc: method is nil but Interface.DeviceGetGpuInstanceById was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetGpuInstanceById.Lock() - mock.calls.DeviceGetGpuInstanceById = append(mock.calls.DeviceGetGpuInstanceById, callInfo) - mock.lockDeviceGetGpuInstanceById.Unlock() - return mock.DeviceGetGpuInstanceByIdFunc(device, n) -} - -// DeviceGetGpuInstanceByIdCalls gets all the calls that were made to DeviceGetGpuInstanceById. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpuInstanceByIdCalls()) -func (mock *Interface) DeviceGetGpuInstanceByIdCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetGpuInstanceById.RLock() - calls = mock.calls.DeviceGetGpuInstanceById - mock.lockDeviceGetGpuInstanceById.RUnlock() - return calls -} - -// DeviceGetGpuInstanceId calls DeviceGetGpuInstanceIdFunc. -func (mock *Interface) DeviceGetGpuInstanceId(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetGpuInstanceIdFunc == nil { - panic("Interface.DeviceGetGpuInstanceIdFunc: method is nil but Interface.DeviceGetGpuInstanceId was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetGpuInstanceId.Lock() - mock.calls.DeviceGetGpuInstanceId = append(mock.calls.DeviceGetGpuInstanceId, callInfo) - mock.lockDeviceGetGpuInstanceId.Unlock() - return mock.DeviceGetGpuInstanceIdFunc(device) -} - -// DeviceGetGpuInstanceIdCalls gets all the calls that were made to DeviceGetGpuInstanceId. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpuInstanceIdCalls()) -func (mock *Interface) DeviceGetGpuInstanceIdCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetGpuInstanceId.RLock() - calls = mock.calls.DeviceGetGpuInstanceId - mock.lockDeviceGetGpuInstanceId.RUnlock() - return calls -} - -// DeviceGetGpuInstancePossiblePlacements calls DeviceGetGpuInstancePossiblePlacementsFunc. -func (mock *Interface) DeviceGetGpuInstancePossiblePlacements(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstancePlacement, nvml.Return) { - if mock.DeviceGetGpuInstancePossiblePlacementsFunc == nil { - panic("Interface.DeviceGetGpuInstancePossiblePlacementsFunc: method is nil but Interface.DeviceGetGpuInstancePossiblePlacements was just called") - } - callInfo := struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - }{ - Device: device, - GpuInstanceProfileInfo: gpuInstanceProfileInfo, - } - mock.lockDeviceGetGpuInstancePossiblePlacements.Lock() - mock.calls.DeviceGetGpuInstancePossiblePlacements = append(mock.calls.DeviceGetGpuInstancePossiblePlacements, callInfo) - mock.lockDeviceGetGpuInstancePossiblePlacements.Unlock() - return mock.DeviceGetGpuInstancePossiblePlacementsFunc(device, gpuInstanceProfileInfo) -} - -// DeviceGetGpuInstancePossiblePlacementsCalls gets all the calls that were made to DeviceGetGpuInstancePossiblePlacements. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpuInstancePossiblePlacementsCalls()) -func (mock *Interface) DeviceGetGpuInstancePossiblePlacementsCalls() []struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo -} { - var calls []struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - mock.lockDeviceGetGpuInstancePossiblePlacements.RLock() - calls = mock.calls.DeviceGetGpuInstancePossiblePlacements - mock.lockDeviceGetGpuInstancePossiblePlacements.RUnlock() - return calls -} - -// DeviceGetGpuInstanceProfileInfo calls DeviceGetGpuInstanceProfileInfoFunc. -func (mock *Interface) DeviceGetGpuInstanceProfileInfo(device nvml.Device, n int) (nvml.GpuInstanceProfileInfo, nvml.Return) { - if mock.DeviceGetGpuInstanceProfileInfoFunc == nil { - panic("Interface.DeviceGetGpuInstanceProfileInfoFunc: method is nil but Interface.DeviceGetGpuInstanceProfileInfo was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetGpuInstanceProfileInfo.Lock() - mock.calls.DeviceGetGpuInstanceProfileInfo = append(mock.calls.DeviceGetGpuInstanceProfileInfo, callInfo) - mock.lockDeviceGetGpuInstanceProfileInfo.Unlock() - return mock.DeviceGetGpuInstanceProfileInfoFunc(device, n) -} - -// DeviceGetGpuInstanceProfileInfoCalls gets all the calls that were made to DeviceGetGpuInstanceProfileInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpuInstanceProfileInfoCalls()) -func (mock *Interface) DeviceGetGpuInstanceProfileInfoCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetGpuInstanceProfileInfo.RLock() - calls = mock.calls.DeviceGetGpuInstanceProfileInfo - mock.lockDeviceGetGpuInstanceProfileInfo.RUnlock() - return calls -} - -// DeviceGetGpuInstanceProfileInfoByIdV calls DeviceGetGpuInstanceProfileInfoByIdVFunc. -func (mock *Interface) DeviceGetGpuInstanceProfileInfoByIdV(device nvml.Device, n int) nvml.GpuInstanceProfileInfoByIdHandler { - if mock.DeviceGetGpuInstanceProfileInfoByIdVFunc == nil { - panic("Interface.DeviceGetGpuInstanceProfileInfoByIdVFunc: method is nil but Interface.DeviceGetGpuInstanceProfileInfoByIdV was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetGpuInstanceProfileInfoByIdV.Lock() - mock.calls.DeviceGetGpuInstanceProfileInfoByIdV = append(mock.calls.DeviceGetGpuInstanceProfileInfoByIdV, callInfo) - mock.lockDeviceGetGpuInstanceProfileInfoByIdV.Unlock() - return mock.DeviceGetGpuInstanceProfileInfoByIdVFunc(device, n) -} - -// DeviceGetGpuInstanceProfileInfoByIdVCalls gets all the calls that were made to DeviceGetGpuInstanceProfileInfoByIdV. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpuInstanceProfileInfoByIdVCalls()) -func (mock *Interface) DeviceGetGpuInstanceProfileInfoByIdVCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetGpuInstanceProfileInfoByIdV.RLock() - calls = mock.calls.DeviceGetGpuInstanceProfileInfoByIdV - mock.lockDeviceGetGpuInstanceProfileInfoByIdV.RUnlock() - return calls -} - -// DeviceGetGpuInstanceProfileInfoV calls DeviceGetGpuInstanceProfileInfoVFunc. -func (mock *Interface) DeviceGetGpuInstanceProfileInfoV(device nvml.Device, n int) nvml.GpuInstanceProfileInfoHandler { - if mock.DeviceGetGpuInstanceProfileInfoVFunc == nil { - panic("Interface.DeviceGetGpuInstanceProfileInfoVFunc: method is nil but Interface.DeviceGetGpuInstanceProfileInfoV was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetGpuInstanceProfileInfoV.Lock() - mock.calls.DeviceGetGpuInstanceProfileInfoV = append(mock.calls.DeviceGetGpuInstanceProfileInfoV, callInfo) - mock.lockDeviceGetGpuInstanceProfileInfoV.Unlock() - return mock.DeviceGetGpuInstanceProfileInfoVFunc(device, n) -} - -// DeviceGetGpuInstanceProfileInfoVCalls gets all the calls that were made to DeviceGetGpuInstanceProfileInfoV. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpuInstanceProfileInfoVCalls()) -func (mock *Interface) DeviceGetGpuInstanceProfileInfoVCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetGpuInstanceProfileInfoV.RLock() - calls = mock.calls.DeviceGetGpuInstanceProfileInfoV - mock.lockDeviceGetGpuInstanceProfileInfoV.RUnlock() - return calls -} - -// DeviceGetGpuInstanceRemainingCapacity calls DeviceGetGpuInstanceRemainingCapacityFunc. -func (mock *Interface) DeviceGetGpuInstanceRemainingCapacity(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) (int, nvml.Return) { - if mock.DeviceGetGpuInstanceRemainingCapacityFunc == nil { - panic("Interface.DeviceGetGpuInstanceRemainingCapacityFunc: method is nil but Interface.DeviceGetGpuInstanceRemainingCapacity was just called") - } - callInfo := struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - }{ - Device: device, - GpuInstanceProfileInfo: gpuInstanceProfileInfo, - } - mock.lockDeviceGetGpuInstanceRemainingCapacity.Lock() - mock.calls.DeviceGetGpuInstanceRemainingCapacity = append(mock.calls.DeviceGetGpuInstanceRemainingCapacity, callInfo) - mock.lockDeviceGetGpuInstanceRemainingCapacity.Unlock() - return mock.DeviceGetGpuInstanceRemainingCapacityFunc(device, gpuInstanceProfileInfo) -} - -// DeviceGetGpuInstanceRemainingCapacityCalls gets all the calls that were made to DeviceGetGpuInstanceRemainingCapacity. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpuInstanceRemainingCapacityCalls()) -func (mock *Interface) DeviceGetGpuInstanceRemainingCapacityCalls() []struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo -} { - var calls []struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - mock.lockDeviceGetGpuInstanceRemainingCapacity.RLock() - calls = mock.calls.DeviceGetGpuInstanceRemainingCapacity - mock.lockDeviceGetGpuInstanceRemainingCapacity.RUnlock() - return calls -} - -// DeviceGetGpuInstances calls DeviceGetGpuInstancesFunc. -func (mock *Interface) DeviceGetGpuInstances(device nvml.Device, gpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo) ([]nvml.GpuInstance, nvml.Return) { - if mock.DeviceGetGpuInstancesFunc == nil { - panic("Interface.DeviceGetGpuInstancesFunc: method is nil but Interface.DeviceGetGpuInstances was just called") - } - callInfo := struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - }{ - Device: device, - GpuInstanceProfileInfo: gpuInstanceProfileInfo, - } - mock.lockDeviceGetGpuInstances.Lock() - mock.calls.DeviceGetGpuInstances = append(mock.calls.DeviceGetGpuInstances, callInfo) - mock.lockDeviceGetGpuInstances.Unlock() - return mock.DeviceGetGpuInstancesFunc(device, gpuInstanceProfileInfo) -} - -// DeviceGetGpuInstancesCalls gets all the calls that were made to DeviceGetGpuInstances. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpuInstancesCalls()) -func (mock *Interface) DeviceGetGpuInstancesCalls() []struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo -} { - var calls []struct { - Device nvml.Device - GpuInstanceProfileInfo *nvml.GpuInstanceProfileInfo - } - mock.lockDeviceGetGpuInstances.RLock() - calls = mock.calls.DeviceGetGpuInstances - mock.lockDeviceGetGpuInstances.RUnlock() - return calls -} - -// DeviceGetGpuMaxPcieLinkGeneration calls DeviceGetGpuMaxPcieLinkGenerationFunc. -func (mock *Interface) DeviceGetGpuMaxPcieLinkGeneration(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetGpuMaxPcieLinkGenerationFunc == nil { - panic("Interface.DeviceGetGpuMaxPcieLinkGenerationFunc: method is nil but Interface.DeviceGetGpuMaxPcieLinkGeneration was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetGpuMaxPcieLinkGeneration.Lock() - mock.calls.DeviceGetGpuMaxPcieLinkGeneration = append(mock.calls.DeviceGetGpuMaxPcieLinkGeneration, callInfo) - mock.lockDeviceGetGpuMaxPcieLinkGeneration.Unlock() - return mock.DeviceGetGpuMaxPcieLinkGenerationFunc(device) -} - -// DeviceGetGpuMaxPcieLinkGenerationCalls gets all the calls that were made to DeviceGetGpuMaxPcieLinkGeneration. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpuMaxPcieLinkGenerationCalls()) -func (mock *Interface) DeviceGetGpuMaxPcieLinkGenerationCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetGpuMaxPcieLinkGeneration.RLock() - calls = mock.calls.DeviceGetGpuMaxPcieLinkGeneration - mock.lockDeviceGetGpuMaxPcieLinkGeneration.RUnlock() - return calls -} - -// DeviceGetGpuOperationMode calls DeviceGetGpuOperationModeFunc. -func (mock *Interface) DeviceGetGpuOperationMode(device nvml.Device) (nvml.GpuOperationMode, nvml.GpuOperationMode, nvml.Return) { - if mock.DeviceGetGpuOperationModeFunc == nil { - panic("Interface.DeviceGetGpuOperationModeFunc: method is nil but Interface.DeviceGetGpuOperationMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetGpuOperationMode.Lock() - mock.calls.DeviceGetGpuOperationMode = append(mock.calls.DeviceGetGpuOperationMode, callInfo) - mock.lockDeviceGetGpuOperationMode.Unlock() - return mock.DeviceGetGpuOperationModeFunc(device) -} - -// DeviceGetGpuOperationModeCalls gets all the calls that were made to DeviceGetGpuOperationMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetGpuOperationModeCalls()) -func (mock *Interface) DeviceGetGpuOperationModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetGpuOperationMode.RLock() - calls = mock.calls.DeviceGetGpuOperationMode - mock.lockDeviceGetGpuOperationMode.RUnlock() - return calls -} - -// DeviceGetGraphicsRunningProcesses calls DeviceGetGraphicsRunningProcessesFunc. -func (mock *Interface) DeviceGetGraphicsRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { - if mock.DeviceGetGraphicsRunningProcessesFunc == nil { - panic("Interface.DeviceGetGraphicsRunningProcessesFunc: method is nil but Interface.DeviceGetGraphicsRunningProcesses was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetGraphicsRunningProcesses.Lock() - mock.calls.DeviceGetGraphicsRunningProcesses = append(mock.calls.DeviceGetGraphicsRunningProcesses, callInfo) - mock.lockDeviceGetGraphicsRunningProcesses.Unlock() - return mock.DeviceGetGraphicsRunningProcessesFunc(device) -} - -// DeviceGetGraphicsRunningProcessesCalls gets all the calls that were made to DeviceGetGraphicsRunningProcesses. -// Check the length with: -// -// len(mockedInterface.DeviceGetGraphicsRunningProcessesCalls()) -func (mock *Interface) DeviceGetGraphicsRunningProcessesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetGraphicsRunningProcesses.RLock() - calls = mock.calls.DeviceGetGraphicsRunningProcesses - mock.lockDeviceGetGraphicsRunningProcesses.RUnlock() - return calls -} - -// DeviceGetGridLicensableFeatures calls DeviceGetGridLicensableFeaturesFunc. -func (mock *Interface) DeviceGetGridLicensableFeatures(device nvml.Device) (nvml.GridLicensableFeatures, nvml.Return) { - if mock.DeviceGetGridLicensableFeaturesFunc == nil { - panic("Interface.DeviceGetGridLicensableFeaturesFunc: method is nil but Interface.DeviceGetGridLicensableFeatures was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetGridLicensableFeatures.Lock() - mock.calls.DeviceGetGridLicensableFeatures = append(mock.calls.DeviceGetGridLicensableFeatures, callInfo) - mock.lockDeviceGetGridLicensableFeatures.Unlock() - return mock.DeviceGetGridLicensableFeaturesFunc(device) -} - -// DeviceGetGridLicensableFeaturesCalls gets all the calls that were made to DeviceGetGridLicensableFeatures. -// Check the length with: -// -// len(mockedInterface.DeviceGetGridLicensableFeaturesCalls()) -func (mock *Interface) DeviceGetGridLicensableFeaturesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetGridLicensableFeatures.RLock() - calls = mock.calls.DeviceGetGridLicensableFeatures - mock.lockDeviceGetGridLicensableFeatures.RUnlock() - return calls -} - -// DeviceGetGspFirmwareMode calls DeviceGetGspFirmwareModeFunc. -func (mock *Interface) DeviceGetGspFirmwareMode(device nvml.Device) (bool, bool, nvml.Return) { - if mock.DeviceGetGspFirmwareModeFunc == nil { - panic("Interface.DeviceGetGspFirmwareModeFunc: method is nil but Interface.DeviceGetGspFirmwareMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetGspFirmwareMode.Lock() - mock.calls.DeviceGetGspFirmwareMode = append(mock.calls.DeviceGetGspFirmwareMode, callInfo) - mock.lockDeviceGetGspFirmwareMode.Unlock() - return mock.DeviceGetGspFirmwareModeFunc(device) -} - -// DeviceGetGspFirmwareModeCalls gets all the calls that were made to DeviceGetGspFirmwareMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetGspFirmwareModeCalls()) -func (mock *Interface) DeviceGetGspFirmwareModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetGspFirmwareMode.RLock() - calls = mock.calls.DeviceGetGspFirmwareMode - mock.lockDeviceGetGspFirmwareMode.RUnlock() - return calls -} - -// DeviceGetGspFirmwareVersion calls DeviceGetGspFirmwareVersionFunc. -func (mock *Interface) DeviceGetGspFirmwareVersion(device nvml.Device) (string, nvml.Return) { - if mock.DeviceGetGspFirmwareVersionFunc == nil { - panic("Interface.DeviceGetGspFirmwareVersionFunc: method is nil but Interface.DeviceGetGspFirmwareVersion was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetGspFirmwareVersion.Lock() - mock.calls.DeviceGetGspFirmwareVersion = append(mock.calls.DeviceGetGspFirmwareVersion, callInfo) - mock.lockDeviceGetGspFirmwareVersion.Unlock() - return mock.DeviceGetGspFirmwareVersionFunc(device) -} - -// DeviceGetGspFirmwareVersionCalls gets all the calls that were made to DeviceGetGspFirmwareVersion. -// Check the length with: -// -// len(mockedInterface.DeviceGetGspFirmwareVersionCalls()) -func (mock *Interface) DeviceGetGspFirmwareVersionCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetGspFirmwareVersion.RLock() - calls = mock.calls.DeviceGetGspFirmwareVersion - mock.lockDeviceGetGspFirmwareVersion.RUnlock() - return calls -} - -// DeviceGetHandleByIndex calls DeviceGetHandleByIndexFunc. -func (mock *Interface) DeviceGetHandleByIndex(n int) (nvml.Device, nvml.Return) { - if mock.DeviceGetHandleByIndexFunc == nil { - panic("Interface.DeviceGetHandleByIndexFunc: method is nil but Interface.DeviceGetHandleByIndex was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockDeviceGetHandleByIndex.Lock() - mock.calls.DeviceGetHandleByIndex = append(mock.calls.DeviceGetHandleByIndex, callInfo) - mock.lockDeviceGetHandleByIndex.Unlock() - return mock.DeviceGetHandleByIndexFunc(n) -} - -// DeviceGetHandleByIndexCalls gets all the calls that were made to DeviceGetHandleByIndex. -// Check the length with: -// -// len(mockedInterface.DeviceGetHandleByIndexCalls()) -func (mock *Interface) DeviceGetHandleByIndexCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockDeviceGetHandleByIndex.RLock() - calls = mock.calls.DeviceGetHandleByIndex - mock.lockDeviceGetHandleByIndex.RUnlock() - return calls -} - -// DeviceGetHandleByPciBusId calls DeviceGetHandleByPciBusIdFunc. -func (mock *Interface) DeviceGetHandleByPciBusId(s string) (nvml.Device, nvml.Return) { - if mock.DeviceGetHandleByPciBusIdFunc == nil { - panic("Interface.DeviceGetHandleByPciBusIdFunc: method is nil but Interface.DeviceGetHandleByPciBusId was just called") - } - callInfo := struct { - S string - }{ - S: s, - } - mock.lockDeviceGetHandleByPciBusId.Lock() - mock.calls.DeviceGetHandleByPciBusId = append(mock.calls.DeviceGetHandleByPciBusId, callInfo) - mock.lockDeviceGetHandleByPciBusId.Unlock() - return mock.DeviceGetHandleByPciBusIdFunc(s) -} - -// DeviceGetHandleByPciBusIdCalls gets all the calls that were made to DeviceGetHandleByPciBusId. -// Check the length with: -// -// len(mockedInterface.DeviceGetHandleByPciBusIdCalls()) -func (mock *Interface) DeviceGetHandleByPciBusIdCalls() []struct { - S string -} { - var calls []struct { - S string - } - mock.lockDeviceGetHandleByPciBusId.RLock() - calls = mock.calls.DeviceGetHandleByPciBusId - mock.lockDeviceGetHandleByPciBusId.RUnlock() - return calls -} - -// DeviceGetHandleBySerial calls DeviceGetHandleBySerialFunc. -func (mock *Interface) DeviceGetHandleBySerial(s string) (nvml.Device, nvml.Return) { - if mock.DeviceGetHandleBySerialFunc == nil { - panic("Interface.DeviceGetHandleBySerialFunc: method is nil but Interface.DeviceGetHandleBySerial was just called") - } - callInfo := struct { - S string - }{ - S: s, - } - mock.lockDeviceGetHandleBySerial.Lock() - mock.calls.DeviceGetHandleBySerial = append(mock.calls.DeviceGetHandleBySerial, callInfo) - mock.lockDeviceGetHandleBySerial.Unlock() - return mock.DeviceGetHandleBySerialFunc(s) -} - -// DeviceGetHandleBySerialCalls gets all the calls that were made to DeviceGetHandleBySerial. -// Check the length with: -// -// len(mockedInterface.DeviceGetHandleBySerialCalls()) -func (mock *Interface) DeviceGetHandleBySerialCalls() []struct { - S string -} { - var calls []struct { - S string - } - mock.lockDeviceGetHandleBySerial.RLock() - calls = mock.calls.DeviceGetHandleBySerial - mock.lockDeviceGetHandleBySerial.RUnlock() - return calls -} - -// DeviceGetHandleByUUID calls DeviceGetHandleByUUIDFunc. -func (mock *Interface) DeviceGetHandleByUUID(s string) (nvml.Device, nvml.Return) { - if mock.DeviceGetHandleByUUIDFunc == nil { - panic("Interface.DeviceGetHandleByUUIDFunc: method is nil but Interface.DeviceGetHandleByUUID was just called") - } - callInfo := struct { - S string - }{ - S: s, - } - mock.lockDeviceGetHandleByUUID.Lock() - mock.calls.DeviceGetHandleByUUID = append(mock.calls.DeviceGetHandleByUUID, callInfo) - mock.lockDeviceGetHandleByUUID.Unlock() - return mock.DeviceGetHandleByUUIDFunc(s) -} - -// DeviceGetHandleByUUIDCalls gets all the calls that were made to DeviceGetHandleByUUID. -// Check the length with: -// -// len(mockedInterface.DeviceGetHandleByUUIDCalls()) -func (mock *Interface) DeviceGetHandleByUUIDCalls() []struct { - S string -} { - var calls []struct { - S string - } - mock.lockDeviceGetHandleByUUID.RLock() - calls = mock.calls.DeviceGetHandleByUUID - mock.lockDeviceGetHandleByUUID.RUnlock() - return calls -} - -// DeviceGetHandleByUUIDV calls DeviceGetHandleByUUIDVFunc. -func (mock *Interface) DeviceGetHandleByUUIDV(uUID *nvml.UUID) (nvml.Device, nvml.Return) { - if mock.DeviceGetHandleByUUIDVFunc == nil { - panic("Interface.DeviceGetHandleByUUIDVFunc: method is nil but Interface.DeviceGetHandleByUUIDV was just called") - } - callInfo := struct { - UUID *nvml.UUID - }{ - UUID: uUID, - } - mock.lockDeviceGetHandleByUUIDV.Lock() - mock.calls.DeviceGetHandleByUUIDV = append(mock.calls.DeviceGetHandleByUUIDV, callInfo) - mock.lockDeviceGetHandleByUUIDV.Unlock() - return mock.DeviceGetHandleByUUIDVFunc(uUID) -} - -// DeviceGetHandleByUUIDVCalls gets all the calls that were made to DeviceGetHandleByUUIDV. -// Check the length with: -// -// len(mockedInterface.DeviceGetHandleByUUIDVCalls()) -func (mock *Interface) DeviceGetHandleByUUIDVCalls() []struct { - UUID *nvml.UUID -} { - var calls []struct { - UUID *nvml.UUID - } - mock.lockDeviceGetHandleByUUIDV.RLock() - calls = mock.calls.DeviceGetHandleByUUIDV - mock.lockDeviceGetHandleByUUIDV.RUnlock() - return calls -} - -// DeviceGetHostVgpuMode calls DeviceGetHostVgpuModeFunc. -func (mock *Interface) DeviceGetHostVgpuMode(device nvml.Device) (nvml.HostVgpuMode, nvml.Return) { - if mock.DeviceGetHostVgpuModeFunc == nil { - panic("Interface.DeviceGetHostVgpuModeFunc: method is nil but Interface.DeviceGetHostVgpuMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetHostVgpuMode.Lock() - mock.calls.DeviceGetHostVgpuMode = append(mock.calls.DeviceGetHostVgpuMode, callInfo) - mock.lockDeviceGetHostVgpuMode.Unlock() - return mock.DeviceGetHostVgpuModeFunc(device) -} - -// DeviceGetHostVgpuModeCalls gets all the calls that were made to DeviceGetHostVgpuMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetHostVgpuModeCalls()) -func (mock *Interface) DeviceGetHostVgpuModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetHostVgpuMode.RLock() - calls = mock.calls.DeviceGetHostVgpuMode - mock.lockDeviceGetHostVgpuMode.RUnlock() - return calls -} - -// DeviceGetIndex calls DeviceGetIndexFunc. -func (mock *Interface) DeviceGetIndex(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetIndexFunc == nil { - panic("Interface.DeviceGetIndexFunc: method is nil but Interface.DeviceGetIndex was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetIndex.Lock() - mock.calls.DeviceGetIndex = append(mock.calls.DeviceGetIndex, callInfo) - mock.lockDeviceGetIndex.Unlock() - return mock.DeviceGetIndexFunc(device) -} - -// DeviceGetIndexCalls gets all the calls that were made to DeviceGetIndex. -// Check the length with: -// -// len(mockedInterface.DeviceGetIndexCalls()) -func (mock *Interface) DeviceGetIndexCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetIndex.RLock() - calls = mock.calls.DeviceGetIndex - mock.lockDeviceGetIndex.RUnlock() - return calls -} - -// DeviceGetInforomConfigurationChecksum calls DeviceGetInforomConfigurationChecksumFunc. -func (mock *Interface) DeviceGetInforomConfigurationChecksum(device nvml.Device) (uint32, nvml.Return) { - if mock.DeviceGetInforomConfigurationChecksumFunc == nil { - panic("Interface.DeviceGetInforomConfigurationChecksumFunc: method is nil but Interface.DeviceGetInforomConfigurationChecksum was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetInforomConfigurationChecksum.Lock() - mock.calls.DeviceGetInforomConfigurationChecksum = append(mock.calls.DeviceGetInforomConfigurationChecksum, callInfo) - mock.lockDeviceGetInforomConfigurationChecksum.Unlock() - return mock.DeviceGetInforomConfigurationChecksumFunc(device) -} - -// DeviceGetInforomConfigurationChecksumCalls gets all the calls that were made to DeviceGetInforomConfigurationChecksum. -// Check the length with: -// -// len(mockedInterface.DeviceGetInforomConfigurationChecksumCalls()) -func (mock *Interface) DeviceGetInforomConfigurationChecksumCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetInforomConfigurationChecksum.RLock() - calls = mock.calls.DeviceGetInforomConfigurationChecksum - mock.lockDeviceGetInforomConfigurationChecksum.RUnlock() - return calls -} - -// DeviceGetInforomImageVersion calls DeviceGetInforomImageVersionFunc. -func (mock *Interface) DeviceGetInforomImageVersion(device nvml.Device) (string, nvml.Return) { - if mock.DeviceGetInforomImageVersionFunc == nil { - panic("Interface.DeviceGetInforomImageVersionFunc: method is nil but Interface.DeviceGetInforomImageVersion was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetInforomImageVersion.Lock() - mock.calls.DeviceGetInforomImageVersion = append(mock.calls.DeviceGetInforomImageVersion, callInfo) - mock.lockDeviceGetInforomImageVersion.Unlock() - return mock.DeviceGetInforomImageVersionFunc(device) -} - -// DeviceGetInforomImageVersionCalls gets all the calls that were made to DeviceGetInforomImageVersion. -// Check the length with: -// -// len(mockedInterface.DeviceGetInforomImageVersionCalls()) -func (mock *Interface) DeviceGetInforomImageVersionCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetInforomImageVersion.RLock() - calls = mock.calls.DeviceGetInforomImageVersion - mock.lockDeviceGetInforomImageVersion.RUnlock() - return calls -} - -// DeviceGetInforomVersion calls DeviceGetInforomVersionFunc. -func (mock *Interface) DeviceGetInforomVersion(device nvml.Device, inforomObject nvml.InforomObject) (string, nvml.Return) { - if mock.DeviceGetInforomVersionFunc == nil { - panic("Interface.DeviceGetInforomVersionFunc: method is nil but Interface.DeviceGetInforomVersion was just called") - } - callInfo := struct { - Device nvml.Device - InforomObject nvml.InforomObject - }{ - Device: device, - InforomObject: inforomObject, - } - mock.lockDeviceGetInforomVersion.Lock() - mock.calls.DeviceGetInforomVersion = append(mock.calls.DeviceGetInforomVersion, callInfo) - mock.lockDeviceGetInforomVersion.Unlock() - return mock.DeviceGetInforomVersionFunc(device, inforomObject) -} - -// DeviceGetInforomVersionCalls gets all the calls that were made to DeviceGetInforomVersion. -// Check the length with: -// -// len(mockedInterface.DeviceGetInforomVersionCalls()) -func (mock *Interface) DeviceGetInforomVersionCalls() []struct { - Device nvml.Device - InforomObject nvml.InforomObject -} { - var calls []struct { - Device nvml.Device - InforomObject nvml.InforomObject - } - mock.lockDeviceGetInforomVersion.RLock() - calls = mock.calls.DeviceGetInforomVersion - mock.lockDeviceGetInforomVersion.RUnlock() - return calls -} - -// DeviceGetIrqNum calls DeviceGetIrqNumFunc. -func (mock *Interface) DeviceGetIrqNum(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetIrqNumFunc == nil { - panic("Interface.DeviceGetIrqNumFunc: method is nil but Interface.DeviceGetIrqNum was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetIrqNum.Lock() - mock.calls.DeviceGetIrqNum = append(mock.calls.DeviceGetIrqNum, callInfo) - mock.lockDeviceGetIrqNum.Unlock() - return mock.DeviceGetIrqNumFunc(device) -} - -// DeviceGetIrqNumCalls gets all the calls that were made to DeviceGetIrqNum. -// Check the length with: -// -// len(mockedInterface.DeviceGetIrqNumCalls()) -func (mock *Interface) DeviceGetIrqNumCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetIrqNum.RLock() - calls = mock.calls.DeviceGetIrqNum - mock.lockDeviceGetIrqNum.RUnlock() - return calls -} - -// DeviceGetJpgUtilization calls DeviceGetJpgUtilizationFunc. -func (mock *Interface) DeviceGetJpgUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { - if mock.DeviceGetJpgUtilizationFunc == nil { - panic("Interface.DeviceGetJpgUtilizationFunc: method is nil but Interface.DeviceGetJpgUtilization was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetJpgUtilization.Lock() - mock.calls.DeviceGetJpgUtilization = append(mock.calls.DeviceGetJpgUtilization, callInfo) - mock.lockDeviceGetJpgUtilization.Unlock() - return mock.DeviceGetJpgUtilizationFunc(device) -} - -// DeviceGetJpgUtilizationCalls gets all the calls that were made to DeviceGetJpgUtilization. -// Check the length with: -// -// len(mockedInterface.DeviceGetJpgUtilizationCalls()) -func (mock *Interface) DeviceGetJpgUtilizationCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetJpgUtilization.RLock() - calls = mock.calls.DeviceGetJpgUtilization - mock.lockDeviceGetJpgUtilization.RUnlock() - return calls -} - -// DeviceGetLastBBXFlushTime calls DeviceGetLastBBXFlushTimeFunc. -func (mock *Interface) DeviceGetLastBBXFlushTime(device nvml.Device) (uint64, uint, nvml.Return) { - if mock.DeviceGetLastBBXFlushTimeFunc == nil { - panic("Interface.DeviceGetLastBBXFlushTimeFunc: method is nil but Interface.DeviceGetLastBBXFlushTime was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetLastBBXFlushTime.Lock() - mock.calls.DeviceGetLastBBXFlushTime = append(mock.calls.DeviceGetLastBBXFlushTime, callInfo) - mock.lockDeviceGetLastBBXFlushTime.Unlock() - return mock.DeviceGetLastBBXFlushTimeFunc(device) -} - -// DeviceGetLastBBXFlushTimeCalls gets all the calls that were made to DeviceGetLastBBXFlushTime. -// Check the length with: -// -// len(mockedInterface.DeviceGetLastBBXFlushTimeCalls()) -func (mock *Interface) DeviceGetLastBBXFlushTimeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetLastBBXFlushTime.RLock() - calls = mock.calls.DeviceGetLastBBXFlushTime - mock.lockDeviceGetLastBBXFlushTime.RUnlock() - return calls -} - -// DeviceGetMPSComputeRunningProcesses calls DeviceGetMPSComputeRunningProcessesFunc. -func (mock *Interface) DeviceGetMPSComputeRunningProcesses(device nvml.Device) ([]nvml.ProcessInfo, nvml.Return) { - if mock.DeviceGetMPSComputeRunningProcessesFunc == nil { - panic("Interface.DeviceGetMPSComputeRunningProcessesFunc: method is nil but Interface.DeviceGetMPSComputeRunningProcesses was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMPSComputeRunningProcesses.Lock() - mock.calls.DeviceGetMPSComputeRunningProcesses = append(mock.calls.DeviceGetMPSComputeRunningProcesses, callInfo) - mock.lockDeviceGetMPSComputeRunningProcesses.Unlock() - return mock.DeviceGetMPSComputeRunningProcessesFunc(device) -} - -// DeviceGetMPSComputeRunningProcessesCalls gets all the calls that were made to DeviceGetMPSComputeRunningProcesses. -// Check the length with: -// -// len(mockedInterface.DeviceGetMPSComputeRunningProcessesCalls()) -func (mock *Interface) DeviceGetMPSComputeRunningProcessesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMPSComputeRunningProcesses.RLock() - calls = mock.calls.DeviceGetMPSComputeRunningProcesses - mock.lockDeviceGetMPSComputeRunningProcesses.RUnlock() - return calls -} - -// DeviceGetMarginTemperature calls DeviceGetMarginTemperatureFunc. -func (mock *Interface) DeviceGetMarginTemperature(device nvml.Device) (nvml.MarginTemperature, nvml.Return) { - if mock.DeviceGetMarginTemperatureFunc == nil { - panic("Interface.DeviceGetMarginTemperatureFunc: method is nil but Interface.DeviceGetMarginTemperature was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMarginTemperature.Lock() - mock.calls.DeviceGetMarginTemperature = append(mock.calls.DeviceGetMarginTemperature, callInfo) - mock.lockDeviceGetMarginTemperature.Unlock() - return mock.DeviceGetMarginTemperatureFunc(device) -} - -// DeviceGetMarginTemperatureCalls gets all the calls that were made to DeviceGetMarginTemperature. -// Check the length with: -// -// len(mockedInterface.DeviceGetMarginTemperatureCalls()) -func (mock *Interface) DeviceGetMarginTemperatureCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMarginTemperature.RLock() - calls = mock.calls.DeviceGetMarginTemperature - mock.lockDeviceGetMarginTemperature.RUnlock() - return calls -} - -// DeviceGetMaxClockInfo calls DeviceGetMaxClockInfoFunc. -func (mock *Interface) DeviceGetMaxClockInfo(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { - if mock.DeviceGetMaxClockInfoFunc == nil { - panic("Interface.DeviceGetMaxClockInfoFunc: method is nil but Interface.DeviceGetMaxClockInfo was just called") - } - callInfo := struct { - Device nvml.Device - ClockType nvml.ClockType - }{ - Device: device, - ClockType: clockType, - } - mock.lockDeviceGetMaxClockInfo.Lock() - mock.calls.DeviceGetMaxClockInfo = append(mock.calls.DeviceGetMaxClockInfo, callInfo) - mock.lockDeviceGetMaxClockInfo.Unlock() - return mock.DeviceGetMaxClockInfoFunc(device, clockType) -} - -// DeviceGetMaxClockInfoCalls gets all the calls that were made to DeviceGetMaxClockInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetMaxClockInfoCalls()) -func (mock *Interface) DeviceGetMaxClockInfoCalls() []struct { - Device nvml.Device - ClockType nvml.ClockType -} { - var calls []struct { - Device nvml.Device - ClockType nvml.ClockType - } - mock.lockDeviceGetMaxClockInfo.RLock() - calls = mock.calls.DeviceGetMaxClockInfo - mock.lockDeviceGetMaxClockInfo.RUnlock() - return calls -} - -// DeviceGetMaxCustomerBoostClock calls DeviceGetMaxCustomerBoostClockFunc. -func (mock *Interface) DeviceGetMaxCustomerBoostClock(device nvml.Device, clockType nvml.ClockType) (uint32, nvml.Return) { - if mock.DeviceGetMaxCustomerBoostClockFunc == nil { - panic("Interface.DeviceGetMaxCustomerBoostClockFunc: method is nil but Interface.DeviceGetMaxCustomerBoostClock was just called") - } - callInfo := struct { - Device nvml.Device - ClockType nvml.ClockType - }{ - Device: device, - ClockType: clockType, - } - mock.lockDeviceGetMaxCustomerBoostClock.Lock() - mock.calls.DeviceGetMaxCustomerBoostClock = append(mock.calls.DeviceGetMaxCustomerBoostClock, callInfo) - mock.lockDeviceGetMaxCustomerBoostClock.Unlock() - return mock.DeviceGetMaxCustomerBoostClockFunc(device, clockType) -} - -// DeviceGetMaxCustomerBoostClockCalls gets all the calls that were made to DeviceGetMaxCustomerBoostClock. -// Check the length with: -// -// len(mockedInterface.DeviceGetMaxCustomerBoostClockCalls()) -func (mock *Interface) DeviceGetMaxCustomerBoostClockCalls() []struct { - Device nvml.Device - ClockType nvml.ClockType -} { - var calls []struct { - Device nvml.Device - ClockType nvml.ClockType - } - mock.lockDeviceGetMaxCustomerBoostClock.RLock() - calls = mock.calls.DeviceGetMaxCustomerBoostClock - mock.lockDeviceGetMaxCustomerBoostClock.RUnlock() - return calls -} - -// DeviceGetMaxMigDeviceCount calls DeviceGetMaxMigDeviceCountFunc. -func (mock *Interface) DeviceGetMaxMigDeviceCount(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetMaxMigDeviceCountFunc == nil { - panic("Interface.DeviceGetMaxMigDeviceCountFunc: method is nil but Interface.DeviceGetMaxMigDeviceCount was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMaxMigDeviceCount.Lock() - mock.calls.DeviceGetMaxMigDeviceCount = append(mock.calls.DeviceGetMaxMigDeviceCount, callInfo) - mock.lockDeviceGetMaxMigDeviceCount.Unlock() - return mock.DeviceGetMaxMigDeviceCountFunc(device) -} - -// DeviceGetMaxMigDeviceCountCalls gets all the calls that were made to DeviceGetMaxMigDeviceCount. -// Check the length with: -// -// len(mockedInterface.DeviceGetMaxMigDeviceCountCalls()) -func (mock *Interface) DeviceGetMaxMigDeviceCountCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMaxMigDeviceCount.RLock() - calls = mock.calls.DeviceGetMaxMigDeviceCount - mock.lockDeviceGetMaxMigDeviceCount.RUnlock() - return calls -} - -// DeviceGetMaxPcieLinkGeneration calls DeviceGetMaxPcieLinkGenerationFunc. -func (mock *Interface) DeviceGetMaxPcieLinkGeneration(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetMaxPcieLinkGenerationFunc == nil { - panic("Interface.DeviceGetMaxPcieLinkGenerationFunc: method is nil but Interface.DeviceGetMaxPcieLinkGeneration was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMaxPcieLinkGeneration.Lock() - mock.calls.DeviceGetMaxPcieLinkGeneration = append(mock.calls.DeviceGetMaxPcieLinkGeneration, callInfo) - mock.lockDeviceGetMaxPcieLinkGeneration.Unlock() - return mock.DeviceGetMaxPcieLinkGenerationFunc(device) -} - -// DeviceGetMaxPcieLinkGenerationCalls gets all the calls that were made to DeviceGetMaxPcieLinkGeneration. -// Check the length with: -// -// len(mockedInterface.DeviceGetMaxPcieLinkGenerationCalls()) -func (mock *Interface) DeviceGetMaxPcieLinkGenerationCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMaxPcieLinkGeneration.RLock() - calls = mock.calls.DeviceGetMaxPcieLinkGeneration - mock.lockDeviceGetMaxPcieLinkGeneration.RUnlock() - return calls -} - -// DeviceGetMaxPcieLinkWidth calls DeviceGetMaxPcieLinkWidthFunc. -func (mock *Interface) DeviceGetMaxPcieLinkWidth(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetMaxPcieLinkWidthFunc == nil { - panic("Interface.DeviceGetMaxPcieLinkWidthFunc: method is nil but Interface.DeviceGetMaxPcieLinkWidth was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMaxPcieLinkWidth.Lock() - mock.calls.DeviceGetMaxPcieLinkWidth = append(mock.calls.DeviceGetMaxPcieLinkWidth, callInfo) - mock.lockDeviceGetMaxPcieLinkWidth.Unlock() - return mock.DeviceGetMaxPcieLinkWidthFunc(device) -} - -// DeviceGetMaxPcieLinkWidthCalls gets all the calls that were made to DeviceGetMaxPcieLinkWidth. -// Check the length with: -// -// len(mockedInterface.DeviceGetMaxPcieLinkWidthCalls()) -func (mock *Interface) DeviceGetMaxPcieLinkWidthCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMaxPcieLinkWidth.RLock() - calls = mock.calls.DeviceGetMaxPcieLinkWidth - mock.lockDeviceGetMaxPcieLinkWidth.RUnlock() - return calls -} - -// DeviceGetMemClkMinMaxVfOffset calls DeviceGetMemClkMinMaxVfOffsetFunc. -func (mock *Interface) DeviceGetMemClkMinMaxVfOffset(device nvml.Device) (int, int, nvml.Return) { - if mock.DeviceGetMemClkMinMaxVfOffsetFunc == nil { - panic("Interface.DeviceGetMemClkMinMaxVfOffsetFunc: method is nil but Interface.DeviceGetMemClkMinMaxVfOffset was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMemClkMinMaxVfOffset.Lock() - mock.calls.DeviceGetMemClkMinMaxVfOffset = append(mock.calls.DeviceGetMemClkMinMaxVfOffset, callInfo) - mock.lockDeviceGetMemClkMinMaxVfOffset.Unlock() - return mock.DeviceGetMemClkMinMaxVfOffsetFunc(device) -} - -// DeviceGetMemClkMinMaxVfOffsetCalls gets all the calls that were made to DeviceGetMemClkMinMaxVfOffset. -// Check the length with: -// -// len(mockedInterface.DeviceGetMemClkMinMaxVfOffsetCalls()) -func (mock *Interface) DeviceGetMemClkMinMaxVfOffsetCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMemClkMinMaxVfOffset.RLock() - calls = mock.calls.DeviceGetMemClkMinMaxVfOffset - mock.lockDeviceGetMemClkMinMaxVfOffset.RUnlock() - return calls -} - -// DeviceGetMemClkVfOffset calls DeviceGetMemClkVfOffsetFunc. -func (mock *Interface) DeviceGetMemClkVfOffset(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetMemClkVfOffsetFunc == nil { - panic("Interface.DeviceGetMemClkVfOffsetFunc: method is nil but Interface.DeviceGetMemClkVfOffset was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMemClkVfOffset.Lock() - mock.calls.DeviceGetMemClkVfOffset = append(mock.calls.DeviceGetMemClkVfOffset, callInfo) - mock.lockDeviceGetMemClkVfOffset.Unlock() - return mock.DeviceGetMemClkVfOffsetFunc(device) -} - -// DeviceGetMemClkVfOffsetCalls gets all the calls that were made to DeviceGetMemClkVfOffset. -// Check the length with: -// -// len(mockedInterface.DeviceGetMemClkVfOffsetCalls()) -func (mock *Interface) DeviceGetMemClkVfOffsetCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMemClkVfOffset.RLock() - calls = mock.calls.DeviceGetMemClkVfOffset - mock.lockDeviceGetMemClkVfOffset.RUnlock() - return calls -} - -// DeviceGetMemoryAffinity calls DeviceGetMemoryAffinityFunc. -func (mock *Interface) DeviceGetMemoryAffinity(device nvml.Device, n int, affinityScope nvml.AffinityScope) ([]uint, nvml.Return) { - if mock.DeviceGetMemoryAffinityFunc == nil { - panic("Interface.DeviceGetMemoryAffinityFunc: method is nil but Interface.DeviceGetMemoryAffinity was just called") - } - callInfo := struct { - Device nvml.Device - N int - AffinityScope nvml.AffinityScope - }{ - Device: device, - N: n, - AffinityScope: affinityScope, - } - mock.lockDeviceGetMemoryAffinity.Lock() - mock.calls.DeviceGetMemoryAffinity = append(mock.calls.DeviceGetMemoryAffinity, callInfo) - mock.lockDeviceGetMemoryAffinity.Unlock() - return mock.DeviceGetMemoryAffinityFunc(device, n, affinityScope) -} - -// DeviceGetMemoryAffinityCalls gets all the calls that were made to DeviceGetMemoryAffinity. -// Check the length with: -// -// len(mockedInterface.DeviceGetMemoryAffinityCalls()) -func (mock *Interface) DeviceGetMemoryAffinityCalls() []struct { - Device nvml.Device - N int - AffinityScope nvml.AffinityScope -} { - var calls []struct { - Device nvml.Device - N int - AffinityScope nvml.AffinityScope - } - mock.lockDeviceGetMemoryAffinity.RLock() - calls = mock.calls.DeviceGetMemoryAffinity - mock.lockDeviceGetMemoryAffinity.RUnlock() - return calls -} - -// DeviceGetMemoryBusWidth calls DeviceGetMemoryBusWidthFunc. -func (mock *Interface) DeviceGetMemoryBusWidth(device nvml.Device) (uint32, nvml.Return) { - if mock.DeviceGetMemoryBusWidthFunc == nil { - panic("Interface.DeviceGetMemoryBusWidthFunc: method is nil but Interface.DeviceGetMemoryBusWidth was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMemoryBusWidth.Lock() - mock.calls.DeviceGetMemoryBusWidth = append(mock.calls.DeviceGetMemoryBusWidth, callInfo) - mock.lockDeviceGetMemoryBusWidth.Unlock() - return mock.DeviceGetMemoryBusWidthFunc(device) -} - -// DeviceGetMemoryBusWidthCalls gets all the calls that were made to DeviceGetMemoryBusWidth. -// Check the length with: -// -// len(mockedInterface.DeviceGetMemoryBusWidthCalls()) -func (mock *Interface) DeviceGetMemoryBusWidthCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMemoryBusWidth.RLock() - calls = mock.calls.DeviceGetMemoryBusWidth - mock.lockDeviceGetMemoryBusWidth.RUnlock() - return calls -} - -// DeviceGetMemoryErrorCounter calls DeviceGetMemoryErrorCounterFunc. -func (mock *Interface) DeviceGetMemoryErrorCounter(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType, memoryLocation nvml.MemoryLocation) (uint64, nvml.Return) { - if mock.DeviceGetMemoryErrorCounterFunc == nil { - panic("Interface.DeviceGetMemoryErrorCounterFunc: method is nil but Interface.DeviceGetMemoryErrorCounter was just called") - } - callInfo := struct { - Device nvml.Device - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - MemoryLocation nvml.MemoryLocation - }{ - Device: device, - MemoryErrorType: memoryErrorType, - EccCounterType: eccCounterType, - MemoryLocation: memoryLocation, - } - mock.lockDeviceGetMemoryErrorCounter.Lock() - mock.calls.DeviceGetMemoryErrorCounter = append(mock.calls.DeviceGetMemoryErrorCounter, callInfo) - mock.lockDeviceGetMemoryErrorCounter.Unlock() - return mock.DeviceGetMemoryErrorCounterFunc(device, memoryErrorType, eccCounterType, memoryLocation) -} - -// DeviceGetMemoryErrorCounterCalls gets all the calls that were made to DeviceGetMemoryErrorCounter. -// Check the length with: -// -// len(mockedInterface.DeviceGetMemoryErrorCounterCalls()) -func (mock *Interface) DeviceGetMemoryErrorCounterCalls() []struct { - Device nvml.Device - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - MemoryLocation nvml.MemoryLocation -} { - var calls []struct { - Device nvml.Device - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - MemoryLocation nvml.MemoryLocation - } - mock.lockDeviceGetMemoryErrorCounter.RLock() - calls = mock.calls.DeviceGetMemoryErrorCounter - mock.lockDeviceGetMemoryErrorCounter.RUnlock() - return calls -} - -// DeviceGetMemoryInfo calls DeviceGetMemoryInfoFunc. -func (mock *Interface) DeviceGetMemoryInfo(device nvml.Device) (nvml.Memory, nvml.Return) { - if mock.DeviceGetMemoryInfoFunc == nil { - panic("Interface.DeviceGetMemoryInfoFunc: method is nil but Interface.DeviceGetMemoryInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMemoryInfo.Lock() - mock.calls.DeviceGetMemoryInfo = append(mock.calls.DeviceGetMemoryInfo, callInfo) - mock.lockDeviceGetMemoryInfo.Unlock() - return mock.DeviceGetMemoryInfoFunc(device) -} - -// DeviceGetMemoryInfoCalls gets all the calls that were made to DeviceGetMemoryInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetMemoryInfoCalls()) -func (mock *Interface) DeviceGetMemoryInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMemoryInfo.RLock() - calls = mock.calls.DeviceGetMemoryInfo - mock.lockDeviceGetMemoryInfo.RUnlock() - return calls -} - -// DeviceGetMemoryInfo_v2 calls DeviceGetMemoryInfo_v2Func. -func (mock *Interface) DeviceGetMemoryInfo_v2(device nvml.Device) (nvml.Memory_v2, nvml.Return) { - if mock.DeviceGetMemoryInfo_v2Func == nil { - panic("Interface.DeviceGetMemoryInfo_v2Func: method is nil but Interface.DeviceGetMemoryInfo_v2 was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMemoryInfo_v2.Lock() - mock.calls.DeviceGetMemoryInfo_v2 = append(mock.calls.DeviceGetMemoryInfo_v2, callInfo) - mock.lockDeviceGetMemoryInfo_v2.Unlock() - return mock.DeviceGetMemoryInfo_v2Func(device) -} - -// DeviceGetMemoryInfo_v2Calls gets all the calls that were made to DeviceGetMemoryInfo_v2. -// Check the length with: -// -// len(mockedInterface.DeviceGetMemoryInfo_v2Calls()) -func (mock *Interface) DeviceGetMemoryInfo_v2Calls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMemoryInfo_v2.RLock() - calls = mock.calls.DeviceGetMemoryInfo_v2 - mock.lockDeviceGetMemoryInfo_v2.RUnlock() - return calls -} - -// DeviceGetMigDeviceHandleByIndex calls DeviceGetMigDeviceHandleByIndexFunc. -func (mock *Interface) DeviceGetMigDeviceHandleByIndex(device nvml.Device, n int) (nvml.Device, nvml.Return) { - if mock.DeviceGetMigDeviceHandleByIndexFunc == nil { - panic("Interface.DeviceGetMigDeviceHandleByIndexFunc: method is nil but Interface.DeviceGetMigDeviceHandleByIndex was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetMigDeviceHandleByIndex.Lock() - mock.calls.DeviceGetMigDeviceHandleByIndex = append(mock.calls.DeviceGetMigDeviceHandleByIndex, callInfo) - mock.lockDeviceGetMigDeviceHandleByIndex.Unlock() - return mock.DeviceGetMigDeviceHandleByIndexFunc(device, n) -} - -// DeviceGetMigDeviceHandleByIndexCalls gets all the calls that were made to DeviceGetMigDeviceHandleByIndex. -// Check the length with: -// -// len(mockedInterface.DeviceGetMigDeviceHandleByIndexCalls()) -func (mock *Interface) DeviceGetMigDeviceHandleByIndexCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetMigDeviceHandleByIndex.RLock() - calls = mock.calls.DeviceGetMigDeviceHandleByIndex - mock.lockDeviceGetMigDeviceHandleByIndex.RUnlock() - return calls -} - -// DeviceGetMigMode calls DeviceGetMigModeFunc. -func (mock *Interface) DeviceGetMigMode(device nvml.Device) (int, int, nvml.Return) { - if mock.DeviceGetMigModeFunc == nil { - panic("Interface.DeviceGetMigModeFunc: method is nil but Interface.DeviceGetMigMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMigMode.Lock() - mock.calls.DeviceGetMigMode = append(mock.calls.DeviceGetMigMode, callInfo) - mock.lockDeviceGetMigMode.Unlock() - return mock.DeviceGetMigModeFunc(device) -} - -// DeviceGetMigModeCalls gets all the calls that were made to DeviceGetMigMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetMigModeCalls()) -func (mock *Interface) DeviceGetMigModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMigMode.RLock() - calls = mock.calls.DeviceGetMigMode - mock.lockDeviceGetMigMode.RUnlock() - return calls -} - -// DeviceGetMinMaxClockOfPState calls DeviceGetMinMaxClockOfPStateFunc. -func (mock *Interface) DeviceGetMinMaxClockOfPState(device nvml.Device, clockType nvml.ClockType, pstates nvml.Pstates) (uint32, uint32, nvml.Return) { - if mock.DeviceGetMinMaxClockOfPStateFunc == nil { - panic("Interface.DeviceGetMinMaxClockOfPStateFunc: method is nil but Interface.DeviceGetMinMaxClockOfPState was just called") - } - callInfo := struct { - Device nvml.Device - ClockType nvml.ClockType - Pstates nvml.Pstates - }{ - Device: device, - ClockType: clockType, - Pstates: pstates, - } - mock.lockDeviceGetMinMaxClockOfPState.Lock() - mock.calls.DeviceGetMinMaxClockOfPState = append(mock.calls.DeviceGetMinMaxClockOfPState, callInfo) - mock.lockDeviceGetMinMaxClockOfPState.Unlock() - return mock.DeviceGetMinMaxClockOfPStateFunc(device, clockType, pstates) -} - -// DeviceGetMinMaxClockOfPStateCalls gets all the calls that were made to DeviceGetMinMaxClockOfPState. -// Check the length with: -// -// len(mockedInterface.DeviceGetMinMaxClockOfPStateCalls()) -func (mock *Interface) DeviceGetMinMaxClockOfPStateCalls() []struct { - Device nvml.Device - ClockType nvml.ClockType - Pstates nvml.Pstates -} { - var calls []struct { - Device nvml.Device - ClockType nvml.ClockType - Pstates nvml.Pstates - } - mock.lockDeviceGetMinMaxClockOfPState.RLock() - calls = mock.calls.DeviceGetMinMaxClockOfPState - mock.lockDeviceGetMinMaxClockOfPState.RUnlock() - return calls -} - -// DeviceGetMinMaxFanSpeed calls DeviceGetMinMaxFanSpeedFunc. -func (mock *Interface) DeviceGetMinMaxFanSpeed(device nvml.Device) (int, int, nvml.Return) { - if mock.DeviceGetMinMaxFanSpeedFunc == nil { - panic("Interface.DeviceGetMinMaxFanSpeedFunc: method is nil but Interface.DeviceGetMinMaxFanSpeed was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMinMaxFanSpeed.Lock() - mock.calls.DeviceGetMinMaxFanSpeed = append(mock.calls.DeviceGetMinMaxFanSpeed, callInfo) - mock.lockDeviceGetMinMaxFanSpeed.Unlock() - return mock.DeviceGetMinMaxFanSpeedFunc(device) -} - -// DeviceGetMinMaxFanSpeedCalls gets all the calls that were made to DeviceGetMinMaxFanSpeed. -// Check the length with: -// -// len(mockedInterface.DeviceGetMinMaxFanSpeedCalls()) -func (mock *Interface) DeviceGetMinMaxFanSpeedCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMinMaxFanSpeed.RLock() - calls = mock.calls.DeviceGetMinMaxFanSpeed - mock.lockDeviceGetMinMaxFanSpeed.RUnlock() - return calls -} - -// DeviceGetMinorNumber calls DeviceGetMinorNumberFunc. -func (mock *Interface) DeviceGetMinorNumber(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetMinorNumberFunc == nil { - panic("Interface.DeviceGetMinorNumberFunc: method is nil but Interface.DeviceGetMinorNumber was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMinorNumber.Lock() - mock.calls.DeviceGetMinorNumber = append(mock.calls.DeviceGetMinorNumber, callInfo) - mock.lockDeviceGetMinorNumber.Unlock() - return mock.DeviceGetMinorNumberFunc(device) -} - -// DeviceGetMinorNumberCalls gets all the calls that were made to DeviceGetMinorNumber. -// Check the length with: -// -// len(mockedInterface.DeviceGetMinorNumberCalls()) -func (mock *Interface) DeviceGetMinorNumberCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMinorNumber.RLock() - calls = mock.calls.DeviceGetMinorNumber - mock.lockDeviceGetMinorNumber.RUnlock() - return calls -} - -// DeviceGetModuleId calls DeviceGetModuleIdFunc. -func (mock *Interface) DeviceGetModuleId(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetModuleIdFunc == nil { - panic("Interface.DeviceGetModuleIdFunc: method is nil but Interface.DeviceGetModuleId was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetModuleId.Lock() - mock.calls.DeviceGetModuleId = append(mock.calls.DeviceGetModuleId, callInfo) - mock.lockDeviceGetModuleId.Unlock() - return mock.DeviceGetModuleIdFunc(device) -} - -// DeviceGetModuleIdCalls gets all the calls that were made to DeviceGetModuleId. -// Check the length with: -// -// len(mockedInterface.DeviceGetModuleIdCalls()) -func (mock *Interface) DeviceGetModuleIdCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetModuleId.RLock() - calls = mock.calls.DeviceGetModuleId - mock.lockDeviceGetModuleId.RUnlock() - return calls -} - -// DeviceGetMultiGpuBoard calls DeviceGetMultiGpuBoardFunc. -func (mock *Interface) DeviceGetMultiGpuBoard(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetMultiGpuBoardFunc == nil { - panic("Interface.DeviceGetMultiGpuBoardFunc: method is nil but Interface.DeviceGetMultiGpuBoard was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetMultiGpuBoard.Lock() - mock.calls.DeviceGetMultiGpuBoard = append(mock.calls.DeviceGetMultiGpuBoard, callInfo) - mock.lockDeviceGetMultiGpuBoard.Unlock() - return mock.DeviceGetMultiGpuBoardFunc(device) -} - -// DeviceGetMultiGpuBoardCalls gets all the calls that were made to DeviceGetMultiGpuBoard. -// Check the length with: -// -// len(mockedInterface.DeviceGetMultiGpuBoardCalls()) -func (mock *Interface) DeviceGetMultiGpuBoardCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetMultiGpuBoard.RLock() - calls = mock.calls.DeviceGetMultiGpuBoard - mock.lockDeviceGetMultiGpuBoard.RUnlock() - return calls -} - -// DeviceGetName calls DeviceGetNameFunc. -func (mock *Interface) DeviceGetName(device nvml.Device) (string, nvml.Return) { - if mock.DeviceGetNameFunc == nil { - panic("Interface.DeviceGetNameFunc: method is nil but Interface.DeviceGetName was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetName.Lock() - mock.calls.DeviceGetName = append(mock.calls.DeviceGetName, callInfo) - mock.lockDeviceGetName.Unlock() - return mock.DeviceGetNameFunc(device) -} - -// DeviceGetNameCalls gets all the calls that were made to DeviceGetName. -// Check the length with: -// -// len(mockedInterface.DeviceGetNameCalls()) -func (mock *Interface) DeviceGetNameCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetName.RLock() - calls = mock.calls.DeviceGetName - mock.lockDeviceGetName.RUnlock() - return calls -} - -// DeviceGetNumFans calls DeviceGetNumFansFunc. -func (mock *Interface) DeviceGetNumFans(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetNumFansFunc == nil { - panic("Interface.DeviceGetNumFansFunc: method is nil but Interface.DeviceGetNumFans was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetNumFans.Lock() - mock.calls.DeviceGetNumFans = append(mock.calls.DeviceGetNumFans, callInfo) - mock.lockDeviceGetNumFans.Unlock() - return mock.DeviceGetNumFansFunc(device) -} - -// DeviceGetNumFansCalls gets all the calls that were made to DeviceGetNumFans. -// Check the length with: -// -// len(mockedInterface.DeviceGetNumFansCalls()) -func (mock *Interface) DeviceGetNumFansCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetNumFans.RLock() - calls = mock.calls.DeviceGetNumFans - mock.lockDeviceGetNumFans.RUnlock() - return calls -} - -// DeviceGetNumGpuCores calls DeviceGetNumGpuCoresFunc. -func (mock *Interface) DeviceGetNumGpuCores(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetNumGpuCoresFunc == nil { - panic("Interface.DeviceGetNumGpuCoresFunc: method is nil but Interface.DeviceGetNumGpuCores was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetNumGpuCores.Lock() - mock.calls.DeviceGetNumGpuCores = append(mock.calls.DeviceGetNumGpuCores, callInfo) - mock.lockDeviceGetNumGpuCores.Unlock() - return mock.DeviceGetNumGpuCoresFunc(device) -} - -// DeviceGetNumGpuCoresCalls gets all the calls that were made to DeviceGetNumGpuCores. -// Check the length with: -// -// len(mockedInterface.DeviceGetNumGpuCoresCalls()) -func (mock *Interface) DeviceGetNumGpuCoresCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetNumGpuCores.RLock() - calls = mock.calls.DeviceGetNumGpuCores - mock.lockDeviceGetNumGpuCores.RUnlock() - return calls -} - -// DeviceGetNumaNodeId calls DeviceGetNumaNodeIdFunc. -func (mock *Interface) DeviceGetNumaNodeId(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetNumaNodeIdFunc == nil { - panic("Interface.DeviceGetNumaNodeIdFunc: method is nil but Interface.DeviceGetNumaNodeId was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetNumaNodeId.Lock() - mock.calls.DeviceGetNumaNodeId = append(mock.calls.DeviceGetNumaNodeId, callInfo) - mock.lockDeviceGetNumaNodeId.Unlock() - return mock.DeviceGetNumaNodeIdFunc(device) -} - -// DeviceGetNumaNodeIdCalls gets all the calls that were made to DeviceGetNumaNodeId. -// Check the length with: -// -// len(mockedInterface.DeviceGetNumaNodeIdCalls()) -func (mock *Interface) DeviceGetNumaNodeIdCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetNumaNodeId.RLock() - calls = mock.calls.DeviceGetNumaNodeId - mock.lockDeviceGetNumaNodeId.RUnlock() - return calls -} - -// DeviceGetNvLinkCapability calls DeviceGetNvLinkCapabilityFunc. -func (mock *Interface) DeviceGetNvLinkCapability(device nvml.Device, n int, nvLinkCapability nvml.NvLinkCapability) (uint32, nvml.Return) { - if mock.DeviceGetNvLinkCapabilityFunc == nil { - panic("Interface.DeviceGetNvLinkCapabilityFunc: method is nil but Interface.DeviceGetNvLinkCapability was just called") - } - callInfo := struct { - Device nvml.Device - N int - NvLinkCapability nvml.NvLinkCapability - }{ - Device: device, - N: n, - NvLinkCapability: nvLinkCapability, - } - mock.lockDeviceGetNvLinkCapability.Lock() - mock.calls.DeviceGetNvLinkCapability = append(mock.calls.DeviceGetNvLinkCapability, callInfo) - mock.lockDeviceGetNvLinkCapability.Unlock() - return mock.DeviceGetNvLinkCapabilityFunc(device, n, nvLinkCapability) -} - -// DeviceGetNvLinkCapabilityCalls gets all the calls that were made to DeviceGetNvLinkCapability. -// Check the length with: -// -// len(mockedInterface.DeviceGetNvLinkCapabilityCalls()) -func (mock *Interface) DeviceGetNvLinkCapabilityCalls() []struct { - Device nvml.Device - N int - NvLinkCapability nvml.NvLinkCapability -} { - var calls []struct { - Device nvml.Device - N int - NvLinkCapability nvml.NvLinkCapability - } - mock.lockDeviceGetNvLinkCapability.RLock() - calls = mock.calls.DeviceGetNvLinkCapability - mock.lockDeviceGetNvLinkCapability.RUnlock() - return calls -} - -// DeviceGetNvLinkErrorCounter calls DeviceGetNvLinkErrorCounterFunc. -func (mock *Interface) DeviceGetNvLinkErrorCounter(device nvml.Device, n int, nvLinkErrorCounter nvml.NvLinkErrorCounter) (uint64, nvml.Return) { - if mock.DeviceGetNvLinkErrorCounterFunc == nil { - panic("Interface.DeviceGetNvLinkErrorCounterFunc: method is nil but Interface.DeviceGetNvLinkErrorCounter was just called") - } - callInfo := struct { - Device nvml.Device - N int - NvLinkErrorCounter nvml.NvLinkErrorCounter - }{ - Device: device, - N: n, - NvLinkErrorCounter: nvLinkErrorCounter, - } - mock.lockDeviceGetNvLinkErrorCounter.Lock() - mock.calls.DeviceGetNvLinkErrorCounter = append(mock.calls.DeviceGetNvLinkErrorCounter, callInfo) - mock.lockDeviceGetNvLinkErrorCounter.Unlock() - return mock.DeviceGetNvLinkErrorCounterFunc(device, n, nvLinkErrorCounter) -} - -// DeviceGetNvLinkErrorCounterCalls gets all the calls that were made to DeviceGetNvLinkErrorCounter. -// Check the length with: -// -// len(mockedInterface.DeviceGetNvLinkErrorCounterCalls()) -func (mock *Interface) DeviceGetNvLinkErrorCounterCalls() []struct { - Device nvml.Device - N int - NvLinkErrorCounter nvml.NvLinkErrorCounter -} { - var calls []struct { - Device nvml.Device - N int - NvLinkErrorCounter nvml.NvLinkErrorCounter - } - mock.lockDeviceGetNvLinkErrorCounter.RLock() - calls = mock.calls.DeviceGetNvLinkErrorCounter - mock.lockDeviceGetNvLinkErrorCounter.RUnlock() - return calls -} - -// DeviceGetNvLinkInfo calls DeviceGetNvLinkInfoFunc. -func (mock *Interface) DeviceGetNvLinkInfo(device nvml.Device) nvml.NvLinkInfoHandler { - if mock.DeviceGetNvLinkInfoFunc == nil { - panic("Interface.DeviceGetNvLinkInfoFunc: method is nil but Interface.DeviceGetNvLinkInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetNvLinkInfo.Lock() - mock.calls.DeviceGetNvLinkInfo = append(mock.calls.DeviceGetNvLinkInfo, callInfo) - mock.lockDeviceGetNvLinkInfo.Unlock() - return mock.DeviceGetNvLinkInfoFunc(device) -} - -// DeviceGetNvLinkInfoCalls gets all the calls that were made to DeviceGetNvLinkInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetNvLinkInfoCalls()) -func (mock *Interface) DeviceGetNvLinkInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetNvLinkInfo.RLock() - calls = mock.calls.DeviceGetNvLinkInfo - mock.lockDeviceGetNvLinkInfo.RUnlock() - return calls -} - -// DeviceGetNvLinkRemoteDeviceType calls DeviceGetNvLinkRemoteDeviceTypeFunc. -func (mock *Interface) DeviceGetNvLinkRemoteDeviceType(device nvml.Device, n int) (nvml.IntNvLinkDeviceType, nvml.Return) { - if mock.DeviceGetNvLinkRemoteDeviceTypeFunc == nil { - panic("Interface.DeviceGetNvLinkRemoteDeviceTypeFunc: method is nil but Interface.DeviceGetNvLinkRemoteDeviceType was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetNvLinkRemoteDeviceType.Lock() - mock.calls.DeviceGetNvLinkRemoteDeviceType = append(mock.calls.DeviceGetNvLinkRemoteDeviceType, callInfo) - mock.lockDeviceGetNvLinkRemoteDeviceType.Unlock() - return mock.DeviceGetNvLinkRemoteDeviceTypeFunc(device, n) -} - -// DeviceGetNvLinkRemoteDeviceTypeCalls gets all the calls that were made to DeviceGetNvLinkRemoteDeviceType. -// Check the length with: -// -// len(mockedInterface.DeviceGetNvLinkRemoteDeviceTypeCalls()) -func (mock *Interface) DeviceGetNvLinkRemoteDeviceTypeCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetNvLinkRemoteDeviceType.RLock() - calls = mock.calls.DeviceGetNvLinkRemoteDeviceType - mock.lockDeviceGetNvLinkRemoteDeviceType.RUnlock() - return calls -} - -// DeviceGetNvLinkRemotePciInfo calls DeviceGetNvLinkRemotePciInfoFunc. -func (mock *Interface) DeviceGetNvLinkRemotePciInfo(device nvml.Device, n int) (nvml.PciInfo, nvml.Return) { - if mock.DeviceGetNvLinkRemotePciInfoFunc == nil { - panic("Interface.DeviceGetNvLinkRemotePciInfoFunc: method is nil but Interface.DeviceGetNvLinkRemotePciInfo was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetNvLinkRemotePciInfo.Lock() - mock.calls.DeviceGetNvLinkRemotePciInfo = append(mock.calls.DeviceGetNvLinkRemotePciInfo, callInfo) - mock.lockDeviceGetNvLinkRemotePciInfo.Unlock() - return mock.DeviceGetNvLinkRemotePciInfoFunc(device, n) -} - -// DeviceGetNvLinkRemotePciInfoCalls gets all the calls that were made to DeviceGetNvLinkRemotePciInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetNvLinkRemotePciInfoCalls()) -func (mock *Interface) DeviceGetNvLinkRemotePciInfoCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetNvLinkRemotePciInfo.RLock() - calls = mock.calls.DeviceGetNvLinkRemotePciInfo - mock.lockDeviceGetNvLinkRemotePciInfo.RUnlock() - return calls -} - -// DeviceGetNvLinkState calls DeviceGetNvLinkStateFunc. -func (mock *Interface) DeviceGetNvLinkState(device nvml.Device, n int) (nvml.EnableState, nvml.Return) { - if mock.DeviceGetNvLinkStateFunc == nil { - panic("Interface.DeviceGetNvLinkStateFunc: method is nil but Interface.DeviceGetNvLinkState was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetNvLinkState.Lock() - mock.calls.DeviceGetNvLinkState = append(mock.calls.DeviceGetNvLinkState, callInfo) - mock.lockDeviceGetNvLinkState.Unlock() - return mock.DeviceGetNvLinkStateFunc(device, n) -} - -// DeviceGetNvLinkStateCalls gets all the calls that were made to DeviceGetNvLinkState. -// Check the length with: -// -// len(mockedInterface.DeviceGetNvLinkStateCalls()) -func (mock *Interface) DeviceGetNvLinkStateCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetNvLinkState.RLock() - calls = mock.calls.DeviceGetNvLinkState - mock.lockDeviceGetNvLinkState.RUnlock() - return calls -} - -// DeviceGetNvLinkUtilizationControl calls DeviceGetNvLinkUtilizationControlFunc. -func (mock *Interface) DeviceGetNvLinkUtilizationControl(device nvml.Device, n1 int, n2 int) (nvml.NvLinkUtilizationControl, nvml.Return) { - if mock.DeviceGetNvLinkUtilizationControlFunc == nil { - panic("Interface.DeviceGetNvLinkUtilizationControlFunc: method is nil but Interface.DeviceGetNvLinkUtilizationControl was just called") - } - callInfo := struct { - Device nvml.Device - N1 int - N2 int - }{ - Device: device, - N1: n1, - N2: n2, - } - mock.lockDeviceGetNvLinkUtilizationControl.Lock() - mock.calls.DeviceGetNvLinkUtilizationControl = append(mock.calls.DeviceGetNvLinkUtilizationControl, callInfo) - mock.lockDeviceGetNvLinkUtilizationControl.Unlock() - return mock.DeviceGetNvLinkUtilizationControlFunc(device, n1, n2) -} - -// DeviceGetNvLinkUtilizationControlCalls gets all the calls that were made to DeviceGetNvLinkUtilizationControl. -// Check the length with: -// -// len(mockedInterface.DeviceGetNvLinkUtilizationControlCalls()) -func (mock *Interface) DeviceGetNvLinkUtilizationControlCalls() []struct { - Device nvml.Device - N1 int - N2 int -} { - var calls []struct { - Device nvml.Device - N1 int - N2 int - } - mock.lockDeviceGetNvLinkUtilizationControl.RLock() - calls = mock.calls.DeviceGetNvLinkUtilizationControl - mock.lockDeviceGetNvLinkUtilizationControl.RUnlock() - return calls -} - -// DeviceGetNvLinkUtilizationCounter calls DeviceGetNvLinkUtilizationCounterFunc. -func (mock *Interface) DeviceGetNvLinkUtilizationCounter(device nvml.Device, n1 int, n2 int) (uint64, uint64, nvml.Return) { - if mock.DeviceGetNvLinkUtilizationCounterFunc == nil { - panic("Interface.DeviceGetNvLinkUtilizationCounterFunc: method is nil but Interface.DeviceGetNvLinkUtilizationCounter was just called") - } - callInfo := struct { - Device nvml.Device - N1 int - N2 int - }{ - Device: device, - N1: n1, - N2: n2, - } - mock.lockDeviceGetNvLinkUtilizationCounter.Lock() - mock.calls.DeviceGetNvLinkUtilizationCounter = append(mock.calls.DeviceGetNvLinkUtilizationCounter, callInfo) - mock.lockDeviceGetNvLinkUtilizationCounter.Unlock() - return mock.DeviceGetNvLinkUtilizationCounterFunc(device, n1, n2) -} - -// DeviceGetNvLinkUtilizationCounterCalls gets all the calls that were made to DeviceGetNvLinkUtilizationCounter. -// Check the length with: -// -// len(mockedInterface.DeviceGetNvLinkUtilizationCounterCalls()) -func (mock *Interface) DeviceGetNvLinkUtilizationCounterCalls() []struct { - Device nvml.Device - N1 int - N2 int -} { - var calls []struct { - Device nvml.Device - N1 int - N2 int - } - mock.lockDeviceGetNvLinkUtilizationCounter.RLock() - calls = mock.calls.DeviceGetNvLinkUtilizationCounter - mock.lockDeviceGetNvLinkUtilizationCounter.RUnlock() - return calls -} - -// DeviceGetNvLinkVersion calls DeviceGetNvLinkVersionFunc. -func (mock *Interface) DeviceGetNvLinkVersion(device nvml.Device, n int) (uint32, nvml.Return) { - if mock.DeviceGetNvLinkVersionFunc == nil { - panic("Interface.DeviceGetNvLinkVersionFunc: method is nil but Interface.DeviceGetNvLinkVersion was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetNvLinkVersion.Lock() - mock.calls.DeviceGetNvLinkVersion = append(mock.calls.DeviceGetNvLinkVersion, callInfo) - mock.lockDeviceGetNvLinkVersion.Unlock() - return mock.DeviceGetNvLinkVersionFunc(device, n) -} - -// DeviceGetNvLinkVersionCalls gets all the calls that were made to DeviceGetNvLinkVersion. -// Check the length with: -// -// len(mockedInterface.DeviceGetNvLinkVersionCalls()) -func (mock *Interface) DeviceGetNvLinkVersionCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetNvLinkVersion.RLock() - calls = mock.calls.DeviceGetNvLinkVersion - mock.lockDeviceGetNvLinkVersion.RUnlock() - return calls -} - -// DeviceGetNvlinkBwMode calls DeviceGetNvlinkBwModeFunc. -func (mock *Interface) DeviceGetNvlinkBwMode(device nvml.Device) (nvml.NvlinkGetBwMode, nvml.Return) { - if mock.DeviceGetNvlinkBwModeFunc == nil { - panic("Interface.DeviceGetNvlinkBwModeFunc: method is nil but Interface.DeviceGetNvlinkBwMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetNvlinkBwMode.Lock() - mock.calls.DeviceGetNvlinkBwMode = append(mock.calls.DeviceGetNvlinkBwMode, callInfo) - mock.lockDeviceGetNvlinkBwMode.Unlock() - return mock.DeviceGetNvlinkBwModeFunc(device) -} - -// DeviceGetNvlinkBwModeCalls gets all the calls that were made to DeviceGetNvlinkBwMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetNvlinkBwModeCalls()) -func (mock *Interface) DeviceGetNvlinkBwModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetNvlinkBwMode.RLock() - calls = mock.calls.DeviceGetNvlinkBwMode - mock.lockDeviceGetNvlinkBwMode.RUnlock() - return calls -} - -// DeviceGetNvlinkSupportedBwModes calls DeviceGetNvlinkSupportedBwModesFunc. -func (mock *Interface) DeviceGetNvlinkSupportedBwModes(device nvml.Device) (nvml.NvlinkSupportedBwModes, nvml.Return) { - if mock.DeviceGetNvlinkSupportedBwModesFunc == nil { - panic("Interface.DeviceGetNvlinkSupportedBwModesFunc: method is nil but Interface.DeviceGetNvlinkSupportedBwModes was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetNvlinkSupportedBwModes.Lock() - mock.calls.DeviceGetNvlinkSupportedBwModes = append(mock.calls.DeviceGetNvlinkSupportedBwModes, callInfo) - mock.lockDeviceGetNvlinkSupportedBwModes.Unlock() - return mock.DeviceGetNvlinkSupportedBwModesFunc(device) -} - -// DeviceGetNvlinkSupportedBwModesCalls gets all the calls that were made to DeviceGetNvlinkSupportedBwModes. -// Check the length with: -// -// len(mockedInterface.DeviceGetNvlinkSupportedBwModesCalls()) -func (mock *Interface) DeviceGetNvlinkSupportedBwModesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetNvlinkSupportedBwModes.RLock() - calls = mock.calls.DeviceGetNvlinkSupportedBwModes - mock.lockDeviceGetNvlinkSupportedBwModes.RUnlock() - return calls -} - -// DeviceGetOfaUtilization calls DeviceGetOfaUtilizationFunc. -func (mock *Interface) DeviceGetOfaUtilization(device nvml.Device) (uint32, uint32, nvml.Return) { - if mock.DeviceGetOfaUtilizationFunc == nil { - panic("Interface.DeviceGetOfaUtilizationFunc: method is nil but Interface.DeviceGetOfaUtilization was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetOfaUtilization.Lock() - mock.calls.DeviceGetOfaUtilization = append(mock.calls.DeviceGetOfaUtilization, callInfo) - mock.lockDeviceGetOfaUtilization.Unlock() - return mock.DeviceGetOfaUtilizationFunc(device) -} - -// DeviceGetOfaUtilizationCalls gets all the calls that were made to DeviceGetOfaUtilization. -// Check the length with: -// -// len(mockedInterface.DeviceGetOfaUtilizationCalls()) -func (mock *Interface) DeviceGetOfaUtilizationCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetOfaUtilization.RLock() - calls = mock.calls.DeviceGetOfaUtilization - mock.lockDeviceGetOfaUtilization.RUnlock() - return calls -} - -// DeviceGetP2PStatus calls DeviceGetP2PStatusFunc. -func (mock *Interface) DeviceGetP2PStatus(device1 nvml.Device, device2 nvml.Device, gpuP2PCapsIndex nvml.GpuP2PCapsIndex) (nvml.GpuP2PStatus, nvml.Return) { - if mock.DeviceGetP2PStatusFunc == nil { - panic("Interface.DeviceGetP2PStatusFunc: method is nil but Interface.DeviceGetP2PStatus was just called") - } - callInfo := struct { - Device1 nvml.Device - Device2 nvml.Device - GpuP2PCapsIndex nvml.GpuP2PCapsIndex - }{ - Device1: device1, - Device2: device2, - GpuP2PCapsIndex: gpuP2PCapsIndex, - } - mock.lockDeviceGetP2PStatus.Lock() - mock.calls.DeviceGetP2PStatus = append(mock.calls.DeviceGetP2PStatus, callInfo) - mock.lockDeviceGetP2PStatus.Unlock() - return mock.DeviceGetP2PStatusFunc(device1, device2, gpuP2PCapsIndex) -} - -// DeviceGetP2PStatusCalls gets all the calls that were made to DeviceGetP2PStatus. -// Check the length with: -// -// len(mockedInterface.DeviceGetP2PStatusCalls()) -func (mock *Interface) DeviceGetP2PStatusCalls() []struct { - Device1 nvml.Device - Device2 nvml.Device - GpuP2PCapsIndex nvml.GpuP2PCapsIndex -} { - var calls []struct { - Device1 nvml.Device - Device2 nvml.Device - GpuP2PCapsIndex nvml.GpuP2PCapsIndex - } - mock.lockDeviceGetP2PStatus.RLock() - calls = mock.calls.DeviceGetP2PStatus - mock.lockDeviceGetP2PStatus.RUnlock() - return calls -} - -// DeviceGetPciInfo calls DeviceGetPciInfoFunc. -func (mock *Interface) DeviceGetPciInfo(device nvml.Device) (nvml.PciInfo, nvml.Return) { - if mock.DeviceGetPciInfoFunc == nil { - panic("Interface.DeviceGetPciInfoFunc: method is nil but Interface.DeviceGetPciInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPciInfo.Lock() - mock.calls.DeviceGetPciInfo = append(mock.calls.DeviceGetPciInfo, callInfo) - mock.lockDeviceGetPciInfo.Unlock() - return mock.DeviceGetPciInfoFunc(device) -} - -// DeviceGetPciInfoCalls gets all the calls that were made to DeviceGetPciInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetPciInfoCalls()) -func (mock *Interface) DeviceGetPciInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPciInfo.RLock() - calls = mock.calls.DeviceGetPciInfo - mock.lockDeviceGetPciInfo.RUnlock() - return calls -} - -// DeviceGetPciInfoExt calls DeviceGetPciInfoExtFunc. -func (mock *Interface) DeviceGetPciInfoExt(device nvml.Device) (nvml.PciInfoExt, nvml.Return) { - if mock.DeviceGetPciInfoExtFunc == nil { - panic("Interface.DeviceGetPciInfoExtFunc: method is nil but Interface.DeviceGetPciInfoExt was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPciInfoExt.Lock() - mock.calls.DeviceGetPciInfoExt = append(mock.calls.DeviceGetPciInfoExt, callInfo) - mock.lockDeviceGetPciInfoExt.Unlock() - return mock.DeviceGetPciInfoExtFunc(device) -} - -// DeviceGetPciInfoExtCalls gets all the calls that were made to DeviceGetPciInfoExt. -// Check the length with: -// -// len(mockedInterface.DeviceGetPciInfoExtCalls()) -func (mock *Interface) DeviceGetPciInfoExtCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPciInfoExt.RLock() - calls = mock.calls.DeviceGetPciInfoExt - mock.lockDeviceGetPciInfoExt.RUnlock() - return calls -} - -// DeviceGetPcieLinkMaxSpeed calls DeviceGetPcieLinkMaxSpeedFunc. -func (mock *Interface) DeviceGetPcieLinkMaxSpeed(device nvml.Device) (uint32, nvml.Return) { - if mock.DeviceGetPcieLinkMaxSpeedFunc == nil { - panic("Interface.DeviceGetPcieLinkMaxSpeedFunc: method is nil but Interface.DeviceGetPcieLinkMaxSpeed was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPcieLinkMaxSpeed.Lock() - mock.calls.DeviceGetPcieLinkMaxSpeed = append(mock.calls.DeviceGetPcieLinkMaxSpeed, callInfo) - mock.lockDeviceGetPcieLinkMaxSpeed.Unlock() - return mock.DeviceGetPcieLinkMaxSpeedFunc(device) -} - -// DeviceGetPcieLinkMaxSpeedCalls gets all the calls that were made to DeviceGetPcieLinkMaxSpeed. -// Check the length with: -// -// len(mockedInterface.DeviceGetPcieLinkMaxSpeedCalls()) -func (mock *Interface) DeviceGetPcieLinkMaxSpeedCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPcieLinkMaxSpeed.RLock() - calls = mock.calls.DeviceGetPcieLinkMaxSpeed - mock.lockDeviceGetPcieLinkMaxSpeed.RUnlock() - return calls -} - -// DeviceGetPcieReplayCounter calls DeviceGetPcieReplayCounterFunc. -func (mock *Interface) DeviceGetPcieReplayCounter(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetPcieReplayCounterFunc == nil { - panic("Interface.DeviceGetPcieReplayCounterFunc: method is nil but Interface.DeviceGetPcieReplayCounter was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPcieReplayCounter.Lock() - mock.calls.DeviceGetPcieReplayCounter = append(mock.calls.DeviceGetPcieReplayCounter, callInfo) - mock.lockDeviceGetPcieReplayCounter.Unlock() - return mock.DeviceGetPcieReplayCounterFunc(device) -} - -// DeviceGetPcieReplayCounterCalls gets all the calls that were made to DeviceGetPcieReplayCounter. -// Check the length with: -// -// len(mockedInterface.DeviceGetPcieReplayCounterCalls()) -func (mock *Interface) DeviceGetPcieReplayCounterCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPcieReplayCounter.RLock() - calls = mock.calls.DeviceGetPcieReplayCounter - mock.lockDeviceGetPcieReplayCounter.RUnlock() - return calls -} - -// DeviceGetPcieSpeed calls DeviceGetPcieSpeedFunc. -func (mock *Interface) DeviceGetPcieSpeed(device nvml.Device) (int, nvml.Return) { - if mock.DeviceGetPcieSpeedFunc == nil { - panic("Interface.DeviceGetPcieSpeedFunc: method is nil but Interface.DeviceGetPcieSpeed was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPcieSpeed.Lock() - mock.calls.DeviceGetPcieSpeed = append(mock.calls.DeviceGetPcieSpeed, callInfo) - mock.lockDeviceGetPcieSpeed.Unlock() - return mock.DeviceGetPcieSpeedFunc(device) -} - -// DeviceGetPcieSpeedCalls gets all the calls that were made to DeviceGetPcieSpeed. -// Check the length with: -// -// len(mockedInterface.DeviceGetPcieSpeedCalls()) -func (mock *Interface) DeviceGetPcieSpeedCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPcieSpeed.RLock() - calls = mock.calls.DeviceGetPcieSpeed - mock.lockDeviceGetPcieSpeed.RUnlock() - return calls -} - -// DeviceGetPcieThroughput calls DeviceGetPcieThroughputFunc. -func (mock *Interface) DeviceGetPcieThroughput(device nvml.Device, pcieUtilCounter nvml.PcieUtilCounter) (uint32, nvml.Return) { - if mock.DeviceGetPcieThroughputFunc == nil { - panic("Interface.DeviceGetPcieThroughputFunc: method is nil but Interface.DeviceGetPcieThroughput was just called") - } - callInfo := struct { - Device nvml.Device - PcieUtilCounter nvml.PcieUtilCounter - }{ - Device: device, - PcieUtilCounter: pcieUtilCounter, - } - mock.lockDeviceGetPcieThroughput.Lock() - mock.calls.DeviceGetPcieThroughput = append(mock.calls.DeviceGetPcieThroughput, callInfo) - mock.lockDeviceGetPcieThroughput.Unlock() - return mock.DeviceGetPcieThroughputFunc(device, pcieUtilCounter) -} - -// DeviceGetPcieThroughputCalls gets all the calls that were made to DeviceGetPcieThroughput. -// Check the length with: -// -// len(mockedInterface.DeviceGetPcieThroughputCalls()) -func (mock *Interface) DeviceGetPcieThroughputCalls() []struct { - Device nvml.Device - PcieUtilCounter nvml.PcieUtilCounter -} { - var calls []struct { - Device nvml.Device - PcieUtilCounter nvml.PcieUtilCounter - } - mock.lockDeviceGetPcieThroughput.RLock() - calls = mock.calls.DeviceGetPcieThroughput - mock.lockDeviceGetPcieThroughput.RUnlock() - return calls -} - -// DeviceGetPdi calls DeviceGetPdiFunc. -func (mock *Interface) DeviceGetPdi(device nvml.Device) (nvml.Pdi, nvml.Return) { - if mock.DeviceGetPdiFunc == nil { - panic("Interface.DeviceGetPdiFunc: method is nil but Interface.DeviceGetPdi was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPdi.Lock() - mock.calls.DeviceGetPdi = append(mock.calls.DeviceGetPdi, callInfo) - mock.lockDeviceGetPdi.Unlock() - return mock.DeviceGetPdiFunc(device) -} - -// DeviceGetPdiCalls gets all the calls that were made to DeviceGetPdi. -// Check the length with: -// -// len(mockedInterface.DeviceGetPdiCalls()) -func (mock *Interface) DeviceGetPdiCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPdi.RLock() - calls = mock.calls.DeviceGetPdi - mock.lockDeviceGetPdi.RUnlock() - return calls -} - -// DeviceGetPerformanceModes calls DeviceGetPerformanceModesFunc. -func (mock *Interface) DeviceGetPerformanceModes(device nvml.Device) (nvml.DevicePerfModes, nvml.Return) { - if mock.DeviceGetPerformanceModesFunc == nil { - panic("Interface.DeviceGetPerformanceModesFunc: method is nil but Interface.DeviceGetPerformanceModes was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPerformanceModes.Lock() - mock.calls.DeviceGetPerformanceModes = append(mock.calls.DeviceGetPerformanceModes, callInfo) - mock.lockDeviceGetPerformanceModes.Unlock() - return mock.DeviceGetPerformanceModesFunc(device) -} - -// DeviceGetPerformanceModesCalls gets all the calls that were made to DeviceGetPerformanceModes. -// Check the length with: -// -// len(mockedInterface.DeviceGetPerformanceModesCalls()) -func (mock *Interface) DeviceGetPerformanceModesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPerformanceModes.RLock() - calls = mock.calls.DeviceGetPerformanceModes - mock.lockDeviceGetPerformanceModes.RUnlock() - return calls -} - -// DeviceGetPerformanceState calls DeviceGetPerformanceStateFunc. -func (mock *Interface) DeviceGetPerformanceState(device nvml.Device) (nvml.Pstates, nvml.Return) { - if mock.DeviceGetPerformanceStateFunc == nil { - panic("Interface.DeviceGetPerformanceStateFunc: method is nil but Interface.DeviceGetPerformanceState was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPerformanceState.Lock() - mock.calls.DeviceGetPerformanceState = append(mock.calls.DeviceGetPerformanceState, callInfo) - mock.lockDeviceGetPerformanceState.Unlock() - return mock.DeviceGetPerformanceStateFunc(device) -} - -// DeviceGetPerformanceStateCalls gets all the calls that were made to DeviceGetPerformanceState. -// Check the length with: -// -// len(mockedInterface.DeviceGetPerformanceStateCalls()) -func (mock *Interface) DeviceGetPerformanceStateCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPerformanceState.RLock() - calls = mock.calls.DeviceGetPerformanceState - mock.lockDeviceGetPerformanceState.RUnlock() - return calls -} - -// DeviceGetPersistenceMode calls DeviceGetPersistenceModeFunc. -func (mock *Interface) DeviceGetPersistenceMode(device nvml.Device) (nvml.EnableState, nvml.Return) { - if mock.DeviceGetPersistenceModeFunc == nil { - panic("Interface.DeviceGetPersistenceModeFunc: method is nil but Interface.DeviceGetPersistenceMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPersistenceMode.Lock() - mock.calls.DeviceGetPersistenceMode = append(mock.calls.DeviceGetPersistenceMode, callInfo) - mock.lockDeviceGetPersistenceMode.Unlock() - return mock.DeviceGetPersistenceModeFunc(device) -} - -// DeviceGetPersistenceModeCalls gets all the calls that were made to DeviceGetPersistenceMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetPersistenceModeCalls()) -func (mock *Interface) DeviceGetPersistenceModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPersistenceMode.RLock() - calls = mock.calls.DeviceGetPersistenceMode - mock.lockDeviceGetPersistenceMode.RUnlock() - return calls -} - -// DeviceGetPgpuMetadataString calls DeviceGetPgpuMetadataStringFunc. -func (mock *Interface) DeviceGetPgpuMetadataString(device nvml.Device) (string, nvml.Return) { - if mock.DeviceGetPgpuMetadataStringFunc == nil { - panic("Interface.DeviceGetPgpuMetadataStringFunc: method is nil but Interface.DeviceGetPgpuMetadataString was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPgpuMetadataString.Lock() - mock.calls.DeviceGetPgpuMetadataString = append(mock.calls.DeviceGetPgpuMetadataString, callInfo) - mock.lockDeviceGetPgpuMetadataString.Unlock() - return mock.DeviceGetPgpuMetadataStringFunc(device) -} - -// DeviceGetPgpuMetadataStringCalls gets all the calls that were made to DeviceGetPgpuMetadataString. -// Check the length with: -// -// len(mockedInterface.DeviceGetPgpuMetadataStringCalls()) -func (mock *Interface) DeviceGetPgpuMetadataStringCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPgpuMetadataString.RLock() - calls = mock.calls.DeviceGetPgpuMetadataString - mock.lockDeviceGetPgpuMetadataString.RUnlock() - return calls -} - -// DeviceGetPlatformInfo calls DeviceGetPlatformInfoFunc. -func (mock *Interface) DeviceGetPlatformInfo(device nvml.Device) (nvml.PlatformInfo, nvml.Return) { - if mock.DeviceGetPlatformInfoFunc == nil { - panic("Interface.DeviceGetPlatformInfoFunc: method is nil but Interface.DeviceGetPlatformInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPlatformInfo.Lock() - mock.calls.DeviceGetPlatformInfo = append(mock.calls.DeviceGetPlatformInfo, callInfo) - mock.lockDeviceGetPlatformInfo.Unlock() - return mock.DeviceGetPlatformInfoFunc(device) -} - -// DeviceGetPlatformInfoCalls gets all the calls that were made to DeviceGetPlatformInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetPlatformInfoCalls()) -func (mock *Interface) DeviceGetPlatformInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPlatformInfo.RLock() - calls = mock.calls.DeviceGetPlatformInfo - mock.lockDeviceGetPlatformInfo.RUnlock() - return calls -} - -// DeviceGetPowerManagementDefaultLimit calls DeviceGetPowerManagementDefaultLimitFunc. -func (mock *Interface) DeviceGetPowerManagementDefaultLimit(device nvml.Device) (uint32, nvml.Return) { - if mock.DeviceGetPowerManagementDefaultLimitFunc == nil { - panic("Interface.DeviceGetPowerManagementDefaultLimitFunc: method is nil but Interface.DeviceGetPowerManagementDefaultLimit was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPowerManagementDefaultLimit.Lock() - mock.calls.DeviceGetPowerManagementDefaultLimit = append(mock.calls.DeviceGetPowerManagementDefaultLimit, callInfo) - mock.lockDeviceGetPowerManagementDefaultLimit.Unlock() - return mock.DeviceGetPowerManagementDefaultLimitFunc(device) -} - -// DeviceGetPowerManagementDefaultLimitCalls gets all the calls that were made to DeviceGetPowerManagementDefaultLimit. -// Check the length with: -// -// len(mockedInterface.DeviceGetPowerManagementDefaultLimitCalls()) -func (mock *Interface) DeviceGetPowerManagementDefaultLimitCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPowerManagementDefaultLimit.RLock() - calls = mock.calls.DeviceGetPowerManagementDefaultLimit - mock.lockDeviceGetPowerManagementDefaultLimit.RUnlock() - return calls -} - -// DeviceGetPowerManagementLimit calls DeviceGetPowerManagementLimitFunc. -func (mock *Interface) DeviceGetPowerManagementLimit(device nvml.Device) (uint32, nvml.Return) { - if mock.DeviceGetPowerManagementLimitFunc == nil { - panic("Interface.DeviceGetPowerManagementLimitFunc: method is nil but Interface.DeviceGetPowerManagementLimit was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPowerManagementLimit.Lock() - mock.calls.DeviceGetPowerManagementLimit = append(mock.calls.DeviceGetPowerManagementLimit, callInfo) - mock.lockDeviceGetPowerManagementLimit.Unlock() - return mock.DeviceGetPowerManagementLimitFunc(device) -} - -// DeviceGetPowerManagementLimitCalls gets all the calls that were made to DeviceGetPowerManagementLimit. -// Check the length with: -// -// len(mockedInterface.DeviceGetPowerManagementLimitCalls()) -func (mock *Interface) DeviceGetPowerManagementLimitCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPowerManagementLimit.RLock() - calls = mock.calls.DeviceGetPowerManagementLimit - mock.lockDeviceGetPowerManagementLimit.RUnlock() - return calls -} - -// DeviceGetPowerManagementLimitConstraints calls DeviceGetPowerManagementLimitConstraintsFunc. -func (mock *Interface) DeviceGetPowerManagementLimitConstraints(device nvml.Device) (uint32, uint32, nvml.Return) { - if mock.DeviceGetPowerManagementLimitConstraintsFunc == nil { - panic("Interface.DeviceGetPowerManagementLimitConstraintsFunc: method is nil but Interface.DeviceGetPowerManagementLimitConstraints was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPowerManagementLimitConstraints.Lock() - mock.calls.DeviceGetPowerManagementLimitConstraints = append(mock.calls.DeviceGetPowerManagementLimitConstraints, callInfo) - mock.lockDeviceGetPowerManagementLimitConstraints.Unlock() - return mock.DeviceGetPowerManagementLimitConstraintsFunc(device) -} - -// DeviceGetPowerManagementLimitConstraintsCalls gets all the calls that were made to DeviceGetPowerManagementLimitConstraints. -// Check the length with: -// -// len(mockedInterface.DeviceGetPowerManagementLimitConstraintsCalls()) -func (mock *Interface) DeviceGetPowerManagementLimitConstraintsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPowerManagementLimitConstraints.RLock() - calls = mock.calls.DeviceGetPowerManagementLimitConstraints - mock.lockDeviceGetPowerManagementLimitConstraints.RUnlock() - return calls -} - -// DeviceGetPowerManagementMode calls DeviceGetPowerManagementModeFunc. -func (mock *Interface) DeviceGetPowerManagementMode(device nvml.Device) (nvml.EnableState, nvml.Return) { - if mock.DeviceGetPowerManagementModeFunc == nil { - panic("Interface.DeviceGetPowerManagementModeFunc: method is nil but Interface.DeviceGetPowerManagementMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPowerManagementMode.Lock() - mock.calls.DeviceGetPowerManagementMode = append(mock.calls.DeviceGetPowerManagementMode, callInfo) - mock.lockDeviceGetPowerManagementMode.Unlock() - return mock.DeviceGetPowerManagementModeFunc(device) -} - -// DeviceGetPowerManagementModeCalls gets all the calls that were made to DeviceGetPowerManagementMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetPowerManagementModeCalls()) -func (mock *Interface) DeviceGetPowerManagementModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPowerManagementMode.RLock() - calls = mock.calls.DeviceGetPowerManagementMode - mock.lockDeviceGetPowerManagementMode.RUnlock() - return calls -} - -// DeviceGetPowerMizerMode_v1 calls DeviceGetPowerMizerMode_v1Func. -func (mock *Interface) DeviceGetPowerMizerMode_v1(device nvml.Device) (nvml.DevicePowerMizerModes_v1, nvml.Return) { - if mock.DeviceGetPowerMizerMode_v1Func == nil { - panic("Interface.DeviceGetPowerMizerMode_v1Func: method is nil but Interface.DeviceGetPowerMizerMode_v1 was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPowerMizerMode_v1.Lock() - mock.calls.DeviceGetPowerMizerMode_v1 = append(mock.calls.DeviceGetPowerMizerMode_v1, callInfo) - mock.lockDeviceGetPowerMizerMode_v1.Unlock() - return mock.DeviceGetPowerMizerMode_v1Func(device) -} - -// DeviceGetPowerMizerMode_v1Calls gets all the calls that were made to DeviceGetPowerMizerMode_v1. -// Check the length with: -// -// len(mockedInterface.DeviceGetPowerMizerMode_v1Calls()) -func (mock *Interface) DeviceGetPowerMizerMode_v1Calls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPowerMizerMode_v1.RLock() - calls = mock.calls.DeviceGetPowerMizerMode_v1 - mock.lockDeviceGetPowerMizerMode_v1.RUnlock() - return calls -} - -// DeviceGetPowerSource calls DeviceGetPowerSourceFunc. -func (mock *Interface) DeviceGetPowerSource(device nvml.Device) (nvml.PowerSource, nvml.Return) { - if mock.DeviceGetPowerSourceFunc == nil { - panic("Interface.DeviceGetPowerSourceFunc: method is nil but Interface.DeviceGetPowerSource was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPowerSource.Lock() - mock.calls.DeviceGetPowerSource = append(mock.calls.DeviceGetPowerSource, callInfo) - mock.lockDeviceGetPowerSource.Unlock() - return mock.DeviceGetPowerSourceFunc(device) -} - -// DeviceGetPowerSourceCalls gets all the calls that were made to DeviceGetPowerSource. -// Check the length with: -// -// len(mockedInterface.DeviceGetPowerSourceCalls()) -func (mock *Interface) DeviceGetPowerSourceCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPowerSource.RLock() - calls = mock.calls.DeviceGetPowerSource - mock.lockDeviceGetPowerSource.RUnlock() - return calls -} - -// DeviceGetPowerState calls DeviceGetPowerStateFunc. -func (mock *Interface) DeviceGetPowerState(device nvml.Device) (nvml.Pstates, nvml.Return) { - if mock.DeviceGetPowerStateFunc == nil { - panic("Interface.DeviceGetPowerStateFunc: method is nil but Interface.DeviceGetPowerState was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPowerState.Lock() - mock.calls.DeviceGetPowerState = append(mock.calls.DeviceGetPowerState, callInfo) - mock.lockDeviceGetPowerState.Unlock() - return mock.DeviceGetPowerStateFunc(device) -} - -// DeviceGetPowerStateCalls gets all the calls that were made to DeviceGetPowerState. -// Check the length with: -// -// len(mockedInterface.DeviceGetPowerStateCalls()) -func (mock *Interface) DeviceGetPowerStateCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPowerState.RLock() - calls = mock.calls.DeviceGetPowerState - mock.lockDeviceGetPowerState.RUnlock() - return calls -} - -// DeviceGetPowerUsage calls DeviceGetPowerUsageFunc. -func (mock *Interface) DeviceGetPowerUsage(device nvml.Device) (uint32, nvml.Return) { - if mock.DeviceGetPowerUsageFunc == nil { - panic("Interface.DeviceGetPowerUsageFunc: method is nil but Interface.DeviceGetPowerUsage was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetPowerUsage.Lock() - mock.calls.DeviceGetPowerUsage = append(mock.calls.DeviceGetPowerUsage, callInfo) - mock.lockDeviceGetPowerUsage.Unlock() - return mock.DeviceGetPowerUsageFunc(device) -} - -// DeviceGetPowerUsageCalls gets all the calls that were made to DeviceGetPowerUsage. -// Check the length with: -// -// len(mockedInterface.DeviceGetPowerUsageCalls()) -func (mock *Interface) DeviceGetPowerUsageCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetPowerUsage.RLock() - calls = mock.calls.DeviceGetPowerUsage - mock.lockDeviceGetPowerUsage.RUnlock() - return calls -} - -// DeviceGetProcessUtilization calls DeviceGetProcessUtilizationFunc. -func (mock *Interface) DeviceGetProcessUtilization(device nvml.Device, v uint64) ([]nvml.ProcessUtilizationSample, nvml.Return) { - if mock.DeviceGetProcessUtilizationFunc == nil { - panic("Interface.DeviceGetProcessUtilizationFunc: method is nil but Interface.DeviceGetProcessUtilization was just called") - } - callInfo := struct { - Device nvml.Device - V uint64 - }{ - Device: device, - V: v, - } - mock.lockDeviceGetProcessUtilization.Lock() - mock.calls.DeviceGetProcessUtilization = append(mock.calls.DeviceGetProcessUtilization, callInfo) - mock.lockDeviceGetProcessUtilization.Unlock() - return mock.DeviceGetProcessUtilizationFunc(device, v) -} - -// DeviceGetProcessUtilizationCalls gets all the calls that were made to DeviceGetProcessUtilization. -// Check the length with: -// -// len(mockedInterface.DeviceGetProcessUtilizationCalls()) -func (mock *Interface) DeviceGetProcessUtilizationCalls() []struct { - Device nvml.Device - V uint64 -} { - var calls []struct { - Device nvml.Device - V uint64 - } - mock.lockDeviceGetProcessUtilization.RLock() - calls = mock.calls.DeviceGetProcessUtilization - mock.lockDeviceGetProcessUtilization.RUnlock() - return calls -} - -// DeviceGetProcessesUtilizationInfo calls DeviceGetProcessesUtilizationInfoFunc. -func (mock *Interface) DeviceGetProcessesUtilizationInfo(device nvml.Device) (nvml.ProcessesUtilizationInfo, nvml.Return) { - if mock.DeviceGetProcessesUtilizationInfoFunc == nil { - panic("Interface.DeviceGetProcessesUtilizationInfoFunc: method is nil but Interface.DeviceGetProcessesUtilizationInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetProcessesUtilizationInfo.Lock() - mock.calls.DeviceGetProcessesUtilizationInfo = append(mock.calls.DeviceGetProcessesUtilizationInfo, callInfo) - mock.lockDeviceGetProcessesUtilizationInfo.Unlock() - return mock.DeviceGetProcessesUtilizationInfoFunc(device) -} - -// DeviceGetProcessesUtilizationInfoCalls gets all the calls that were made to DeviceGetProcessesUtilizationInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetProcessesUtilizationInfoCalls()) -func (mock *Interface) DeviceGetProcessesUtilizationInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetProcessesUtilizationInfo.RLock() - calls = mock.calls.DeviceGetProcessesUtilizationInfo - mock.lockDeviceGetProcessesUtilizationInfo.RUnlock() - return calls -} - -// DeviceGetRemappedRows calls DeviceGetRemappedRowsFunc. -func (mock *Interface) DeviceGetRemappedRows(device nvml.Device) (int, int, bool, bool, nvml.Return) { - if mock.DeviceGetRemappedRowsFunc == nil { - panic("Interface.DeviceGetRemappedRowsFunc: method is nil but Interface.DeviceGetRemappedRows was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetRemappedRows.Lock() - mock.calls.DeviceGetRemappedRows = append(mock.calls.DeviceGetRemappedRows, callInfo) - mock.lockDeviceGetRemappedRows.Unlock() - return mock.DeviceGetRemappedRowsFunc(device) -} - -// DeviceGetRemappedRowsCalls gets all the calls that were made to DeviceGetRemappedRows. -// Check the length with: -// -// len(mockedInterface.DeviceGetRemappedRowsCalls()) -func (mock *Interface) DeviceGetRemappedRowsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetRemappedRows.RLock() - calls = mock.calls.DeviceGetRemappedRows - mock.lockDeviceGetRemappedRows.RUnlock() - return calls -} - -// DeviceGetRepairStatus calls DeviceGetRepairStatusFunc. -func (mock *Interface) DeviceGetRepairStatus(device nvml.Device) (nvml.RepairStatus, nvml.Return) { - if mock.DeviceGetRepairStatusFunc == nil { - panic("Interface.DeviceGetRepairStatusFunc: method is nil but Interface.DeviceGetRepairStatus was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetRepairStatus.Lock() - mock.calls.DeviceGetRepairStatus = append(mock.calls.DeviceGetRepairStatus, callInfo) - mock.lockDeviceGetRepairStatus.Unlock() - return mock.DeviceGetRepairStatusFunc(device) -} - -// DeviceGetRepairStatusCalls gets all the calls that were made to DeviceGetRepairStatus. -// Check the length with: -// -// len(mockedInterface.DeviceGetRepairStatusCalls()) -func (mock *Interface) DeviceGetRepairStatusCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetRepairStatus.RLock() - calls = mock.calls.DeviceGetRepairStatus - mock.lockDeviceGetRepairStatus.RUnlock() - return calls -} - -// DeviceGetRetiredPages calls DeviceGetRetiredPagesFunc. -func (mock *Interface) DeviceGetRetiredPages(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, nvml.Return) { - if mock.DeviceGetRetiredPagesFunc == nil { - panic("Interface.DeviceGetRetiredPagesFunc: method is nil but Interface.DeviceGetRetiredPages was just called") - } - callInfo := struct { - Device nvml.Device - PageRetirementCause nvml.PageRetirementCause - }{ - Device: device, - PageRetirementCause: pageRetirementCause, - } - mock.lockDeviceGetRetiredPages.Lock() - mock.calls.DeviceGetRetiredPages = append(mock.calls.DeviceGetRetiredPages, callInfo) - mock.lockDeviceGetRetiredPages.Unlock() - return mock.DeviceGetRetiredPagesFunc(device, pageRetirementCause) -} - -// DeviceGetRetiredPagesCalls gets all the calls that were made to DeviceGetRetiredPages. -// Check the length with: -// -// len(mockedInterface.DeviceGetRetiredPagesCalls()) -func (mock *Interface) DeviceGetRetiredPagesCalls() []struct { - Device nvml.Device - PageRetirementCause nvml.PageRetirementCause -} { - var calls []struct { - Device nvml.Device - PageRetirementCause nvml.PageRetirementCause - } - mock.lockDeviceGetRetiredPages.RLock() - calls = mock.calls.DeviceGetRetiredPages - mock.lockDeviceGetRetiredPages.RUnlock() - return calls -} - -// DeviceGetRetiredPagesPendingStatus calls DeviceGetRetiredPagesPendingStatusFunc. -func (mock *Interface) DeviceGetRetiredPagesPendingStatus(device nvml.Device) (nvml.EnableState, nvml.Return) { - if mock.DeviceGetRetiredPagesPendingStatusFunc == nil { - panic("Interface.DeviceGetRetiredPagesPendingStatusFunc: method is nil but Interface.DeviceGetRetiredPagesPendingStatus was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetRetiredPagesPendingStatus.Lock() - mock.calls.DeviceGetRetiredPagesPendingStatus = append(mock.calls.DeviceGetRetiredPagesPendingStatus, callInfo) - mock.lockDeviceGetRetiredPagesPendingStatus.Unlock() - return mock.DeviceGetRetiredPagesPendingStatusFunc(device) -} - -// DeviceGetRetiredPagesPendingStatusCalls gets all the calls that were made to DeviceGetRetiredPagesPendingStatus. -// Check the length with: -// -// len(mockedInterface.DeviceGetRetiredPagesPendingStatusCalls()) -func (mock *Interface) DeviceGetRetiredPagesPendingStatusCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetRetiredPagesPendingStatus.RLock() - calls = mock.calls.DeviceGetRetiredPagesPendingStatus - mock.lockDeviceGetRetiredPagesPendingStatus.RUnlock() - return calls -} - -// DeviceGetRetiredPages_v2 calls DeviceGetRetiredPages_v2Func. -func (mock *Interface) DeviceGetRetiredPages_v2(device nvml.Device, pageRetirementCause nvml.PageRetirementCause) ([]uint64, []uint64, nvml.Return) { - if mock.DeviceGetRetiredPages_v2Func == nil { - panic("Interface.DeviceGetRetiredPages_v2Func: method is nil but Interface.DeviceGetRetiredPages_v2 was just called") - } - callInfo := struct { - Device nvml.Device - PageRetirementCause nvml.PageRetirementCause - }{ - Device: device, - PageRetirementCause: pageRetirementCause, - } - mock.lockDeviceGetRetiredPages_v2.Lock() - mock.calls.DeviceGetRetiredPages_v2 = append(mock.calls.DeviceGetRetiredPages_v2, callInfo) - mock.lockDeviceGetRetiredPages_v2.Unlock() - return mock.DeviceGetRetiredPages_v2Func(device, pageRetirementCause) -} - -// DeviceGetRetiredPages_v2Calls gets all the calls that were made to DeviceGetRetiredPages_v2. -// Check the length with: -// -// len(mockedInterface.DeviceGetRetiredPages_v2Calls()) -func (mock *Interface) DeviceGetRetiredPages_v2Calls() []struct { - Device nvml.Device - PageRetirementCause nvml.PageRetirementCause -} { - var calls []struct { - Device nvml.Device - PageRetirementCause nvml.PageRetirementCause - } - mock.lockDeviceGetRetiredPages_v2.RLock() - calls = mock.calls.DeviceGetRetiredPages_v2 - mock.lockDeviceGetRetiredPages_v2.RUnlock() - return calls -} - -// DeviceGetRowRemapperHistogram calls DeviceGetRowRemapperHistogramFunc. -func (mock *Interface) DeviceGetRowRemapperHistogram(device nvml.Device) (nvml.RowRemapperHistogramValues, nvml.Return) { - if mock.DeviceGetRowRemapperHistogramFunc == nil { - panic("Interface.DeviceGetRowRemapperHistogramFunc: method is nil but Interface.DeviceGetRowRemapperHistogram was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetRowRemapperHistogram.Lock() - mock.calls.DeviceGetRowRemapperHistogram = append(mock.calls.DeviceGetRowRemapperHistogram, callInfo) - mock.lockDeviceGetRowRemapperHistogram.Unlock() - return mock.DeviceGetRowRemapperHistogramFunc(device) -} - -// DeviceGetRowRemapperHistogramCalls gets all the calls that were made to DeviceGetRowRemapperHistogram. -// Check the length with: -// -// len(mockedInterface.DeviceGetRowRemapperHistogramCalls()) -func (mock *Interface) DeviceGetRowRemapperHistogramCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetRowRemapperHistogram.RLock() - calls = mock.calls.DeviceGetRowRemapperHistogram - mock.lockDeviceGetRowRemapperHistogram.RUnlock() - return calls -} - -// DeviceGetRunningProcessDetailList calls DeviceGetRunningProcessDetailListFunc. -func (mock *Interface) DeviceGetRunningProcessDetailList(device nvml.Device) (nvml.ProcessDetailList, nvml.Return) { - if mock.DeviceGetRunningProcessDetailListFunc == nil { - panic("Interface.DeviceGetRunningProcessDetailListFunc: method is nil but Interface.DeviceGetRunningProcessDetailList was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetRunningProcessDetailList.Lock() - mock.calls.DeviceGetRunningProcessDetailList = append(mock.calls.DeviceGetRunningProcessDetailList, callInfo) - mock.lockDeviceGetRunningProcessDetailList.Unlock() - return mock.DeviceGetRunningProcessDetailListFunc(device) -} - -// DeviceGetRunningProcessDetailListCalls gets all the calls that were made to DeviceGetRunningProcessDetailList. -// Check the length with: -// -// len(mockedInterface.DeviceGetRunningProcessDetailListCalls()) -func (mock *Interface) DeviceGetRunningProcessDetailListCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetRunningProcessDetailList.RLock() - calls = mock.calls.DeviceGetRunningProcessDetailList - mock.lockDeviceGetRunningProcessDetailList.RUnlock() - return calls -} - -// DeviceGetSamples calls DeviceGetSamplesFunc. -func (mock *Interface) DeviceGetSamples(device nvml.Device, samplingType nvml.SamplingType, v uint64) (nvml.ValueType, []nvml.Sample, nvml.Return) { - if mock.DeviceGetSamplesFunc == nil { - panic("Interface.DeviceGetSamplesFunc: method is nil but Interface.DeviceGetSamples was just called") - } - callInfo := struct { - Device nvml.Device - SamplingType nvml.SamplingType - V uint64 - }{ - Device: device, - SamplingType: samplingType, - V: v, - } - mock.lockDeviceGetSamples.Lock() - mock.calls.DeviceGetSamples = append(mock.calls.DeviceGetSamples, callInfo) - mock.lockDeviceGetSamples.Unlock() - return mock.DeviceGetSamplesFunc(device, samplingType, v) -} - -// DeviceGetSamplesCalls gets all the calls that were made to DeviceGetSamples. -// Check the length with: -// -// len(mockedInterface.DeviceGetSamplesCalls()) -func (mock *Interface) DeviceGetSamplesCalls() []struct { - Device nvml.Device - SamplingType nvml.SamplingType - V uint64 -} { - var calls []struct { - Device nvml.Device - SamplingType nvml.SamplingType - V uint64 - } - mock.lockDeviceGetSamples.RLock() - calls = mock.calls.DeviceGetSamples - mock.lockDeviceGetSamples.RUnlock() - return calls -} - -// DeviceGetSerial calls DeviceGetSerialFunc. -func (mock *Interface) DeviceGetSerial(device nvml.Device) (string, nvml.Return) { - if mock.DeviceGetSerialFunc == nil { - panic("Interface.DeviceGetSerialFunc: method is nil but Interface.DeviceGetSerial was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetSerial.Lock() - mock.calls.DeviceGetSerial = append(mock.calls.DeviceGetSerial, callInfo) - mock.lockDeviceGetSerial.Unlock() - return mock.DeviceGetSerialFunc(device) -} - -// DeviceGetSerialCalls gets all the calls that were made to DeviceGetSerial. -// Check the length with: -// -// len(mockedInterface.DeviceGetSerialCalls()) -func (mock *Interface) DeviceGetSerialCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetSerial.RLock() - calls = mock.calls.DeviceGetSerial - mock.lockDeviceGetSerial.RUnlock() - return calls -} - -// DeviceGetSramEccErrorStatus calls DeviceGetSramEccErrorStatusFunc. -func (mock *Interface) DeviceGetSramEccErrorStatus(device nvml.Device) (nvml.EccSramErrorStatus, nvml.Return) { - if mock.DeviceGetSramEccErrorStatusFunc == nil { - panic("Interface.DeviceGetSramEccErrorStatusFunc: method is nil but Interface.DeviceGetSramEccErrorStatus was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetSramEccErrorStatus.Lock() - mock.calls.DeviceGetSramEccErrorStatus = append(mock.calls.DeviceGetSramEccErrorStatus, callInfo) - mock.lockDeviceGetSramEccErrorStatus.Unlock() - return mock.DeviceGetSramEccErrorStatusFunc(device) -} - -// DeviceGetSramEccErrorStatusCalls gets all the calls that were made to DeviceGetSramEccErrorStatus. -// Check the length with: -// -// len(mockedInterface.DeviceGetSramEccErrorStatusCalls()) -func (mock *Interface) DeviceGetSramEccErrorStatusCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetSramEccErrorStatus.RLock() - calls = mock.calls.DeviceGetSramEccErrorStatus - mock.lockDeviceGetSramEccErrorStatus.RUnlock() - return calls -} - -// DeviceGetSramUniqueUncorrectedEccErrorCounts calls DeviceGetSramUniqueUncorrectedEccErrorCountsFunc. -func (mock *Interface) DeviceGetSramUniqueUncorrectedEccErrorCounts(device nvml.Device, eccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts) nvml.Return { - if mock.DeviceGetSramUniqueUncorrectedEccErrorCountsFunc == nil { - panic("Interface.DeviceGetSramUniqueUncorrectedEccErrorCountsFunc: method is nil but Interface.DeviceGetSramUniqueUncorrectedEccErrorCounts was just called") - } - callInfo := struct { - Device nvml.Device - EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts - }{ - Device: device, - EccSramUniqueUncorrectedErrorCounts: eccSramUniqueUncorrectedErrorCounts, - } - mock.lockDeviceGetSramUniqueUncorrectedEccErrorCounts.Lock() - mock.calls.DeviceGetSramUniqueUncorrectedEccErrorCounts = append(mock.calls.DeviceGetSramUniqueUncorrectedEccErrorCounts, callInfo) - mock.lockDeviceGetSramUniqueUncorrectedEccErrorCounts.Unlock() - return mock.DeviceGetSramUniqueUncorrectedEccErrorCountsFunc(device, eccSramUniqueUncorrectedErrorCounts) -} - -// DeviceGetSramUniqueUncorrectedEccErrorCountsCalls gets all the calls that were made to DeviceGetSramUniqueUncorrectedEccErrorCounts. -// Check the length with: -// -// len(mockedInterface.DeviceGetSramUniqueUncorrectedEccErrorCountsCalls()) -func (mock *Interface) DeviceGetSramUniqueUncorrectedEccErrorCountsCalls() []struct { - Device nvml.Device - EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts -} { - var calls []struct { - Device nvml.Device - EccSramUniqueUncorrectedErrorCounts *nvml.EccSramUniqueUncorrectedErrorCounts - } - mock.lockDeviceGetSramUniqueUncorrectedEccErrorCounts.RLock() - calls = mock.calls.DeviceGetSramUniqueUncorrectedEccErrorCounts - mock.lockDeviceGetSramUniqueUncorrectedEccErrorCounts.RUnlock() - return calls -} - -// DeviceGetSupportedClocksEventReasons calls DeviceGetSupportedClocksEventReasonsFunc. -func (mock *Interface) DeviceGetSupportedClocksEventReasons(device nvml.Device) (uint64, nvml.Return) { - if mock.DeviceGetSupportedClocksEventReasonsFunc == nil { - panic("Interface.DeviceGetSupportedClocksEventReasonsFunc: method is nil but Interface.DeviceGetSupportedClocksEventReasons was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetSupportedClocksEventReasons.Lock() - mock.calls.DeviceGetSupportedClocksEventReasons = append(mock.calls.DeviceGetSupportedClocksEventReasons, callInfo) - mock.lockDeviceGetSupportedClocksEventReasons.Unlock() - return mock.DeviceGetSupportedClocksEventReasonsFunc(device) -} - -// DeviceGetSupportedClocksEventReasonsCalls gets all the calls that were made to DeviceGetSupportedClocksEventReasons. -// Check the length with: -// -// len(mockedInterface.DeviceGetSupportedClocksEventReasonsCalls()) -func (mock *Interface) DeviceGetSupportedClocksEventReasonsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetSupportedClocksEventReasons.RLock() - calls = mock.calls.DeviceGetSupportedClocksEventReasons - mock.lockDeviceGetSupportedClocksEventReasons.RUnlock() - return calls -} - -// DeviceGetSupportedClocksThrottleReasons calls DeviceGetSupportedClocksThrottleReasonsFunc. -func (mock *Interface) DeviceGetSupportedClocksThrottleReasons(device nvml.Device) (uint64, nvml.Return) { - if mock.DeviceGetSupportedClocksThrottleReasonsFunc == nil { - panic("Interface.DeviceGetSupportedClocksThrottleReasonsFunc: method is nil but Interface.DeviceGetSupportedClocksThrottleReasons was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetSupportedClocksThrottleReasons.Lock() - mock.calls.DeviceGetSupportedClocksThrottleReasons = append(mock.calls.DeviceGetSupportedClocksThrottleReasons, callInfo) - mock.lockDeviceGetSupportedClocksThrottleReasons.Unlock() - return mock.DeviceGetSupportedClocksThrottleReasonsFunc(device) -} - -// DeviceGetSupportedClocksThrottleReasonsCalls gets all the calls that were made to DeviceGetSupportedClocksThrottleReasons. -// Check the length with: -// -// len(mockedInterface.DeviceGetSupportedClocksThrottleReasonsCalls()) -func (mock *Interface) DeviceGetSupportedClocksThrottleReasonsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetSupportedClocksThrottleReasons.RLock() - calls = mock.calls.DeviceGetSupportedClocksThrottleReasons - mock.lockDeviceGetSupportedClocksThrottleReasons.RUnlock() - return calls -} - -// DeviceGetSupportedEventTypes calls DeviceGetSupportedEventTypesFunc. -func (mock *Interface) DeviceGetSupportedEventTypes(device nvml.Device) (uint64, nvml.Return) { - if mock.DeviceGetSupportedEventTypesFunc == nil { - panic("Interface.DeviceGetSupportedEventTypesFunc: method is nil but Interface.DeviceGetSupportedEventTypes was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetSupportedEventTypes.Lock() - mock.calls.DeviceGetSupportedEventTypes = append(mock.calls.DeviceGetSupportedEventTypes, callInfo) - mock.lockDeviceGetSupportedEventTypes.Unlock() - return mock.DeviceGetSupportedEventTypesFunc(device) -} - -// DeviceGetSupportedEventTypesCalls gets all the calls that were made to DeviceGetSupportedEventTypes. -// Check the length with: -// -// len(mockedInterface.DeviceGetSupportedEventTypesCalls()) -func (mock *Interface) DeviceGetSupportedEventTypesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetSupportedEventTypes.RLock() - calls = mock.calls.DeviceGetSupportedEventTypes - mock.lockDeviceGetSupportedEventTypes.RUnlock() - return calls -} - -// DeviceGetSupportedGraphicsClocks calls DeviceGetSupportedGraphicsClocksFunc. -func (mock *Interface) DeviceGetSupportedGraphicsClocks(device nvml.Device, n int) (int, uint32, nvml.Return) { - if mock.DeviceGetSupportedGraphicsClocksFunc == nil { - panic("Interface.DeviceGetSupportedGraphicsClocksFunc: method is nil but Interface.DeviceGetSupportedGraphicsClocks was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetSupportedGraphicsClocks.Lock() - mock.calls.DeviceGetSupportedGraphicsClocks = append(mock.calls.DeviceGetSupportedGraphicsClocks, callInfo) - mock.lockDeviceGetSupportedGraphicsClocks.Unlock() - return mock.DeviceGetSupportedGraphicsClocksFunc(device, n) -} - -// DeviceGetSupportedGraphicsClocksCalls gets all the calls that were made to DeviceGetSupportedGraphicsClocks. -// Check the length with: -// -// len(mockedInterface.DeviceGetSupportedGraphicsClocksCalls()) -func (mock *Interface) DeviceGetSupportedGraphicsClocksCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetSupportedGraphicsClocks.RLock() - calls = mock.calls.DeviceGetSupportedGraphicsClocks - mock.lockDeviceGetSupportedGraphicsClocks.RUnlock() - return calls -} - -// DeviceGetSupportedMemoryClocks calls DeviceGetSupportedMemoryClocksFunc. -func (mock *Interface) DeviceGetSupportedMemoryClocks(device nvml.Device) (int, uint32, nvml.Return) { - if mock.DeviceGetSupportedMemoryClocksFunc == nil { - panic("Interface.DeviceGetSupportedMemoryClocksFunc: method is nil but Interface.DeviceGetSupportedMemoryClocks was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetSupportedMemoryClocks.Lock() - mock.calls.DeviceGetSupportedMemoryClocks = append(mock.calls.DeviceGetSupportedMemoryClocks, callInfo) - mock.lockDeviceGetSupportedMemoryClocks.Unlock() - return mock.DeviceGetSupportedMemoryClocksFunc(device) -} - -// DeviceGetSupportedMemoryClocksCalls gets all the calls that were made to DeviceGetSupportedMemoryClocks. -// Check the length with: -// -// len(mockedInterface.DeviceGetSupportedMemoryClocksCalls()) -func (mock *Interface) DeviceGetSupportedMemoryClocksCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetSupportedMemoryClocks.RLock() - calls = mock.calls.DeviceGetSupportedMemoryClocks - mock.lockDeviceGetSupportedMemoryClocks.RUnlock() - return calls -} - -// DeviceGetSupportedPerformanceStates calls DeviceGetSupportedPerformanceStatesFunc. -func (mock *Interface) DeviceGetSupportedPerformanceStates(device nvml.Device) ([]nvml.Pstates, nvml.Return) { - if mock.DeviceGetSupportedPerformanceStatesFunc == nil { - panic("Interface.DeviceGetSupportedPerformanceStatesFunc: method is nil but Interface.DeviceGetSupportedPerformanceStates was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetSupportedPerformanceStates.Lock() - mock.calls.DeviceGetSupportedPerformanceStates = append(mock.calls.DeviceGetSupportedPerformanceStates, callInfo) - mock.lockDeviceGetSupportedPerformanceStates.Unlock() - return mock.DeviceGetSupportedPerformanceStatesFunc(device) -} - -// DeviceGetSupportedPerformanceStatesCalls gets all the calls that were made to DeviceGetSupportedPerformanceStates. -// Check the length with: -// -// len(mockedInterface.DeviceGetSupportedPerformanceStatesCalls()) -func (mock *Interface) DeviceGetSupportedPerformanceStatesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetSupportedPerformanceStates.RLock() - calls = mock.calls.DeviceGetSupportedPerformanceStates - mock.lockDeviceGetSupportedPerformanceStates.RUnlock() - return calls -} - -// DeviceGetSupportedVgpus calls DeviceGetSupportedVgpusFunc. -func (mock *Interface) DeviceGetSupportedVgpus(device nvml.Device) ([]nvml.VgpuTypeId, nvml.Return) { - if mock.DeviceGetSupportedVgpusFunc == nil { - panic("Interface.DeviceGetSupportedVgpusFunc: method is nil but Interface.DeviceGetSupportedVgpus was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetSupportedVgpus.Lock() - mock.calls.DeviceGetSupportedVgpus = append(mock.calls.DeviceGetSupportedVgpus, callInfo) - mock.lockDeviceGetSupportedVgpus.Unlock() - return mock.DeviceGetSupportedVgpusFunc(device) -} - -// DeviceGetSupportedVgpusCalls gets all the calls that were made to DeviceGetSupportedVgpus. -// Check the length with: -// -// len(mockedInterface.DeviceGetSupportedVgpusCalls()) -func (mock *Interface) DeviceGetSupportedVgpusCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetSupportedVgpus.RLock() - calls = mock.calls.DeviceGetSupportedVgpus - mock.lockDeviceGetSupportedVgpus.RUnlock() - return calls -} - -// DeviceGetTargetFanSpeed calls DeviceGetTargetFanSpeedFunc. -func (mock *Interface) DeviceGetTargetFanSpeed(device nvml.Device, n int) (int, nvml.Return) { - if mock.DeviceGetTargetFanSpeedFunc == nil { - panic("Interface.DeviceGetTargetFanSpeedFunc: method is nil but Interface.DeviceGetTargetFanSpeed was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceGetTargetFanSpeed.Lock() - mock.calls.DeviceGetTargetFanSpeed = append(mock.calls.DeviceGetTargetFanSpeed, callInfo) - mock.lockDeviceGetTargetFanSpeed.Unlock() - return mock.DeviceGetTargetFanSpeedFunc(device, n) -} - -// DeviceGetTargetFanSpeedCalls gets all the calls that were made to DeviceGetTargetFanSpeed. -// Check the length with: -// -// len(mockedInterface.DeviceGetTargetFanSpeedCalls()) -func (mock *Interface) DeviceGetTargetFanSpeedCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceGetTargetFanSpeed.RLock() - calls = mock.calls.DeviceGetTargetFanSpeed - mock.lockDeviceGetTargetFanSpeed.RUnlock() - return calls -} - -// DeviceGetTemperature calls DeviceGetTemperatureFunc. -func (mock *Interface) DeviceGetTemperature(device nvml.Device, temperatureSensors nvml.TemperatureSensors) (uint32, nvml.Return) { - if mock.DeviceGetTemperatureFunc == nil { - panic("Interface.DeviceGetTemperatureFunc: method is nil but Interface.DeviceGetTemperature was just called") - } - callInfo := struct { - Device nvml.Device - TemperatureSensors nvml.TemperatureSensors - }{ - Device: device, - TemperatureSensors: temperatureSensors, - } - mock.lockDeviceGetTemperature.Lock() - mock.calls.DeviceGetTemperature = append(mock.calls.DeviceGetTemperature, callInfo) - mock.lockDeviceGetTemperature.Unlock() - return mock.DeviceGetTemperatureFunc(device, temperatureSensors) -} - -// DeviceGetTemperatureCalls gets all the calls that were made to DeviceGetTemperature. -// Check the length with: -// -// len(mockedInterface.DeviceGetTemperatureCalls()) -func (mock *Interface) DeviceGetTemperatureCalls() []struct { - Device nvml.Device - TemperatureSensors nvml.TemperatureSensors -} { - var calls []struct { - Device nvml.Device - TemperatureSensors nvml.TemperatureSensors - } - mock.lockDeviceGetTemperature.RLock() - calls = mock.calls.DeviceGetTemperature - mock.lockDeviceGetTemperature.RUnlock() - return calls -} - -// DeviceGetTemperatureThreshold calls DeviceGetTemperatureThresholdFunc. -func (mock *Interface) DeviceGetTemperatureThreshold(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds) (uint32, nvml.Return) { - if mock.DeviceGetTemperatureThresholdFunc == nil { - panic("Interface.DeviceGetTemperatureThresholdFunc: method is nil but Interface.DeviceGetTemperatureThreshold was just called") - } - callInfo := struct { - Device nvml.Device - TemperatureThresholds nvml.TemperatureThresholds - }{ - Device: device, - TemperatureThresholds: temperatureThresholds, - } - mock.lockDeviceGetTemperatureThreshold.Lock() - mock.calls.DeviceGetTemperatureThreshold = append(mock.calls.DeviceGetTemperatureThreshold, callInfo) - mock.lockDeviceGetTemperatureThreshold.Unlock() - return mock.DeviceGetTemperatureThresholdFunc(device, temperatureThresholds) -} - -// DeviceGetTemperatureThresholdCalls gets all the calls that were made to DeviceGetTemperatureThreshold. -// Check the length with: -// -// len(mockedInterface.DeviceGetTemperatureThresholdCalls()) -func (mock *Interface) DeviceGetTemperatureThresholdCalls() []struct { - Device nvml.Device - TemperatureThresholds nvml.TemperatureThresholds -} { - var calls []struct { - Device nvml.Device - TemperatureThresholds nvml.TemperatureThresholds - } - mock.lockDeviceGetTemperatureThreshold.RLock() - calls = mock.calls.DeviceGetTemperatureThreshold - mock.lockDeviceGetTemperatureThreshold.RUnlock() - return calls -} - -// DeviceGetTemperatureV calls DeviceGetTemperatureVFunc. -func (mock *Interface) DeviceGetTemperatureV(device nvml.Device) nvml.TemperatureHandler { - if mock.DeviceGetTemperatureVFunc == nil { - panic("Interface.DeviceGetTemperatureVFunc: method is nil but Interface.DeviceGetTemperatureV was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetTemperatureV.Lock() - mock.calls.DeviceGetTemperatureV = append(mock.calls.DeviceGetTemperatureV, callInfo) - mock.lockDeviceGetTemperatureV.Unlock() - return mock.DeviceGetTemperatureVFunc(device) -} - -// DeviceGetTemperatureVCalls gets all the calls that were made to DeviceGetTemperatureV. -// Check the length with: -// -// len(mockedInterface.DeviceGetTemperatureVCalls()) -func (mock *Interface) DeviceGetTemperatureVCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetTemperatureV.RLock() - calls = mock.calls.DeviceGetTemperatureV - mock.lockDeviceGetTemperatureV.RUnlock() - return calls -} - -// DeviceGetThermalSettings calls DeviceGetThermalSettingsFunc. -func (mock *Interface) DeviceGetThermalSettings(device nvml.Device, v uint32) (nvml.GpuThermalSettings, nvml.Return) { - if mock.DeviceGetThermalSettingsFunc == nil { - panic("Interface.DeviceGetThermalSettingsFunc: method is nil but Interface.DeviceGetThermalSettings was just called") - } - callInfo := struct { - Device nvml.Device - V uint32 - }{ - Device: device, - V: v, - } - mock.lockDeviceGetThermalSettings.Lock() - mock.calls.DeviceGetThermalSettings = append(mock.calls.DeviceGetThermalSettings, callInfo) - mock.lockDeviceGetThermalSettings.Unlock() - return mock.DeviceGetThermalSettingsFunc(device, v) -} - -// DeviceGetThermalSettingsCalls gets all the calls that were made to DeviceGetThermalSettings. -// Check the length with: -// -// len(mockedInterface.DeviceGetThermalSettingsCalls()) -func (mock *Interface) DeviceGetThermalSettingsCalls() []struct { - Device nvml.Device - V uint32 -} { - var calls []struct { - Device nvml.Device - V uint32 - } - mock.lockDeviceGetThermalSettings.RLock() - calls = mock.calls.DeviceGetThermalSettings - mock.lockDeviceGetThermalSettings.RUnlock() - return calls -} - -// DeviceGetTopologyCommonAncestor calls DeviceGetTopologyCommonAncestorFunc. -func (mock *Interface) DeviceGetTopologyCommonAncestor(device1 nvml.Device, device2 nvml.Device) (nvml.GpuTopologyLevel, nvml.Return) { - if mock.DeviceGetTopologyCommonAncestorFunc == nil { - panic("Interface.DeviceGetTopologyCommonAncestorFunc: method is nil but Interface.DeviceGetTopologyCommonAncestor was just called") - } - callInfo := struct { - Device1 nvml.Device - Device2 nvml.Device - }{ - Device1: device1, - Device2: device2, - } - mock.lockDeviceGetTopologyCommonAncestor.Lock() - mock.calls.DeviceGetTopologyCommonAncestor = append(mock.calls.DeviceGetTopologyCommonAncestor, callInfo) - mock.lockDeviceGetTopologyCommonAncestor.Unlock() - return mock.DeviceGetTopologyCommonAncestorFunc(device1, device2) -} - -// DeviceGetTopologyCommonAncestorCalls gets all the calls that were made to DeviceGetTopologyCommonAncestor. -// Check the length with: -// -// len(mockedInterface.DeviceGetTopologyCommonAncestorCalls()) -func (mock *Interface) DeviceGetTopologyCommonAncestorCalls() []struct { - Device1 nvml.Device - Device2 nvml.Device -} { - var calls []struct { - Device1 nvml.Device - Device2 nvml.Device - } - mock.lockDeviceGetTopologyCommonAncestor.RLock() - calls = mock.calls.DeviceGetTopologyCommonAncestor - mock.lockDeviceGetTopologyCommonAncestor.RUnlock() - return calls -} - -// DeviceGetTopologyNearestGpus calls DeviceGetTopologyNearestGpusFunc. -func (mock *Interface) DeviceGetTopologyNearestGpus(device nvml.Device, gpuTopologyLevel nvml.GpuTopologyLevel) ([]nvml.Device, nvml.Return) { - if mock.DeviceGetTopologyNearestGpusFunc == nil { - panic("Interface.DeviceGetTopologyNearestGpusFunc: method is nil but Interface.DeviceGetTopologyNearestGpus was just called") - } - callInfo := struct { - Device nvml.Device - GpuTopologyLevel nvml.GpuTopologyLevel - }{ - Device: device, - GpuTopologyLevel: gpuTopologyLevel, - } - mock.lockDeviceGetTopologyNearestGpus.Lock() - mock.calls.DeviceGetTopologyNearestGpus = append(mock.calls.DeviceGetTopologyNearestGpus, callInfo) - mock.lockDeviceGetTopologyNearestGpus.Unlock() - return mock.DeviceGetTopologyNearestGpusFunc(device, gpuTopologyLevel) -} - -// DeviceGetTopologyNearestGpusCalls gets all the calls that were made to DeviceGetTopologyNearestGpus. -// Check the length with: -// -// len(mockedInterface.DeviceGetTopologyNearestGpusCalls()) -func (mock *Interface) DeviceGetTopologyNearestGpusCalls() []struct { - Device nvml.Device - GpuTopologyLevel nvml.GpuTopologyLevel -} { - var calls []struct { - Device nvml.Device - GpuTopologyLevel nvml.GpuTopologyLevel - } - mock.lockDeviceGetTopologyNearestGpus.RLock() - calls = mock.calls.DeviceGetTopologyNearestGpus - mock.lockDeviceGetTopologyNearestGpus.RUnlock() - return calls -} - -// DeviceGetTotalEccErrors calls DeviceGetTotalEccErrorsFunc. -func (mock *Interface) DeviceGetTotalEccErrors(device nvml.Device, memoryErrorType nvml.MemoryErrorType, eccCounterType nvml.EccCounterType) (uint64, nvml.Return) { - if mock.DeviceGetTotalEccErrorsFunc == nil { - panic("Interface.DeviceGetTotalEccErrorsFunc: method is nil but Interface.DeviceGetTotalEccErrors was just called") - } - callInfo := struct { - Device nvml.Device - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - }{ - Device: device, - MemoryErrorType: memoryErrorType, - EccCounterType: eccCounterType, - } - mock.lockDeviceGetTotalEccErrors.Lock() - mock.calls.DeviceGetTotalEccErrors = append(mock.calls.DeviceGetTotalEccErrors, callInfo) - mock.lockDeviceGetTotalEccErrors.Unlock() - return mock.DeviceGetTotalEccErrorsFunc(device, memoryErrorType, eccCounterType) -} - -// DeviceGetTotalEccErrorsCalls gets all the calls that were made to DeviceGetTotalEccErrors. -// Check the length with: -// -// len(mockedInterface.DeviceGetTotalEccErrorsCalls()) -func (mock *Interface) DeviceGetTotalEccErrorsCalls() []struct { - Device nvml.Device - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType -} { - var calls []struct { - Device nvml.Device - MemoryErrorType nvml.MemoryErrorType - EccCounterType nvml.EccCounterType - } - mock.lockDeviceGetTotalEccErrors.RLock() - calls = mock.calls.DeviceGetTotalEccErrors - mock.lockDeviceGetTotalEccErrors.RUnlock() - return calls -} - -// DeviceGetTotalEnergyConsumption calls DeviceGetTotalEnergyConsumptionFunc. -func (mock *Interface) DeviceGetTotalEnergyConsumption(device nvml.Device) (uint64, nvml.Return) { - if mock.DeviceGetTotalEnergyConsumptionFunc == nil { - panic("Interface.DeviceGetTotalEnergyConsumptionFunc: method is nil but Interface.DeviceGetTotalEnergyConsumption was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetTotalEnergyConsumption.Lock() - mock.calls.DeviceGetTotalEnergyConsumption = append(mock.calls.DeviceGetTotalEnergyConsumption, callInfo) - mock.lockDeviceGetTotalEnergyConsumption.Unlock() - return mock.DeviceGetTotalEnergyConsumptionFunc(device) -} - -// DeviceGetTotalEnergyConsumptionCalls gets all the calls that were made to DeviceGetTotalEnergyConsumption. -// Check the length with: -// -// len(mockedInterface.DeviceGetTotalEnergyConsumptionCalls()) -func (mock *Interface) DeviceGetTotalEnergyConsumptionCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetTotalEnergyConsumption.RLock() - calls = mock.calls.DeviceGetTotalEnergyConsumption - mock.lockDeviceGetTotalEnergyConsumption.RUnlock() - return calls -} - -// DeviceGetUUID calls DeviceGetUUIDFunc. -func (mock *Interface) DeviceGetUUID(device nvml.Device) (string, nvml.Return) { - if mock.DeviceGetUUIDFunc == nil { - panic("Interface.DeviceGetUUIDFunc: method is nil but Interface.DeviceGetUUID was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetUUID.Lock() - mock.calls.DeviceGetUUID = append(mock.calls.DeviceGetUUID, callInfo) - mock.lockDeviceGetUUID.Unlock() - return mock.DeviceGetUUIDFunc(device) -} - -// DeviceGetUUIDCalls gets all the calls that were made to DeviceGetUUID. -// Check the length with: -// -// len(mockedInterface.DeviceGetUUIDCalls()) -func (mock *Interface) DeviceGetUUIDCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetUUID.RLock() - calls = mock.calls.DeviceGetUUID - mock.lockDeviceGetUUID.RUnlock() - return calls -} - -// DeviceGetUtilizationRates calls DeviceGetUtilizationRatesFunc. -func (mock *Interface) DeviceGetUtilizationRates(device nvml.Device) (nvml.Utilization, nvml.Return) { - if mock.DeviceGetUtilizationRatesFunc == nil { - panic("Interface.DeviceGetUtilizationRatesFunc: method is nil but Interface.DeviceGetUtilizationRates was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetUtilizationRates.Lock() - mock.calls.DeviceGetUtilizationRates = append(mock.calls.DeviceGetUtilizationRates, callInfo) - mock.lockDeviceGetUtilizationRates.Unlock() - return mock.DeviceGetUtilizationRatesFunc(device) -} - -// DeviceGetUtilizationRatesCalls gets all the calls that were made to DeviceGetUtilizationRates. -// Check the length with: -// -// len(mockedInterface.DeviceGetUtilizationRatesCalls()) -func (mock *Interface) DeviceGetUtilizationRatesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetUtilizationRates.RLock() - calls = mock.calls.DeviceGetUtilizationRates - mock.lockDeviceGetUtilizationRates.RUnlock() - return calls -} - -// DeviceGetVbiosVersion calls DeviceGetVbiosVersionFunc. -func (mock *Interface) DeviceGetVbiosVersion(device nvml.Device) (string, nvml.Return) { - if mock.DeviceGetVbiosVersionFunc == nil { - panic("Interface.DeviceGetVbiosVersionFunc: method is nil but Interface.DeviceGetVbiosVersion was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetVbiosVersion.Lock() - mock.calls.DeviceGetVbiosVersion = append(mock.calls.DeviceGetVbiosVersion, callInfo) - mock.lockDeviceGetVbiosVersion.Unlock() - return mock.DeviceGetVbiosVersionFunc(device) -} - -// DeviceGetVbiosVersionCalls gets all the calls that were made to DeviceGetVbiosVersion. -// Check the length with: -// -// len(mockedInterface.DeviceGetVbiosVersionCalls()) -func (mock *Interface) DeviceGetVbiosVersionCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetVbiosVersion.RLock() - calls = mock.calls.DeviceGetVbiosVersion - mock.lockDeviceGetVbiosVersion.RUnlock() - return calls -} - -// DeviceGetVgpuCapabilities calls DeviceGetVgpuCapabilitiesFunc. -func (mock *Interface) DeviceGetVgpuCapabilities(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability) (bool, nvml.Return) { - if mock.DeviceGetVgpuCapabilitiesFunc == nil { - panic("Interface.DeviceGetVgpuCapabilitiesFunc: method is nil but Interface.DeviceGetVgpuCapabilities was just called") - } - callInfo := struct { - Device nvml.Device - DeviceVgpuCapability nvml.DeviceVgpuCapability - }{ - Device: device, - DeviceVgpuCapability: deviceVgpuCapability, - } - mock.lockDeviceGetVgpuCapabilities.Lock() - mock.calls.DeviceGetVgpuCapabilities = append(mock.calls.DeviceGetVgpuCapabilities, callInfo) - mock.lockDeviceGetVgpuCapabilities.Unlock() - return mock.DeviceGetVgpuCapabilitiesFunc(device, deviceVgpuCapability) -} - -// DeviceGetVgpuCapabilitiesCalls gets all the calls that were made to DeviceGetVgpuCapabilities. -// Check the length with: -// -// len(mockedInterface.DeviceGetVgpuCapabilitiesCalls()) -func (mock *Interface) DeviceGetVgpuCapabilitiesCalls() []struct { - Device nvml.Device - DeviceVgpuCapability nvml.DeviceVgpuCapability -} { - var calls []struct { - Device nvml.Device - DeviceVgpuCapability nvml.DeviceVgpuCapability - } - mock.lockDeviceGetVgpuCapabilities.RLock() - calls = mock.calls.DeviceGetVgpuCapabilities - mock.lockDeviceGetVgpuCapabilities.RUnlock() - return calls -} - -// DeviceGetVgpuHeterogeneousMode calls DeviceGetVgpuHeterogeneousModeFunc. -func (mock *Interface) DeviceGetVgpuHeterogeneousMode(device nvml.Device) (nvml.VgpuHeterogeneousMode, nvml.Return) { - if mock.DeviceGetVgpuHeterogeneousModeFunc == nil { - panic("Interface.DeviceGetVgpuHeterogeneousModeFunc: method is nil but Interface.DeviceGetVgpuHeterogeneousMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetVgpuHeterogeneousMode.Lock() - mock.calls.DeviceGetVgpuHeterogeneousMode = append(mock.calls.DeviceGetVgpuHeterogeneousMode, callInfo) - mock.lockDeviceGetVgpuHeterogeneousMode.Unlock() - return mock.DeviceGetVgpuHeterogeneousModeFunc(device) -} - -// DeviceGetVgpuHeterogeneousModeCalls gets all the calls that were made to DeviceGetVgpuHeterogeneousMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetVgpuHeterogeneousModeCalls()) -func (mock *Interface) DeviceGetVgpuHeterogeneousModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetVgpuHeterogeneousMode.RLock() - calls = mock.calls.DeviceGetVgpuHeterogeneousMode - mock.lockDeviceGetVgpuHeterogeneousMode.RUnlock() - return calls -} - -// DeviceGetVgpuInstancesUtilizationInfo calls DeviceGetVgpuInstancesUtilizationInfoFunc. -func (mock *Interface) DeviceGetVgpuInstancesUtilizationInfo(device nvml.Device) (nvml.VgpuInstancesUtilizationInfo, nvml.Return) { - if mock.DeviceGetVgpuInstancesUtilizationInfoFunc == nil { - panic("Interface.DeviceGetVgpuInstancesUtilizationInfoFunc: method is nil but Interface.DeviceGetVgpuInstancesUtilizationInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetVgpuInstancesUtilizationInfo.Lock() - mock.calls.DeviceGetVgpuInstancesUtilizationInfo = append(mock.calls.DeviceGetVgpuInstancesUtilizationInfo, callInfo) - mock.lockDeviceGetVgpuInstancesUtilizationInfo.Unlock() - return mock.DeviceGetVgpuInstancesUtilizationInfoFunc(device) -} - -// DeviceGetVgpuInstancesUtilizationInfoCalls gets all the calls that were made to DeviceGetVgpuInstancesUtilizationInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetVgpuInstancesUtilizationInfoCalls()) -func (mock *Interface) DeviceGetVgpuInstancesUtilizationInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetVgpuInstancesUtilizationInfo.RLock() - calls = mock.calls.DeviceGetVgpuInstancesUtilizationInfo - mock.lockDeviceGetVgpuInstancesUtilizationInfo.RUnlock() - return calls -} - -// DeviceGetVgpuMetadata calls DeviceGetVgpuMetadataFunc. -func (mock *Interface) DeviceGetVgpuMetadata(device nvml.Device) (nvml.VgpuPgpuMetadata, nvml.Return) { - if mock.DeviceGetVgpuMetadataFunc == nil { - panic("Interface.DeviceGetVgpuMetadataFunc: method is nil but Interface.DeviceGetVgpuMetadata was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetVgpuMetadata.Lock() - mock.calls.DeviceGetVgpuMetadata = append(mock.calls.DeviceGetVgpuMetadata, callInfo) - mock.lockDeviceGetVgpuMetadata.Unlock() - return mock.DeviceGetVgpuMetadataFunc(device) -} - -// DeviceGetVgpuMetadataCalls gets all the calls that were made to DeviceGetVgpuMetadata. -// Check the length with: -// -// len(mockedInterface.DeviceGetVgpuMetadataCalls()) -func (mock *Interface) DeviceGetVgpuMetadataCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetVgpuMetadata.RLock() - calls = mock.calls.DeviceGetVgpuMetadata - mock.lockDeviceGetVgpuMetadata.RUnlock() - return calls -} - -// DeviceGetVgpuProcessUtilization calls DeviceGetVgpuProcessUtilizationFunc. -func (mock *Interface) DeviceGetVgpuProcessUtilization(device nvml.Device, v uint64) ([]nvml.VgpuProcessUtilizationSample, nvml.Return) { - if mock.DeviceGetVgpuProcessUtilizationFunc == nil { - panic("Interface.DeviceGetVgpuProcessUtilizationFunc: method is nil but Interface.DeviceGetVgpuProcessUtilization was just called") - } - callInfo := struct { - Device nvml.Device - V uint64 - }{ - Device: device, - V: v, - } - mock.lockDeviceGetVgpuProcessUtilization.Lock() - mock.calls.DeviceGetVgpuProcessUtilization = append(mock.calls.DeviceGetVgpuProcessUtilization, callInfo) - mock.lockDeviceGetVgpuProcessUtilization.Unlock() - return mock.DeviceGetVgpuProcessUtilizationFunc(device, v) -} - -// DeviceGetVgpuProcessUtilizationCalls gets all the calls that were made to DeviceGetVgpuProcessUtilization. -// Check the length with: -// -// len(mockedInterface.DeviceGetVgpuProcessUtilizationCalls()) -func (mock *Interface) DeviceGetVgpuProcessUtilizationCalls() []struct { - Device nvml.Device - V uint64 -} { - var calls []struct { - Device nvml.Device - V uint64 - } - mock.lockDeviceGetVgpuProcessUtilization.RLock() - calls = mock.calls.DeviceGetVgpuProcessUtilization - mock.lockDeviceGetVgpuProcessUtilization.RUnlock() - return calls -} - -// DeviceGetVgpuProcessesUtilizationInfo calls DeviceGetVgpuProcessesUtilizationInfoFunc. -func (mock *Interface) DeviceGetVgpuProcessesUtilizationInfo(device nvml.Device) (nvml.VgpuProcessesUtilizationInfo, nvml.Return) { - if mock.DeviceGetVgpuProcessesUtilizationInfoFunc == nil { - panic("Interface.DeviceGetVgpuProcessesUtilizationInfoFunc: method is nil but Interface.DeviceGetVgpuProcessesUtilizationInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetVgpuProcessesUtilizationInfo.Lock() - mock.calls.DeviceGetVgpuProcessesUtilizationInfo = append(mock.calls.DeviceGetVgpuProcessesUtilizationInfo, callInfo) - mock.lockDeviceGetVgpuProcessesUtilizationInfo.Unlock() - return mock.DeviceGetVgpuProcessesUtilizationInfoFunc(device) -} - -// DeviceGetVgpuProcessesUtilizationInfoCalls gets all the calls that were made to DeviceGetVgpuProcessesUtilizationInfo. -// Check the length with: -// -// len(mockedInterface.DeviceGetVgpuProcessesUtilizationInfoCalls()) -func (mock *Interface) DeviceGetVgpuProcessesUtilizationInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetVgpuProcessesUtilizationInfo.RLock() - calls = mock.calls.DeviceGetVgpuProcessesUtilizationInfo - mock.lockDeviceGetVgpuProcessesUtilizationInfo.RUnlock() - return calls -} - -// DeviceGetVgpuSchedulerCapabilities calls DeviceGetVgpuSchedulerCapabilitiesFunc. -func (mock *Interface) DeviceGetVgpuSchedulerCapabilities(device nvml.Device) (nvml.VgpuSchedulerCapabilities, nvml.Return) { - if mock.DeviceGetVgpuSchedulerCapabilitiesFunc == nil { - panic("Interface.DeviceGetVgpuSchedulerCapabilitiesFunc: method is nil but Interface.DeviceGetVgpuSchedulerCapabilities was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetVgpuSchedulerCapabilities.Lock() - mock.calls.DeviceGetVgpuSchedulerCapabilities = append(mock.calls.DeviceGetVgpuSchedulerCapabilities, callInfo) - mock.lockDeviceGetVgpuSchedulerCapabilities.Unlock() - return mock.DeviceGetVgpuSchedulerCapabilitiesFunc(device) -} - -// DeviceGetVgpuSchedulerCapabilitiesCalls gets all the calls that were made to DeviceGetVgpuSchedulerCapabilities. -// Check the length with: -// -// len(mockedInterface.DeviceGetVgpuSchedulerCapabilitiesCalls()) -func (mock *Interface) DeviceGetVgpuSchedulerCapabilitiesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetVgpuSchedulerCapabilities.RLock() - calls = mock.calls.DeviceGetVgpuSchedulerCapabilities - mock.lockDeviceGetVgpuSchedulerCapabilities.RUnlock() - return calls -} - -// DeviceGetVgpuSchedulerLog calls DeviceGetVgpuSchedulerLogFunc. -func (mock *Interface) DeviceGetVgpuSchedulerLog(device nvml.Device) (nvml.VgpuSchedulerLog, nvml.Return) { - if mock.DeviceGetVgpuSchedulerLogFunc == nil { - panic("Interface.DeviceGetVgpuSchedulerLogFunc: method is nil but Interface.DeviceGetVgpuSchedulerLog was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetVgpuSchedulerLog.Lock() - mock.calls.DeviceGetVgpuSchedulerLog = append(mock.calls.DeviceGetVgpuSchedulerLog, callInfo) - mock.lockDeviceGetVgpuSchedulerLog.Unlock() - return mock.DeviceGetVgpuSchedulerLogFunc(device) -} - -// DeviceGetVgpuSchedulerLogCalls gets all the calls that were made to DeviceGetVgpuSchedulerLog. -// Check the length with: -// -// len(mockedInterface.DeviceGetVgpuSchedulerLogCalls()) -func (mock *Interface) DeviceGetVgpuSchedulerLogCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetVgpuSchedulerLog.RLock() - calls = mock.calls.DeviceGetVgpuSchedulerLog - mock.lockDeviceGetVgpuSchedulerLog.RUnlock() - return calls -} - -// DeviceGetVgpuSchedulerState calls DeviceGetVgpuSchedulerStateFunc. -func (mock *Interface) DeviceGetVgpuSchedulerState(device nvml.Device) (nvml.VgpuSchedulerGetState, nvml.Return) { - if mock.DeviceGetVgpuSchedulerStateFunc == nil { - panic("Interface.DeviceGetVgpuSchedulerStateFunc: method is nil but Interface.DeviceGetVgpuSchedulerState was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetVgpuSchedulerState.Lock() - mock.calls.DeviceGetVgpuSchedulerState = append(mock.calls.DeviceGetVgpuSchedulerState, callInfo) - mock.lockDeviceGetVgpuSchedulerState.Unlock() - return mock.DeviceGetVgpuSchedulerStateFunc(device) -} - -// DeviceGetVgpuSchedulerStateCalls gets all the calls that were made to DeviceGetVgpuSchedulerState. -// Check the length with: -// -// len(mockedInterface.DeviceGetVgpuSchedulerStateCalls()) -func (mock *Interface) DeviceGetVgpuSchedulerStateCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetVgpuSchedulerState.RLock() - calls = mock.calls.DeviceGetVgpuSchedulerState - mock.lockDeviceGetVgpuSchedulerState.RUnlock() - return calls -} - -// DeviceGetVgpuTypeCreatablePlacements calls DeviceGetVgpuTypeCreatablePlacementsFunc. -func (mock *Interface) DeviceGetVgpuTypeCreatablePlacements(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { - if mock.DeviceGetVgpuTypeCreatablePlacementsFunc == nil { - panic("Interface.DeviceGetVgpuTypeCreatablePlacementsFunc: method is nil but Interface.DeviceGetVgpuTypeCreatablePlacements was just called") - } - callInfo := struct { - Device nvml.Device - VgpuTypeId nvml.VgpuTypeId - }{ - Device: device, - VgpuTypeId: vgpuTypeId, - } - mock.lockDeviceGetVgpuTypeCreatablePlacements.Lock() - mock.calls.DeviceGetVgpuTypeCreatablePlacements = append(mock.calls.DeviceGetVgpuTypeCreatablePlacements, callInfo) - mock.lockDeviceGetVgpuTypeCreatablePlacements.Unlock() - return mock.DeviceGetVgpuTypeCreatablePlacementsFunc(device, vgpuTypeId) -} - -// DeviceGetVgpuTypeCreatablePlacementsCalls gets all the calls that were made to DeviceGetVgpuTypeCreatablePlacements. -// Check the length with: -// -// len(mockedInterface.DeviceGetVgpuTypeCreatablePlacementsCalls()) -func (mock *Interface) DeviceGetVgpuTypeCreatablePlacementsCalls() []struct { - Device nvml.Device - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - Device nvml.Device - VgpuTypeId nvml.VgpuTypeId - } - mock.lockDeviceGetVgpuTypeCreatablePlacements.RLock() - calls = mock.calls.DeviceGetVgpuTypeCreatablePlacements - mock.lockDeviceGetVgpuTypeCreatablePlacements.RUnlock() - return calls -} - -// DeviceGetVgpuTypeSupportedPlacements calls DeviceGetVgpuTypeSupportedPlacementsFunc. -func (mock *Interface) DeviceGetVgpuTypeSupportedPlacements(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuPlacementList, nvml.Return) { - if mock.DeviceGetVgpuTypeSupportedPlacementsFunc == nil { - panic("Interface.DeviceGetVgpuTypeSupportedPlacementsFunc: method is nil but Interface.DeviceGetVgpuTypeSupportedPlacements was just called") - } - callInfo := struct { - Device nvml.Device - VgpuTypeId nvml.VgpuTypeId - }{ - Device: device, - VgpuTypeId: vgpuTypeId, - } - mock.lockDeviceGetVgpuTypeSupportedPlacements.Lock() - mock.calls.DeviceGetVgpuTypeSupportedPlacements = append(mock.calls.DeviceGetVgpuTypeSupportedPlacements, callInfo) - mock.lockDeviceGetVgpuTypeSupportedPlacements.Unlock() - return mock.DeviceGetVgpuTypeSupportedPlacementsFunc(device, vgpuTypeId) -} - -// DeviceGetVgpuTypeSupportedPlacementsCalls gets all the calls that were made to DeviceGetVgpuTypeSupportedPlacements. -// Check the length with: -// -// len(mockedInterface.DeviceGetVgpuTypeSupportedPlacementsCalls()) -func (mock *Interface) DeviceGetVgpuTypeSupportedPlacementsCalls() []struct { - Device nvml.Device - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - Device nvml.Device - VgpuTypeId nvml.VgpuTypeId - } - mock.lockDeviceGetVgpuTypeSupportedPlacements.RLock() - calls = mock.calls.DeviceGetVgpuTypeSupportedPlacements - mock.lockDeviceGetVgpuTypeSupportedPlacements.RUnlock() - return calls -} - -// DeviceGetVgpuUtilization calls DeviceGetVgpuUtilizationFunc. -func (mock *Interface) DeviceGetVgpuUtilization(device nvml.Device, v uint64) (nvml.ValueType, []nvml.VgpuInstanceUtilizationSample, nvml.Return) { - if mock.DeviceGetVgpuUtilizationFunc == nil { - panic("Interface.DeviceGetVgpuUtilizationFunc: method is nil but Interface.DeviceGetVgpuUtilization was just called") - } - callInfo := struct { - Device nvml.Device - V uint64 - }{ - Device: device, - V: v, - } - mock.lockDeviceGetVgpuUtilization.Lock() - mock.calls.DeviceGetVgpuUtilization = append(mock.calls.DeviceGetVgpuUtilization, callInfo) - mock.lockDeviceGetVgpuUtilization.Unlock() - return mock.DeviceGetVgpuUtilizationFunc(device, v) -} - -// DeviceGetVgpuUtilizationCalls gets all the calls that were made to DeviceGetVgpuUtilization. -// Check the length with: -// -// len(mockedInterface.DeviceGetVgpuUtilizationCalls()) -func (mock *Interface) DeviceGetVgpuUtilizationCalls() []struct { - Device nvml.Device - V uint64 -} { - var calls []struct { - Device nvml.Device - V uint64 - } - mock.lockDeviceGetVgpuUtilization.RLock() - calls = mock.calls.DeviceGetVgpuUtilization - mock.lockDeviceGetVgpuUtilization.RUnlock() - return calls -} - -// DeviceGetViolationStatus calls DeviceGetViolationStatusFunc. -func (mock *Interface) DeviceGetViolationStatus(device nvml.Device, perfPolicyType nvml.PerfPolicyType) (nvml.ViolationTime, nvml.Return) { - if mock.DeviceGetViolationStatusFunc == nil { - panic("Interface.DeviceGetViolationStatusFunc: method is nil but Interface.DeviceGetViolationStatus was just called") - } - callInfo := struct { - Device nvml.Device - PerfPolicyType nvml.PerfPolicyType - }{ - Device: device, - PerfPolicyType: perfPolicyType, - } - mock.lockDeviceGetViolationStatus.Lock() - mock.calls.DeviceGetViolationStatus = append(mock.calls.DeviceGetViolationStatus, callInfo) - mock.lockDeviceGetViolationStatus.Unlock() - return mock.DeviceGetViolationStatusFunc(device, perfPolicyType) -} - -// DeviceGetViolationStatusCalls gets all the calls that were made to DeviceGetViolationStatus. -// Check the length with: -// -// len(mockedInterface.DeviceGetViolationStatusCalls()) -func (mock *Interface) DeviceGetViolationStatusCalls() []struct { - Device nvml.Device - PerfPolicyType nvml.PerfPolicyType -} { - var calls []struct { - Device nvml.Device - PerfPolicyType nvml.PerfPolicyType - } - mock.lockDeviceGetViolationStatus.RLock() - calls = mock.calls.DeviceGetViolationStatus - mock.lockDeviceGetViolationStatus.RUnlock() - return calls -} - -// DeviceGetVirtualizationMode calls DeviceGetVirtualizationModeFunc. -func (mock *Interface) DeviceGetVirtualizationMode(device nvml.Device) (nvml.GpuVirtualizationMode, nvml.Return) { - if mock.DeviceGetVirtualizationModeFunc == nil { - panic("Interface.DeviceGetVirtualizationModeFunc: method is nil but Interface.DeviceGetVirtualizationMode was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceGetVirtualizationMode.Lock() - mock.calls.DeviceGetVirtualizationMode = append(mock.calls.DeviceGetVirtualizationMode, callInfo) - mock.lockDeviceGetVirtualizationMode.Unlock() - return mock.DeviceGetVirtualizationModeFunc(device) -} - -// DeviceGetVirtualizationModeCalls gets all the calls that were made to DeviceGetVirtualizationMode. -// Check the length with: -// -// len(mockedInterface.DeviceGetVirtualizationModeCalls()) -func (mock *Interface) DeviceGetVirtualizationModeCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceGetVirtualizationMode.RLock() - calls = mock.calls.DeviceGetVirtualizationMode - mock.lockDeviceGetVirtualizationMode.RUnlock() - return calls -} - -// DeviceIsMigDeviceHandle calls DeviceIsMigDeviceHandleFunc. -func (mock *Interface) DeviceIsMigDeviceHandle(device nvml.Device) (bool, nvml.Return) { - if mock.DeviceIsMigDeviceHandleFunc == nil { - panic("Interface.DeviceIsMigDeviceHandleFunc: method is nil but Interface.DeviceIsMigDeviceHandle was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceIsMigDeviceHandle.Lock() - mock.calls.DeviceIsMigDeviceHandle = append(mock.calls.DeviceIsMigDeviceHandle, callInfo) - mock.lockDeviceIsMigDeviceHandle.Unlock() - return mock.DeviceIsMigDeviceHandleFunc(device) -} - -// DeviceIsMigDeviceHandleCalls gets all the calls that were made to DeviceIsMigDeviceHandle. -// Check the length with: -// -// len(mockedInterface.DeviceIsMigDeviceHandleCalls()) -func (mock *Interface) DeviceIsMigDeviceHandleCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceIsMigDeviceHandle.RLock() - calls = mock.calls.DeviceIsMigDeviceHandle - mock.lockDeviceIsMigDeviceHandle.RUnlock() - return calls -} - -// DeviceModifyDrainState calls DeviceModifyDrainStateFunc. -func (mock *Interface) DeviceModifyDrainState(pciInfo *nvml.PciInfo, enableState nvml.EnableState) nvml.Return { - if mock.DeviceModifyDrainStateFunc == nil { - panic("Interface.DeviceModifyDrainStateFunc: method is nil but Interface.DeviceModifyDrainState was just called") - } - callInfo := struct { - PciInfo *nvml.PciInfo - EnableState nvml.EnableState - }{ - PciInfo: pciInfo, - EnableState: enableState, - } - mock.lockDeviceModifyDrainState.Lock() - mock.calls.DeviceModifyDrainState = append(mock.calls.DeviceModifyDrainState, callInfo) - mock.lockDeviceModifyDrainState.Unlock() - return mock.DeviceModifyDrainStateFunc(pciInfo, enableState) -} - -// DeviceModifyDrainStateCalls gets all the calls that were made to DeviceModifyDrainState. -// Check the length with: -// -// len(mockedInterface.DeviceModifyDrainStateCalls()) -func (mock *Interface) DeviceModifyDrainStateCalls() []struct { - PciInfo *nvml.PciInfo - EnableState nvml.EnableState -} { - var calls []struct { - PciInfo *nvml.PciInfo - EnableState nvml.EnableState - } - mock.lockDeviceModifyDrainState.RLock() - calls = mock.calls.DeviceModifyDrainState - mock.lockDeviceModifyDrainState.RUnlock() - return calls -} - -// DeviceOnSameBoard calls DeviceOnSameBoardFunc. -func (mock *Interface) DeviceOnSameBoard(device1 nvml.Device, device2 nvml.Device) (int, nvml.Return) { - if mock.DeviceOnSameBoardFunc == nil { - panic("Interface.DeviceOnSameBoardFunc: method is nil but Interface.DeviceOnSameBoard was just called") - } - callInfo := struct { - Device1 nvml.Device - Device2 nvml.Device - }{ - Device1: device1, - Device2: device2, - } - mock.lockDeviceOnSameBoard.Lock() - mock.calls.DeviceOnSameBoard = append(mock.calls.DeviceOnSameBoard, callInfo) - mock.lockDeviceOnSameBoard.Unlock() - return mock.DeviceOnSameBoardFunc(device1, device2) -} - -// DeviceOnSameBoardCalls gets all the calls that were made to DeviceOnSameBoard. -// Check the length with: -// -// len(mockedInterface.DeviceOnSameBoardCalls()) -func (mock *Interface) DeviceOnSameBoardCalls() []struct { - Device1 nvml.Device - Device2 nvml.Device -} { - var calls []struct { - Device1 nvml.Device - Device2 nvml.Device - } - mock.lockDeviceOnSameBoard.RLock() - calls = mock.calls.DeviceOnSameBoard - mock.lockDeviceOnSameBoard.RUnlock() - return calls -} - -// DevicePowerSmoothingActivatePresetProfile calls DevicePowerSmoothingActivatePresetProfileFunc. -func (mock *Interface) DevicePowerSmoothingActivatePresetProfile(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { - if mock.DevicePowerSmoothingActivatePresetProfileFunc == nil { - panic("Interface.DevicePowerSmoothingActivatePresetProfileFunc: method is nil but Interface.DevicePowerSmoothingActivatePresetProfile was just called") - } - callInfo := struct { - Device nvml.Device - PowerSmoothingProfile *nvml.PowerSmoothingProfile - }{ - Device: device, - PowerSmoothingProfile: powerSmoothingProfile, - } - mock.lockDevicePowerSmoothingActivatePresetProfile.Lock() - mock.calls.DevicePowerSmoothingActivatePresetProfile = append(mock.calls.DevicePowerSmoothingActivatePresetProfile, callInfo) - mock.lockDevicePowerSmoothingActivatePresetProfile.Unlock() - return mock.DevicePowerSmoothingActivatePresetProfileFunc(device, powerSmoothingProfile) -} - -// DevicePowerSmoothingActivatePresetProfileCalls gets all the calls that were made to DevicePowerSmoothingActivatePresetProfile. -// Check the length with: -// -// len(mockedInterface.DevicePowerSmoothingActivatePresetProfileCalls()) -func (mock *Interface) DevicePowerSmoothingActivatePresetProfileCalls() []struct { - Device nvml.Device - PowerSmoothingProfile *nvml.PowerSmoothingProfile -} { - var calls []struct { - Device nvml.Device - PowerSmoothingProfile *nvml.PowerSmoothingProfile - } - mock.lockDevicePowerSmoothingActivatePresetProfile.RLock() - calls = mock.calls.DevicePowerSmoothingActivatePresetProfile - mock.lockDevicePowerSmoothingActivatePresetProfile.RUnlock() - return calls -} - -// DevicePowerSmoothingSetState calls DevicePowerSmoothingSetStateFunc. -func (mock *Interface) DevicePowerSmoothingSetState(device nvml.Device, powerSmoothingState *nvml.PowerSmoothingState) nvml.Return { - if mock.DevicePowerSmoothingSetStateFunc == nil { - panic("Interface.DevicePowerSmoothingSetStateFunc: method is nil but Interface.DevicePowerSmoothingSetState was just called") - } - callInfo := struct { - Device nvml.Device - PowerSmoothingState *nvml.PowerSmoothingState - }{ - Device: device, - PowerSmoothingState: powerSmoothingState, - } - mock.lockDevicePowerSmoothingSetState.Lock() - mock.calls.DevicePowerSmoothingSetState = append(mock.calls.DevicePowerSmoothingSetState, callInfo) - mock.lockDevicePowerSmoothingSetState.Unlock() - return mock.DevicePowerSmoothingSetStateFunc(device, powerSmoothingState) -} - -// DevicePowerSmoothingSetStateCalls gets all the calls that were made to DevicePowerSmoothingSetState. -// Check the length with: -// -// len(mockedInterface.DevicePowerSmoothingSetStateCalls()) -func (mock *Interface) DevicePowerSmoothingSetStateCalls() []struct { - Device nvml.Device - PowerSmoothingState *nvml.PowerSmoothingState -} { - var calls []struct { - Device nvml.Device - PowerSmoothingState *nvml.PowerSmoothingState - } - mock.lockDevicePowerSmoothingSetState.RLock() - calls = mock.calls.DevicePowerSmoothingSetState - mock.lockDevicePowerSmoothingSetState.RUnlock() - return calls -} - -// DevicePowerSmoothingUpdatePresetProfileParam calls DevicePowerSmoothingUpdatePresetProfileParamFunc. -func (mock *Interface) DevicePowerSmoothingUpdatePresetProfileParam(device nvml.Device, powerSmoothingProfile *nvml.PowerSmoothingProfile) nvml.Return { - if mock.DevicePowerSmoothingUpdatePresetProfileParamFunc == nil { - panic("Interface.DevicePowerSmoothingUpdatePresetProfileParamFunc: method is nil but Interface.DevicePowerSmoothingUpdatePresetProfileParam was just called") - } - callInfo := struct { - Device nvml.Device - PowerSmoothingProfile *nvml.PowerSmoothingProfile - }{ - Device: device, - PowerSmoothingProfile: powerSmoothingProfile, - } - mock.lockDevicePowerSmoothingUpdatePresetProfileParam.Lock() - mock.calls.DevicePowerSmoothingUpdatePresetProfileParam = append(mock.calls.DevicePowerSmoothingUpdatePresetProfileParam, callInfo) - mock.lockDevicePowerSmoothingUpdatePresetProfileParam.Unlock() - return mock.DevicePowerSmoothingUpdatePresetProfileParamFunc(device, powerSmoothingProfile) -} - -// DevicePowerSmoothingUpdatePresetProfileParamCalls gets all the calls that were made to DevicePowerSmoothingUpdatePresetProfileParam. -// Check the length with: -// -// len(mockedInterface.DevicePowerSmoothingUpdatePresetProfileParamCalls()) -func (mock *Interface) DevicePowerSmoothingUpdatePresetProfileParamCalls() []struct { - Device nvml.Device - PowerSmoothingProfile *nvml.PowerSmoothingProfile -} { - var calls []struct { - Device nvml.Device - PowerSmoothingProfile *nvml.PowerSmoothingProfile - } - mock.lockDevicePowerSmoothingUpdatePresetProfileParam.RLock() - calls = mock.calls.DevicePowerSmoothingUpdatePresetProfileParam - mock.lockDevicePowerSmoothingUpdatePresetProfileParam.RUnlock() - return calls -} - -// DeviceQueryDrainState calls DeviceQueryDrainStateFunc. -func (mock *Interface) DeviceQueryDrainState(pciInfo *nvml.PciInfo) (nvml.EnableState, nvml.Return) { - if mock.DeviceQueryDrainStateFunc == nil { - panic("Interface.DeviceQueryDrainStateFunc: method is nil but Interface.DeviceQueryDrainState was just called") - } - callInfo := struct { - PciInfo *nvml.PciInfo - }{ - PciInfo: pciInfo, - } - mock.lockDeviceQueryDrainState.Lock() - mock.calls.DeviceQueryDrainState = append(mock.calls.DeviceQueryDrainState, callInfo) - mock.lockDeviceQueryDrainState.Unlock() - return mock.DeviceQueryDrainStateFunc(pciInfo) -} - -// DeviceQueryDrainStateCalls gets all the calls that were made to DeviceQueryDrainState. -// Check the length with: -// -// len(mockedInterface.DeviceQueryDrainStateCalls()) -func (mock *Interface) DeviceQueryDrainStateCalls() []struct { - PciInfo *nvml.PciInfo -} { - var calls []struct { - PciInfo *nvml.PciInfo - } - mock.lockDeviceQueryDrainState.RLock() - calls = mock.calls.DeviceQueryDrainState - mock.lockDeviceQueryDrainState.RUnlock() - return calls -} - -// DeviceReadWritePRM_v1 calls DeviceReadWritePRM_v1Func. -func (mock *Interface) DeviceReadWritePRM_v1(device nvml.Device, pRMTLV_v1 *nvml.PRMTLV_v1) nvml.Return { - if mock.DeviceReadWritePRM_v1Func == nil { - panic("Interface.DeviceReadWritePRM_v1Func: method is nil but Interface.DeviceReadWritePRM_v1 was just called") - } - callInfo := struct { - Device nvml.Device - PRMTLV_v1 *nvml.PRMTLV_v1 - }{ - Device: device, - PRMTLV_v1: pRMTLV_v1, - } - mock.lockDeviceReadWritePRM_v1.Lock() - mock.calls.DeviceReadWritePRM_v1 = append(mock.calls.DeviceReadWritePRM_v1, callInfo) - mock.lockDeviceReadWritePRM_v1.Unlock() - return mock.DeviceReadWritePRM_v1Func(device, pRMTLV_v1) -} - -// DeviceReadWritePRM_v1Calls gets all the calls that were made to DeviceReadWritePRM_v1. -// Check the length with: -// -// len(mockedInterface.DeviceReadWritePRM_v1Calls()) -func (mock *Interface) DeviceReadWritePRM_v1Calls() []struct { - Device nvml.Device - PRMTLV_v1 *nvml.PRMTLV_v1 -} { - var calls []struct { - Device nvml.Device - PRMTLV_v1 *nvml.PRMTLV_v1 - } - mock.lockDeviceReadWritePRM_v1.RLock() - calls = mock.calls.DeviceReadWritePRM_v1 - mock.lockDeviceReadWritePRM_v1.RUnlock() - return calls -} - -// DeviceRegisterEvents calls DeviceRegisterEventsFunc. -func (mock *Interface) DeviceRegisterEvents(device nvml.Device, v uint64, eventSet nvml.EventSet) nvml.Return { - if mock.DeviceRegisterEventsFunc == nil { - panic("Interface.DeviceRegisterEventsFunc: method is nil but Interface.DeviceRegisterEvents was just called") - } - callInfo := struct { - Device nvml.Device - V uint64 - EventSet nvml.EventSet - }{ - Device: device, - V: v, - EventSet: eventSet, - } - mock.lockDeviceRegisterEvents.Lock() - mock.calls.DeviceRegisterEvents = append(mock.calls.DeviceRegisterEvents, callInfo) - mock.lockDeviceRegisterEvents.Unlock() - return mock.DeviceRegisterEventsFunc(device, v, eventSet) -} - -// DeviceRegisterEventsCalls gets all the calls that were made to DeviceRegisterEvents. -// Check the length with: -// -// len(mockedInterface.DeviceRegisterEventsCalls()) -func (mock *Interface) DeviceRegisterEventsCalls() []struct { - Device nvml.Device - V uint64 - EventSet nvml.EventSet -} { - var calls []struct { - Device nvml.Device - V uint64 - EventSet nvml.EventSet - } - mock.lockDeviceRegisterEvents.RLock() - calls = mock.calls.DeviceRegisterEvents - mock.lockDeviceRegisterEvents.RUnlock() - return calls -} - -// DeviceRemoveGpu calls DeviceRemoveGpuFunc. -func (mock *Interface) DeviceRemoveGpu(pciInfo *nvml.PciInfo) nvml.Return { - if mock.DeviceRemoveGpuFunc == nil { - panic("Interface.DeviceRemoveGpuFunc: method is nil but Interface.DeviceRemoveGpu was just called") - } - callInfo := struct { - PciInfo *nvml.PciInfo - }{ - PciInfo: pciInfo, - } - mock.lockDeviceRemoveGpu.Lock() - mock.calls.DeviceRemoveGpu = append(mock.calls.DeviceRemoveGpu, callInfo) - mock.lockDeviceRemoveGpu.Unlock() - return mock.DeviceRemoveGpuFunc(pciInfo) -} - -// DeviceRemoveGpuCalls gets all the calls that were made to DeviceRemoveGpu. -// Check the length with: -// -// len(mockedInterface.DeviceRemoveGpuCalls()) -func (mock *Interface) DeviceRemoveGpuCalls() []struct { - PciInfo *nvml.PciInfo -} { - var calls []struct { - PciInfo *nvml.PciInfo - } - mock.lockDeviceRemoveGpu.RLock() - calls = mock.calls.DeviceRemoveGpu - mock.lockDeviceRemoveGpu.RUnlock() - return calls -} - -// DeviceRemoveGpu_v2 calls DeviceRemoveGpu_v2Func. -func (mock *Interface) DeviceRemoveGpu_v2(pciInfo *nvml.PciInfo, detachGpuState nvml.DetachGpuState, pcieLinkState nvml.PcieLinkState) nvml.Return { - if mock.DeviceRemoveGpu_v2Func == nil { - panic("Interface.DeviceRemoveGpu_v2Func: method is nil but Interface.DeviceRemoveGpu_v2 was just called") - } - callInfo := struct { - PciInfo *nvml.PciInfo - DetachGpuState nvml.DetachGpuState - PcieLinkState nvml.PcieLinkState - }{ - PciInfo: pciInfo, - DetachGpuState: detachGpuState, - PcieLinkState: pcieLinkState, - } - mock.lockDeviceRemoveGpu_v2.Lock() - mock.calls.DeviceRemoveGpu_v2 = append(mock.calls.DeviceRemoveGpu_v2, callInfo) - mock.lockDeviceRemoveGpu_v2.Unlock() - return mock.DeviceRemoveGpu_v2Func(pciInfo, detachGpuState, pcieLinkState) -} - -// DeviceRemoveGpu_v2Calls gets all the calls that were made to DeviceRemoveGpu_v2. -// Check the length with: -// -// len(mockedInterface.DeviceRemoveGpu_v2Calls()) -func (mock *Interface) DeviceRemoveGpu_v2Calls() []struct { - PciInfo *nvml.PciInfo - DetachGpuState nvml.DetachGpuState - PcieLinkState nvml.PcieLinkState -} { - var calls []struct { - PciInfo *nvml.PciInfo - DetachGpuState nvml.DetachGpuState - PcieLinkState nvml.PcieLinkState - } - mock.lockDeviceRemoveGpu_v2.RLock() - calls = mock.calls.DeviceRemoveGpu_v2 - mock.lockDeviceRemoveGpu_v2.RUnlock() - return calls -} - -// DeviceResetApplicationsClocks calls DeviceResetApplicationsClocksFunc. -func (mock *Interface) DeviceResetApplicationsClocks(device nvml.Device) nvml.Return { - if mock.DeviceResetApplicationsClocksFunc == nil { - panic("Interface.DeviceResetApplicationsClocksFunc: method is nil but Interface.DeviceResetApplicationsClocks was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceResetApplicationsClocks.Lock() - mock.calls.DeviceResetApplicationsClocks = append(mock.calls.DeviceResetApplicationsClocks, callInfo) - mock.lockDeviceResetApplicationsClocks.Unlock() - return mock.DeviceResetApplicationsClocksFunc(device) -} - -// DeviceResetApplicationsClocksCalls gets all the calls that were made to DeviceResetApplicationsClocks. -// Check the length with: -// -// len(mockedInterface.DeviceResetApplicationsClocksCalls()) -func (mock *Interface) DeviceResetApplicationsClocksCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceResetApplicationsClocks.RLock() - calls = mock.calls.DeviceResetApplicationsClocks - mock.lockDeviceResetApplicationsClocks.RUnlock() - return calls -} - -// DeviceResetGpuLockedClocks calls DeviceResetGpuLockedClocksFunc. -func (mock *Interface) DeviceResetGpuLockedClocks(device nvml.Device) nvml.Return { - if mock.DeviceResetGpuLockedClocksFunc == nil { - panic("Interface.DeviceResetGpuLockedClocksFunc: method is nil but Interface.DeviceResetGpuLockedClocks was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceResetGpuLockedClocks.Lock() - mock.calls.DeviceResetGpuLockedClocks = append(mock.calls.DeviceResetGpuLockedClocks, callInfo) - mock.lockDeviceResetGpuLockedClocks.Unlock() - return mock.DeviceResetGpuLockedClocksFunc(device) -} - -// DeviceResetGpuLockedClocksCalls gets all the calls that were made to DeviceResetGpuLockedClocks. -// Check the length with: -// -// len(mockedInterface.DeviceResetGpuLockedClocksCalls()) -func (mock *Interface) DeviceResetGpuLockedClocksCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceResetGpuLockedClocks.RLock() - calls = mock.calls.DeviceResetGpuLockedClocks - mock.lockDeviceResetGpuLockedClocks.RUnlock() - return calls -} - -// DeviceResetMemoryLockedClocks calls DeviceResetMemoryLockedClocksFunc. -func (mock *Interface) DeviceResetMemoryLockedClocks(device nvml.Device) nvml.Return { - if mock.DeviceResetMemoryLockedClocksFunc == nil { - panic("Interface.DeviceResetMemoryLockedClocksFunc: method is nil but Interface.DeviceResetMemoryLockedClocks was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceResetMemoryLockedClocks.Lock() - mock.calls.DeviceResetMemoryLockedClocks = append(mock.calls.DeviceResetMemoryLockedClocks, callInfo) - mock.lockDeviceResetMemoryLockedClocks.Unlock() - return mock.DeviceResetMemoryLockedClocksFunc(device) -} - -// DeviceResetMemoryLockedClocksCalls gets all the calls that were made to DeviceResetMemoryLockedClocks. -// Check the length with: -// -// len(mockedInterface.DeviceResetMemoryLockedClocksCalls()) -func (mock *Interface) DeviceResetMemoryLockedClocksCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceResetMemoryLockedClocks.RLock() - calls = mock.calls.DeviceResetMemoryLockedClocks - mock.lockDeviceResetMemoryLockedClocks.RUnlock() - return calls -} - -// DeviceResetNvLinkErrorCounters calls DeviceResetNvLinkErrorCountersFunc. -func (mock *Interface) DeviceResetNvLinkErrorCounters(device nvml.Device, n int) nvml.Return { - if mock.DeviceResetNvLinkErrorCountersFunc == nil { - panic("Interface.DeviceResetNvLinkErrorCountersFunc: method is nil but Interface.DeviceResetNvLinkErrorCounters was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceResetNvLinkErrorCounters.Lock() - mock.calls.DeviceResetNvLinkErrorCounters = append(mock.calls.DeviceResetNvLinkErrorCounters, callInfo) - mock.lockDeviceResetNvLinkErrorCounters.Unlock() - return mock.DeviceResetNvLinkErrorCountersFunc(device, n) -} - -// DeviceResetNvLinkErrorCountersCalls gets all the calls that were made to DeviceResetNvLinkErrorCounters. -// Check the length with: -// -// len(mockedInterface.DeviceResetNvLinkErrorCountersCalls()) -func (mock *Interface) DeviceResetNvLinkErrorCountersCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceResetNvLinkErrorCounters.RLock() - calls = mock.calls.DeviceResetNvLinkErrorCounters - mock.lockDeviceResetNvLinkErrorCounters.RUnlock() - return calls -} - -// DeviceResetNvLinkUtilizationCounter calls DeviceResetNvLinkUtilizationCounterFunc. -func (mock *Interface) DeviceResetNvLinkUtilizationCounter(device nvml.Device, n1 int, n2 int) nvml.Return { - if mock.DeviceResetNvLinkUtilizationCounterFunc == nil { - panic("Interface.DeviceResetNvLinkUtilizationCounterFunc: method is nil but Interface.DeviceResetNvLinkUtilizationCounter was just called") - } - callInfo := struct { - Device nvml.Device - N1 int - N2 int - }{ - Device: device, - N1: n1, - N2: n2, - } - mock.lockDeviceResetNvLinkUtilizationCounter.Lock() - mock.calls.DeviceResetNvLinkUtilizationCounter = append(mock.calls.DeviceResetNvLinkUtilizationCounter, callInfo) - mock.lockDeviceResetNvLinkUtilizationCounter.Unlock() - return mock.DeviceResetNvLinkUtilizationCounterFunc(device, n1, n2) -} - -// DeviceResetNvLinkUtilizationCounterCalls gets all the calls that were made to DeviceResetNvLinkUtilizationCounter. -// Check the length with: -// -// len(mockedInterface.DeviceResetNvLinkUtilizationCounterCalls()) -func (mock *Interface) DeviceResetNvLinkUtilizationCounterCalls() []struct { - Device nvml.Device - N1 int - N2 int -} { - var calls []struct { - Device nvml.Device - N1 int - N2 int - } - mock.lockDeviceResetNvLinkUtilizationCounter.RLock() - calls = mock.calls.DeviceResetNvLinkUtilizationCounter - mock.lockDeviceResetNvLinkUtilizationCounter.RUnlock() - return calls -} - -// DeviceSetAPIRestriction calls DeviceSetAPIRestrictionFunc. -func (mock *Interface) DeviceSetAPIRestriction(device nvml.Device, restrictedAPI nvml.RestrictedAPI, enableState nvml.EnableState) nvml.Return { - if mock.DeviceSetAPIRestrictionFunc == nil { - panic("Interface.DeviceSetAPIRestrictionFunc: method is nil but Interface.DeviceSetAPIRestriction was just called") - } - callInfo := struct { - Device nvml.Device - RestrictedAPI nvml.RestrictedAPI - EnableState nvml.EnableState - }{ - Device: device, - RestrictedAPI: restrictedAPI, - EnableState: enableState, - } - mock.lockDeviceSetAPIRestriction.Lock() - mock.calls.DeviceSetAPIRestriction = append(mock.calls.DeviceSetAPIRestriction, callInfo) - mock.lockDeviceSetAPIRestriction.Unlock() - return mock.DeviceSetAPIRestrictionFunc(device, restrictedAPI, enableState) -} - -// DeviceSetAPIRestrictionCalls gets all the calls that were made to DeviceSetAPIRestriction. -// Check the length with: -// -// len(mockedInterface.DeviceSetAPIRestrictionCalls()) -func (mock *Interface) DeviceSetAPIRestrictionCalls() []struct { - Device nvml.Device - RestrictedAPI nvml.RestrictedAPI - EnableState nvml.EnableState -} { - var calls []struct { - Device nvml.Device - RestrictedAPI nvml.RestrictedAPI - EnableState nvml.EnableState - } - mock.lockDeviceSetAPIRestriction.RLock() - calls = mock.calls.DeviceSetAPIRestriction - mock.lockDeviceSetAPIRestriction.RUnlock() - return calls -} - -// DeviceSetAccountingMode calls DeviceSetAccountingModeFunc. -func (mock *Interface) DeviceSetAccountingMode(device nvml.Device, enableState nvml.EnableState) nvml.Return { - if mock.DeviceSetAccountingModeFunc == nil { - panic("Interface.DeviceSetAccountingModeFunc: method is nil but Interface.DeviceSetAccountingMode was just called") - } - callInfo := struct { - Device nvml.Device - EnableState nvml.EnableState - }{ - Device: device, - EnableState: enableState, - } - mock.lockDeviceSetAccountingMode.Lock() - mock.calls.DeviceSetAccountingMode = append(mock.calls.DeviceSetAccountingMode, callInfo) - mock.lockDeviceSetAccountingMode.Unlock() - return mock.DeviceSetAccountingModeFunc(device, enableState) -} - -// DeviceSetAccountingModeCalls gets all the calls that were made to DeviceSetAccountingMode. -// Check the length with: -// -// len(mockedInterface.DeviceSetAccountingModeCalls()) -func (mock *Interface) DeviceSetAccountingModeCalls() []struct { - Device nvml.Device - EnableState nvml.EnableState -} { - var calls []struct { - Device nvml.Device - EnableState nvml.EnableState - } - mock.lockDeviceSetAccountingMode.RLock() - calls = mock.calls.DeviceSetAccountingMode - mock.lockDeviceSetAccountingMode.RUnlock() - return calls -} - -// DeviceSetApplicationsClocks calls DeviceSetApplicationsClocksFunc. -func (mock *Interface) DeviceSetApplicationsClocks(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { - if mock.DeviceSetApplicationsClocksFunc == nil { - panic("Interface.DeviceSetApplicationsClocksFunc: method is nil but Interface.DeviceSetApplicationsClocks was just called") - } - callInfo := struct { - Device nvml.Device - V1 uint32 - V2 uint32 - }{ - Device: device, - V1: v1, - V2: v2, - } - mock.lockDeviceSetApplicationsClocks.Lock() - mock.calls.DeviceSetApplicationsClocks = append(mock.calls.DeviceSetApplicationsClocks, callInfo) - mock.lockDeviceSetApplicationsClocks.Unlock() - return mock.DeviceSetApplicationsClocksFunc(device, v1, v2) -} - -// DeviceSetApplicationsClocksCalls gets all the calls that were made to DeviceSetApplicationsClocks. -// Check the length with: -// -// len(mockedInterface.DeviceSetApplicationsClocksCalls()) -func (mock *Interface) DeviceSetApplicationsClocksCalls() []struct { - Device nvml.Device - V1 uint32 - V2 uint32 -} { - var calls []struct { - Device nvml.Device - V1 uint32 - V2 uint32 - } - mock.lockDeviceSetApplicationsClocks.RLock() - calls = mock.calls.DeviceSetApplicationsClocks - mock.lockDeviceSetApplicationsClocks.RUnlock() - return calls -} - -// DeviceSetAutoBoostedClocksEnabled calls DeviceSetAutoBoostedClocksEnabledFunc. -func (mock *Interface) DeviceSetAutoBoostedClocksEnabled(device nvml.Device, enableState nvml.EnableState) nvml.Return { - if mock.DeviceSetAutoBoostedClocksEnabledFunc == nil { - panic("Interface.DeviceSetAutoBoostedClocksEnabledFunc: method is nil but Interface.DeviceSetAutoBoostedClocksEnabled was just called") - } - callInfo := struct { - Device nvml.Device - EnableState nvml.EnableState - }{ - Device: device, - EnableState: enableState, - } - mock.lockDeviceSetAutoBoostedClocksEnabled.Lock() - mock.calls.DeviceSetAutoBoostedClocksEnabled = append(mock.calls.DeviceSetAutoBoostedClocksEnabled, callInfo) - mock.lockDeviceSetAutoBoostedClocksEnabled.Unlock() - return mock.DeviceSetAutoBoostedClocksEnabledFunc(device, enableState) -} - -// DeviceSetAutoBoostedClocksEnabledCalls gets all the calls that were made to DeviceSetAutoBoostedClocksEnabled. -// Check the length with: -// -// len(mockedInterface.DeviceSetAutoBoostedClocksEnabledCalls()) -func (mock *Interface) DeviceSetAutoBoostedClocksEnabledCalls() []struct { - Device nvml.Device - EnableState nvml.EnableState -} { - var calls []struct { - Device nvml.Device - EnableState nvml.EnableState - } - mock.lockDeviceSetAutoBoostedClocksEnabled.RLock() - calls = mock.calls.DeviceSetAutoBoostedClocksEnabled - mock.lockDeviceSetAutoBoostedClocksEnabled.RUnlock() - return calls -} - -// DeviceSetClockOffsets calls DeviceSetClockOffsetsFunc. -func (mock *Interface) DeviceSetClockOffsets(device nvml.Device, clockOffset nvml.ClockOffset) nvml.Return { - if mock.DeviceSetClockOffsetsFunc == nil { - panic("Interface.DeviceSetClockOffsetsFunc: method is nil but Interface.DeviceSetClockOffsets was just called") - } - callInfo := struct { - Device nvml.Device - ClockOffset nvml.ClockOffset - }{ - Device: device, - ClockOffset: clockOffset, - } - mock.lockDeviceSetClockOffsets.Lock() - mock.calls.DeviceSetClockOffsets = append(mock.calls.DeviceSetClockOffsets, callInfo) - mock.lockDeviceSetClockOffsets.Unlock() - return mock.DeviceSetClockOffsetsFunc(device, clockOffset) -} - -// DeviceSetClockOffsetsCalls gets all the calls that were made to DeviceSetClockOffsets. -// Check the length with: -// -// len(mockedInterface.DeviceSetClockOffsetsCalls()) -func (mock *Interface) DeviceSetClockOffsetsCalls() []struct { - Device nvml.Device - ClockOffset nvml.ClockOffset -} { - var calls []struct { - Device nvml.Device - ClockOffset nvml.ClockOffset - } - mock.lockDeviceSetClockOffsets.RLock() - calls = mock.calls.DeviceSetClockOffsets - mock.lockDeviceSetClockOffsets.RUnlock() - return calls -} - -// DeviceSetComputeMode calls DeviceSetComputeModeFunc. -func (mock *Interface) DeviceSetComputeMode(device nvml.Device, computeMode nvml.ComputeMode) nvml.Return { - if mock.DeviceSetComputeModeFunc == nil { - panic("Interface.DeviceSetComputeModeFunc: method is nil but Interface.DeviceSetComputeMode was just called") - } - callInfo := struct { - Device nvml.Device - ComputeMode nvml.ComputeMode - }{ - Device: device, - ComputeMode: computeMode, - } - mock.lockDeviceSetComputeMode.Lock() - mock.calls.DeviceSetComputeMode = append(mock.calls.DeviceSetComputeMode, callInfo) - mock.lockDeviceSetComputeMode.Unlock() - return mock.DeviceSetComputeModeFunc(device, computeMode) -} - -// DeviceSetComputeModeCalls gets all the calls that were made to DeviceSetComputeMode. -// Check the length with: -// -// len(mockedInterface.DeviceSetComputeModeCalls()) -func (mock *Interface) DeviceSetComputeModeCalls() []struct { - Device nvml.Device - ComputeMode nvml.ComputeMode -} { - var calls []struct { - Device nvml.Device - ComputeMode nvml.ComputeMode - } - mock.lockDeviceSetComputeMode.RLock() - calls = mock.calls.DeviceSetComputeMode - mock.lockDeviceSetComputeMode.RUnlock() - return calls -} - -// DeviceSetConfComputeUnprotectedMemSize calls DeviceSetConfComputeUnprotectedMemSizeFunc. -func (mock *Interface) DeviceSetConfComputeUnprotectedMemSize(device nvml.Device, v uint64) nvml.Return { - if mock.DeviceSetConfComputeUnprotectedMemSizeFunc == nil { - panic("Interface.DeviceSetConfComputeUnprotectedMemSizeFunc: method is nil but Interface.DeviceSetConfComputeUnprotectedMemSize was just called") - } - callInfo := struct { - Device nvml.Device - V uint64 - }{ - Device: device, - V: v, - } - mock.lockDeviceSetConfComputeUnprotectedMemSize.Lock() - mock.calls.DeviceSetConfComputeUnprotectedMemSize = append(mock.calls.DeviceSetConfComputeUnprotectedMemSize, callInfo) - mock.lockDeviceSetConfComputeUnprotectedMemSize.Unlock() - return mock.DeviceSetConfComputeUnprotectedMemSizeFunc(device, v) -} - -// DeviceSetConfComputeUnprotectedMemSizeCalls gets all the calls that were made to DeviceSetConfComputeUnprotectedMemSize. -// Check the length with: -// -// len(mockedInterface.DeviceSetConfComputeUnprotectedMemSizeCalls()) -func (mock *Interface) DeviceSetConfComputeUnprotectedMemSizeCalls() []struct { - Device nvml.Device - V uint64 -} { - var calls []struct { - Device nvml.Device - V uint64 - } - mock.lockDeviceSetConfComputeUnprotectedMemSize.RLock() - calls = mock.calls.DeviceSetConfComputeUnprotectedMemSize - mock.lockDeviceSetConfComputeUnprotectedMemSize.RUnlock() - return calls -} - -// DeviceSetCpuAffinity calls DeviceSetCpuAffinityFunc. -func (mock *Interface) DeviceSetCpuAffinity(device nvml.Device) nvml.Return { - if mock.DeviceSetCpuAffinityFunc == nil { - panic("Interface.DeviceSetCpuAffinityFunc: method is nil but Interface.DeviceSetCpuAffinity was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceSetCpuAffinity.Lock() - mock.calls.DeviceSetCpuAffinity = append(mock.calls.DeviceSetCpuAffinity, callInfo) - mock.lockDeviceSetCpuAffinity.Unlock() - return mock.DeviceSetCpuAffinityFunc(device) -} - -// DeviceSetCpuAffinityCalls gets all the calls that were made to DeviceSetCpuAffinity. -// Check the length with: -// -// len(mockedInterface.DeviceSetCpuAffinityCalls()) -func (mock *Interface) DeviceSetCpuAffinityCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceSetCpuAffinity.RLock() - calls = mock.calls.DeviceSetCpuAffinity - mock.lockDeviceSetCpuAffinity.RUnlock() - return calls -} - -// DeviceSetDefaultAutoBoostedClocksEnabled calls DeviceSetDefaultAutoBoostedClocksEnabledFunc. -func (mock *Interface) DeviceSetDefaultAutoBoostedClocksEnabled(device nvml.Device, enableState nvml.EnableState, v uint32) nvml.Return { - if mock.DeviceSetDefaultAutoBoostedClocksEnabledFunc == nil { - panic("Interface.DeviceSetDefaultAutoBoostedClocksEnabledFunc: method is nil but Interface.DeviceSetDefaultAutoBoostedClocksEnabled was just called") - } - callInfo := struct { - Device nvml.Device - EnableState nvml.EnableState - V uint32 - }{ - Device: device, - EnableState: enableState, - V: v, - } - mock.lockDeviceSetDefaultAutoBoostedClocksEnabled.Lock() - mock.calls.DeviceSetDefaultAutoBoostedClocksEnabled = append(mock.calls.DeviceSetDefaultAutoBoostedClocksEnabled, callInfo) - mock.lockDeviceSetDefaultAutoBoostedClocksEnabled.Unlock() - return mock.DeviceSetDefaultAutoBoostedClocksEnabledFunc(device, enableState, v) -} - -// DeviceSetDefaultAutoBoostedClocksEnabledCalls gets all the calls that were made to DeviceSetDefaultAutoBoostedClocksEnabled. -// Check the length with: -// -// len(mockedInterface.DeviceSetDefaultAutoBoostedClocksEnabledCalls()) -func (mock *Interface) DeviceSetDefaultAutoBoostedClocksEnabledCalls() []struct { - Device nvml.Device - EnableState nvml.EnableState - V uint32 -} { - var calls []struct { - Device nvml.Device - EnableState nvml.EnableState - V uint32 - } - mock.lockDeviceSetDefaultAutoBoostedClocksEnabled.RLock() - calls = mock.calls.DeviceSetDefaultAutoBoostedClocksEnabled - mock.lockDeviceSetDefaultAutoBoostedClocksEnabled.RUnlock() - return calls -} - -// DeviceSetDefaultFanSpeed_v2 calls DeviceSetDefaultFanSpeed_v2Func. -func (mock *Interface) DeviceSetDefaultFanSpeed_v2(device nvml.Device, n int) nvml.Return { - if mock.DeviceSetDefaultFanSpeed_v2Func == nil { - panic("Interface.DeviceSetDefaultFanSpeed_v2Func: method is nil but Interface.DeviceSetDefaultFanSpeed_v2 was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceSetDefaultFanSpeed_v2.Lock() - mock.calls.DeviceSetDefaultFanSpeed_v2 = append(mock.calls.DeviceSetDefaultFanSpeed_v2, callInfo) - mock.lockDeviceSetDefaultFanSpeed_v2.Unlock() - return mock.DeviceSetDefaultFanSpeed_v2Func(device, n) -} - -// DeviceSetDefaultFanSpeed_v2Calls gets all the calls that were made to DeviceSetDefaultFanSpeed_v2. -// Check the length with: -// -// len(mockedInterface.DeviceSetDefaultFanSpeed_v2Calls()) -func (mock *Interface) DeviceSetDefaultFanSpeed_v2Calls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceSetDefaultFanSpeed_v2.RLock() - calls = mock.calls.DeviceSetDefaultFanSpeed_v2 - mock.lockDeviceSetDefaultFanSpeed_v2.RUnlock() - return calls -} - -// DeviceSetDramEncryptionMode calls DeviceSetDramEncryptionModeFunc. -func (mock *Interface) DeviceSetDramEncryptionMode(device nvml.Device, dramEncryptionInfo *nvml.DramEncryptionInfo) nvml.Return { - if mock.DeviceSetDramEncryptionModeFunc == nil { - panic("Interface.DeviceSetDramEncryptionModeFunc: method is nil but Interface.DeviceSetDramEncryptionMode was just called") - } - callInfo := struct { - Device nvml.Device - DramEncryptionInfo *nvml.DramEncryptionInfo - }{ - Device: device, - DramEncryptionInfo: dramEncryptionInfo, - } - mock.lockDeviceSetDramEncryptionMode.Lock() - mock.calls.DeviceSetDramEncryptionMode = append(mock.calls.DeviceSetDramEncryptionMode, callInfo) - mock.lockDeviceSetDramEncryptionMode.Unlock() - return mock.DeviceSetDramEncryptionModeFunc(device, dramEncryptionInfo) -} - -// DeviceSetDramEncryptionModeCalls gets all the calls that were made to DeviceSetDramEncryptionMode. -// Check the length with: -// -// len(mockedInterface.DeviceSetDramEncryptionModeCalls()) -func (mock *Interface) DeviceSetDramEncryptionModeCalls() []struct { - Device nvml.Device - DramEncryptionInfo *nvml.DramEncryptionInfo -} { - var calls []struct { - Device nvml.Device - DramEncryptionInfo *nvml.DramEncryptionInfo - } - mock.lockDeviceSetDramEncryptionMode.RLock() - calls = mock.calls.DeviceSetDramEncryptionMode - mock.lockDeviceSetDramEncryptionMode.RUnlock() - return calls -} - -// DeviceSetDriverModel calls DeviceSetDriverModelFunc. -func (mock *Interface) DeviceSetDriverModel(device nvml.Device, driverModel nvml.DriverModel, v uint32) nvml.Return { - if mock.DeviceSetDriverModelFunc == nil { - panic("Interface.DeviceSetDriverModelFunc: method is nil but Interface.DeviceSetDriverModel was just called") - } - callInfo := struct { - Device nvml.Device - DriverModel nvml.DriverModel - V uint32 - }{ - Device: device, - DriverModel: driverModel, - V: v, - } - mock.lockDeviceSetDriverModel.Lock() - mock.calls.DeviceSetDriverModel = append(mock.calls.DeviceSetDriverModel, callInfo) - mock.lockDeviceSetDriverModel.Unlock() - return mock.DeviceSetDriverModelFunc(device, driverModel, v) -} - -// DeviceSetDriverModelCalls gets all the calls that were made to DeviceSetDriverModel. -// Check the length with: -// -// len(mockedInterface.DeviceSetDriverModelCalls()) -func (mock *Interface) DeviceSetDriverModelCalls() []struct { - Device nvml.Device - DriverModel nvml.DriverModel - V uint32 -} { - var calls []struct { - Device nvml.Device - DriverModel nvml.DriverModel - V uint32 - } - mock.lockDeviceSetDriverModel.RLock() - calls = mock.calls.DeviceSetDriverModel - mock.lockDeviceSetDriverModel.RUnlock() - return calls -} - -// DeviceSetEccMode calls DeviceSetEccModeFunc. -func (mock *Interface) DeviceSetEccMode(device nvml.Device, enableState nvml.EnableState) nvml.Return { - if mock.DeviceSetEccModeFunc == nil { - panic("Interface.DeviceSetEccModeFunc: method is nil but Interface.DeviceSetEccMode was just called") - } - callInfo := struct { - Device nvml.Device - EnableState nvml.EnableState - }{ - Device: device, - EnableState: enableState, - } - mock.lockDeviceSetEccMode.Lock() - mock.calls.DeviceSetEccMode = append(mock.calls.DeviceSetEccMode, callInfo) - mock.lockDeviceSetEccMode.Unlock() - return mock.DeviceSetEccModeFunc(device, enableState) -} - -// DeviceSetEccModeCalls gets all the calls that were made to DeviceSetEccMode. -// Check the length with: -// -// len(mockedInterface.DeviceSetEccModeCalls()) -func (mock *Interface) DeviceSetEccModeCalls() []struct { - Device nvml.Device - EnableState nvml.EnableState -} { - var calls []struct { - Device nvml.Device - EnableState nvml.EnableState - } - mock.lockDeviceSetEccMode.RLock() - calls = mock.calls.DeviceSetEccMode - mock.lockDeviceSetEccMode.RUnlock() - return calls -} - -// DeviceSetFanControlPolicy calls DeviceSetFanControlPolicyFunc. -func (mock *Interface) DeviceSetFanControlPolicy(device nvml.Device, n int, fanControlPolicy nvml.FanControlPolicy) nvml.Return { - if mock.DeviceSetFanControlPolicyFunc == nil { - panic("Interface.DeviceSetFanControlPolicyFunc: method is nil but Interface.DeviceSetFanControlPolicy was just called") - } - callInfo := struct { - Device nvml.Device - N int - FanControlPolicy nvml.FanControlPolicy - }{ - Device: device, - N: n, - FanControlPolicy: fanControlPolicy, - } - mock.lockDeviceSetFanControlPolicy.Lock() - mock.calls.DeviceSetFanControlPolicy = append(mock.calls.DeviceSetFanControlPolicy, callInfo) - mock.lockDeviceSetFanControlPolicy.Unlock() - return mock.DeviceSetFanControlPolicyFunc(device, n, fanControlPolicy) -} - -// DeviceSetFanControlPolicyCalls gets all the calls that were made to DeviceSetFanControlPolicy. -// Check the length with: -// -// len(mockedInterface.DeviceSetFanControlPolicyCalls()) -func (mock *Interface) DeviceSetFanControlPolicyCalls() []struct { - Device nvml.Device - N int - FanControlPolicy nvml.FanControlPolicy -} { - var calls []struct { - Device nvml.Device - N int - FanControlPolicy nvml.FanControlPolicy - } - mock.lockDeviceSetFanControlPolicy.RLock() - calls = mock.calls.DeviceSetFanControlPolicy - mock.lockDeviceSetFanControlPolicy.RUnlock() - return calls -} - -// DeviceSetFanSpeed_v2 calls DeviceSetFanSpeed_v2Func. -func (mock *Interface) DeviceSetFanSpeed_v2(device nvml.Device, n1 int, n2 int) nvml.Return { - if mock.DeviceSetFanSpeed_v2Func == nil { - panic("Interface.DeviceSetFanSpeed_v2Func: method is nil but Interface.DeviceSetFanSpeed_v2 was just called") - } - callInfo := struct { - Device nvml.Device - N1 int - N2 int - }{ - Device: device, - N1: n1, - N2: n2, - } - mock.lockDeviceSetFanSpeed_v2.Lock() - mock.calls.DeviceSetFanSpeed_v2 = append(mock.calls.DeviceSetFanSpeed_v2, callInfo) - mock.lockDeviceSetFanSpeed_v2.Unlock() - return mock.DeviceSetFanSpeed_v2Func(device, n1, n2) -} - -// DeviceSetFanSpeed_v2Calls gets all the calls that were made to DeviceSetFanSpeed_v2. -// Check the length with: -// -// len(mockedInterface.DeviceSetFanSpeed_v2Calls()) -func (mock *Interface) DeviceSetFanSpeed_v2Calls() []struct { - Device nvml.Device - N1 int - N2 int -} { - var calls []struct { - Device nvml.Device - N1 int - N2 int - } - mock.lockDeviceSetFanSpeed_v2.RLock() - calls = mock.calls.DeviceSetFanSpeed_v2 - mock.lockDeviceSetFanSpeed_v2.RUnlock() - return calls -} - -// DeviceSetGpcClkVfOffset calls DeviceSetGpcClkVfOffsetFunc. -func (mock *Interface) DeviceSetGpcClkVfOffset(device nvml.Device, n int) nvml.Return { - if mock.DeviceSetGpcClkVfOffsetFunc == nil { - panic("Interface.DeviceSetGpcClkVfOffsetFunc: method is nil but Interface.DeviceSetGpcClkVfOffset was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceSetGpcClkVfOffset.Lock() - mock.calls.DeviceSetGpcClkVfOffset = append(mock.calls.DeviceSetGpcClkVfOffset, callInfo) - mock.lockDeviceSetGpcClkVfOffset.Unlock() - return mock.DeviceSetGpcClkVfOffsetFunc(device, n) -} - -// DeviceSetGpcClkVfOffsetCalls gets all the calls that were made to DeviceSetGpcClkVfOffset. -// Check the length with: -// -// len(mockedInterface.DeviceSetGpcClkVfOffsetCalls()) -func (mock *Interface) DeviceSetGpcClkVfOffsetCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceSetGpcClkVfOffset.RLock() - calls = mock.calls.DeviceSetGpcClkVfOffset - mock.lockDeviceSetGpcClkVfOffset.RUnlock() - return calls -} - -// DeviceSetGpuLockedClocks calls DeviceSetGpuLockedClocksFunc. -func (mock *Interface) DeviceSetGpuLockedClocks(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { - if mock.DeviceSetGpuLockedClocksFunc == nil { - panic("Interface.DeviceSetGpuLockedClocksFunc: method is nil but Interface.DeviceSetGpuLockedClocks was just called") - } - callInfo := struct { - Device nvml.Device - V1 uint32 - V2 uint32 - }{ - Device: device, - V1: v1, - V2: v2, - } - mock.lockDeviceSetGpuLockedClocks.Lock() - mock.calls.DeviceSetGpuLockedClocks = append(mock.calls.DeviceSetGpuLockedClocks, callInfo) - mock.lockDeviceSetGpuLockedClocks.Unlock() - return mock.DeviceSetGpuLockedClocksFunc(device, v1, v2) -} - -// DeviceSetGpuLockedClocksCalls gets all the calls that were made to DeviceSetGpuLockedClocks. -// Check the length with: -// -// len(mockedInterface.DeviceSetGpuLockedClocksCalls()) -func (mock *Interface) DeviceSetGpuLockedClocksCalls() []struct { - Device nvml.Device - V1 uint32 - V2 uint32 -} { - var calls []struct { - Device nvml.Device - V1 uint32 - V2 uint32 - } - mock.lockDeviceSetGpuLockedClocks.RLock() - calls = mock.calls.DeviceSetGpuLockedClocks - mock.lockDeviceSetGpuLockedClocks.RUnlock() - return calls -} - -// DeviceSetGpuOperationMode calls DeviceSetGpuOperationModeFunc. -func (mock *Interface) DeviceSetGpuOperationMode(device nvml.Device, gpuOperationMode nvml.GpuOperationMode) nvml.Return { - if mock.DeviceSetGpuOperationModeFunc == nil { - panic("Interface.DeviceSetGpuOperationModeFunc: method is nil but Interface.DeviceSetGpuOperationMode was just called") - } - callInfo := struct { - Device nvml.Device - GpuOperationMode nvml.GpuOperationMode - }{ - Device: device, - GpuOperationMode: gpuOperationMode, - } - mock.lockDeviceSetGpuOperationMode.Lock() - mock.calls.DeviceSetGpuOperationMode = append(mock.calls.DeviceSetGpuOperationMode, callInfo) - mock.lockDeviceSetGpuOperationMode.Unlock() - return mock.DeviceSetGpuOperationModeFunc(device, gpuOperationMode) -} - -// DeviceSetGpuOperationModeCalls gets all the calls that were made to DeviceSetGpuOperationMode. -// Check the length with: -// -// len(mockedInterface.DeviceSetGpuOperationModeCalls()) -func (mock *Interface) DeviceSetGpuOperationModeCalls() []struct { - Device nvml.Device - GpuOperationMode nvml.GpuOperationMode -} { - var calls []struct { - Device nvml.Device - GpuOperationMode nvml.GpuOperationMode - } - mock.lockDeviceSetGpuOperationMode.RLock() - calls = mock.calls.DeviceSetGpuOperationMode - mock.lockDeviceSetGpuOperationMode.RUnlock() - return calls -} - -// DeviceSetMemClkVfOffset calls DeviceSetMemClkVfOffsetFunc. -func (mock *Interface) DeviceSetMemClkVfOffset(device nvml.Device, n int) nvml.Return { - if mock.DeviceSetMemClkVfOffsetFunc == nil { - panic("Interface.DeviceSetMemClkVfOffsetFunc: method is nil but Interface.DeviceSetMemClkVfOffset was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceSetMemClkVfOffset.Lock() - mock.calls.DeviceSetMemClkVfOffset = append(mock.calls.DeviceSetMemClkVfOffset, callInfo) - mock.lockDeviceSetMemClkVfOffset.Unlock() - return mock.DeviceSetMemClkVfOffsetFunc(device, n) -} - -// DeviceSetMemClkVfOffsetCalls gets all the calls that were made to DeviceSetMemClkVfOffset. -// Check the length with: -// -// len(mockedInterface.DeviceSetMemClkVfOffsetCalls()) -func (mock *Interface) DeviceSetMemClkVfOffsetCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceSetMemClkVfOffset.RLock() - calls = mock.calls.DeviceSetMemClkVfOffset - mock.lockDeviceSetMemClkVfOffset.RUnlock() - return calls -} - -// DeviceSetMemoryLockedClocks calls DeviceSetMemoryLockedClocksFunc. -func (mock *Interface) DeviceSetMemoryLockedClocks(device nvml.Device, v1 uint32, v2 uint32) nvml.Return { - if mock.DeviceSetMemoryLockedClocksFunc == nil { - panic("Interface.DeviceSetMemoryLockedClocksFunc: method is nil but Interface.DeviceSetMemoryLockedClocks was just called") - } - callInfo := struct { - Device nvml.Device - V1 uint32 - V2 uint32 - }{ - Device: device, - V1: v1, - V2: v2, - } - mock.lockDeviceSetMemoryLockedClocks.Lock() - mock.calls.DeviceSetMemoryLockedClocks = append(mock.calls.DeviceSetMemoryLockedClocks, callInfo) - mock.lockDeviceSetMemoryLockedClocks.Unlock() - return mock.DeviceSetMemoryLockedClocksFunc(device, v1, v2) -} - -// DeviceSetMemoryLockedClocksCalls gets all the calls that were made to DeviceSetMemoryLockedClocks. -// Check the length with: -// -// len(mockedInterface.DeviceSetMemoryLockedClocksCalls()) -func (mock *Interface) DeviceSetMemoryLockedClocksCalls() []struct { - Device nvml.Device - V1 uint32 - V2 uint32 -} { - var calls []struct { - Device nvml.Device - V1 uint32 - V2 uint32 - } - mock.lockDeviceSetMemoryLockedClocks.RLock() - calls = mock.calls.DeviceSetMemoryLockedClocks - mock.lockDeviceSetMemoryLockedClocks.RUnlock() - return calls -} - -// DeviceSetMigMode calls DeviceSetMigModeFunc. -func (mock *Interface) DeviceSetMigMode(device nvml.Device, n int) (nvml.Return, nvml.Return) { - if mock.DeviceSetMigModeFunc == nil { - panic("Interface.DeviceSetMigModeFunc: method is nil but Interface.DeviceSetMigMode was just called") - } - callInfo := struct { - Device nvml.Device - N int - }{ - Device: device, - N: n, - } - mock.lockDeviceSetMigMode.Lock() - mock.calls.DeviceSetMigMode = append(mock.calls.DeviceSetMigMode, callInfo) - mock.lockDeviceSetMigMode.Unlock() - return mock.DeviceSetMigModeFunc(device, n) -} - -// DeviceSetMigModeCalls gets all the calls that were made to DeviceSetMigMode. -// Check the length with: -// -// len(mockedInterface.DeviceSetMigModeCalls()) -func (mock *Interface) DeviceSetMigModeCalls() []struct { - Device nvml.Device - N int -} { - var calls []struct { - Device nvml.Device - N int - } - mock.lockDeviceSetMigMode.RLock() - calls = mock.calls.DeviceSetMigMode - mock.lockDeviceSetMigMode.RUnlock() - return calls -} - -// DeviceSetNvLinkDeviceLowPowerThreshold calls DeviceSetNvLinkDeviceLowPowerThresholdFunc. -func (mock *Interface) DeviceSetNvLinkDeviceLowPowerThreshold(device nvml.Device, nvLinkPowerThres *nvml.NvLinkPowerThres) nvml.Return { - if mock.DeviceSetNvLinkDeviceLowPowerThresholdFunc == nil { - panic("Interface.DeviceSetNvLinkDeviceLowPowerThresholdFunc: method is nil but Interface.DeviceSetNvLinkDeviceLowPowerThreshold was just called") - } - callInfo := struct { - Device nvml.Device - NvLinkPowerThres *nvml.NvLinkPowerThres - }{ - Device: device, - NvLinkPowerThres: nvLinkPowerThres, - } - mock.lockDeviceSetNvLinkDeviceLowPowerThreshold.Lock() - mock.calls.DeviceSetNvLinkDeviceLowPowerThreshold = append(mock.calls.DeviceSetNvLinkDeviceLowPowerThreshold, callInfo) - mock.lockDeviceSetNvLinkDeviceLowPowerThreshold.Unlock() - return mock.DeviceSetNvLinkDeviceLowPowerThresholdFunc(device, nvLinkPowerThres) -} - -// DeviceSetNvLinkDeviceLowPowerThresholdCalls gets all the calls that were made to DeviceSetNvLinkDeviceLowPowerThreshold. -// Check the length with: -// -// len(mockedInterface.DeviceSetNvLinkDeviceLowPowerThresholdCalls()) -func (mock *Interface) DeviceSetNvLinkDeviceLowPowerThresholdCalls() []struct { - Device nvml.Device - NvLinkPowerThres *nvml.NvLinkPowerThres -} { - var calls []struct { - Device nvml.Device - NvLinkPowerThres *nvml.NvLinkPowerThres - } - mock.lockDeviceSetNvLinkDeviceLowPowerThreshold.RLock() - calls = mock.calls.DeviceSetNvLinkDeviceLowPowerThreshold - mock.lockDeviceSetNvLinkDeviceLowPowerThreshold.RUnlock() - return calls -} - -// DeviceSetNvLinkUtilizationControl calls DeviceSetNvLinkUtilizationControlFunc. -func (mock *Interface) DeviceSetNvLinkUtilizationControl(device nvml.Device, n1 int, n2 int, nvLinkUtilizationControl *nvml.NvLinkUtilizationControl, b bool) nvml.Return { - if mock.DeviceSetNvLinkUtilizationControlFunc == nil { - panic("Interface.DeviceSetNvLinkUtilizationControlFunc: method is nil but Interface.DeviceSetNvLinkUtilizationControl was just called") - } - callInfo := struct { - Device nvml.Device - N1 int - N2 int - NvLinkUtilizationControl *nvml.NvLinkUtilizationControl - B bool - }{ - Device: device, - N1: n1, - N2: n2, - NvLinkUtilizationControl: nvLinkUtilizationControl, - B: b, - } - mock.lockDeviceSetNvLinkUtilizationControl.Lock() - mock.calls.DeviceSetNvLinkUtilizationControl = append(mock.calls.DeviceSetNvLinkUtilizationControl, callInfo) - mock.lockDeviceSetNvLinkUtilizationControl.Unlock() - return mock.DeviceSetNvLinkUtilizationControlFunc(device, n1, n2, nvLinkUtilizationControl, b) -} - -// DeviceSetNvLinkUtilizationControlCalls gets all the calls that were made to DeviceSetNvLinkUtilizationControl. -// Check the length with: -// -// len(mockedInterface.DeviceSetNvLinkUtilizationControlCalls()) -func (mock *Interface) DeviceSetNvLinkUtilizationControlCalls() []struct { - Device nvml.Device - N1 int - N2 int - NvLinkUtilizationControl *nvml.NvLinkUtilizationControl - B bool -} { - var calls []struct { - Device nvml.Device - N1 int - N2 int - NvLinkUtilizationControl *nvml.NvLinkUtilizationControl - B bool - } - mock.lockDeviceSetNvLinkUtilizationControl.RLock() - calls = mock.calls.DeviceSetNvLinkUtilizationControl - mock.lockDeviceSetNvLinkUtilizationControl.RUnlock() - return calls -} - -// DeviceSetNvlinkBwMode calls DeviceSetNvlinkBwModeFunc. -func (mock *Interface) DeviceSetNvlinkBwMode(device nvml.Device, nvlinkSetBwMode *nvml.NvlinkSetBwMode) nvml.Return { - if mock.DeviceSetNvlinkBwModeFunc == nil { - panic("Interface.DeviceSetNvlinkBwModeFunc: method is nil but Interface.DeviceSetNvlinkBwMode was just called") - } - callInfo := struct { - Device nvml.Device - NvlinkSetBwMode *nvml.NvlinkSetBwMode - }{ - Device: device, - NvlinkSetBwMode: nvlinkSetBwMode, - } - mock.lockDeviceSetNvlinkBwMode.Lock() - mock.calls.DeviceSetNvlinkBwMode = append(mock.calls.DeviceSetNvlinkBwMode, callInfo) - mock.lockDeviceSetNvlinkBwMode.Unlock() - return mock.DeviceSetNvlinkBwModeFunc(device, nvlinkSetBwMode) -} - -// DeviceSetNvlinkBwModeCalls gets all the calls that were made to DeviceSetNvlinkBwMode. -// Check the length with: -// -// len(mockedInterface.DeviceSetNvlinkBwModeCalls()) -func (mock *Interface) DeviceSetNvlinkBwModeCalls() []struct { - Device nvml.Device - NvlinkSetBwMode *nvml.NvlinkSetBwMode -} { - var calls []struct { - Device nvml.Device - NvlinkSetBwMode *nvml.NvlinkSetBwMode - } - mock.lockDeviceSetNvlinkBwMode.RLock() - calls = mock.calls.DeviceSetNvlinkBwMode - mock.lockDeviceSetNvlinkBwMode.RUnlock() - return calls -} - -// DeviceSetPersistenceMode calls DeviceSetPersistenceModeFunc. -func (mock *Interface) DeviceSetPersistenceMode(device nvml.Device, enableState nvml.EnableState) nvml.Return { - if mock.DeviceSetPersistenceModeFunc == nil { - panic("Interface.DeviceSetPersistenceModeFunc: method is nil but Interface.DeviceSetPersistenceMode was just called") - } - callInfo := struct { - Device nvml.Device - EnableState nvml.EnableState - }{ - Device: device, - EnableState: enableState, - } - mock.lockDeviceSetPersistenceMode.Lock() - mock.calls.DeviceSetPersistenceMode = append(mock.calls.DeviceSetPersistenceMode, callInfo) - mock.lockDeviceSetPersistenceMode.Unlock() - return mock.DeviceSetPersistenceModeFunc(device, enableState) -} - -// DeviceSetPersistenceModeCalls gets all the calls that were made to DeviceSetPersistenceMode. -// Check the length with: -// -// len(mockedInterface.DeviceSetPersistenceModeCalls()) -func (mock *Interface) DeviceSetPersistenceModeCalls() []struct { - Device nvml.Device - EnableState nvml.EnableState -} { - var calls []struct { - Device nvml.Device - EnableState nvml.EnableState - } - mock.lockDeviceSetPersistenceMode.RLock() - calls = mock.calls.DeviceSetPersistenceMode - mock.lockDeviceSetPersistenceMode.RUnlock() - return calls -} - -// DeviceSetPowerManagementLimit calls DeviceSetPowerManagementLimitFunc. -func (mock *Interface) DeviceSetPowerManagementLimit(device nvml.Device, v uint32) nvml.Return { - if mock.DeviceSetPowerManagementLimitFunc == nil { - panic("Interface.DeviceSetPowerManagementLimitFunc: method is nil but Interface.DeviceSetPowerManagementLimit was just called") - } - callInfo := struct { - Device nvml.Device - V uint32 - }{ - Device: device, - V: v, - } - mock.lockDeviceSetPowerManagementLimit.Lock() - mock.calls.DeviceSetPowerManagementLimit = append(mock.calls.DeviceSetPowerManagementLimit, callInfo) - mock.lockDeviceSetPowerManagementLimit.Unlock() - return mock.DeviceSetPowerManagementLimitFunc(device, v) -} - -// DeviceSetPowerManagementLimitCalls gets all the calls that were made to DeviceSetPowerManagementLimit. -// Check the length with: -// -// len(mockedInterface.DeviceSetPowerManagementLimitCalls()) -func (mock *Interface) DeviceSetPowerManagementLimitCalls() []struct { - Device nvml.Device - V uint32 -} { - var calls []struct { - Device nvml.Device - V uint32 - } - mock.lockDeviceSetPowerManagementLimit.RLock() - calls = mock.calls.DeviceSetPowerManagementLimit - mock.lockDeviceSetPowerManagementLimit.RUnlock() - return calls -} - -// DeviceSetPowerManagementLimit_v2 calls DeviceSetPowerManagementLimit_v2Func. -func (mock *Interface) DeviceSetPowerManagementLimit_v2(device nvml.Device, powerValue_v2 *nvml.PowerValue_v2) nvml.Return { - if mock.DeviceSetPowerManagementLimit_v2Func == nil { - panic("Interface.DeviceSetPowerManagementLimit_v2Func: method is nil but Interface.DeviceSetPowerManagementLimit_v2 was just called") - } - callInfo := struct { - Device nvml.Device - PowerValue_v2 *nvml.PowerValue_v2 - }{ - Device: device, - PowerValue_v2: powerValue_v2, - } - mock.lockDeviceSetPowerManagementLimit_v2.Lock() - mock.calls.DeviceSetPowerManagementLimit_v2 = append(mock.calls.DeviceSetPowerManagementLimit_v2, callInfo) - mock.lockDeviceSetPowerManagementLimit_v2.Unlock() - return mock.DeviceSetPowerManagementLimit_v2Func(device, powerValue_v2) -} - -// DeviceSetPowerManagementLimit_v2Calls gets all the calls that were made to DeviceSetPowerManagementLimit_v2. -// Check the length with: -// -// len(mockedInterface.DeviceSetPowerManagementLimit_v2Calls()) -func (mock *Interface) DeviceSetPowerManagementLimit_v2Calls() []struct { - Device nvml.Device - PowerValue_v2 *nvml.PowerValue_v2 -} { - var calls []struct { - Device nvml.Device - PowerValue_v2 *nvml.PowerValue_v2 - } - mock.lockDeviceSetPowerManagementLimit_v2.RLock() - calls = mock.calls.DeviceSetPowerManagementLimit_v2 - mock.lockDeviceSetPowerManagementLimit_v2.RUnlock() - return calls -} - -// DeviceSetTemperatureThreshold calls DeviceSetTemperatureThresholdFunc. -func (mock *Interface) DeviceSetTemperatureThreshold(device nvml.Device, temperatureThresholds nvml.TemperatureThresholds, n int) nvml.Return { - if mock.DeviceSetTemperatureThresholdFunc == nil { - panic("Interface.DeviceSetTemperatureThresholdFunc: method is nil but Interface.DeviceSetTemperatureThreshold was just called") - } - callInfo := struct { - Device nvml.Device - TemperatureThresholds nvml.TemperatureThresholds - N int - }{ - Device: device, - TemperatureThresholds: temperatureThresholds, - N: n, - } - mock.lockDeviceSetTemperatureThreshold.Lock() - mock.calls.DeviceSetTemperatureThreshold = append(mock.calls.DeviceSetTemperatureThreshold, callInfo) - mock.lockDeviceSetTemperatureThreshold.Unlock() - return mock.DeviceSetTemperatureThresholdFunc(device, temperatureThresholds, n) -} - -// DeviceSetTemperatureThresholdCalls gets all the calls that were made to DeviceSetTemperatureThreshold. -// Check the length with: -// -// len(mockedInterface.DeviceSetTemperatureThresholdCalls()) -func (mock *Interface) DeviceSetTemperatureThresholdCalls() []struct { - Device nvml.Device - TemperatureThresholds nvml.TemperatureThresholds - N int -} { - var calls []struct { - Device nvml.Device - TemperatureThresholds nvml.TemperatureThresholds - N int - } - mock.lockDeviceSetTemperatureThreshold.RLock() - calls = mock.calls.DeviceSetTemperatureThreshold - mock.lockDeviceSetTemperatureThreshold.RUnlock() - return calls -} - -// DeviceSetVgpuCapabilities calls DeviceSetVgpuCapabilitiesFunc. -func (mock *Interface) DeviceSetVgpuCapabilities(device nvml.Device, deviceVgpuCapability nvml.DeviceVgpuCapability, enableState nvml.EnableState) nvml.Return { - if mock.DeviceSetVgpuCapabilitiesFunc == nil { - panic("Interface.DeviceSetVgpuCapabilitiesFunc: method is nil but Interface.DeviceSetVgpuCapabilities was just called") - } - callInfo := struct { - Device nvml.Device - DeviceVgpuCapability nvml.DeviceVgpuCapability - EnableState nvml.EnableState - }{ - Device: device, - DeviceVgpuCapability: deviceVgpuCapability, - EnableState: enableState, - } - mock.lockDeviceSetVgpuCapabilities.Lock() - mock.calls.DeviceSetVgpuCapabilities = append(mock.calls.DeviceSetVgpuCapabilities, callInfo) - mock.lockDeviceSetVgpuCapabilities.Unlock() - return mock.DeviceSetVgpuCapabilitiesFunc(device, deviceVgpuCapability, enableState) -} - -// DeviceSetVgpuCapabilitiesCalls gets all the calls that were made to DeviceSetVgpuCapabilities. -// Check the length with: -// -// len(mockedInterface.DeviceSetVgpuCapabilitiesCalls()) -func (mock *Interface) DeviceSetVgpuCapabilitiesCalls() []struct { - Device nvml.Device - DeviceVgpuCapability nvml.DeviceVgpuCapability - EnableState nvml.EnableState -} { - var calls []struct { - Device nvml.Device - DeviceVgpuCapability nvml.DeviceVgpuCapability - EnableState nvml.EnableState - } - mock.lockDeviceSetVgpuCapabilities.RLock() - calls = mock.calls.DeviceSetVgpuCapabilities - mock.lockDeviceSetVgpuCapabilities.RUnlock() - return calls -} - -// DeviceSetVgpuHeterogeneousMode calls DeviceSetVgpuHeterogeneousModeFunc. -func (mock *Interface) DeviceSetVgpuHeterogeneousMode(device nvml.Device, vgpuHeterogeneousMode nvml.VgpuHeterogeneousMode) nvml.Return { - if mock.DeviceSetVgpuHeterogeneousModeFunc == nil { - panic("Interface.DeviceSetVgpuHeterogeneousModeFunc: method is nil but Interface.DeviceSetVgpuHeterogeneousMode was just called") - } - callInfo := struct { - Device nvml.Device - VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode - }{ - Device: device, - VgpuHeterogeneousMode: vgpuHeterogeneousMode, - } - mock.lockDeviceSetVgpuHeterogeneousMode.Lock() - mock.calls.DeviceSetVgpuHeterogeneousMode = append(mock.calls.DeviceSetVgpuHeterogeneousMode, callInfo) - mock.lockDeviceSetVgpuHeterogeneousMode.Unlock() - return mock.DeviceSetVgpuHeterogeneousModeFunc(device, vgpuHeterogeneousMode) -} - -// DeviceSetVgpuHeterogeneousModeCalls gets all the calls that were made to DeviceSetVgpuHeterogeneousMode. -// Check the length with: -// -// len(mockedInterface.DeviceSetVgpuHeterogeneousModeCalls()) -func (mock *Interface) DeviceSetVgpuHeterogeneousModeCalls() []struct { - Device nvml.Device - VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode -} { - var calls []struct { - Device nvml.Device - VgpuHeterogeneousMode nvml.VgpuHeterogeneousMode - } - mock.lockDeviceSetVgpuHeterogeneousMode.RLock() - calls = mock.calls.DeviceSetVgpuHeterogeneousMode - mock.lockDeviceSetVgpuHeterogeneousMode.RUnlock() - return calls -} - -// DeviceSetVgpuSchedulerState calls DeviceSetVgpuSchedulerStateFunc. -func (mock *Interface) DeviceSetVgpuSchedulerState(device nvml.Device, vgpuSchedulerSetState *nvml.VgpuSchedulerSetState) nvml.Return { - if mock.DeviceSetVgpuSchedulerStateFunc == nil { - panic("Interface.DeviceSetVgpuSchedulerStateFunc: method is nil but Interface.DeviceSetVgpuSchedulerState was just called") - } - callInfo := struct { - Device nvml.Device - VgpuSchedulerSetState *nvml.VgpuSchedulerSetState - }{ - Device: device, - VgpuSchedulerSetState: vgpuSchedulerSetState, - } - mock.lockDeviceSetVgpuSchedulerState.Lock() - mock.calls.DeviceSetVgpuSchedulerState = append(mock.calls.DeviceSetVgpuSchedulerState, callInfo) - mock.lockDeviceSetVgpuSchedulerState.Unlock() - return mock.DeviceSetVgpuSchedulerStateFunc(device, vgpuSchedulerSetState) -} - -// DeviceSetVgpuSchedulerStateCalls gets all the calls that were made to DeviceSetVgpuSchedulerState. -// Check the length with: -// -// len(mockedInterface.DeviceSetVgpuSchedulerStateCalls()) -func (mock *Interface) DeviceSetVgpuSchedulerStateCalls() []struct { - Device nvml.Device - VgpuSchedulerSetState *nvml.VgpuSchedulerSetState -} { - var calls []struct { - Device nvml.Device - VgpuSchedulerSetState *nvml.VgpuSchedulerSetState - } - mock.lockDeviceSetVgpuSchedulerState.RLock() - calls = mock.calls.DeviceSetVgpuSchedulerState - mock.lockDeviceSetVgpuSchedulerState.RUnlock() - return calls -} - -// DeviceSetVirtualizationMode calls DeviceSetVirtualizationModeFunc. -func (mock *Interface) DeviceSetVirtualizationMode(device nvml.Device, gpuVirtualizationMode nvml.GpuVirtualizationMode) nvml.Return { - if mock.DeviceSetVirtualizationModeFunc == nil { - panic("Interface.DeviceSetVirtualizationModeFunc: method is nil but Interface.DeviceSetVirtualizationMode was just called") - } - callInfo := struct { - Device nvml.Device - GpuVirtualizationMode nvml.GpuVirtualizationMode - }{ - Device: device, - GpuVirtualizationMode: gpuVirtualizationMode, - } - mock.lockDeviceSetVirtualizationMode.Lock() - mock.calls.DeviceSetVirtualizationMode = append(mock.calls.DeviceSetVirtualizationMode, callInfo) - mock.lockDeviceSetVirtualizationMode.Unlock() - return mock.DeviceSetVirtualizationModeFunc(device, gpuVirtualizationMode) -} - -// DeviceSetVirtualizationModeCalls gets all the calls that were made to DeviceSetVirtualizationMode. -// Check the length with: -// -// len(mockedInterface.DeviceSetVirtualizationModeCalls()) -func (mock *Interface) DeviceSetVirtualizationModeCalls() []struct { - Device nvml.Device - GpuVirtualizationMode nvml.GpuVirtualizationMode -} { - var calls []struct { - Device nvml.Device - GpuVirtualizationMode nvml.GpuVirtualizationMode - } - mock.lockDeviceSetVirtualizationMode.RLock() - calls = mock.calls.DeviceSetVirtualizationMode - mock.lockDeviceSetVirtualizationMode.RUnlock() - return calls -} - -// DeviceValidateInforom calls DeviceValidateInforomFunc. -func (mock *Interface) DeviceValidateInforom(device nvml.Device) nvml.Return { - if mock.DeviceValidateInforomFunc == nil { - panic("Interface.DeviceValidateInforomFunc: method is nil but Interface.DeviceValidateInforom was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceValidateInforom.Lock() - mock.calls.DeviceValidateInforom = append(mock.calls.DeviceValidateInforom, callInfo) - mock.lockDeviceValidateInforom.Unlock() - return mock.DeviceValidateInforomFunc(device) -} - -// DeviceValidateInforomCalls gets all the calls that were made to DeviceValidateInforom. -// Check the length with: -// -// len(mockedInterface.DeviceValidateInforomCalls()) -func (mock *Interface) DeviceValidateInforomCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceValidateInforom.RLock() - calls = mock.calls.DeviceValidateInforom - mock.lockDeviceValidateInforom.RUnlock() - return calls -} - -// DeviceWorkloadPowerProfileClearRequestedProfiles calls DeviceWorkloadPowerProfileClearRequestedProfilesFunc. -func (mock *Interface) DeviceWorkloadPowerProfileClearRequestedProfiles(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { - if mock.DeviceWorkloadPowerProfileClearRequestedProfilesFunc == nil { - panic("Interface.DeviceWorkloadPowerProfileClearRequestedProfilesFunc: method is nil but Interface.DeviceWorkloadPowerProfileClearRequestedProfiles was just called") - } - callInfo := struct { - Device nvml.Device - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles - }{ - Device: device, - WorkloadPowerProfileRequestedProfiles: workloadPowerProfileRequestedProfiles, - } - mock.lockDeviceWorkloadPowerProfileClearRequestedProfiles.Lock() - mock.calls.DeviceWorkloadPowerProfileClearRequestedProfiles = append(mock.calls.DeviceWorkloadPowerProfileClearRequestedProfiles, callInfo) - mock.lockDeviceWorkloadPowerProfileClearRequestedProfiles.Unlock() - return mock.DeviceWorkloadPowerProfileClearRequestedProfilesFunc(device, workloadPowerProfileRequestedProfiles) -} - -// DeviceWorkloadPowerProfileClearRequestedProfilesCalls gets all the calls that were made to DeviceWorkloadPowerProfileClearRequestedProfiles. -// Check the length with: -// -// len(mockedInterface.DeviceWorkloadPowerProfileClearRequestedProfilesCalls()) -func (mock *Interface) DeviceWorkloadPowerProfileClearRequestedProfilesCalls() []struct { - Device nvml.Device - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles -} { - var calls []struct { - Device nvml.Device - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles - } - mock.lockDeviceWorkloadPowerProfileClearRequestedProfiles.RLock() - calls = mock.calls.DeviceWorkloadPowerProfileClearRequestedProfiles - mock.lockDeviceWorkloadPowerProfileClearRequestedProfiles.RUnlock() - return calls -} - -// DeviceWorkloadPowerProfileGetCurrentProfiles calls DeviceWorkloadPowerProfileGetCurrentProfilesFunc. -func (mock *Interface) DeviceWorkloadPowerProfileGetCurrentProfiles(device nvml.Device) (nvml.WorkloadPowerProfileCurrentProfiles, nvml.Return) { - if mock.DeviceWorkloadPowerProfileGetCurrentProfilesFunc == nil { - panic("Interface.DeviceWorkloadPowerProfileGetCurrentProfilesFunc: method is nil but Interface.DeviceWorkloadPowerProfileGetCurrentProfiles was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceWorkloadPowerProfileGetCurrentProfiles.Lock() - mock.calls.DeviceWorkloadPowerProfileGetCurrentProfiles = append(mock.calls.DeviceWorkloadPowerProfileGetCurrentProfiles, callInfo) - mock.lockDeviceWorkloadPowerProfileGetCurrentProfiles.Unlock() - return mock.DeviceWorkloadPowerProfileGetCurrentProfilesFunc(device) -} - -// DeviceWorkloadPowerProfileGetCurrentProfilesCalls gets all the calls that were made to DeviceWorkloadPowerProfileGetCurrentProfiles. -// Check the length with: -// -// len(mockedInterface.DeviceWorkloadPowerProfileGetCurrentProfilesCalls()) -func (mock *Interface) DeviceWorkloadPowerProfileGetCurrentProfilesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceWorkloadPowerProfileGetCurrentProfiles.RLock() - calls = mock.calls.DeviceWorkloadPowerProfileGetCurrentProfiles - mock.lockDeviceWorkloadPowerProfileGetCurrentProfiles.RUnlock() - return calls -} - -// DeviceWorkloadPowerProfileGetProfilesInfo calls DeviceWorkloadPowerProfileGetProfilesInfoFunc. -func (mock *Interface) DeviceWorkloadPowerProfileGetProfilesInfo(device nvml.Device) (nvml.WorkloadPowerProfileProfilesInfo, nvml.Return) { - if mock.DeviceWorkloadPowerProfileGetProfilesInfoFunc == nil { - panic("Interface.DeviceWorkloadPowerProfileGetProfilesInfoFunc: method is nil but Interface.DeviceWorkloadPowerProfileGetProfilesInfo was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockDeviceWorkloadPowerProfileGetProfilesInfo.Lock() - mock.calls.DeviceWorkloadPowerProfileGetProfilesInfo = append(mock.calls.DeviceWorkloadPowerProfileGetProfilesInfo, callInfo) - mock.lockDeviceWorkloadPowerProfileGetProfilesInfo.Unlock() - return mock.DeviceWorkloadPowerProfileGetProfilesInfoFunc(device) -} - -// DeviceWorkloadPowerProfileGetProfilesInfoCalls gets all the calls that were made to DeviceWorkloadPowerProfileGetProfilesInfo. -// Check the length with: -// -// len(mockedInterface.DeviceWorkloadPowerProfileGetProfilesInfoCalls()) -func (mock *Interface) DeviceWorkloadPowerProfileGetProfilesInfoCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockDeviceWorkloadPowerProfileGetProfilesInfo.RLock() - calls = mock.calls.DeviceWorkloadPowerProfileGetProfilesInfo - mock.lockDeviceWorkloadPowerProfileGetProfilesInfo.RUnlock() - return calls -} - -// DeviceWorkloadPowerProfileSetRequestedProfiles calls DeviceWorkloadPowerProfileSetRequestedProfilesFunc. -func (mock *Interface) DeviceWorkloadPowerProfileSetRequestedProfiles(device nvml.Device, workloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles) nvml.Return { - if mock.DeviceWorkloadPowerProfileSetRequestedProfilesFunc == nil { - panic("Interface.DeviceWorkloadPowerProfileSetRequestedProfilesFunc: method is nil but Interface.DeviceWorkloadPowerProfileSetRequestedProfiles was just called") - } - callInfo := struct { - Device nvml.Device - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles - }{ - Device: device, - WorkloadPowerProfileRequestedProfiles: workloadPowerProfileRequestedProfiles, - } - mock.lockDeviceWorkloadPowerProfileSetRequestedProfiles.Lock() - mock.calls.DeviceWorkloadPowerProfileSetRequestedProfiles = append(mock.calls.DeviceWorkloadPowerProfileSetRequestedProfiles, callInfo) - mock.lockDeviceWorkloadPowerProfileSetRequestedProfiles.Unlock() - return mock.DeviceWorkloadPowerProfileSetRequestedProfilesFunc(device, workloadPowerProfileRequestedProfiles) -} - -// DeviceWorkloadPowerProfileSetRequestedProfilesCalls gets all the calls that were made to DeviceWorkloadPowerProfileSetRequestedProfiles. -// Check the length with: -// -// len(mockedInterface.DeviceWorkloadPowerProfileSetRequestedProfilesCalls()) -func (mock *Interface) DeviceWorkloadPowerProfileSetRequestedProfilesCalls() []struct { - Device nvml.Device - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles -} { - var calls []struct { - Device nvml.Device - WorkloadPowerProfileRequestedProfiles *nvml.WorkloadPowerProfileRequestedProfiles - } - mock.lockDeviceWorkloadPowerProfileSetRequestedProfiles.RLock() - calls = mock.calls.DeviceWorkloadPowerProfileSetRequestedProfiles - mock.lockDeviceWorkloadPowerProfileSetRequestedProfiles.RUnlock() - return calls -} - -// ErrorString calls ErrorStringFunc. -func (mock *Interface) ErrorString(returnMoqParam nvml.Return) string { - if mock.ErrorStringFunc == nil { - panic("Interface.ErrorStringFunc: method is nil but Interface.ErrorString was just called") - } - callInfo := struct { - ReturnMoqParam nvml.Return - }{ - ReturnMoqParam: returnMoqParam, - } - mock.lockErrorString.Lock() - mock.calls.ErrorString = append(mock.calls.ErrorString, callInfo) - mock.lockErrorString.Unlock() - return mock.ErrorStringFunc(returnMoqParam) -} - -// ErrorStringCalls gets all the calls that were made to ErrorString. -// Check the length with: -// -// len(mockedInterface.ErrorStringCalls()) -func (mock *Interface) ErrorStringCalls() []struct { - ReturnMoqParam nvml.Return -} { - var calls []struct { - ReturnMoqParam nvml.Return - } - mock.lockErrorString.RLock() - calls = mock.calls.ErrorString - mock.lockErrorString.RUnlock() - return calls -} - -// EventSetCreate calls EventSetCreateFunc. -func (mock *Interface) EventSetCreate() (nvml.EventSet, nvml.Return) { - if mock.EventSetCreateFunc == nil { - panic("Interface.EventSetCreateFunc: method is nil but Interface.EventSetCreate was just called") - } - callInfo := struct { - }{} - mock.lockEventSetCreate.Lock() - mock.calls.EventSetCreate = append(mock.calls.EventSetCreate, callInfo) - mock.lockEventSetCreate.Unlock() - return mock.EventSetCreateFunc() -} - -// EventSetCreateCalls gets all the calls that were made to EventSetCreate. -// Check the length with: -// -// len(mockedInterface.EventSetCreateCalls()) -func (mock *Interface) EventSetCreateCalls() []struct { -} { - var calls []struct { - } - mock.lockEventSetCreate.RLock() - calls = mock.calls.EventSetCreate - mock.lockEventSetCreate.RUnlock() - return calls -} - -// EventSetFree calls EventSetFreeFunc. -func (mock *Interface) EventSetFree(eventSet nvml.EventSet) nvml.Return { - if mock.EventSetFreeFunc == nil { - panic("Interface.EventSetFreeFunc: method is nil but Interface.EventSetFree was just called") - } - callInfo := struct { - EventSet nvml.EventSet - }{ - EventSet: eventSet, - } - mock.lockEventSetFree.Lock() - mock.calls.EventSetFree = append(mock.calls.EventSetFree, callInfo) - mock.lockEventSetFree.Unlock() - return mock.EventSetFreeFunc(eventSet) -} - -// EventSetFreeCalls gets all the calls that were made to EventSetFree. -// Check the length with: -// -// len(mockedInterface.EventSetFreeCalls()) -func (mock *Interface) EventSetFreeCalls() []struct { - EventSet nvml.EventSet -} { - var calls []struct { - EventSet nvml.EventSet - } - mock.lockEventSetFree.RLock() - calls = mock.calls.EventSetFree - mock.lockEventSetFree.RUnlock() - return calls -} - -// EventSetWait calls EventSetWaitFunc. -func (mock *Interface) EventSetWait(eventSet nvml.EventSet, v uint32) (nvml.EventData, nvml.Return) { - if mock.EventSetWaitFunc == nil { - panic("Interface.EventSetWaitFunc: method is nil but Interface.EventSetWait was just called") - } - callInfo := struct { - EventSet nvml.EventSet - V uint32 - }{ - EventSet: eventSet, - V: v, - } - mock.lockEventSetWait.Lock() - mock.calls.EventSetWait = append(mock.calls.EventSetWait, callInfo) - mock.lockEventSetWait.Unlock() - return mock.EventSetWaitFunc(eventSet, v) -} - -// EventSetWaitCalls gets all the calls that were made to EventSetWait. -// Check the length with: -// -// len(mockedInterface.EventSetWaitCalls()) -func (mock *Interface) EventSetWaitCalls() []struct { - EventSet nvml.EventSet - V uint32 -} { - var calls []struct { - EventSet nvml.EventSet - V uint32 - } - mock.lockEventSetWait.RLock() - calls = mock.calls.EventSetWait - mock.lockEventSetWait.RUnlock() - return calls -} - -// Extensions calls ExtensionsFunc. -func (mock *Interface) Extensions() nvml.ExtendedInterface { - if mock.ExtensionsFunc == nil { - panic("Interface.ExtensionsFunc: method is nil but Interface.Extensions was just called") - } - callInfo := struct { - }{} - mock.lockExtensions.Lock() - mock.calls.Extensions = append(mock.calls.Extensions, callInfo) - mock.lockExtensions.Unlock() - return mock.ExtensionsFunc() -} - -// ExtensionsCalls gets all the calls that were made to Extensions. -// Check the length with: -// -// len(mockedInterface.ExtensionsCalls()) -func (mock *Interface) ExtensionsCalls() []struct { -} { - var calls []struct { - } - mock.lockExtensions.RLock() - calls = mock.calls.Extensions - mock.lockExtensions.RUnlock() - return calls -} - -// GetExcludedDeviceCount calls GetExcludedDeviceCountFunc. -func (mock *Interface) GetExcludedDeviceCount() (int, nvml.Return) { - if mock.GetExcludedDeviceCountFunc == nil { - panic("Interface.GetExcludedDeviceCountFunc: method is nil but Interface.GetExcludedDeviceCount was just called") - } - callInfo := struct { - }{} - mock.lockGetExcludedDeviceCount.Lock() - mock.calls.GetExcludedDeviceCount = append(mock.calls.GetExcludedDeviceCount, callInfo) - mock.lockGetExcludedDeviceCount.Unlock() - return mock.GetExcludedDeviceCountFunc() -} - -// GetExcludedDeviceCountCalls gets all the calls that were made to GetExcludedDeviceCount. -// Check the length with: -// -// len(mockedInterface.GetExcludedDeviceCountCalls()) -func (mock *Interface) GetExcludedDeviceCountCalls() []struct { -} { - var calls []struct { - } - mock.lockGetExcludedDeviceCount.RLock() - calls = mock.calls.GetExcludedDeviceCount - mock.lockGetExcludedDeviceCount.RUnlock() - return calls -} - -// GetExcludedDeviceInfoByIndex calls GetExcludedDeviceInfoByIndexFunc. -func (mock *Interface) GetExcludedDeviceInfoByIndex(n int) (nvml.ExcludedDeviceInfo, nvml.Return) { - if mock.GetExcludedDeviceInfoByIndexFunc == nil { - panic("Interface.GetExcludedDeviceInfoByIndexFunc: method is nil but Interface.GetExcludedDeviceInfoByIndex was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetExcludedDeviceInfoByIndex.Lock() - mock.calls.GetExcludedDeviceInfoByIndex = append(mock.calls.GetExcludedDeviceInfoByIndex, callInfo) - mock.lockGetExcludedDeviceInfoByIndex.Unlock() - return mock.GetExcludedDeviceInfoByIndexFunc(n) -} - -// GetExcludedDeviceInfoByIndexCalls gets all the calls that were made to GetExcludedDeviceInfoByIndex. -// Check the length with: -// -// len(mockedInterface.GetExcludedDeviceInfoByIndexCalls()) -func (mock *Interface) GetExcludedDeviceInfoByIndexCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetExcludedDeviceInfoByIndex.RLock() - calls = mock.calls.GetExcludedDeviceInfoByIndex - mock.lockGetExcludedDeviceInfoByIndex.RUnlock() - return calls -} - -// GetVgpuCompatibility calls GetVgpuCompatibilityFunc. -func (mock *Interface) GetVgpuCompatibility(vgpuMetadata *nvml.VgpuMetadata, vgpuPgpuMetadata *nvml.VgpuPgpuMetadata) (nvml.VgpuPgpuCompatibility, nvml.Return) { - if mock.GetVgpuCompatibilityFunc == nil { - panic("Interface.GetVgpuCompatibilityFunc: method is nil but Interface.GetVgpuCompatibility was just called") - } - callInfo := struct { - VgpuMetadata *nvml.VgpuMetadata - VgpuPgpuMetadata *nvml.VgpuPgpuMetadata - }{ - VgpuMetadata: vgpuMetadata, - VgpuPgpuMetadata: vgpuPgpuMetadata, - } - mock.lockGetVgpuCompatibility.Lock() - mock.calls.GetVgpuCompatibility = append(mock.calls.GetVgpuCompatibility, callInfo) - mock.lockGetVgpuCompatibility.Unlock() - return mock.GetVgpuCompatibilityFunc(vgpuMetadata, vgpuPgpuMetadata) -} - -// GetVgpuCompatibilityCalls gets all the calls that were made to GetVgpuCompatibility. -// Check the length with: -// -// len(mockedInterface.GetVgpuCompatibilityCalls()) -func (mock *Interface) GetVgpuCompatibilityCalls() []struct { - VgpuMetadata *nvml.VgpuMetadata - VgpuPgpuMetadata *nvml.VgpuPgpuMetadata -} { - var calls []struct { - VgpuMetadata *nvml.VgpuMetadata - VgpuPgpuMetadata *nvml.VgpuPgpuMetadata - } - mock.lockGetVgpuCompatibility.RLock() - calls = mock.calls.GetVgpuCompatibility - mock.lockGetVgpuCompatibility.RUnlock() - return calls -} - -// GetVgpuDriverCapabilities calls GetVgpuDriverCapabilitiesFunc. -func (mock *Interface) GetVgpuDriverCapabilities(vgpuDriverCapability nvml.VgpuDriverCapability) (bool, nvml.Return) { - if mock.GetVgpuDriverCapabilitiesFunc == nil { - panic("Interface.GetVgpuDriverCapabilitiesFunc: method is nil but Interface.GetVgpuDriverCapabilities was just called") - } - callInfo := struct { - VgpuDriverCapability nvml.VgpuDriverCapability - }{ - VgpuDriverCapability: vgpuDriverCapability, - } - mock.lockGetVgpuDriverCapabilities.Lock() - mock.calls.GetVgpuDriverCapabilities = append(mock.calls.GetVgpuDriverCapabilities, callInfo) - mock.lockGetVgpuDriverCapabilities.Unlock() - return mock.GetVgpuDriverCapabilitiesFunc(vgpuDriverCapability) -} - -// GetVgpuDriverCapabilitiesCalls gets all the calls that were made to GetVgpuDriverCapabilities. -// Check the length with: -// -// len(mockedInterface.GetVgpuDriverCapabilitiesCalls()) -func (mock *Interface) GetVgpuDriverCapabilitiesCalls() []struct { - VgpuDriverCapability nvml.VgpuDriverCapability -} { - var calls []struct { - VgpuDriverCapability nvml.VgpuDriverCapability - } - mock.lockGetVgpuDriverCapabilities.RLock() - calls = mock.calls.GetVgpuDriverCapabilities - mock.lockGetVgpuDriverCapabilities.RUnlock() - return calls -} - -// GetVgpuVersion calls GetVgpuVersionFunc. -func (mock *Interface) GetVgpuVersion() (nvml.VgpuVersion, nvml.VgpuVersion, nvml.Return) { - if mock.GetVgpuVersionFunc == nil { - panic("Interface.GetVgpuVersionFunc: method is nil but Interface.GetVgpuVersion was just called") - } - callInfo := struct { - }{} - mock.lockGetVgpuVersion.Lock() - mock.calls.GetVgpuVersion = append(mock.calls.GetVgpuVersion, callInfo) - mock.lockGetVgpuVersion.Unlock() - return mock.GetVgpuVersionFunc() -} - -// GetVgpuVersionCalls gets all the calls that were made to GetVgpuVersion. -// Check the length with: -// -// len(mockedInterface.GetVgpuVersionCalls()) -func (mock *Interface) GetVgpuVersionCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVgpuVersion.RLock() - calls = mock.calls.GetVgpuVersion - mock.lockGetVgpuVersion.RUnlock() - return calls -} - -// GpmMetricsGet calls GpmMetricsGetFunc. -func (mock *Interface) GpmMetricsGet(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.Return { - if mock.GpmMetricsGetFunc == nil { - panic("Interface.GpmMetricsGetFunc: method is nil but Interface.GpmMetricsGet was just called") - } - callInfo := struct { - GpmMetricsGetType *nvml.GpmMetricsGetType - }{ - GpmMetricsGetType: gpmMetricsGetType, - } - mock.lockGpmMetricsGet.Lock() - mock.calls.GpmMetricsGet = append(mock.calls.GpmMetricsGet, callInfo) - mock.lockGpmMetricsGet.Unlock() - return mock.GpmMetricsGetFunc(gpmMetricsGetType) -} - -// GpmMetricsGetCalls gets all the calls that were made to GpmMetricsGet. -// Check the length with: -// -// len(mockedInterface.GpmMetricsGetCalls()) -func (mock *Interface) GpmMetricsGetCalls() []struct { - GpmMetricsGetType *nvml.GpmMetricsGetType -} { - var calls []struct { - GpmMetricsGetType *nvml.GpmMetricsGetType - } - mock.lockGpmMetricsGet.RLock() - calls = mock.calls.GpmMetricsGet - mock.lockGpmMetricsGet.RUnlock() - return calls -} - -// GpmMetricsGetV calls GpmMetricsGetVFunc. -func (mock *Interface) GpmMetricsGetV(gpmMetricsGetType *nvml.GpmMetricsGetType) nvml.GpmMetricsGetVType { - if mock.GpmMetricsGetVFunc == nil { - panic("Interface.GpmMetricsGetVFunc: method is nil but Interface.GpmMetricsGetV was just called") - } - callInfo := struct { - GpmMetricsGetType *nvml.GpmMetricsGetType - }{ - GpmMetricsGetType: gpmMetricsGetType, - } - mock.lockGpmMetricsGetV.Lock() - mock.calls.GpmMetricsGetV = append(mock.calls.GpmMetricsGetV, callInfo) - mock.lockGpmMetricsGetV.Unlock() - return mock.GpmMetricsGetVFunc(gpmMetricsGetType) -} - -// GpmMetricsGetVCalls gets all the calls that were made to GpmMetricsGetV. -// Check the length with: -// -// len(mockedInterface.GpmMetricsGetVCalls()) -func (mock *Interface) GpmMetricsGetVCalls() []struct { - GpmMetricsGetType *nvml.GpmMetricsGetType -} { - var calls []struct { - GpmMetricsGetType *nvml.GpmMetricsGetType - } - mock.lockGpmMetricsGetV.RLock() - calls = mock.calls.GpmMetricsGetV - mock.lockGpmMetricsGetV.RUnlock() - return calls -} - -// GpmMigSampleGet calls GpmMigSampleGetFunc. -func (mock *Interface) GpmMigSampleGet(device nvml.Device, n int, gpmSample nvml.GpmSample) nvml.Return { - if mock.GpmMigSampleGetFunc == nil { - panic("Interface.GpmMigSampleGetFunc: method is nil but Interface.GpmMigSampleGet was just called") - } - callInfo := struct { - Device nvml.Device - N int - GpmSample nvml.GpmSample - }{ - Device: device, - N: n, - GpmSample: gpmSample, - } - mock.lockGpmMigSampleGet.Lock() - mock.calls.GpmMigSampleGet = append(mock.calls.GpmMigSampleGet, callInfo) - mock.lockGpmMigSampleGet.Unlock() - return mock.GpmMigSampleGetFunc(device, n, gpmSample) -} - -// GpmMigSampleGetCalls gets all the calls that were made to GpmMigSampleGet. -// Check the length with: -// -// len(mockedInterface.GpmMigSampleGetCalls()) -func (mock *Interface) GpmMigSampleGetCalls() []struct { - Device nvml.Device - N int - GpmSample nvml.GpmSample -} { - var calls []struct { - Device nvml.Device - N int - GpmSample nvml.GpmSample - } - mock.lockGpmMigSampleGet.RLock() - calls = mock.calls.GpmMigSampleGet - mock.lockGpmMigSampleGet.RUnlock() - return calls -} - -// GpmQueryDeviceSupport calls GpmQueryDeviceSupportFunc. -func (mock *Interface) GpmQueryDeviceSupport(device nvml.Device) (nvml.GpmSupport, nvml.Return) { - if mock.GpmQueryDeviceSupportFunc == nil { - panic("Interface.GpmQueryDeviceSupportFunc: method is nil but Interface.GpmQueryDeviceSupport was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockGpmQueryDeviceSupport.Lock() - mock.calls.GpmQueryDeviceSupport = append(mock.calls.GpmQueryDeviceSupport, callInfo) - mock.lockGpmQueryDeviceSupport.Unlock() - return mock.GpmQueryDeviceSupportFunc(device) -} - -// GpmQueryDeviceSupportCalls gets all the calls that were made to GpmQueryDeviceSupport. -// Check the length with: -// -// len(mockedInterface.GpmQueryDeviceSupportCalls()) -func (mock *Interface) GpmQueryDeviceSupportCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockGpmQueryDeviceSupport.RLock() - calls = mock.calls.GpmQueryDeviceSupport - mock.lockGpmQueryDeviceSupport.RUnlock() - return calls -} - -// GpmQueryDeviceSupportV calls GpmQueryDeviceSupportVFunc. -func (mock *Interface) GpmQueryDeviceSupportV(device nvml.Device) nvml.GpmSupportV { - if mock.GpmQueryDeviceSupportVFunc == nil { - panic("Interface.GpmQueryDeviceSupportVFunc: method is nil but Interface.GpmQueryDeviceSupportV was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockGpmQueryDeviceSupportV.Lock() - mock.calls.GpmQueryDeviceSupportV = append(mock.calls.GpmQueryDeviceSupportV, callInfo) - mock.lockGpmQueryDeviceSupportV.Unlock() - return mock.GpmQueryDeviceSupportVFunc(device) -} - -// GpmQueryDeviceSupportVCalls gets all the calls that were made to GpmQueryDeviceSupportV. -// Check the length with: -// -// len(mockedInterface.GpmQueryDeviceSupportVCalls()) -func (mock *Interface) GpmQueryDeviceSupportVCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockGpmQueryDeviceSupportV.RLock() - calls = mock.calls.GpmQueryDeviceSupportV - mock.lockGpmQueryDeviceSupportV.RUnlock() - return calls -} - -// GpmQueryIfStreamingEnabled calls GpmQueryIfStreamingEnabledFunc. -func (mock *Interface) GpmQueryIfStreamingEnabled(device nvml.Device) (uint32, nvml.Return) { - if mock.GpmQueryIfStreamingEnabledFunc == nil { - panic("Interface.GpmQueryIfStreamingEnabledFunc: method is nil but Interface.GpmQueryIfStreamingEnabled was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockGpmQueryIfStreamingEnabled.Lock() - mock.calls.GpmQueryIfStreamingEnabled = append(mock.calls.GpmQueryIfStreamingEnabled, callInfo) - mock.lockGpmQueryIfStreamingEnabled.Unlock() - return mock.GpmQueryIfStreamingEnabledFunc(device) -} - -// GpmQueryIfStreamingEnabledCalls gets all the calls that were made to GpmQueryIfStreamingEnabled. -// Check the length with: -// -// len(mockedInterface.GpmQueryIfStreamingEnabledCalls()) -func (mock *Interface) GpmQueryIfStreamingEnabledCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockGpmQueryIfStreamingEnabled.RLock() - calls = mock.calls.GpmQueryIfStreamingEnabled - mock.lockGpmQueryIfStreamingEnabled.RUnlock() - return calls -} - -// GpmSampleAlloc calls GpmSampleAllocFunc. -func (mock *Interface) GpmSampleAlloc() (nvml.GpmSample, nvml.Return) { - if mock.GpmSampleAllocFunc == nil { - panic("Interface.GpmSampleAllocFunc: method is nil but Interface.GpmSampleAlloc was just called") - } - callInfo := struct { - }{} - mock.lockGpmSampleAlloc.Lock() - mock.calls.GpmSampleAlloc = append(mock.calls.GpmSampleAlloc, callInfo) - mock.lockGpmSampleAlloc.Unlock() - return mock.GpmSampleAllocFunc() -} - -// GpmSampleAllocCalls gets all the calls that were made to GpmSampleAlloc. -// Check the length with: -// -// len(mockedInterface.GpmSampleAllocCalls()) -func (mock *Interface) GpmSampleAllocCalls() []struct { -} { - var calls []struct { - } - mock.lockGpmSampleAlloc.RLock() - calls = mock.calls.GpmSampleAlloc - mock.lockGpmSampleAlloc.RUnlock() - return calls -} - -// GpmSampleFree calls GpmSampleFreeFunc. -func (mock *Interface) GpmSampleFree(gpmSample nvml.GpmSample) nvml.Return { - if mock.GpmSampleFreeFunc == nil { - panic("Interface.GpmSampleFreeFunc: method is nil but Interface.GpmSampleFree was just called") - } - callInfo := struct { - GpmSample nvml.GpmSample - }{ - GpmSample: gpmSample, - } - mock.lockGpmSampleFree.Lock() - mock.calls.GpmSampleFree = append(mock.calls.GpmSampleFree, callInfo) - mock.lockGpmSampleFree.Unlock() - return mock.GpmSampleFreeFunc(gpmSample) -} - -// GpmSampleFreeCalls gets all the calls that were made to GpmSampleFree. -// Check the length with: -// -// len(mockedInterface.GpmSampleFreeCalls()) -func (mock *Interface) GpmSampleFreeCalls() []struct { - GpmSample nvml.GpmSample -} { - var calls []struct { - GpmSample nvml.GpmSample - } - mock.lockGpmSampleFree.RLock() - calls = mock.calls.GpmSampleFree - mock.lockGpmSampleFree.RUnlock() - return calls -} - -// GpmSampleGet calls GpmSampleGetFunc. -func (mock *Interface) GpmSampleGet(device nvml.Device, gpmSample nvml.GpmSample) nvml.Return { - if mock.GpmSampleGetFunc == nil { - panic("Interface.GpmSampleGetFunc: method is nil but Interface.GpmSampleGet was just called") - } - callInfo := struct { - Device nvml.Device - GpmSample nvml.GpmSample - }{ - Device: device, - GpmSample: gpmSample, - } - mock.lockGpmSampleGet.Lock() - mock.calls.GpmSampleGet = append(mock.calls.GpmSampleGet, callInfo) - mock.lockGpmSampleGet.Unlock() - return mock.GpmSampleGetFunc(device, gpmSample) -} - -// GpmSampleGetCalls gets all the calls that were made to GpmSampleGet. -// Check the length with: -// -// len(mockedInterface.GpmSampleGetCalls()) -func (mock *Interface) GpmSampleGetCalls() []struct { - Device nvml.Device - GpmSample nvml.GpmSample -} { - var calls []struct { - Device nvml.Device - GpmSample nvml.GpmSample - } - mock.lockGpmSampleGet.RLock() - calls = mock.calls.GpmSampleGet - mock.lockGpmSampleGet.RUnlock() - return calls -} - -// GpmSetStreamingEnabled calls GpmSetStreamingEnabledFunc. -func (mock *Interface) GpmSetStreamingEnabled(device nvml.Device, v uint32) nvml.Return { - if mock.GpmSetStreamingEnabledFunc == nil { - panic("Interface.GpmSetStreamingEnabledFunc: method is nil but Interface.GpmSetStreamingEnabled was just called") - } - callInfo := struct { - Device nvml.Device - V uint32 - }{ - Device: device, - V: v, - } - mock.lockGpmSetStreamingEnabled.Lock() - mock.calls.GpmSetStreamingEnabled = append(mock.calls.GpmSetStreamingEnabled, callInfo) - mock.lockGpmSetStreamingEnabled.Unlock() - return mock.GpmSetStreamingEnabledFunc(device, v) -} - -// GpmSetStreamingEnabledCalls gets all the calls that were made to GpmSetStreamingEnabled. -// Check the length with: -// -// len(mockedInterface.GpmSetStreamingEnabledCalls()) -func (mock *Interface) GpmSetStreamingEnabledCalls() []struct { - Device nvml.Device - V uint32 -} { - var calls []struct { - Device nvml.Device - V uint32 - } - mock.lockGpmSetStreamingEnabled.RLock() - calls = mock.calls.GpmSetStreamingEnabled - mock.lockGpmSetStreamingEnabled.RUnlock() - return calls -} - -// GpuInstanceCreateComputeInstance calls GpuInstanceCreateComputeInstanceFunc. -func (mock *Interface) GpuInstanceCreateComputeInstance(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (nvml.ComputeInstance, nvml.Return) { - if mock.GpuInstanceCreateComputeInstanceFunc == nil { - panic("Interface.GpuInstanceCreateComputeInstanceFunc: method is nil but Interface.GpuInstanceCreateComputeInstance was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - }{ - GpuInstance: gpuInstance, - ComputeInstanceProfileInfo: computeInstanceProfileInfo, - } - mock.lockGpuInstanceCreateComputeInstance.Lock() - mock.calls.GpuInstanceCreateComputeInstance = append(mock.calls.GpuInstanceCreateComputeInstance, callInfo) - mock.lockGpuInstanceCreateComputeInstance.Unlock() - return mock.GpuInstanceCreateComputeInstanceFunc(gpuInstance, computeInstanceProfileInfo) -} - -// GpuInstanceCreateComputeInstanceCalls gets all the calls that were made to GpuInstanceCreateComputeInstance. -// Check the length with: -// -// len(mockedInterface.GpuInstanceCreateComputeInstanceCalls()) -func (mock *Interface) GpuInstanceCreateComputeInstanceCalls() []struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo -} { - var calls []struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - mock.lockGpuInstanceCreateComputeInstance.RLock() - calls = mock.calls.GpuInstanceCreateComputeInstance - mock.lockGpuInstanceCreateComputeInstance.RUnlock() - return calls -} - -// GpuInstanceCreateComputeInstanceWithPlacement calls GpuInstanceCreateComputeInstanceWithPlacementFunc. -func (mock *Interface) GpuInstanceCreateComputeInstanceWithPlacement(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo, computeInstancePlacement *nvml.ComputeInstancePlacement) (nvml.ComputeInstance, nvml.Return) { - if mock.GpuInstanceCreateComputeInstanceWithPlacementFunc == nil { - panic("Interface.GpuInstanceCreateComputeInstanceWithPlacementFunc: method is nil but Interface.GpuInstanceCreateComputeInstanceWithPlacement was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - ComputeInstancePlacement *nvml.ComputeInstancePlacement - }{ - GpuInstance: gpuInstance, - ComputeInstanceProfileInfo: computeInstanceProfileInfo, - ComputeInstancePlacement: computeInstancePlacement, - } - mock.lockGpuInstanceCreateComputeInstanceWithPlacement.Lock() - mock.calls.GpuInstanceCreateComputeInstanceWithPlacement = append(mock.calls.GpuInstanceCreateComputeInstanceWithPlacement, callInfo) - mock.lockGpuInstanceCreateComputeInstanceWithPlacement.Unlock() - return mock.GpuInstanceCreateComputeInstanceWithPlacementFunc(gpuInstance, computeInstanceProfileInfo, computeInstancePlacement) -} - -// GpuInstanceCreateComputeInstanceWithPlacementCalls gets all the calls that were made to GpuInstanceCreateComputeInstanceWithPlacement. -// Check the length with: -// -// len(mockedInterface.GpuInstanceCreateComputeInstanceWithPlacementCalls()) -func (mock *Interface) GpuInstanceCreateComputeInstanceWithPlacementCalls() []struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - ComputeInstancePlacement *nvml.ComputeInstancePlacement -} { - var calls []struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - ComputeInstancePlacement *nvml.ComputeInstancePlacement - } - mock.lockGpuInstanceCreateComputeInstanceWithPlacement.RLock() - calls = mock.calls.GpuInstanceCreateComputeInstanceWithPlacement - mock.lockGpuInstanceCreateComputeInstanceWithPlacement.RUnlock() - return calls -} - -// GpuInstanceDestroy calls GpuInstanceDestroyFunc. -func (mock *Interface) GpuInstanceDestroy(gpuInstance nvml.GpuInstance) nvml.Return { - if mock.GpuInstanceDestroyFunc == nil { - panic("Interface.GpuInstanceDestroyFunc: method is nil but Interface.GpuInstanceDestroy was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - }{ - GpuInstance: gpuInstance, - } - mock.lockGpuInstanceDestroy.Lock() - mock.calls.GpuInstanceDestroy = append(mock.calls.GpuInstanceDestroy, callInfo) - mock.lockGpuInstanceDestroy.Unlock() - return mock.GpuInstanceDestroyFunc(gpuInstance) -} - -// GpuInstanceDestroyCalls gets all the calls that were made to GpuInstanceDestroy. -// Check the length with: -// -// len(mockedInterface.GpuInstanceDestroyCalls()) -func (mock *Interface) GpuInstanceDestroyCalls() []struct { - GpuInstance nvml.GpuInstance -} { - var calls []struct { - GpuInstance nvml.GpuInstance - } - mock.lockGpuInstanceDestroy.RLock() - calls = mock.calls.GpuInstanceDestroy - mock.lockGpuInstanceDestroy.RUnlock() - return calls -} - -// GpuInstanceGetActiveVgpus calls GpuInstanceGetActiveVgpusFunc. -func (mock *Interface) GpuInstanceGetActiveVgpus(gpuInstance nvml.GpuInstance) (nvml.ActiveVgpuInstanceInfo, nvml.Return) { - if mock.GpuInstanceGetActiveVgpusFunc == nil { - panic("Interface.GpuInstanceGetActiveVgpusFunc: method is nil but Interface.GpuInstanceGetActiveVgpus was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - }{ - GpuInstance: gpuInstance, - } - mock.lockGpuInstanceGetActiveVgpus.Lock() - mock.calls.GpuInstanceGetActiveVgpus = append(mock.calls.GpuInstanceGetActiveVgpus, callInfo) - mock.lockGpuInstanceGetActiveVgpus.Unlock() - return mock.GpuInstanceGetActiveVgpusFunc(gpuInstance) -} - -// GpuInstanceGetActiveVgpusCalls gets all the calls that were made to GpuInstanceGetActiveVgpus. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetActiveVgpusCalls()) -func (mock *Interface) GpuInstanceGetActiveVgpusCalls() []struct { - GpuInstance nvml.GpuInstance -} { - var calls []struct { - GpuInstance nvml.GpuInstance - } - mock.lockGpuInstanceGetActiveVgpus.RLock() - calls = mock.calls.GpuInstanceGetActiveVgpus - mock.lockGpuInstanceGetActiveVgpus.RUnlock() - return calls -} - -// GpuInstanceGetComputeInstanceById calls GpuInstanceGetComputeInstanceByIdFunc. -func (mock *Interface) GpuInstanceGetComputeInstanceById(gpuInstance nvml.GpuInstance, n int) (nvml.ComputeInstance, nvml.Return) { - if mock.GpuInstanceGetComputeInstanceByIdFunc == nil { - panic("Interface.GpuInstanceGetComputeInstanceByIdFunc: method is nil but Interface.GpuInstanceGetComputeInstanceById was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - N int - }{ - GpuInstance: gpuInstance, - N: n, - } - mock.lockGpuInstanceGetComputeInstanceById.Lock() - mock.calls.GpuInstanceGetComputeInstanceById = append(mock.calls.GpuInstanceGetComputeInstanceById, callInfo) - mock.lockGpuInstanceGetComputeInstanceById.Unlock() - return mock.GpuInstanceGetComputeInstanceByIdFunc(gpuInstance, n) -} - -// GpuInstanceGetComputeInstanceByIdCalls gets all the calls that were made to GpuInstanceGetComputeInstanceById. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetComputeInstanceByIdCalls()) -func (mock *Interface) GpuInstanceGetComputeInstanceByIdCalls() []struct { - GpuInstance nvml.GpuInstance - N int -} { - var calls []struct { - GpuInstance nvml.GpuInstance - N int - } - mock.lockGpuInstanceGetComputeInstanceById.RLock() - calls = mock.calls.GpuInstanceGetComputeInstanceById - mock.lockGpuInstanceGetComputeInstanceById.RUnlock() - return calls -} - -// GpuInstanceGetComputeInstancePossiblePlacements calls GpuInstanceGetComputeInstancePossiblePlacementsFunc. -func (mock *Interface) GpuInstanceGetComputeInstancePossiblePlacements(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstancePlacement, nvml.Return) { - if mock.GpuInstanceGetComputeInstancePossiblePlacementsFunc == nil { - panic("Interface.GpuInstanceGetComputeInstancePossiblePlacementsFunc: method is nil but Interface.GpuInstanceGetComputeInstancePossiblePlacements was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - }{ - GpuInstance: gpuInstance, - ComputeInstanceProfileInfo: computeInstanceProfileInfo, - } - mock.lockGpuInstanceGetComputeInstancePossiblePlacements.Lock() - mock.calls.GpuInstanceGetComputeInstancePossiblePlacements = append(mock.calls.GpuInstanceGetComputeInstancePossiblePlacements, callInfo) - mock.lockGpuInstanceGetComputeInstancePossiblePlacements.Unlock() - return mock.GpuInstanceGetComputeInstancePossiblePlacementsFunc(gpuInstance, computeInstanceProfileInfo) -} - -// GpuInstanceGetComputeInstancePossiblePlacementsCalls gets all the calls that were made to GpuInstanceGetComputeInstancePossiblePlacements. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetComputeInstancePossiblePlacementsCalls()) -func (mock *Interface) GpuInstanceGetComputeInstancePossiblePlacementsCalls() []struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo -} { - var calls []struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - mock.lockGpuInstanceGetComputeInstancePossiblePlacements.RLock() - calls = mock.calls.GpuInstanceGetComputeInstancePossiblePlacements - mock.lockGpuInstanceGetComputeInstancePossiblePlacements.RUnlock() - return calls -} - -// GpuInstanceGetComputeInstanceProfileInfo calls GpuInstanceGetComputeInstanceProfileInfoFunc. -func (mock *Interface) GpuInstanceGetComputeInstanceProfileInfo(gpuInstance nvml.GpuInstance, n1 int, n2 int) (nvml.ComputeInstanceProfileInfo, nvml.Return) { - if mock.GpuInstanceGetComputeInstanceProfileInfoFunc == nil { - panic("Interface.GpuInstanceGetComputeInstanceProfileInfoFunc: method is nil but Interface.GpuInstanceGetComputeInstanceProfileInfo was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - N1 int - N2 int - }{ - GpuInstance: gpuInstance, - N1: n1, - N2: n2, - } - mock.lockGpuInstanceGetComputeInstanceProfileInfo.Lock() - mock.calls.GpuInstanceGetComputeInstanceProfileInfo = append(mock.calls.GpuInstanceGetComputeInstanceProfileInfo, callInfo) - mock.lockGpuInstanceGetComputeInstanceProfileInfo.Unlock() - return mock.GpuInstanceGetComputeInstanceProfileInfoFunc(gpuInstance, n1, n2) -} - -// GpuInstanceGetComputeInstanceProfileInfoCalls gets all the calls that were made to GpuInstanceGetComputeInstanceProfileInfo. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetComputeInstanceProfileInfoCalls()) -func (mock *Interface) GpuInstanceGetComputeInstanceProfileInfoCalls() []struct { - GpuInstance nvml.GpuInstance - N1 int - N2 int -} { - var calls []struct { - GpuInstance nvml.GpuInstance - N1 int - N2 int - } - mock.lockGpuInstanceGetComputeInstanceProfileInfo.RLock() - calls = mock.calls.GpuInstanceGetComputeInstanceProfileInfo - mock.lockGpuInstanceGetComputeInstanceProfileInfo.RUnlock() - return calls -} - -// GpuInstanceGetComputeInstanceProfileInfoV calls GpuInstanceGetComputeInstanceProfileInfoVFunc. -func (mock *Interface) GpuInstanceGetComputeInstanceProfileInfoV(gpuInstance nvml.GpuInstance, n1 int, n2 int) nvml.ComputeInstanceProfileInfoHandler { - if mock.GpuInstanceGetComputeInstanceProfileInfoVFunc == nil { - panic("Interface.GpuInstanceGetComputeInstanceProfileInfoVFunc: method is nil but Interface.GpuInstanceGetComputeInstanceProfileInfoV was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - N1 int - N2 int - }{ - GpuInstance: gpuInstance, - N1: n1, - N2: n2, - } - mock.lockGpuInstanceGetComputeInstanceProfileInfoV.Lock() - mock.calls.GpuInstanceGetComputeInstanceProfileInfoV = append(mock.calls.GpuInstanceGetComputeInstanceProfileInfoV, callInfo) - mock.lockGpuInstanceGetComputeInstanceProfileInfoV.Unlock() - return mock.GpuInstanceGetComputeInstanceProfileInfoVFunc(gpuInstance, n1, n2) -} - -// GpuInstanceGetComputeInstanceProfileInfoVCalls gets all the calls that were made to GpuInstanceGetComputeInstanceProfileInfoV. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetComputeInstanceProfileInfoVCalls()) -func (mock *Interface) GpuInstanceGetComputeInstanceProfileInfoVCalls() []struct { - GpuInstance nvml.GpuInstance - N1 int - N2 int -} { - var calls []struct { - GpuInstance nvml.GpuInstance - N1 int - N2 int - } - mock.lockGpuInstanceGetComputeInstanceProfileInfoV.RLock() - calls = mock.calls.GpuInstanceGetComputeInstanceProfileInfoV - mock.lockGpuInstanceGetComputeInstanceProfileInfoV.RUnlock() - return calls -} - -// GpuInstanceGetComputeInstanceRemainingCapacity calls GpuInstanceGetComputeInstanceRemainingCapacityFunc. -func (mock *Interface) GpuInstanceGetComputeInstanceRemainingCapacity(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) (int, nvml.Return) { - if mock.GpuInstanceGetComputeInstanceRemainingCapacityFunc == nil { - panic("Interface.GpuInstanceGetComputeInstanceRemainingCapacityFunc: method is nil but Interface.GpuInstanceGetComputeInstanceRemainingCapacity was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - }{ - GpuInstance: gpuInstance, - ComputeInstanceProfileInfo: computeInstanceProfileInfo, - } - mock.lockGpuInstanceGetComputeInstanceRemainingCapacity.Lock() - mock.calls.GpuInstanceGetComputeInstanceRemainingCapacity = append(mock.calls.GpuInstanceGetComputeInstanceRemainingCapacity, callInfo) - mock.lockGpuInstanceGetComputeInstanceRemainingCapacity.Unlock() - return mock.GpuInstanceGetComputeInstanceRemainingCapacityFunc(gpuInstance, computeInstanceProfileInfo) -} - -// GpuInstanceGetComputeInstanceRemainingCapacityCalls gets all the calls that were made to GpuInstanceGetComputeInstanceRemainingCapacity. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetComputeInstanceRemainingCapacityCalls()) -func (mock *Interface) GpuInstanceGetComputeInstanceRemainingCapacityCalls() []struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo -} { - var calls []struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - mock.lockGpuInstanceGetComputeInstanceRemainingCapacity.RLock() - calls = mock.calls.GpuInstanceGetComputeInstanceRemainingCapacity - mock.lockGpuInstanceGetComputeInstanceRemainingCapacity.RUnlock() - return calls -} - -// GpuInstanceGetComputeInstances calls GpuInstanceGetComputeInstancesFunc. -func (mock *Interface) GpuInstanceGetComputeInstances(gpuInstance nvml.GpuInstance, computeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo) ([]nvml.ComputeInstance, nvml.Return) { - if mock.GpuInstanceGetComputeInstancesFunc == nil { - panic("Interface.GpuInstanceGetComputeInstancesFunc: method is nil but Interface.GpuInstanceGetComputeInstances was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - }{ - GpuInstance: gpuInstance, - ComputeInstanceProfileInfo: computeInstanceProfileInfo, - } - mock.lockGpuInstanceGetComputeInstances.Lock() - mock.calls.GpuInstanceGetComputeInstances = append(mock.calls.GpuInstanceGetComputeInstances, callInfo) - mock.lockGpuInstanceGetComputeInstances.Unlock() - return mock.GpuInstanceGetComputeInstancesFunc(gpuInstance, computeInstanceProfileInfo) -} - -// GpuInstanceGetComputeInstancesCalls gets all the calls that were made to GpuInstanceGetComputeInstances. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetComputeInstancesCalls()) -func (mock *Interface) GpuInstanceGetComputeInstancesCalls() []struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo -} { - var calls []struct { - GpuInstance nvml.GpuInstance - ComputeInstanceProfileInfo *nvml.ComputeInstanceProfileInfo - } - mock.lockGpuInstanceGetComputeInstances.RLock() - calls = mock.calls.GpuInstanceGetComputeInstances - mock.lockGpuInstanceGetComputeInstances.RUnlock() - return calls -} - -// GpuInstanceGetCreatableVgpus calls GpuInstanceGetCreatableVgpusFunc. -func (mock *Interface) GpuInstanceGetCreatableVgpus(gpuInstance nvml.GpuInstance) (nvml.VgpuTypeIdInfo, nvml.Return) { - if mock.GpuInstanceGetCreatableVgpusFunc == nil { - panic("Interface.GpuInstanceGetCreatableVgpusFunc: method is nil but Interface.GpuInstanceGetCreatableVgpus was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - }{ - GpuInstance: gpuInstance, - } - mock.lockGpuInstanceGetCreatableVgpus.Lock() - mock.calls.GpuInstanceGetCreatableVgpus = append(mock.calls.GpuInstanceGetCreatableVgpus, callInfo) - mock.lockGpuInstanceGetCreatableVgpus.Unlock() - return mock.GpuInstanceGetCreatableVgpusFunc(gpuInstance) -} - -// GpuInstanceGetCreatableVgpusCalls gets all the calls that were made to GpuInstanceGetCreatableVgpus. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetCreatableVgpusCalls()) -func (mock *Interface) GpuInstanceGetCreatableVgpusCalls() []struct { - GpuInstance nvml.GpuInstance -} { - var calls []struct { - GpuInstance nvml.GpuInstance - } - mock.lockGpuInstanceGetCreatableVgpus.RLock() - calls = mock.calls.GpuInstanceGetCreatableVgpus - mock.lockGpuInstanceGetCreatableVgpus.RUnlock() - return calls -} - -// GpuInstanceGetInfo calls GpuInstanceGetInfoFunc. -func (mock *Interface) GpuInstanceGetInfo(gpuInstance nvml.GpuInstance) (nvml.GpuInstanceInfo, nvml.Return) { - if mock.GpuInstanceGetInfoFunc == nil { - panic("Interface.GpuInstanceGetInfoFunc: method is nil but Interface.GpuInstanceGetInfo was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - }{ - GpuInstance: gpuInstance, - } - mock.lockGpuInstanceGetInfo.Lock() - mock.calls.GpuInstanceGetInfo = append(mock.calls.GpuInstanceGetInfo, callInfo) - mock.lockGpuInstanceGetInfo.Unlock() - return mock.GpuInstanceGetInfoFunc(gpuInstance) -} - -// GpuInstanceGetInfoCalls gets all the calls that were made to GpuInstanceGetInfo. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetInfoCalls()) -func (mock *Interface) GpuInstanceGetInfoCalls() []struct { - GpuInstance nvml.GpuInstance -} { - var calls []struct { - GpuInstance nvml.GpuInstance - } - mock.lockGpuInstanceGetInfo.RLock() - calls = mock.calls.GpuInstanceGetInfo - mock.lockGpuInstanceGetInfo.RUnlock() - return calls -} - -// GpuInstanceGetVgpuHeterogeneousMode calls GpuInstanceGetVgpuHeterogeneousModeFunc. -func (mock *Interface) GpuInstanceGetVgpuHeterogeneousMode(gpuInstance nvml.GpuInstance) (nvml.VgpuHeterogeneousMode, nvml.Return) { - if mock.GpuInstanceGetVgpuHeterogeneousModeFunc == nil { - panic("Interface.GpuInstanceGetVgpuHeterogeneousModeFunc: method is nil but Interface.GpuInstanceGetVgpuHeterogeneousMode was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - }{ - GpuInstance: gpuInstance, - } - mock.lockGpuInstanceGetVgpuHeterogeneousMode.Lock() - mock.calls.GpuInstanceGetVgpuHeterogeneousMode = append(mock.calls.GpuInstanceGetVgpuHeterogeneousMode, callInfo) - mock.lockGpuInstanceGetVgpuHeterogeneousMode.Unlock() - return mock.GpuInstanceGetVgpuHeterogeneousModeFunc(gpuInstance) -} - -// GpuInstanceGetVgpuHeterogeneousModeCalls gets all the calls that were made to GpuInstanceGetVgpuHeterogeneousMode. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetVgpuHeterogeneousModeCalls()) -func (mock *Interface) GpuInstanceGetVgpuHeterogeneousModeCalls() []struct { - GpuInstance nvml.GpuInstance -} { - var calls []struct { - GpuInstance nvml.GpuInstance - } - mock.lockGpuInstanceGetVgpuHeterogeneousMode.RLock() - calls = mock.calls.GpuInstanceGetVgpuHeterogeneousMode - mock.lockGpuInstanceGetVgpuHeterogeneousMode.RUnlock() - return calls -} - -// GpuInstanceGetVgpuSchedulerLog calls GpuInstanceGetVgpuSchedulerLogFunc. -func (mock *Interface) GpuInstanceGetVgpuSchedulerLog(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerLogInfo, nvml.Return) { - if mock.GpuInstanceGetVgpuSchedulerLogFunc == nil { - panic("Interface.GpuInstanceGetVgpuSchedulerLogFunc: method is nil but Interface.GpuInstanceGetVgpuSchedulerLog was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - }{ - GpuInstance: gpuInstance, - } - mock.lockGpuInstanceGetVgpuSchedulerLog.Lock() - mock.calls.GpuInstanceGetVgpuSchedulerLog = append(mock.calls.GpuInstanceGetVgpuSchedulerLog, callInfo) - mock.lockGpuInstanceGetVgpuSchedulerLog.Unlock() - return mock.GpuInstanceGetVgpuSchedulerLogFunc(gpuInstance) -} - -// GpuInstanceGetVgpuSchedulerLogCalls gets all the calls that were made to GpuInstanceGetVgpuSchedulerLog. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetVgpuSchedulerLogCalls()) -func (mock *Interface) GpuInstanceGetVgpuSchedulerLogCalls() []struct { - GpuInstance nvml.GpuInstance -} { - var calls []struct { - GpuInstance nvml.GpuInstance - } - mock.lockGpuInstanceGetVgpuSchedulerLog.RLock() - calls = mock.calls.GpuInstanceGetVgpuSchedulerLog - mock.lockGpuInstanceGetVgpuSchedulerLog.RUnlock() - return calls -} - -// GpuInstanceGetVgpuSchedulerState calls GpuInstanceGetVgpuSchedulerStateFunc. -func (mock *Interface) GpuInstanceGetVgpuSchedulerState(gpuInstance nvml.GpuInstance) (nvml.VgpuSchedulerStateInfo, nvml.Return) { - if mock.GpuInstanceGetVgpuSchedulerStateFunc == nil { - panic("Interface.GpuInstanceGetVgpuSchedulerStateFunc: method is nil but Interface.GpuInstanceGetVgpuSchedulerState was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - }{ - GpuInstance: gpuInstance, - } - mock.lockGpuInstanceGetVgpuSchedulerState.Lock() - mock.calls.GpuInstanceGetVgpuSchedulerState = append(mock.calls.GpuInstanceGetVgpuSchedulerState, callInfo) - mock.lockGpuInstanceGetVgpuSchedulerState.Unlock() - return mock.GpuInstanceGetVgpuSchedulerStateFunc(gpuInstance) -} - -// GpuInstanceGetVgpuSchedulerStateCalls gets all the calls that were made to GpuInstanceGetVgpuSchedulerState. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetVgpuSchedulerStateCalls()) -func (mock *Interface) GpuInstanceGetVgpuSchedulerStateCalls() []struct { - GpuInstance nvml.GpuInstance -} { - var calls []struct { - GpuInstance nvml.GpuInstance - } - mock.lockGpuInstanceGetVgpuSchedulerState.RLock() - calls = mock.calls.GpuInstanceGetVgpuSchedulerState - mock.lockGpuInstanceGetVgpuSchedulerState.RUnlock() - return calls -} - -// GpuInstanceGetVgpuTypeCreatablePlacements calls GpuInstanceGetVgpuTypeCreatablePlacementsFunc. -func (mock *Interface) GpuInstanceGetVgpuTypeCreatablePlacements(gpuInstance nvml.GpuInstance) (nvml.VgpuCreatablePlacementInfo, nvml.Return) { - if mock.GpuInstanceGetVgpuTypeCreatablePlacementsFunc == nil { - panic("Interface.GpuInstanceGetVgpuTypeCreatablePlacementsFunc: method is nil but Interface.GpuInstanceGetVgpuTypeCreatablePlacements was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - }{ - GpuInstance: gpuInstance, - } - mock.lockGpuInstanceGetVgpuTypeCreatablePlacements.Lock() - mock.calls.GpuInstanceGetVgpuTypeCreatablePlacements = append(mock.calls.GpuInstanceGetVgpuTypeCreatablePlacements, callInfo) - mock.lockGpuInstanceGetVgpuTypeCreatablePlacements.Unlock() - return mock.GpuInstanceGetVgpuTypeCreatablePlacementsFunc(gpuInstance) -} - -// GpuInstanceGetVgpuTypeCreatablePlacementsCalls gets all the calls that were made to GpuInstanceGetVgpuTypeCreatablePlacements. -// Check the length with: -// -// len(mockedInterface.GpuInstanceGetVgpuTypeCreatablePlacementsCalls()) -func (mock *Interface) GpuInstanceGetVgpuTypeCreatablePlacementsCalls() []struct { - GpuInstance nvml.GpuInstance -} { - var calls []struct { - GpuInstance nvml.GpuInstance - } - mock.lockGpuInstanceGetVgpuTypeCreatablePlacements.RLock() - calls = mock.calls.GpuInstanceGetVgpuTypeCreatablePlacements - mock.lockGpuInstanceGetVgpuTypeCreatablePlacements.RUnlock() - return calls -} - -// GpuInstanceSetVgpuHeterogeneousMode calls GpuInstanceSetVgpuHeterogeneousModeFunc. -func (mock *Interface) GpuInstanceSetVgpuHeterogeneousMode(gpuInstance nvml.GpuInstance, vgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode) nvml.Return { - if mock.GpuInstanceSetVgpuHeterogeneousModeFunc == nil { - panic("Interface.GpuInstanceSetVgpuHeterogeneousModeFunc: method is nil but Interface.GpuInstanceSetVgpuHeterogeneousMode was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode - }{ - GpuInstance: gpuInstance, - VgpuHeterogeneousMode: vgpuHeterogeneousMode, - } - mock.lockGpuInstanceSetVgpuHeterogeneousMode.Lock() - mock.calls.GpuInstanceSetVgpuHeterogeneousMode = append(mock.calls.GpuInstanceSetVgpuHeterogeneousMode, callInfo) - mock.lockGpuInstanceSetVgpuHeterogeneousMode.Unlock() - return mock.GpuInstanceSetVgpuHeterogeneousModeFunc(gpuInstance, vgpuHeterogeneousMode) -} - -// GpuInstanceSetVgpuHeterogeneousModeCalls gets all the calls that were made to GpuInstanceSetVgpuHeterogeneousMode. -// Check the length with: -// -// len(mockedInterface.GpuInstanceSetVgpuHeterogeneousModeCalls()) -func (mock *Interface) GpuInstanceSetVgpuHeterogeneousModeCalls() []struct { - GpuInstance nvml.GpuInstance - VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode -} { - var calls []struct { - GpuInstance nvml.GpuInstance - VgpuHeterogeneousMode *nvml.VgpuHeterogeneousMode - } - mock.lockGpuInstanceSetVgpuHeterogeneousMode.RLock() - calls = mock.calls.GpuInstanceSetVgpuHeterogeneousMode - mock.lockGpuInstanceSetVgpuHeterogeneousMode.RUnlock() - return calls -} - -// GpuInstanceSetVgpuSchedulerState calls GpuInstanceSetVgpuSchedulerStateFunc. -func (mock *Interface) GpuInstanceSetVgpuSchedulerState(gpuInstance nvml.GpuInstance, vgpuSchedulerState *nvml.VgpuSchedulerState) nvml.Return { - if mock.GpuInstanceSetVgpuSchedulerStateFunc == nil { - panic("Interface.GpuInstanceSetVgpuSchedulerStateFunc: method is nil but Interface.GpuInstanceSetVgpuSchedulerState was just called") - } - callInfo := struct { - GpuInstance nvml.GpuInstance - VgpuSchedulerState *nvml.VgpuSchedulerState - }{ - GpuInstance: gpuInstance, - VgpuSchedulerState: vgpuSchedulerState, - } - mock.lockGpuInstanceSetVgpuSchedulerState.Lock() - mock.calls.GpuInstanceSetVgpuSchedulerState = append(mock.calls.GpuInstanceSetVgpuSchedulerState, callInfo) - mock.lockGpuInstanceSetVgpuSchedulerState.Unlock() - return mock.GpuInstanceSetVgpuSchedulerStateFunc(gpuInstance, vgpuSchedulerState) -} - -// GpuInstanceSetVgpuSchedulerStateCalls gets all the calls that were made to GpuInstanceSetVgpuSchedulerState. -// Check the length with: -// -// len(mockedInterface.GpuInstanceSetVgpuSchedulerStateCalls()) -func (mock *Interface) GpuInstanceSetVgpuSchedulerStateCalls() []struct { - GpuInstance nvml.GpuInstance - VgpuSchedulerState *nvml.VgpuSchedulerState -} { - var calls []struct { - GpuInstance nvml.GpuInstance - VgpuSchedulerState *nvml.VgpuSchedulerState - } - mock.lockGpuInstanceSetVgpuSchedulerState.RLock() - calls = mock.calls.GpuInstanceSetVgpuSchedulerState - mock.lockGpuInstanceSetVgpuSchedulerState.RUnlock() - return calls -} - -// Init calls InitFunc. -func (mock *Interface) Init() nvml.Return { - if mock.InitFunc == nil { - panic("Interface.InitFunc: method is nil but Interface.Init was just called") - } - callInfo := struct { - }{} - mock.lockInit.Lock() - mock.calls.Init = append(mock.calls.Init, callInfo) - mock.lockInit.Unlock() - return mock.InitFunc() -} - -// InitCalls gets all the calls that were made to Init. -// Check the length with: -// -// len(mockedInterface.InitCalls()) -func (mock *Interface) InitCalls() []struct { -} { - var calls []struct { - } - mock.lockInit.RLock() - calls = mock.calls.Init - mock.lockInit.RUnlock() - return calls -} - -// InitWithFlags calls InitWithFlagsFunc. -func (mock *Interface) InitWithFlags(v uint32) nvml.Return { - if mock.InitWithFlagsFunc == nil { - panic("Interface.InitWithFlagsFunc: method is nil but Interface.InitWithFlags was just called") - } - callInfo := struct { - V uint32 - }{ - V: v, - } - mock.lockInitWithFlags.Lock() - mock.calls.InitWithFlags = append(mock.calls.InitWithFlags, callInfo) - mock.lockInitWithFlags.Unlock() - return mock.InitWithFlagsFunc(v) -} - -// InitWithFlagsCalls gets all the calls that were made to InitWithFlags. -// Check the length with: -// -// len(mockedInterface.InitWithFlagsCalls()) -func (mock *Interface) InitWithFlagsCalls() []struct { - V uint32 -} { - var calls []struct { - V uint32 - } - mock.lockInitWithFlags.RLock() - calls = mock.calls.InitWithFlags - mock.lockInitWithFlags.RUnlock() - return calls -} - -// SetVgpuVersion calls SetVgpuVersionFunc. -func (mock *Interface) SetVgpuVersion(vgpuVersion *nvml.VgpuVersion) nvml.Return { - if mock.SetVgpuVersionFunc == nil { - panic("Interface.SetVgpuVersionFunc: method is nil but Interface.SetVgpuVersion was just called") - } - callInfo := struct { - VgpuVersion *nvml.VgpuVersion - }{ - VgpuVersion: vgpuVersion, - } - mock.lockSetVgpuVersion.Lock() - mock.calls.SetVgpuVersion = append(mock.calls.SetVgpuVersion, callInfo) - mock.lockSetVgpuVersion.Unlock() - return mock.SetVgpuVersionFunc(vgpuVersion) -} - -// SetVgpuVersionCalls gets all the calls that were made to SetVgpuVersion. -// Check the length with: -// -// len(mockedInterface.SetVgpuVersionCalls()) -func (mock *Interface) SetVgpuVersionCalls() []struct { - VgpuVersion *nvml.VgpuVersion -} { - var calls []struct { - VgpuVersion *nvml.VgpuVersion - } - mock.lockSetVgpuVersion.RLock() - calls = mock.calls.SetVgpuVersion - mock.lockSetVgpuVersion.RUnlock() - return calls -} - -// Shutdown calls ShutdownFunc. -func (mock *Interface) Shutdown() nvml.Return { - if mock.ShutdownFunc == nil { - panic("Interface.ShutdownFunc: method is nil but Interface.Shutdown was just called") - } - callInfo := struct { - }{} - mock.lockShutdown.Lock() - mock.calls.Shutdown = append(mock.calls.Shutdown, callInfo) - mock.lockShutdown.Unlock() - return mock.ShutdownFunc() -} - -// ShutdownCalls gets all the calls that were made to Shutdown. -// Check the length with: -// -// len(mockedInterface.ShutdownCalls()) -func (mock *Interface) ShutdownCalls() []struct { -} { - var calls []struct { - } - mock.lockShutdown.RLock() - calls = mock.calls.Shutdown - mock.lockShutdown.RUnlock() - return calls -} - -// SystemEventSetCreate calls SystemEventSetCreateFunc. -func (mock *Interface) SystemEventSetCreate(systemEventSetCreateRequest *nvml.SystemEventSetCreateRequest) nvml.Return { - if mock.SystemEventSetCreateFunc == nil { - panic("Interface.SystemEventSetCreateFunc: method is nil but Interface.SystemEventSetCreate was just called") - } - callInfo := struct { - SystemEventSetCreateRequest *nvml.SystemEventSetCreateRequest - }{ - SystemEventSetCreateRequest: systemEventSetCreateRequest, - } - mock.lockSystemEventSetCreate.Lock() - mock.calls.SystemEventSetCreate = append(mock.calls.SystemEventSetCreate, callInfo) - mock.lockSystemEventSetCreate.Unlock() - return mock.SystemEventSetCreateFunc(systemEventSetCreateRequest) -} - -// SystemEventSetCreateCalls gets all the calls that were made to SystemEventSetCreate. -// Check the length with: -// -// len(mockedInterface.SystemEventSetCreateCalls()) -func (mock *Interface) SystemEventSetCreateCalls() []struct { - SystemEventSetCreateRequest *nvml.SystemEventSetCreateRequest -} { - var calls []struct { - SystemEventSetCreateRequest *nvml.SystemEventSetCreateRequest - } - mock.lockSystemEventSetCreate.RLock() - calls = mock.calls.SystemEventSetCreate - mock.lockSystemEventSetCreate.RUnlock() - return calls -} - -// SystemEventSetFree calls SystemEventSetFreeFunc. -func (mock *Interface) SystemEventSetFree(systemEventSetFreeRequest *nvml.SystemEventSetFreeRequest) nvml.Return { - if mock.SystemEventSetFreeFunc == nil { - panic("Interface.SystemEventSetFreeFunc: method is nil but Interface.SystemEventSetFree was just called") - } - callInfo := struct { - SystemEventSetFreeRequest *nvml.SystemEventSetFreeRequest - }{ - SystemEventSetFreeRequest: systemEventSetFreeRequest, - } - mock.lockSystemEventSetFree.Lock() - mock.calls.SystemEventSetFree = append(mock.calls.SystemEventSetFree, callInfo) - mock.lockSystemEventSetFree.Unlock() - return mock.SystemEventSetFreeFunc(systemEventSetFreeRequest) -} - -// SystemEventSetFreeCalls gets all the calls that were made to SystemEventSetFree. -// Check the length with: -// -// len(mockedInterface.SystemEventSetFreeCalls()) -func (mock *Interface) SystemEventSetFreeCalls() []struct { - SystemEventSetFreeRequest *nvml.SystemEventSetFreeRequest -} { - var calls []struct { - SystemEventSetFreeRequest *nvml.SystemEventSetFreeRequest - } - mock.lockSystemEventSetFree.RLock() - calls = mock.calls.SystemEventSetFree - mock.lockSystemEventSetFree.RUnlock() - return calls -} - -// SystemEventSetWait calls SystemEventSetWaitFunc. -func (mock *Interface) SystemEventSetWait(systemEventSetWaitRequest *nvml.SystemEventSetWaitRequest) nvml.Return { - if mock.SystemEventSetWaitFunc == nil { - panic("Interface.SystemEventSetWaitFunc: method is nil but Interface.SystemEventSetWait was just called") - } - callInfo := struct { - SystemEventSetWaitRequest *nvml.SystemEventSetWaitRequest - }{ - SystemEventSetWaitRequest: systemEventSetWaitRequest, - } - mock.lockSystemEventSetWait.Lock() - mock.calls.SystemEventSetWait = append(mock.calls.SystemEventSetWait, callInfo) - mock.lockSystemEventSetWait.Unlock() - return mock.SystemEventSetWaitFunc(systemEventSetWaitRequest) -} - -// SystemEventSetWaitCalls gets all the calls that were made to SystemEventSetWait. -// Check the length with: -// -// len(mockedInterface.SystemEventSetWaitCalls()) -func (mock *Interface) SystemEventSetWaitCalls() []struct { - SystemEventSetWaitRequest *nvml.SystemEventSetWaitRequest -} { - var calls []struct { - SystemEventSetWaitRequest *nvml.SystemEventSetWaitRequest - } - mock.lockSystemEventSetWait.RLock() - calls = mock.calls.SystemEventSetWait - mock.lockSystemEventSetWait.RUnlock() - return calls -} - -// SystemGetConfComputeCapabilities calls SystemGetConfComputeCapabilitiesFunc. -func (mock *Interface) SystemGetConfComputeCapabilities() (nvml.ConfComputeSystemCaps, nvml.Return) { - if mock.SystemGetConfComputeCapabilitiesFunc == nil { - panic("Interface.SystemGetConfComputeCapabilitiesFunc: method is nil but Interface.SystemGetConfComputeCapabilities was just called") - } - callInfo := struct { - }{} - mock.lockSystemGetConfComputeCapabilities.Lock() - mock.calls.SystemGetConfComputeCapabilities = append(mock.calls.SystemGetConfComputeCapabilities, callInfo) - mock.lockSystemGetConfComputeCapabilities.Unlock() - return mock.SystemGetConfComputeCapabilitiesFunc() -} - -// SystemGetConfComputeCapabilitiesCalls gets all the calls that were made to SystemGetConfComputeCapabilities. -// Check the length with: -// -// len(mockedInterface.SystemGetConfComputeCapabilitiesCalls()) -func (mock *Interface) SystemGetConfComputeCapabilitiesCalls() []struct { -} { - var calls []struct { - } - mock.lockSystemGetConfComputeCapabilities.RLock() - calls = mock.calls.SystemGetConfComputeCapabilities - mock.lockSystemGetConfComputeCapabilities.RUnlock() - return calls -} - -// SystemGetConfComputeGpusReadyState calls SystemGetConfComputeGpusReadyStateFunc. -func (mock *Interface) SystemGetConfComputeGpusReadyState() (uint32, nvml.Return) { - if mock.SystemGetConfComputeGpusReadyStateFunc == nil { - panic("Interface.SystemGetConfComputeGpusReadyStateFunc: method is nil but Interface.SystemGetConfComputeGpusReadyState was just called") - } - callInfo := struct { - }{} - mock.lockSystemGetConfComputeGpusReadyState.Lock() - mock.calls.SystemGetConfComputeGpusReadyState = append(mock.calls.SystemGetConfComputeGpusReadyState, callInfo) - mock.lockSystemGetConfComputeGpusReadyState.Unlock() - return mock.SystemGetConfComputeGpusReadyStateFunc() -} - -// SystemGetConfComputeGpusReadyStateCalls gets all the calls that were made to SystemGetConfComputeGpusReadyState. -// Check the length with: -// -// len(mockedInterface.SystemGetConfComputeGpusReadyStateCalls()) -func (mock *Interface) SystemGetConfComputeGpusReadyStateCalls() []struct { -} { - var calls []struct { - } - mock.lockSystemGetConfComputeGpusReadyState.RLock() - calls = mock.calls.SystemGetConfComputeGpusReadyState - mock.lockSystemGetConfComputeGpusReadyState.RUnlock() - return calls -} - -// SystemGetConfComputeKeyRotationThresholdInfo calls SystemGetConfComputeKeyRotationThresholdInfoFunc. -func (mock *Interface) SystemGetConfComputeKeyRotationThresholdInfo() (nvml.ConfComputeGetKeyRotationThresholdInfo, nvml.Return) { - if mock.SystemGetConfComputeKeyRotationThresholdInfoFunc == nil { - panic("Interface.SystemGetConfComputeKeyRotationThresholdInfoFunc: method is nil but Interface.SystemGetConfComputeKeyRotationThresholdInfo was just called") - } - callInfo := struct { - }{} - mock.lockSystemGetConfComputeKeyRotationThresholdInfo.Lock() - mock.calls.SystemGetConfComputeKeyRotationThresholdInfo = append(mock.calls.SystemGetConfComputeKeyRotationThresholdInfo, callInfo) - mock.lockSystemGetConfComputeKeyRotationThresholdInfo.Unlock() - return mock.SystemGetConfComputeKeyRotationThresholdInfoFunc() -} - -// SystemGetConfComputeKeyRotationThresholdInfoCalls gets all the calls that were made to SystemGetConfComputeKeyRotationThresholdInfo. -// Check the length with: -// -// len(mockedInterface.SystemGetConfComputeKeyRotationThresholdInfoCalls()) -func (mock *Interface) SystemGetConfComputeKeyRotationThresholdInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockSystemGetConfComputeKeyRotationThresholdInfo.RLock() - calls = mock.calls.SystemGetConfComputeKeyRotationThresholdInfo - mock.lockSystemGetConfComputeKeyRotationThresholdInfo.RUnlock() - return calls -} - -// SystemGetConfComputeSettings calls SystemGetConfComputeSettingsFunc. -func (mock *Interface) SystemGetConfComputeSettings() (nvml.SystemConfComputeSettings, nvml.Return) { - if mock.SystemGetConfComputeSettingsFunc == nil { - panic("Interface.SystemGetConfComputeSettingsFunc: method is nil but Interface.SystemGetConfComputeSettings was just called") - } - callInfo := struct { - }{} - mock.lockSystemGetConfComputeSettings.Lock() - mock.calls.SystemGetConfComputeSettings = append(mock.calls.SystemGetConfComputeSettings, callInfo) - mock.lockSystemGetConfComputeSettings.Unlock() - return mock.SystemGetConfComputeSettingsFunc() -} - -// SystemGetConfComputeSettingsCalls gets all the calls that were made to SystemGetConfComputeSettings. -// Check the length with: -// -// len(mockedInterface.SystemGetConfComputeSettingsCalls()) -func (mock *Interface) SystemGetConfComputeSettingsCalls() []struct { -} { - var calls []struct { - } - mock.lockSystemGetConfComputeSettings.RLock() - calls = mock.calls.SystemGetConfComputeSettings - mock.lockSystemGetConfComputeSettings.RUnlock() - return calls -} - -// SystemGetConfComputeState calls SystemGetConfComputeStateFunc. -func (mock *Interface) SystemGetConfComputeState() (nvml.ConfComputeSystemState, nvml.Return) { - if mock.SystemGetConfComputeStateFunc == nil { - panic("Interface.SystemGetConfComputeStateFunc: method is nil but Interface.SystemGetConfComputeState was just called") - } - callInfo := struct { - }{} - mock.lockSystemGetConfComputeState.Lock() - mock.calls.SystemGetConfComputeState = append(mock.calls.SystemGetConfComputeState, callInfo) - mock.lockSystemGetConfComputeState.Unlock() - return mock.SystemGetConfComputeStateFunc() -} - -// SystemGetConfComputeStateCalls gets all the calls that were made to SystemGetConfComputeState. -// Check the length with: -// -// len(mockedInterface.SystemGetConfComputeStateCalls()) -func (mock *Interface) SystemGetConfComputeStateCalls() []struct { -} { - var calls []struct { - } - mock.lockSystemGetConfComputeState.RLock() - calls = mock.calls.SystemGetConfComputeState - mock.lockSystemGetConfComputeState.RUnlock() - return calls -} - -// SystemGetCudaDriverVersion calls SystemGetCudaDriverVersionFunc. -func (mock *Interface) SystemGetCudaDriverVersion() (int, nvml.Return) { - if mock.SystemGetCudaDriverVersionFunc == nil { - panic("Interface.SystemGetCudaDriverVersionFunc: method is nil but Interface.SystemGetCudaDriverVersion was just called") - } - callInfo := struct { - }{} - mock.lockSystemGetCudaDriverVersion.Lock() - mock.calls.SystemGetCudaDriverVersion = append(mock.calls.SystemGetCudaDriverVersion, callInfo) - mock.lockSystemGetCudaDriverVersion.Unlock() - return mock.SystemGetCudaDriverVersionFunc() -} - -// SystemGetCudaDriverVersionCalls gets all the calls that were made to SystemGetCudaDriverVersion. -// Check the length with: -// -// len(mockedInterface.SystemGetCudaDriverVersionCalls()) -func (mock *Interface) SystemGetCudaDriverVersionCalls() []struct { -} { - var calls []struct { - } - mock.lockSystemGetCudaDriverVersion.RLock() - calls = mock.calls.SystemGetCudaDriverVersion - mock.lockSystemGetCudaDriverVersion.RUnlock() - return calls -} - -// SystemGetCudaDriverVersion_v2 calls SystemGetCudaDriverVersion_v2Func. -func (mock *Interface) SystemGetCudaDriverVersion_v2() (int, nvml.Return) { - if mock.SystemGetCudaDriverVersion_v2Func == nil { - panic("Interface.SystemGetCudaDriverVersion_v2Func: method is nil but Interface.SystemGetCudaDriverVersion_v2 was just called") - } - callInfo := struct { - }{} - mock.lockSystemGetCudaDriverVersion_v2.Lock() - mock.calls.SystemGetCudaDriverVersion_v2 = append(mock.calls.SystemGetCudaDriverVersion_v2, callInfo) - mock.lockSystemGetCudaDriverVersion_v2.Unlock() - return mock.SystemGetCudaDriverVersion_v2Func() -} - -// SystemGetCudaDriverVersion_v2Calls gets all the calls that were made to SystemGetCudaDriverVersion_v2. -// Check the length with: -// -// len(mockedInterface.SystemGetCudaDriverVersion_v2Calls()) -func (mock *Interface) SystemGetCudaDriverVersion_v2Calls() []struct { -} { - var calls []struct { - } - mock.lockSystemGetCudaDriverVersion_v2.RLock() - calls = mock.calls.SystemGetCudaDriverVersion_v2 - mock.lockSystemGetCudaDriverVersion_v2.RUnlock() - return calls -} - -// SystemGetDriverBranch calls SystemGetDriverBranchFunc. -func (mock *Interface) SystemGetDriverBranch() (nvml.SystemDriverBranchInfo, nvml.Return) { - if mock.SystemGetDriverBranchFunc == nil { - panic("Interface.SystemGetDriverBranchFunc: method is nil but Interface.SystemGetDriverBranch was just called") - } - callInfo := struct { - }{} - mock.lockSystemGetDriverBranch.Lock() - mock.calls.SystemGetDriverBranch = append(mock.calls.SystemGetDriverBranch, callInfo) - mock.lockSystemGetDriverBranch.Unlock() - return mock.SystemGetDriverBranchFunc() -} - -// SystemGetDriverBranchCalls gets all the calls that were made to SystemGetDriverBranch. -// Check the length with: -// -// len(mockedInterface.SystemGetDriverBranchCalls()) -func (mock *Interface) SystemGetDriverBranchCalls() []struct { -} { - var calls []struct { - } - mock.lockSystemGetDriverBranch.RLock() - calls = mock.calls.SystemGetDriverBranch - mock.lockSystemGetDriverBranch.RUnlock() - return calls -} - -// SystemGetDriverVersion calls SystemGetDriverVersionFunc. -func (mock *Interface) SystemGetDriverVersion() (string, nvml.Return) { - if mock.SystemGetDriverVersionFunc == nil { - panic("Interface.SystemGetDriverVersionFunc: method is nil but Interface.SystemGetDriverVersion was just called") - } - callInfo := struct { - }{} - mock.lockSystemGetDriverVersion.Lock() - mock.calls.SystemGetDriverVersion = append(mock.calls.SystemGetDriverVersion, callInfo) - mock.lockSystemGetDriverVersion.Unlock() - return mock.SystemGetDriverVersionFunc() -} - -// SystemGetDriverVersionCalls gets all the calls that were made to SystemGetDriverVersion. -// Check the length with: -// -// len(mockedInterface.SystemGetDriverVersionCalls()) -func (mock *Interface) SystemGetDriverVersionCalls() []struct { -} { - var calls []struct { - } - mock.lockSystemGetDriverVersion.RLock() - calls = mock.calls.SystemGetDriverVersion - mock.lockSystemGetDriverVersion.RUnlock() - return calls -} - -// SystemGetHicVersion calls SystemGetHicVersionFunc. -func (mock *Interface) SystemGetHicVersion() ([]nvml.HwbcEntry, nvml.Return) { - if mock.SystemGetHicVersionFunc == nil { - panic("Interface.SystemGetHicVersionFunc: method is nil but Interface.SystemGetHicVersion was just called") - } - callInfo := struct { - }{} - mock.lockSystemGetHicVersion.Lock() - mock.calls.SystemGetHicVersion = append(mock.calls.SystemGetHicVersion, callInfo) - mock.lockSystemGetHicVersion.Unlock() - return mock.SystemGetHicVersionFunc() -} - -// SystemGetHicVersionCalls gets all the calls that were made to SystemGetHicVersion. -// Check the length with: -// -// len(mockedInterface.SystemGetHicVersionCalls()) -func (mock *Interface) SystemGetHicVersionCalls() []struct { -} { - var calls []struct { - } - mock.lockSystemGetHicVersion.RLock() - calls = mock.calls.SystemGetHicVersion - mock.lockSystemGetHicVersion.RUnlock() - return calls -} - -// SystemGetNVMLVersion calls SystemGetNVMLVersionFunc. -func (mock *Interface) SystemGetNVMLVersion() (string, nvml.Return) { - if mock.SystemGetNVMLVersionFunc == nil { - panic("Interface.SystemGetNVMLVersionFunc: method is nil but Interface.SystemGetNVMLVersion was just called") - } - callInfo := struct { - }{} - mock.lockSystemGetNVMLVersion.Lock() - mock.calls.SystemGetNVMLVersion = append(mock.calls.SystemGetNVMLVersion, callInfo) - mock.lockSystemGetNVMLVersion.Unlock() - return mock.SystemGetNVMLVersionFunc() -} - -// SystemGetNVMLVersionCalls gets all the calls that were made to SystemGetNVMLVersion. -// Check the length with: -// -// len(mockedInterface.SystemGetNVMLVersionCalls()) -func (mock *Interface) SystemGetNVMLVersionCalls() []struct { -} { - var calls []struct { - } - mock.lockSystemGetNVMLVersion.RLock() - calls = mock.calls.SystemGetNVMLVersion - mock.lockSystemGetNVMLVersion.RUnlock() - return calls -} - -// SystemGetNvlinkBwMode calls SystemGetNvlinkBwModeFunc. -func (mock *Interface) SystemGetNvlinkBwMode() (uint32, nvml.Return) { - if mock.SystemGetNvlinkBwModeFunc == nil { - panic("Interface.SystemGetNvlinkBwModeFunc: method is nil but Interface.SystemGetNvlinkBwMode was just called") - } - callInfo := struct { - }{} - mock.lockSystemGetNvlinkBwMode.Lock() - mock.calls.SystemGetNvlinkBwMode = append(mock.calls.SystemGetNvlinkBwMode, callInfo) - mock.lockSystemGetNvlinkBwMode.Unlock() - return mock.SystemGetNvlinkBwModeFunc() -} - -// SystemGetNvlinkBwModeCalls gets all the calls that were made to SystemGetNvlinkBwMode. -// Check the length with: -// -// len(mockedInterface.SystemGetNvlinkBwModeCalls()) -func (mock *Interface) SystemGetNvlinkBwModeCalls() []struct { -} { - var calls []struct { - } - mock.lockSystemGetNvlinkBwMode.RLock() - calls = mock.calls.SystemGetNvlinkBwMode - mock.lockSystemGetNvlinkBwMode.RUnlock() - return calls -} - -// SystemGetProcessName calls SystemGetProcessNameFunc. -func (mock *Interface) SystemGetProcessName(n int) (string, nvml.Return) { - if mock.SystemGetProcessNameFunc == nil { - panic("Interface.SystemGetProcessNameFunc: method is nil but Interface.SystemGetProcessName was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockSystemGetProcessName.Lock() - mock.calls.SystemGetProcessName = append(mock.calls.SystemGetProcessName, callInfo) - mock.lockSystemGetProcessName.Unlock() - return mock.SystemGetProcessNameFunc(n) -} - -// SystemGetProcessNameCalls gets all the calls that were made to SystemGetProcessName. -// Check the length with: -// -// len(mockedInterface.SystemGetProcessNameCalls()) -func (mock *Interface) SystemGetProcessNameCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockSystemGetProcessName.RLock() - calls = mock.calls.SystemGetProcessName - mock.lockSystemGetProcessName.RUnlock() - return calls -} - -// SystemGetTopologyGpuSet calls SystemGetTopologyGpuSetFunc. -func (mock *Interface) SystemGetTopologyGpuSet(n int) ([]nvml.Device, nvml.Return) { - if mock.SystemGetTopologyGpuSetFunc == nil { - panic("Interface.SystemGetTopologyGpuSetFunc: method is nil but Interface.SystemGetTopologyGpuSet was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockSystemGetTopologyGpuSet.Lock() - mock.calls.SystemGetTopologyGpuSet = append(mock.calls.SystemGetTopologyGpuSet, callInfo) - mock.lockSystemGetTopologyGpuSet.Unlock() - return mock.SystemGetTopologyGpuSetFunc(n) -} - -// SystemGetTopologyGpuSetCalls gets all the calls that were made to SystemGetTopologyGpuSet. -// Check the length with: -// -// len(mockedInterface.SystemGetTopologyGpuSetCalls()) -func (mock *Interface) SystemGetTopologyGpuSetCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockSystemGetTopologyGpuSet.RLock() - calls = mock.calls.SystemGetTopologyGpuSet - mock.lockSystemGetTopologyGpuSet.RUnlock() - return calls -} - -// SystemRegisterEvents calls SystemRegisterEventsFunc. -func (mock *Interface) SystemRegisterEvents(systemRegisterEventRequest *nvml.SystemRegisterEventRequest) nvml.Return { - if mock.SystemRegisterEventsFunc == nil { - panic("Interface.SystemRegisterEventsFunc: method is nil but Interface.SystemRegisterEvents was just called") - } - callInfo := struct { - SystemRegisterEventRequest *nvml.SystemRegisterEventRequest - }{ - SystemRegisterEventRequest: systemRegisterEventRequest, - } - mock.lockSystemRegisterEvents.Lock() - mock.calls.SystemRegisterEvents = append(mock.calls.SystemRegisterEvents, callInfo) - mock.lockSystemRegisterEvents.Unlock() - return mock.SystemRegisterEventsFunc(systemRegisterEventRequest) -} - -// SystemRegisterEventsCalls gets all the calls that were made to SystemRegisterEvents. -// Check the length with: -// -// len(mockedInterface.SystemRegisterEventsCalls()) -func (mock *Interface) SystemRegisterEventsCalls() []struct { - SystemRegisterEventRequest *nvml.SystemRegisterEventRequest -} { - var calls []struct { - SystemRegisterEventRequest *nvml.SystemRegisterEventRequest - } - mock.lockSystemRegisterEvents.RLock() - calls = mock.calls.SystemRegisterEvents - mock.lockSystemRegisterEvents.RUnlock() - return calls -} - -// SystemSetConfComputeGpusReadyState calls SystemSetConfComputeGpusReadyStateFunc. -func (mock *Interface) SystemSetConfComputeGpusReadyState(v uint32) nvml.Return { - if mock.SystemSetConfComputeGpusReadyStateFunc == nil { - panic("Interface.SystemSetConfComputeGpusReadyStateFunc: method is nil but Interface.SystemSetConfComputeGpusReadyState was just called") - } - callInfo := struct { - V uint32 - }{ - V: v, - } - mock.lockSystemSetConfComputeGpusReadyState.Lock() - mock.calls.SystemSetConfComputeGpusReadyState = append(mock.calls.SystemSetConfComputeGpusReadyState, callInfo) - mock.lockSystemSetConfComputeGpusReadyState.Unlock() - return mock.SystemSetConfComputeGpusReadyStateFunc(v) -} - -// SystemSetConfComputeGpusReadyStateCalls gets all the calls that were made to SystemSetConfComputeGpusReadyState. -// Check the length with: -// -// len(mockedInterface.SystemSetConfComputeGpusReadyStateCalls()) -func (mock *Interface) SystemSetConfComputeGpusReadyStateCalls() []struct { - V uint32 -} { - var calls []struct { - V uint32 - } - mock.lockSystemSetConfComputeGpusReadyState.RLock() - calls = mock.calls.SystemSetConfComputeGpusReadyState - mock.lockSystemSetConfComputeGpusReadyState.RUnlock() - return calls -} - -// SystemSetConfComputeKeyRotationThresholdInfo calls SystemSetConfComputeKeyRotationThresholdInfoFunc. -func (mock *Interface) SystemSetConfComputeKeyRotationThresholdInfo(confComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo) nvml.Return { - if mock.SystemSetConfComputeKeyRotationThresholdInfoFunc == nil { - panic("Interface.SystemSetConfComputeKeyRotationThresholdInfoFunc: method is nil but Interface.SystemSetConfComputeKeyRotationThresholdInfo was just called") - } - callInfo := struct { - ConfComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo - }{ - ConfComputeSetKeyRotationThresholdInfo: confComputeSetKeyRotationThresholdInfo, - } - mock.lockSystemSetConfComputeKeyRotationThresholdInfo.Lock() - mock.calls.SystemSetConfComputeKeyRotationThresholdInfo = append(mock.calls.SystemSetConfComputeKeyRotationThresholdInfo, callInfo) - mock.lockSystemSetConfComputeKeyRotationThresholdInfo.Unlock() - return mock.SystemSetConfComputeKeyRotationThresholdInfoFunc(confComputeSetKeyRotationThresholdInfo) -} - -// SystemSetConfComputeKeyRotationThresholdInfoCalls gets all the calls that were made to SystemSetConfComputeKeyRotationThresholdInfo. -// Check the length with: -// -// len(mockedInterface.SystemSetConfComputeKeyRotationThresholdInfoCalls()) -func (mock *Interface) SystemSetConfComputeKeyRotationThresholdInfoCalls() []struct { - ConfComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo -} { - var calls []struct { - ConfComputeSetKeyRotationThresholdInfo nvml.ConfComputeSetKeyRotationThresholdInfo - } - mock.lockSystemSetConfComputeKeyRotationThresholdInfo.RLock() - calls = mock.calls.SystemSetConfComputeKeyRotationThresholdInfo - mock.lockSystemSetConfComputeKeyRotationThresholdInfo.RUnlock() - return calls -} - -// SystemSetNvlinkBwMode calls SystemSetNvlinkBwModeFunc. -func (mock *Interface) SystemSetNvlinkBwMode(v uint32) nvml.Return { - if mock.SystemSetNvlinkBwModeFunc == nil { - panic("Interface.SystemSetNvlinkBwModeFunc: method is nil but Interface.SystemSetNvlinkBwMode was just called") - } - callInfo := struct { - V uint32 - }{ - V: v, - } - mock.lockSystemSetNvlinkBwMode.Lock() - mock.calls.SystemSetNvlinkBwMode = append(mock.calls.SystemSetNvlinkBwMode, callInfo) - mock.lockSystemSetNvlinkBwMode.Unlock() - return mock.SystemSetNvlinkBwModeFunc(v) -} - -// SystemSetNvlinkBwModeCalls gets all the calls that were made to SystemSetNvlinkBwMode. -// Check the length with: -// -// len(mockedInterface.SystemSetNvlinkBwModeCalls()) -func (mock *Interface) SystemSetNvlinkBwModeCalls() []struct { - V uint32 -} { - var calls []struct { - V uint32 - } - mock.lockSystemSetNvlinkBwMode.RLock() - calls = mock.calls.SystemSetNvlinkBwMode - mock.lockSystemSetNvlinkBwMode.RUnlock() - return calls -} - -// UnitGetCount calls UnitGetCountFunc. -func (mock *Interface) UnitGetCount() (int, nvml.Return) { - if mock.UnitGetCountFunc == nil { - panic("Interface.UnitGetCountFunc: method is nil but Interface.UnitGetCount was just called") - } - callInfo := struct { - }{} - mock.lockUnitGetCount.Lock() - mock.calls.UnitGetCount = append(mock.calls.UnitGetCount, callInfo) - mock.lockUnitGetCount.Unlock() - return mock.UnitGetCountFunc() -} - -// UnitGetCountCalls gets all the calls that were made to UnitGetCount. -// Check the length with: -// -// len(mockedInterface.UnitGetCountCalls()) -func (mock *Interface) UnitGetCountCalls() []struct { -} { - var calls []struct { - } - mock.lockUnitGetCount.RLock() - calls = mock.calls.UnitGetCount - mock.lockUnitGetCount.RUnlock() - return calls -} - -// UnitGetDevices calls UnitGetDevicesFunc. -func (mock *Interface) UnitGetDevices(unit nvml.Unit) ([]nvml.Device, nvml.Return) { - if mock.UnitGetDevicesFunc == nil { - panic("Interface.UnitGetDevicesFunc: method is nil but Interface.UnitGetDevices was just called") - } - callInfo := struct { - Unit nvml.Unit - }{ - Unit: unit, - } - mock.lockUnitGetDevices.Lock() - mock.calls.UnitGetDevices = append(mock.calls.UnitGetDevices, callInfo) - mock.lockUnitGetDevices.Unlock() - return mock.UnitGetDevicesFunc(unit) -} - -// UnitGetDevicesCalls gets all the calls that were made to UnitGetDevices. -// Check the length with: -// -// len(mockedInterface.UnitGetDevicesCalls()) -func (mock *Interface) UnitGetDevicesCalls() []struct { - Unit nvml.Unit -} { - var calls []struct { - Unit nvml.Unit - } - mock.lockUnitGetDevices.RLock() - calls = mock.calls.UnitGetDevices - mock.lockUnitGetDevices.RUnlock() - return calls -} - -// UnitGetFanSpeedInfo calls UnitGetFanSpeedInfoFunc. -func (mock *Interface) UnitGetFanSpeedInfo(unit nvml.Unit) (nvml.UnitFanSpeeds, nvml.Return) { - if mock.UnitGetFanSpeedInfoFunc == nil { - panic("Interface.UnitGetFanSpeedInfoFunc: method is nil but Interface.UnitGetFanSpeedInfo was just called") - } - callInfo := struct { - Unit nvml.Unit - }{ - Unit: unit, - } - mock.lockUnitGetFanSpeedInfo.Lock() - mock.calls.UnitGetFanSpeedInfo = append(mock.calls.UnitGetFanSpeedInfo, callInfo) - mock.lockUnitGetFanSpeedInfo.Unlock() - return mock.UnitGetFanSpeedInfoFunc(unit) -} - -// UnitGetFanSpeedInfoCalls gets all the calls that were made to UnitGetFanSpeedInfo. -// Check the length with: -// -// len(mockedInterface.UnitGetFanSpeedInfoCalls()) -func (mock *Interface) UnitGetFanSpeedInfoCalls() []struct { - Unit nvml.Unit -} { - var calls []struct { - Unit nvml.Unit - } - mock.lockUnitGetFanSpeedInfo.RLock() - calls = mock.calls.UnitGetFanSpeedInfo - mock.lockUnitGetFanSpeedInfo.RUnlock() - return calls -} - -// UnitGetHandleByIndex calls UnitGetHandleByIndexFunc. -func (mock *Interface) UnitGetHandleByIndex(n int) (nvml.Unit, nvml.Return) { - if mock.UnitGetHandleByIndexFunc == nil { - panic("Interface.UnitGetHandleByIndexFunc: method is nil but Interface.UnitGetHandleByIndex was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockUnitGetHandleByIndex.Lock() - mock.calls.UnitGetHandleByIndex = append(mock.calls.UnitGetHandleByIndex, callInfo) - mock.lockUnitGetHandleByIndex.Unlock() - return mock.UnitGetHandleByIndexFunc(n) -} - -// UnitGetHandleByIndexCalls gets all the calls that were made to UnitGetHandleByIndex. -// Check the length with: -// -// len(mockedInterface.UnitGetHandleByIndexCalls()) -func (mock *Interface) UnitGetHandleByIndexCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockUnitGetHandleByIndex.RLock() - calls = mock.calls.UnitGetHandleByIndex - mock.lockUnitGetHandleByIndex.RUnlock() - return calls -} - -// UnitGetLedState calls UnitGetLedStateFunc. -func (mock *Interface) UnitGetLedState(unit nvml.Unit) (nvml.LedState, nvml.Return) { - if mock.UnitGetLedStateFunc == nil { - panic("Interface.UnitGetLedStateFunc: method is nil but Interface.UnitGetLedState was just called") - } - callInfo := struct { - Unit nvml.Unit - }{ - Unit: unit, - } - mock.lockUnitGetLedState.Lock() - mock.calls.UnitGetLedState = append(mock.calls.UnitGetLedState, callInfo) - mock.lockUnitGetLedState.Unlock() - return mock.UnitGetLedStateFunc(unit) -} - -// UnitGetLedStateCalls gets all the calls that were made to UnitGetLedState. -// Check the length with: -// -// len(mockedInterface.UnitGetLedStateCalls()) -func (mock *Interface) UnitGetLedStateCalls() []struct { - Unit nvml.Unit -} { - var calls []struct { - Unit nvml.Unit - } - mock.lockUnitGetLedState.RLock() - calls = mock.calls.UnitGetLedState - mock.lockUnitGetLedState.RUnlock() - return calls -} - -// UnitGetPsuInfo calls UnitGetPsuInfoFunc. -func (mock *Interface) UnitGetPsuInfo(unit nvml.Unit) (nvml.PSUInfo, nvml.Return) { - if mock.UnitGetPsuInfoFunc == nil { - panic("Interface.UnitGetPsuInfoFunc: method is nil but Interface.UnitGetPsuInfo was just called") - } - callInfo := struct { - Unit nvml.Unit - }{ - Unit: unit, - } - mock.lockUnitGetPsuInfo.Lock() - mock.calls.UnitGetPsuInfo = append(mock.calls.UnitGetPsuInfo, callInfo) - mock.lockUnitGetPsuInfo.Unlock() - return mock.UnitGetPsuInfoFunc(unit) -} - -// UnitGetPsuInfoCalls gets all the calls that were made to UnitGetPsuInfo. -// Check the length with: -// -// len(mockedInterface.UnitGetPsuInfoCalls()) -func (mock *Interface) UnitGetPsuInfoCalls() []struct { - Unit nvml.Unit -} { - var calls []struct { - Unit nvml.Unit - } - mock.lockUnitGetPsuInfo.RLock() - calls = mock.calls.UnitGetPsuInfo - mock.lockUnitGetPsuInfo.RUnlock() - return calls -} - -// UnitGetTemperature calls UnitGetTemperatureFunc. -func (mock *Interface) UnitGetTemperature(unit nvml.Unit, n int) (uint32, nvml.Return) { - if mock.UnitGetTemperatureFunc == nil { - panic("Interface.UnitGetTemperatureFunc: method is nil but Interface.UnitGetTemperature was just called") - } - callInfo := struct { - Unit nvml.Unit - N int - }{ - Unit: unit, - N: n, - } - mock.lockUnitGetTemperature.Lock() - mock.calls.UnitGetTemperature = append(mock.calls.UnitGetTemperature, callInfo) - mock.lockUnitGetTemperature.Unlock() - return mock.UnitGetTemperatureFunc(unit, n) -} - -// UnitGetTemperatureCalls gets all the calls that were made to UnitGetTemperature. -// Check the length with: -// -// len(mockedInterface.UnitGetTemperatureCalls()) -func (mock *Interface) UnitGetTemperatureCalls() []struct { - Unit nvml.Unit - N int -} { - var calls []struct { - Unit nvml.Unit - N int - } - mock.lockUnitGetTemperature.RLock() - calls = mock.calls.UnitGetTemperature - mock.lockUnitGetTemperature.RUnlock() - return calls -} - -// UnitGetUnitInfo calls UnitGetUnitInfoFunc. -func (mock *Interface) UnitGetUnitInfo(unit nvml.Unit) (nvml.UnitInfo, nvml.Return) { - if mock.UnitGetUnitInfoFunc == nil { - panic("Interface.UnitGetUnitInfoFunc: method is nil but Interface.UnitGetUnitInfo was just called") - } - callInfo := struct { - Unit nvml.Unit - }{ - Unit: unit, - } - mock.lockUnitGetUnitInfo.Lock() - mock.calls.UnitGetUnitInfo = append(mock.calls.UnitGetUnitInfo, callInfo) - mock.lockUnitGetUnitInfo.Unlock() - return mock.UnitGetUnitInfoFunc(unit) -} - -// UnitGetUnitInfoCalls gets all the calls that were made to UnitGetUnitInfo. -// Check the length with: -// -// len(mockedInterface.UnitGetUnitInfoCalls()) -func (mock *Interface) UnitGetUnitInfoCalls() []struct { - Unit nvml.Unit -} { - var calls []struct { - Unit nvml.Unit - } - mock.lockUnitGetUnitInfo.RLock() - calls = mock.calls.UnitGetUnitInfo - mock.lockUnitGetUnitInfo.RUnlock() - return calls -} - -// UnitSetLedState calls UnitSetLedStateFunc. -func (mock *Interface) UnitSetLedState(unit nvml.Unit, ledColor nvml.LedColor) nvml.Return { - if mock.UnitSetLedStateFunc == nil { - panic("Interface.UnitSetLedStateFunc: method is nil but Interface.UnitSetLedState was just called") - } - callInfo := struct { - Unit nvml.Unit - LedColor nvml.LedColor - }{ - Unit: unit, - LedColor: ledColor, - } - mock.lockUnitSetLedState.Lock() - mock.calls.UnitSetLedState = append(mock.calls.UnitSetLedState, callInfo) - mock.lockUnitSetLedState.Unlock() - return mock.UnitSetLedStateFunc(unit, ledColor) -} - -// UnitSetLedStateCalls gets all the calls that were made to UnitSetLedState. -// Check the length with: -// -// len(mockedInterface.UnitSetLedStateCalls()) -func (mock *Interface) UnitSetLedStateCalls() []struct { - Unit nvml.Unit - LedColor nvml.LedColor -} { - var calls []struct { - Unit nvml.Unit - LedColor nvml.LedColor - } - mock.lockUnitSetLedState.RLock() - calls = mock.calls.UnitSetLedState - mock.lockUnitSetLedState.RUnlock() - return calls -} - -// VgpuInstanceClearAccountingPids calls VgpuInstanceClearAccountingPidsFunc. -func (mock *Interface) VgpuInstanceClearAccountingPids(vgpuInstance nvml.VgpuInstance) nvml.Return { - if mock.VgpuInstanceClearAccountingPidsFunc == nil { - panic("Interface.VgpuInstanceClearAccountingPidsFunc: method is nil but Interface.VgpuInstanceClearAccountingPids was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceClearAccountingPids.Lock() - mock.calls.VgpuInstanceClearAccountingPids = append(mock.calls.VgpuInstanceClearAccountingPids, callInfo) - mock.lockVgpuInstanceClearAccountingPids.Unlock() - return mock.VgpuInstanceClearAccountingPidsFunc(vgpuInstance) -} - -// VgpuInstanceClearAccountingPidsCalls gets all the calls that were made to VgpuInstanceClearAccountingPids. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceClearAccountingPidsCalls()) -func (mock *Interface) VgpuInstanceClearAccountingPidsCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceClearAccountingPids.RLock() - calls = mock.calls.VgpuInstanceClearAccountingPids - mock.lockVgpuInstanceClearAccountingPids.RUnlock() - return calls -} - -// VgpuInstanceGetAccountingMode calls VgpuInstanceGetAccountingModeFunc. -func (mock *Interface) VgpuInstanceGetAccountingMode(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) { - if mock.VgpuInstanceGetAccountingModeFunc == nil { - panic("Interface.VgpuInstanceGetAccountingModeFunc: method is nil but Interface.VgpuInstanceGetAccountingMode was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetAccountingMode.Lock() - mock.calls.VgpuInstanceGetAccountingMode = append(mock.calls.VgpuInstanceGetAccountingMode, callInfo) - mock.lockVgpuInstanceGetAccountingMode.Unlock() - return mock.VgpuInstanceGetAccountingModeFunc(vgpuInstance) -} - -// VgpuInstanceGetAccountingModeCalls gets all the calls that were made to VgpuInstanceGetAccountingMode. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetAccountingModeCalls()) -func (mock *Interface) VgpuInstanceGetAccountingModeCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetAccountingMode.RLock() - calls = mock.calls.VgpuInstanceGetAccountingMode - mock.lockVgpuInstanceGetAccountingMode.RUnlock() - return calls -} - -// VgpuInstanceGetAccountingPids calls VgpuInstanceGetAccountingPidsFunc. -func (mock *Interface) VgpuInstanceGetAccountingPids(vgpuInstance nvml.VgpuInstance) ([]int, nvml.Return) { - if mock.VgpuInstanceGetAccountingPidsFunc == nil { - panic("Interface.VgpuInstanceGetAccountingPidsFunc: method is nil but Interface.VgpuInstanceGetAccountingPids was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetAccountingPids.Lock() - mock.calls.VgpuInstanceGetAccountingPids = append(mock.calls.VgpuInstanceGetAccountingPids, callInfo) - mock.lockVgpuInstanceGetAccountingPids.Unlock() - return mock.VgpuInstanceGetAccountingPidsFunc(vgpuInstance) -} - -// VgpuInstanceGetAccountingPidsCalls gets all the calls that were made to VgpuInstanceGetAccountingPids. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetAccountingPidsCalls()) -func (mock *Interface) VgpuInstanceGetAccountingPidsCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetAccountingPids.RLock() - calls = mock.calls.VgpuInstanceGetAccountingPids - mock.lockVgpuInstanceGetAccountingPids.RUnlock() - return calls -} - -// VgpuInstanceGetAccountingStats calls VgpuInstanceGetAccountingStatsFunc. -func (mock *Interface) VgpuInstanceGetAccountingStats(vgpuInstance nvml.VgpuInstance, n int) (nvml.AccountingStats, nvml.Return) { - if mock.VgpuInstanceGetAccountingStatsFunc == nil { - panic("Interface.VgpuInstanceGetAccountingStatsFunc: method is nil but Interface.VgpuInstanceGetAccountingStats was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - N int - }{ - VgpuInstance: vgpuInstance, - N: n, - } - mock.lockVgpuInstanceGetAccountingStats.Lock() - mock.calls.VgpuInstanceGetAccountingStats = append(mock.calls.VgpuInstanceGetAccountingStats, callInfo) - mock.lockVgpuInstanceGetAccountingStats.Unlock() - return mock.VgpuInstanceGetAccountingStatsFunc(vgpuInstance, n) -} - -// VgpuInstanceGetAccountingStatsCalls gets all the calls that were made to VgpuInstanceGetAccountingStats. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetAccountingStatsCalls()) -func (mock *Interface) VgpuInstanceGetAccountingStatsCalls() []struct { - VgpuInstance nvml.VgpuInstance - N int -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - N int - } - mock.lockVgpuInstanceGetAccountingStats.RLock() - calls = mock.calls.VgpuInstanceGetAccountingStats - mock.lockVgpuInstanceGetAccountingStats.RUnlock() - return calls -} - -// VgpuInstanceGetEccMode calls VgpuInstanceGetEccModeFunc. -func (mock *Interface) VgpuInstanceGetEccMode(vgpuInstance nvml.VgpuInstance) (nvml.EnableState, nvml.Return) { - if mock.VgpuInstanceGetEccModeFunc == nil { - panic("Interface.VgpuInstanceGetEccModeFunc: method is nil but Interface.VgpuInstanceGetEccMode was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetEccMode.Lock() - mock.calls.VgpuInstanceGetEccMode = append(mock.calls.VgpuInstanceGetEccMode, callInfo) - mock.lockVgpuInstanceGetEccMode.Unlock() - return mock.VgpuInstanceGetEccModeFunc(vgpuInstance) -} - -// VgpuInstanceGetEccModeCalls gets all the calls that were made to VgpuInstanceGetEccMode. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetEccModeCalls()) -func (mock *Interface) VgpuInstanceGetEccModeCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetEccMode.RLock() - calls = mock.calls.VgpuInstanceGetEccMode - mock.lockVgpuInstanceGetEccMode.RUnlock() - return calls -} - -// VgpuInstanceGetEncoderCapacity calls VgpuInstanceGetEncoderCapacityFunc. -func (mock *Interface) VgpuInstanceGetEncoderCapacity(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { - if mock.VgpuInstanceGetEncoderCapacityFunc == nil { - panic("Interface.VgpuInstanceGetEncoderCapacityFunc: method is nil but Interface.VgpuInstanceGetEncoderCapacity was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetEncoderCapacity.Lock() - mock.calls.VgpuInstanceGetEncoderCapacity = append(mock.calls.VgpuInstanceGetEncoderCapacity, callInfo) - mock.lockVgpuInstanceGetEncoderCapacity.Unlock() - return mock.VgpuInstanceGetEncoderCapacityFunc(vgpuInstance) -} - -// VgpuInstanceGetEncoderCapacityCalls gets all the calls that were made to VgpuInstanceGetEncoderCapacity. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetEncoderCapacityCalls()) -func (mock *Interface) VgpuInstanceGetEncoderCapacityCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetEncoderCapacity.RLock() - calls = mock.calls.VgpuInstanceGetEncoderCapacity - mock.lockVgpuInstanceGetEncoderCapacity.RUnlock() - return calls -} - -// VgpuInstanceGetEncoderSessions calls VgpuInstanceGetEncoderSessionsFunc. -func (mock *Interface) VgpuInstanceGetEncoderSessions(vgpuInstance nvml.VgpuInstance) (int, nvml.EncoderSessionInfo, nvml.Return) { - if mock.VgpuInstanceGetEncoderSessionsFunc == nil { - panic("Interface.VgpuInstanceGetEncoderSessionsFunc: method is nil but Interface.VgpuInstanceGetEncoderSessions was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetEncoderSessions.Lock() - mock.calls.VgpuInstanceGetEncoderSessions = append(mock.calls.VgpuInstanceGetEncoderSessions, callInfo) - mock.lockVgpuInstanceGetEncoderSessions.Unlock() - return mock.VgpuInstanceGetEncoderSessionsFunc(vgpuInstance) -} - -// VgpuInstanceGetEncoderSessionsCalls gets all the calls that were made to VgpuInstanceGetEncoderSessions. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetEncoderSessionsCalls()) -func (mock *Interface) VgpuInstanceGetEncoderSessionsCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetEncoderSessions.RLock() - calls = mock.calls.VgpuInstanceGetEncoderSessions - mock.lockVgpuInstanceGetEncoderSessions.RUnlock() - return calls -} - -// VgpuInstanceGetEncoderStats calls VgpuInstanceGetEncoderStatsFunc. -func (mock *Interface) VgpuInstanceGetEncoderStats(vgpuInstance nvml.VgpuInstance) (int, uint32, uint32, nvml.Return) { - if mock.VgpuInstanceGetEncoderStatsFunc == nil { - panic("Interface.VgpuInstanceGetEncoderStatsFunc: method is nil but Interface.VgpuInstanceGetEncoderStats was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetEncoderStats.Lock() - mock.calls.VgpuInstanceGetEncoderStats = append(mock.calls.VgpuInstanceGetEncoderStats, callInfo) - mock.lockVgpuInstanceGetEncoderStats.Unlock() - return mock.VgpuInstanceGetEncoderStatsFunc(vgpuInstance) -} - -// VgpuInstanceGetEncoderStatsCalls gets all the calls that were made to VgpuInstanceGetEncoderStats. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetEncoderStatsCalls()) -func (mock *Interface) VgpuInstanceGetEncoderStatsCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetEncoderStats.RLock() - calls = mock.calls.VgpuInstanceGetEncoderStats - mock.lockVgpuInstanceGetEncoderStats.RUnlock() - return calls -} - -// VgpuInstanceGetFBCSessions calls VgpuInstanceGetFBCSessionsFunc. -func (mock *Interface) VgpuInstanceGetFBCSessions(vgpuInstance nvml.VgpuInstance) (int, nvml.FBCSessionInfo, nvml.Return) { - if mock.VgpuInstanceGetFBCSessionsFunc == nil { - panic("Interface.VgpuInstanceGetFBCSessionsFunc: method is nil but Interface.VgpuInstanceGetFBCSessions was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetFBCSessions.Lock() - mock.calls.VgpuInstanceGetFBCSessions = append(mock.calls.VgpuInstanceGetFBCSessions, callInfo) - mock.lockVgpuInstanceGetFBCSessions.Unlock() - return mock.VgpuInstanceGetFBCSessionsFunc(vgpuInstance) -} - -// VgpuInstanceGetFBCSessionsCalls gets all the calls that were made to VgpuInstanceGetFBCSessions. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetFBCSessionsCalls()) -func (mock *Interface) VgpuInstanceGetFBCSessionsCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetFBCSessions.RLock() - calls = mock.calls.VgpuInstanceGetFBCSessions - mock.lockVgpuInstanceGetFBCSessions.RUnlock() - return calls -} - -// VgpuInstanceGetFBCStats calls VgpuInstanceGetFBCStatsFunc. -func (mock *Interface) VgpuInstanceGetFBCStats(vgpuInstance nvml.VgpuInstance) (nvml.FBCStats, nvml.Return) { - if mock.VgpuInstanceGetFBCStatsFunc == nil { - panic("Interface.VgpuInstanceGetFBCStatsFunc: method is nil but Interface.VgpuInstanceGetFBCStats was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetFBCStats.Lock() - mock.calls.VgpuInstanceGetFBCStats = append(mock.calls.VgpuInstanceGetFBCStats, callInfo) - mock.lockVgpuInstanceGetFBCStats.Unlock() - return mock.VgpuInstanceGetFBCStatsFunc(vgpuInstance) -} - -// VgpuInstanceGetFBCStatsCalls gets all the calls that were made to VgpuInstanceGetFBCStats. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetFBCStatsCalls()) -func (mock *Interface) VgpuInstanceGetFBCStatsCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetFBCStats.RLock() - calls = mock.calls.VgpuInstanceGetFBCStats - mock.lockVgpuInstanceGetFBCStats.RUnlock() - return calls -} - -// VgpuInstanceGetFbUsage calls VgpuInstanceGetFbUsageFunc. -func (mock *Interface) VgpuInstanceGetFbUsage(vgpuInstance nvml.VgpuInstance) (uint64, nvml.Return) { - if mock.VgpuInstanceGetFbUsageFunc == nil { - panic("Interface.VgpuInstanceGetFbUsageFunc: method is nil but Interface.VgpuInstanceGetFbUsage was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetFbUsage.Lock() - mock.calls.VgpuInstanceGetFbUsage = append(mock.calls.VgpuInstanceGetFbUsage, callInfo) - mock.lockVgpuInstanceGetFbUsage.Unlock() - return mock.VgpuInstanceGetFbUsageFunc(vgpuInstance) -} - -// VgpuInstanceGetFbUsageCalls gets all the calls that were made to VgpuInstanceGetFbUsage. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetFbUsageCalls()) -func (mock *Interface) VgpuInstanceGetFbUsageCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetFbUsage.RLock() - calls = mock.calls.VgpuInstanceGetFbUsage - mock.lockVgpuInstanceGetFbUsage.RUnlock() - return calls -} - -// VgpuInstanceGetFrameRateLimit calls VgpuInstanceGetFrameRateLimitFunc. -func (mock *Interface) VgpuInstanceGetFrameRateLimit(vgpuInstance nvml.VgpuInstance) (uint32, nvml.Return) { - if mock.VgpuInstanceGetFrameRateLimitFunc == nil { - panic("Interface.VgpuInstanceGetFrameRateLimitFunc: method is nil but Interface.VgpuInstanceGetFrameRateLimit was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetFrameRateLimit.Lock() - mock.calls.VgpuInstanceGetFrameRateLimit = append(mock.calls.VgpuInstanceGetFrameRateLimit, callInfo) - mock.lockVgpuInstanceGetFrameRateLimit.Unlock() - return mock.VgpuInstanceGetFrameRateLimitFunc(vgpuInstance) -} - -// VgpuInstanceGetFrameRateLimitCalls gets all the calls that were made to VgpuInstanceGetFrameRateLimit. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetFrameRateLimitCalls()) -func (mock *Interface) VgpuInstanceGetFrameRateLimitCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetFrameRateLimit.RLock() - calls = mock.calls.VgpuInstanceGetFrameRateLimit - mock.lockVgpuInstanceGetFrameRateLimit.RUnlock() - return calls -} - -// VgpuInstanceGetGpuInstanceId calls VgpuInstanceGetGpuInstanceIdFunc. -func (mock *Interface) VgpuInstanceGetGpuInstanceId(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { - if mock.VgpuInstanceGetGpuInstanceIdFunc == nil { - panic("Interface.VgpuInstanceGetGpuInstanceIdFunc: method is nil but Interface.VgpuInstanceGetGpuInstanceId was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetGpuInstanceId.Lock() - mock.calls.VgpuInstanceGetGpuInstanceId = append(mock.calls.VgpuInstanceGetGpuInstanceId, callInfo) - mock.lockVgpuInstanceGetGpuInstanceId.Unlock() - return mock.VgpuInstanceGetGpuInstanceIdFunc(vgpuInstance) -} - -// VgpuInstanceGetGpuInstanceIdCalls gets all the calls that were made to VgpuInstanceGetGpuInstanceId. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetGpuInstanceIdCalls()) -func (mock *Interface) VgpuInstanceGetGpuInstanceIdCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetGpuInstanceId.RLock() - calls = mock.calls.VgpuInstanceGetGpuInstanceId - mock.lockVgpuInstanceGetGpuInstanceId.RUnlock() - return calls -} - -// VgpuInstanceGetGpuPciId calls VgpuInstanceGetGpuPciIdFunc. -func (mock *Interface) VgpuInstanceGetGpuPciId(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { - if mock.VgpuInstanceGetGpuPciIdFunc == nil { - panic("Interface.VgpuInstanceGetGpuPciIdFunc: method is nil but Interface.VgpuInstanceGetGpuPciId was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetGpuPciId.Lock() - mock.calls.VgpuInstanceGetGpuPciId = append(mock.calls.VgpuInstanceGetGpuPciId, callInfo) - mock.lockVgpuInstanceGetGpuPciId.Unlock() - return mock.VgpuInstanceGetGpuPciIdFunc(vgpuInstance) -} - -// VgpuInstanceGetGpuPciIdCalls gets all the calls that were made to VgpuInstanceGetGpuPciId. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetGpuPciIdCalls()) -func (mock *Interface) VgpuInstanceGetGpuPciIdCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetGpuPciId.RLock() - calls = mock.calls.VgpuInstanceGetGpuPciId - mock.lockVgpuInstanceGetGpuPciId.RUnlock() - return calls -} - -// VgpuInstanceGetLicenseInfo calls VgpuInstanceGetLicenseInfoFunc. -func (mock *Interface) VgpuInstanceGetLicenseInfo(vgpuInstance nvml.VgpuInstance) (nvml.VgpuLicenseInfo, nvml.Return) { - if mock.VgpuInstanceGetLicenseInfoFunc == nil { - panic("Interface.VgpuInstanceGetLicenseInfoFunc: method is nil but Interface.VgpuInstanceGetLicenseInfo was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetLicenseInfo.Lock() - mock.calls.VgpuInstanceGetLicenseInfo = append(mock.calls.VgpuInstanceGetLicenseInfo, callInfo) - mock.lockVgpuInstanceGetLicenseInfo.Unlock() - return mock.VgpuInstanceGetLicenseInfoFunc(vgpuInstance) -} - -// VgpuInstanceGetLicenseInfoCalls gets all the calls that were made to VgpuInstanceGetLicenseInfo. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetLicenseInfoCalls()) -func (mock *Interface) VgpuInstanceGetLicenseInfoCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetLicenseInfo.RLock() - calls = mock.calls.VgpuInstanceGetLicenseInfo - mock.lockVgpuInstanceGetLicenseInfo.RUnlock() - return calls -} - -// VgpuInstanceGetLicenseStatus calls VgpuInstanceGetLicenseStatusFunc. -func (mock *Interface) VgpuInstanceGetLicenseStatus(vgpuInstance nvml.VgpuInstance) (int, nvml.Return) { - if mock.VgpuInstanceGetLicenseStatusFunc == nil { - panic("Interface.VgpuInstanceGetLicenseStatusFunc: method is nil but Interface.VgpuInstanceGetLicenseStatus was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetLicenseStatus.Lock() - mock.calls.VgpuInstanceGetLicenseStatus = append(mock.calls.VgpuInstanceGetLicenseStatus, callInfo) - mock.lockVgpuInstanceGetLicenseStatus.Unlock() - return mock.VgpuInstanceGetLicenseStatusFunc(vgpuInstance) -} - -// VgpuInstanceGetLicenseStatusCalls gets all the calls that were made to VgpuInstanceGetLicenseStatus. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetLicenseStatusCalls()) -func (mock *Interface) VgpuInstanceGetLicenseStatusCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetLicenseStatus.RLock() - calls = mock.calls.VgpuInstanceGetLicenseStatus - mock.lockVgpuInstanceGetLicenseStatus.RUnlock() - return calls -} - -// VgpuInstanceGetMdevUUID calls VgpuInstanceGetMdevUUIDFunc. -func (mock *Interface) VgpuInstanceGetMdevUUID(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { - if mock.VgpuInstanceGetMdevUUIDFunc == nil { - panic("Interface.VgpuInstanceGetMdevUUIDFunc: method is nil but Interface.VgpuInstanceGetMdevUUID was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetMdevUUID.Lock() - mock.calls.VgpuInstanceGetMdevUUID = append(mock.calls.VgpuInstanceGetMdevUUID, callInfo) - mock.lockVgpuInstanceGetMdevUUID.Unlock() - return mock.VgpuInstanceGetMdevUUIDFunc(vgpuInstance) -} - -// VgpuInstanceGetMdevUUIDCalls gets all the calls that were made to VgpuInstanceGetMdevUUID. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetMdevUUIDCalls()) -func (mock *Interface) VgpuInstanceGetMdevUUIDCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetMdevUUID.RLock() - calls = mock.calls.VgpuInstanceGetMdevUUID - mock.lockVgpuInstanceGetMdevUUID.RUnlock() - return calls -} - -// VgpuInstanceGetMetadata calls VgpuInstanceGetMetadataFunc. -func (mock *Interface) VgpuInstanceGetMetadata(vgpuInstance nvml.VgpuInstance) (nvml.VgpuMetadata, nvml.Return) { - if mock.VgpuInstanceGetMetadataFunc == nil { - panic("Interface.VgpuInstanceGetMetadataFunc: method is nil but Interface.VgpuInstanceGetMetadata was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetMetadata.Lock() - mock.calls.VgpuInstanceGetMetadata = append(mock.calls.VgpuInstanceGetMetadata, callInfo) - mock.lockVgpuInstanceGetMetadata.Unlock() - return mock.VgpuInstanceGetMetadataFunc(vgpuInstance) -} - -// VgpuInstanceGetMetadataCalls gets all the calls that were made to VgpuInstanceGetMetadata. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetMetadataCalls()) -func (mock *Interface) VgpuInstanceGetMetadataCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetMetadata.RLock() - calls = mock.calls.VgpuInstanceGetMetadata - mock.lockVgpuInstanceGetMetadata.RUnlock() - return calls -} - -// VgpuInstanceGetRuntimeStateSize calls VgpuInstanceGetRuntimeStateSizeFunc. -func (mock *Interface) VgpuInstanceGetRuntimeStateSize(vgpuInstance nvml.VgpuInstance) (nvml.VgpuRuntimeState, nvml.Return) { - if mock.VgpuInstanceGetRuntimeStateSizeFunc == nil { - panic("Interface.VgpuInstanceGetRuntimeStateSizeFunc: method is nil but Interface.VgpuInstanceGetRuntimeStateSize was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetRuntimeStateSize.Lock() - mock.calls.VgpuInstanceGetRuntimeStateSize = append(mock.calls.VgpuInstanceGetRuntimeStateSize, callInfo) - mock.lockVgpuInstanceGetRuntimeStateSize.Unlock() - return mock.VgpuInstanceGetRuntimeStateSizeFunc(vgpuInstance) -} - -// VgpuInstanceGetRuntimeStateSizeCalls gets all the calls that were made to VgpuInstanceGetRuntimeStateSize. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetRuntimeStateSizeCalls()) -func (mock *Interface) VgpuInstanceGetRuntimeStateSizeCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetRuntimeStateSize.RLock() - calls = mock.calls.VgpuInstanceGetRuntimeStateSize - mock.lockVgpuInstanceGetRuntimeStateSize.RUnlock() - return calls -} - -// VgpuInstanceGetType calls VgpuInstanceGetTypeFunc. -func (mock *Interface) VgpuInstanceGetType(vgpuInstance nvml.VgpuInstance) (nvml.VgpuTypeId, nvml.Return) { - if mock.VgpuInstanceGetTypeFunc == nil { - panic("Interface.VgpuInstanceGetTypeFunc: method is nil but Interface.VgpuInstanceGetType was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetType.Lock() - mock.calls.VgpuInstanceGetType = append(mock.calls.VgpuInstanceGetType, callInfo) - mock.lockVgpuInstanceGetType.Unlock() - return mock.VgpuInstanceGetTypeFunc(vgpuInstance) -} - -// VgpuInstanceGetTypeCalls gets all the calls that were made to VgpuInstanceGetType. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetTypeCalls()) -func (mock *Interface) VgpuInstanceGetTypeCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetType.RLock() - calls = mock.calls.VgpuInstanceGetType - mock.lockVgpuInstanceGetType.RUnlock() - return calls -} - -// VgpuInstanceGetUUID calls VgpuInstanceGetUUIDFunc. -func (mock *Interface) VgpuInstanceGetUUID(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { - if mock.VgpuInstanceGetUUIDFunc == nil { - panic("Interface.VgpuInstanceGetUUIDFunc: method is nil but Interface.VgpuInstanceGetUUID was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetUUID.Lock() - mock.calls.VgpuInstanceGetUUID = append(mock.calls.VgpuInstanceGetUUID, callInfo) - mock.lockVgpuInstanceGetUUID.Unlock() - return mock.VgpuInstanceGetUUIDFunc(vgpuInstance) -} - -// VgpuInstanceGetUUIDCalls gets all the calls that were made to VgpuInstanceGetUUID. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetUUIDCalls()) -func (mock *Interface) VgpuInstanceGetUUIDCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetUUID.RLock() - calls = mock.calls.VgpuInstanceGetUUID - mock.lockVgpuInstanceGetUUID.RUnlock() - return calls -} - -// VgpuInstanceGetVmDriverVersion calls VgpuInstanceGetVmDriverVersionFunc. -func (mock *Interface) VgpuInstanceGetVmDriverVersion(vgpuInstance nvml.VgpuInstance) (string, nvml.Return) { - if mock.VgpuInstanceGetVmDriverVersionFunc == nil { - panic("Interface.VgpuInstanceGetVmDriverVersionFunc: method is nil but Interface.VgpuInstanceGetVmDriverVersion was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetVmDriverVersion.Lock() - mock.calls.VgpuInstanceGetVmDriverVersion = append(mock.calls.VgpuInstanceGetVmDriverVersion, callInfo) - mock.lockVgpuInstanceGetVmDriverVersion.Unlock() - return mock.VgpuInstanceGetVmDriverVersionFunc(vgpuInstance) -} - -// VgpuInstanceGetVmDriverVersionCalls gets all the calls that were made to VgpuInstanceGetVmDriverVersion. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetVmDriverVersionCalls()) -func (mock *Interface) VgpuInstanceGetVmDriverVersionCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetVmDriverVersion.RLock() - calls = mock.calls.VgpuInstanceGetVmDriverVersion - mock.lockVgpuInstanceGetVmDriverVersion.RUnlock() - return calls -} - -// VgpuInstanceGetVmID calls VgpuInstanceGetVmIDFunc. -func (mock *Interface) VgpuInstanceGetVmID(vgpuInstance nvml.VgpuInstance) (string, nvml.VgpuVmIdType, nvml.Return) { - if mock.VgpuInstanceGetVmIDFunc == nil { - panic("Interface.VgpuInstanceGetVmIDFunc: method is nil but Interface.VgpuInstanceGetVmID was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - }{ - VgpuInstance: vgpuInstance, - } - mock.lockVgpuInstanceGetVmID.Lock() - mock.calls.VgpuInstanceGetVmID = append(mock.calls.VgpuInstanceGetVmID, callInfo) - mock.lockVgpuInstanceGetVmID.Unlock() - return mock.VgpuInstanceGetVmIDFunc(vgpuInstance) -} - -// VgpuInstanceGetVmIDCalls gets all the calls that were made to VgpuInstanceGetVmID. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceGetVmIDCalls()) -func (mock *Interface) VgpuInstanceGetVmIDCalls() []struct { - VgpuInstance nvml.VgpuInstance -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - } - mock.lockVgpuInstanceGetVmID.RLock() - calls = mock.calls.VgpuInstanceGetVmID - mock.lockVgpuInstanceGetVmID.RUnlock() - return calls -} - -// VgpuInstanceSetEncoderCapacity calls VgpuInstanceSetEncoderCapacityFunc. -func (mock *Interface) VgpuInstanceSetEncoderCapacity(vgpuInstance nvml.VgpuInstance, n int) nvml.Return { - if mock.VgpuInstanceSetEncoderCapacityFunc == nil { - panic("Interface.VgpuInstanceSetEncoderCapacityFunc: method is nil but Interface.VgpuInstanceSetEncoderCapacity was just called") - } - callInfo := struct { - VgpuInstance nvml.VgpuInstance - N int - }{ - VgpuInstance: vgpuInstance, - N: n, - } - mock.lockVgpuInstanceSetEncoderCapacity.Lock() - mock.calls.VgpuInstanceSetEncoderCapacity = append(mock.calls.VgpuInstanceSetEncoderCapacity, callInfo) - mock.lockVgpuInstanceSetEncoderCapacity.Unlock() - return mock.VgpuInstanceSetEncoderCapacityFunc(vgpuInstance, n) -} - -// VgpuInstanceSetEncoderCapacityCalls gets all the calls that were made to VgpuInstanceSetEncoderCapacity. -// Check the length with: -// -// len(mockedInterface.VgpuInstanceSetEncoderCapacityCalls()) -func (mock *Interface) VgpuInstanceSetEncoderCapacityCalls() []struct { - VgpuInstance nvml.VgpuInstance - N int -} { - var calls []struct { - VgpuInstance nvml.VgpuInstance - N int - } - mock.lockVgpuInstanceSetEncoderCapacity.RLock() - calls = mock.calls.VgpuInstanceSetEncoderCapacity - mock.lockVgpuInstanceSetEncoderCapacity.RUnlock() - return calls -} - -// VgpuTypeGetBAR1Info calls VgpuTypeGetBAR1InfoFunc. -func (mock *Interface) VgpuTypeGetBAR1Info(vgpuTypeId nvml.VgpuTypeId) (nvml.VgpuTypeBar1Info, nvml.Return) { - if mock.VgpuTypeGetBAR1InfoFunc == nil { - panic("Interface.VgpuTypeGetBAR1InfoFunc: method is nil but Interface.VgpuTypeGetBAR1Info was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockVgpuTypeGetBAR1Info.Lock() - mock.calls.VgpuTypeGetBAR1Info = append(mock.calls.VgpuTypeGetBAR1Info, callInfo) - mock.lockVgpuTypeGetBAR1Info.Unlock() - return mock.VgpuTypeGetBAR1InfoFunc(vgpuTypeId) -} - -// VgpuTypeGetBAR1InfoCalls gets all the calls that were made to VgpuTypeGetBAR1Info. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetBAR1InfoCalls()) -func (mock *Interface) VgpuTypeGetBAR1InfoCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockVgpuTypeGetBAR1Info.RLock() - calls = mock.calls.VgpuTypeGetBAR1Info - mock.lockVgpuTypeGetBAR1Info.RUnlock() - return calls -} - -// VgpuTypeGetCapabilities calls VgpuTypeGetCapabilitiesFunc. -func (mock *Interface) VgpuTypeGetCapabilities(vgpuTypeId nvml.VgpuTypeId, vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { - if mock.VgpuTypeGetCapabilitiesFunc == nil { - panic("Interface.VgpuTypeGetCapabilitiesFunc: method is nil but Interface.VgpuTypeGetCapabilities was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - VgpuCapability nvml.VgpuCapability - }{ - VgpuTypeId: vgpuTypeId, - VgpuCapability: vgpuCapability, - } - mock.lockVgpuTypeGetCapabilities.Lock() - mock.calls.VgpuTypeGetCapabilities = append(mock.calls.VgpuTypeGetCapabilities, callInfo) - mock.lockVgpuTypeGetCapabilities.Unlock() - return mock.VgpuTypeGetCapabilitiesFunc(vgpuTypeId, vgpuCapability) -} - -// VgpuTypeGetCapabilitiesCalls gets all the calls that were made to VgpuTypeGetCapabilities. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetCapabilitiesCalls()) -func (mock *Interface) VgpuTypeGetCapabilitiesCalls() []struct { - VgpuTypeId nvml.VgpuTypeId - VgpuCapability nvml.VgpuCapability -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - VgpuCapability nvml.VgpuCapability - } - mock.lockVgpuTypeGetCapabilities.RLock() - calls = mock.calls.VgpuTypeGetCapabilities - mock.lockVgpuTypeGetCapabilities.RUnlock() - return calls -} - -// VgpuTypeGetClass calls VgpuTypeGetClassFunc. -func (mock *Interface) VgpuTypeGetClass(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { - if mock.VgpuTypeGetClassFunc == nil { - panic("Interface.VgpuTypeGetClassFunc: method is nil but Interface.VgpuTypeGetClass was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockVgpuTypeGetClass.Lock() - mock.calls.VgpuTypeGetClass = append(mock.calls.VgpuTypeGetClass, callInfo) - mock.lockVgpuTypeGetClass.Unlock() - return mock.VgpuTypeGetClassFunc(vgpuTypeId) -} - -// VgpuTypeGetClassCalls gets all the calls that were made to VgpuTypeGetClass. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetClassCalls()) -func (mock *Interface) VgpuTypeGetClassCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockVgpuTypeGetClass.RLock() - calls = mock.calls.VgpuTypeGetClass - mock.lockVgpuTypeGetClass.RUnlock() - return calls -} - -// VgpuTypeGetDeviceID calls VgpuTypeGetDeviceIDFunc. -func (mock *Interface) VgpuTypeGetDeviceID(vgpuTypeId nvml.VgpuTypeId) (uint64, uint64, nvml.Return) { - if mock.VgpuTypeGetDeviceIDFunc == nil { - panic("Interface.VgpuTypeGetDeviceIDFunc: method is nil but Interface.VgpuTypeGetDeviceID was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockVgpuTypeGetDeviceID.Lock() - mock.calls.VgpuTypeGetDeviceID = append(mock.calls.VgpuTypeGetDeviceID, callInfo) - mock.lockVgpuTypeGetDeviceID.Unlock() - return mock.VgpuTypeGetDeviceIDFunc(vgpuTypeId) -} - -// VgpuTypeGetDeviceIDCalls gets all the calls that were made to VgpuTypeGetDeviceID. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetDeviceIDCalls()) -func (mock *Interface) VgpuTypeGetDeviceIDCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockVgpuTypeGetDeviceID.RLock() - calls = mock.calls.VgpuTypeGetDeviceID - mock.lockVgpuTypeGetDeviceID.RUnlock() - return calls -} - -// VgpuTypeGetFrameRateLimit calls VgpuTypeGetFrameRateLimitFunc. -func (mock *Interface) VgpuTypeGetFrameRateLimit(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { - if mock.VgpuTypeGetFrameRateLimitFunc == nil { - panic("Interface.VgpuTypeGetFrameRateLimitFunc: method is nil but Interface.VgpuTypeGetFrameRateLimit was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockVgpuTypeGetFrameRateLimit.Lock() - mock.calls.VgpuTypeGetFrameRateLimit = append(mock.calls.VgpuTypeGetFrameRateLimit, callInfo) - mock.lockVgpuTypeGetFrameRateLimit.Unlock() - return mock.VgpuTypeGetFrameRateLimitFunc(vgpuTypeId) -} - -// VgpuTypeGetFrameRateLimitCalls gets all the calls that were made to VgpuTypeGetFrameRateLimit. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetFrameRateLimitCalls()) -func (mock *Interface) VgpuTypeGetFrameRateLimitCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockVgpuTypeGetFrameRateLimit.RLock() - calls = mock.calls.VgpuTypeGetFrameRateLimit - mock.lockVgpuTypeGetFrameRateLimit.RUnlock() - return calls -} - -// VgpuTypeGetFramebufferSize calls VgpuTypeGetFramebufferSizeFunc. -func (mock *Interface) VgpuTypeGetFramebufferSize(vgpuTypeId nvml.VgpuTypeId) (uint64, nvml.Return) { - if mock.VgpuTypeGetFramebufferSizeFunc == nil { - panic("Interface.VgpuTypeGetFramebufferSizeFunc: method is nil but Interface.VgpuTypeGetFramebufferSize was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockVgpuTypeGetFramebufferSize.Lock() - mock.calls.VgpuTypeGetFramebufferSize = append(mock.calls.VgpuTypeGetFramebufferSize, callInfo) - mock.lockVgpuTypeGetFramebufferSize.Unlock() - return mock.VgpuTypeGetFramebufferSizeFunc(vgpuTypeId) -} - -// VgpuTypeGetFramebufferSizeCalls gets all the calls that were made to VgpuTypeGetFramebufferSize. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetFramebufferSizeCalls()) -func (mock *Interface) VgpuTypeGetFramebufferSizeCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockVgpuTypeGetFramebufferSize.RLock() - calls = mock.calls.VgpuTypeGetFramebufferSize - mock.lockVgpuTypeGetFramebufferSize.RUnlock() - return calls -} - -// VgpuTypeGetGpuInstanceProfileId calls VgpuTypeGetGpuInstanceProfileIdFunc. -func (mock *Interface) VgpuTypeGetGpuInstanceProfileId(vgpuTypeId nvml.VgpuTypeId) (uint32, nvml.Return) { - if mock.VgpuTypeGetGpuInstanceProfileIdFunc == nil { - panic("Interface.VgpuTypeGetGpuInstanceProfileIdFunc: method is nil but Interface.VgpuTypeGetGpuInstanceProfileId was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockVgpuTypeGetGpuInstanceProfileId.Lock() - mock.calls.VgpuTypeGetGpuInstanceProfileId = append(mock.calls.VgpuTypeGetGpuInstanceProfileId, callInfo) - mock.lockVgpuTypeGetGpuInstanceProfileId.Unlock() - return mock.VgpuTypeGetGpuInstanceProfileIdFunc(vgpuTypeId) -} - -// VgpuTypeGetGpuInstanceProfileIdCalls gets all the calls that were made to VgpuTypeGetGpuInstanceProfileId. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetGpuInstanceProfileIdCalls()) -func (mock *Interface) VgpuTypeGetGpuInstanceProfileIdCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockVgpuTypeGetGpuInstanceProfileId.RLock() - calls = mock.calls.VgpuTypeGetGpuInstanceProfileId - mock.lockVgpuTypeGetGpuInstanceProfileId.RUnlock() - return calls -} - -// VgpuTypeGetLicense calls VgpuTypeGetLicenseFunc. -func (mock *Interface) VgpuTypeGetLicense(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { - if mock.VgpuTypeGetLicenseFunc == nil { - panic("Interface.VgpuTypeGetLicenseFunc: method is nil but Interface.VgpuTypeGetLicense was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockVgpuTypeGetLicense.Lock() - mock.calls.VgpuTypeGetLicense = append(mock.calls.VgpuTypeGetLicense, callInfo) - mock.lockVgpuTypeGetLicense.Unlock() - return mock.VgpuTypeGetLicenseFunc(vgpuTypeId) -} - -// VgpuTypeGetLicenseCalls gets all the calls that were made to VgpuTypeGetLicense. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetLicenseCalls()) -func (mock *Interface) VgpuTypeGetLicenseCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockVgpuTypeGetLicense.RLock() - calls = mock.calls.VgpuTypeGetLicense - mock.lockVgpuTypeGetLicense.RUnlock() - return calls -} - -// VgpuTypeGetMaxInstances calls VgpuTypeGetMaxInstancesFunc. -func (mock *Interface) VgpuTypeGetMaxInstances(device nvml.Device, vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { - if mock.VgpuTypeGetMaxInstancesFunc == nil { - panic("Interface.VgpuTypeGetMaxInstancesFunc: method is nil but Interface.VgpuTypeGetMaxInstances was just called") - } - callInfo := struct { - Device nvml.Device - VgpuTypeId nvml.VgpuTypeId - }{ - Device: device, - VgpuTypeId: vgpuTypeId, - } - mock.lockVgpuTypeGetMaxInstances.Lock() - mock.calls.VgpuTypeGetMaxInstances = append(mock.calls.VgpuTypeGetMaxInstances, callInfo) - mock.lockVgpuTypeGetMaxInstances.Unlock() - return mock.VgpuTypeGetMaxInstancesFunc(device, vgpuTypeId) -} - -// VgpuTypeGetMaxInstancesCalls gets all the calls that were made to VgpuTypeGetMaxInstances. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetMaxInstancesCalls()) -func (mock *Interface) VgpuTypeGetMaxInstancesCalls() []struct { - Device nvml.Device - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - Device nvml.Device - VgpuTypeId nvml.VgpuTypeId - } - mock.lockVgpuTypeGetMaxInstances.RLock() - calls = mock.calls.VgpuTypeGetMaxInstances - mock.lockVgpuTypeGetMaxInstances.RUnlock() - return calls -} - -// VgpuTypeGetMaxInstancesPerGpuInstance calls VgpuTypeGetMaxInstancesPerGpuInstanceFunc. -func (mock *Interface) VgpuTypeGetMaxInstancesPerGpuInstance(vgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance) nvml.Return { - if mock.VgpuTypeGetMaxInstancesPerGpuInstanceFunc == nil { - panic("Interface.VgpuTypeGetMaxInstancesPerGpuInstanceFunc: method is nil but Interface.VgpuTypeGetMaxInstancesPerGpuInstance was just called") - } - callInfo := struct { - VgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance - }{ - VgpuTypeMaxInstance: vgpuTypeMaxInstance, - } - mock.lockVgpuTypeGetMaxInstancesPerGpuInstance.Lock() - mock.calls.VgpuTypeGetMaxInstancesPerGpuInstance = append(mock.calls.VgpuTypeGetMaxInstancesPerGpuInstance, callInfo) - mock.lockVgpuTypeGetMaxInstancesPerGpuInstance.Unlock() - return mock.VgpuTypeGetMaxInstancesPerGpuInstanceFunc(vgpuTypeMaxInstance) -} - -// VgpuTypeGetMaxInstancesPerGpuInstanceCalls gets all the calls that were made to VgpuTypeGetMaxInstancesPerGpuInstance. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetMaxInstancesPerGpuInstanceCalls()) -func (mock *Interface) VgpuTypeGetMaxInstancesPerGpuInstanceCalls() []struct { - VgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance -} { - var calls []struct { - VgpuTypeMaxInstance *nvml.VgpuTypeMaxInstance - } - mock.lockVgpuTypeGetMaxInstancesPerGpuInstance.RLock() - calls = mock.calls.VgpuTypeGetMaxInstancesPerGpuInstance - mock.lockVgpuTypeGetMaxInstancesPerGpuInstance.RUnlock() - return calls -} - -// VgpuTypeGetMaxInstancesPerVm calls VgpuTypeGetMaxInstancesPerVmFunc. -func (mock *Interface) VgpuTypeGetMaxInstancesPerVm(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { - if mock.VgpuTypeGetMaxInstancesPerVmFunc == nil { - panic("Interface.VgpuTypeGetMaxInstancesPerVmFunc: method is nil but Interface.VgpuTypeGetMaxInstancesPerVm was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockVgpuTypeGetMaxInstancesPerVm.Lock() - mock.calls.VgpuTypeGetMaxInstancesPerVm = append(mock.calls.VgpuTypeGetMaxInstancesPerVm, callInfo) - mock.lockVgpuTypeGetMaxInstancesPerVm.Unlock() - return mock.VgpuTypeGetMaxInstancesPerVmFunc(vgpuTypeId) -} - -// VgpuTypeGetMaxInstancesPerVmCalls gets all the calls that were made to VgpuTypeGetMaxInstancesPerVm. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetMaxInstancesPerVmCalls()) -func (mock *Interface) VgpuTypeGetMaxInstancesPerVmCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockVgpuTypeGetMaxInstancesPerVm.RLock() - calls = mock.calls.VgpuTypeGetMaxInstancesPerVm - mock.lockVgpuTypeGetMaxInstancesPerVm.RUnlock() - return calls -} - -// VgpuTypeGetName calls VgpuTypeGetNameFunc. -func (mock *Interface) VgpuTypeGetName(vgpuTypeId nvml.VgpuTypeId) (string, nvml.Return) { - if mock.VgpuTypeGetNameFunc == nil { - panic("Interface.VgpuTypeGetNameFunc: method is nil but Interface.VgpuTypeGetName was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockVgpuTypeGetName.Lock() - mock.calls.VgpuTypeGetName = append(mock.calls.VgpuTypeGetName, callInfo) - mock.lockVgpuTypeGetName.Unlock() - return mock.VgpuTypeGetNameFunc(vgpuTypeId) -} - -// VgpuTypeGetNameCalls gets all the calls that were made to VgpuTypeGetName. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetNameCalls()) -func (mock *Interface) VgpuTypeGetNameCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockVgpuTypeGetName.RLock() - calls = mock.calls.VgpuTypeGetName - mock.lockVgpuTypeGetName.RUnlock() - return calls -} - -// VgpuTypeGetNumDisplayHeads calls VgpuTypeGetNumDisplayHeadsFunc. -func (mock *Interface) VgpuTypeGetNumDisplayHeads(vgpuTypeId nvml.VgpuTypeId) (int, nvml.Return) { - if mock.VgpuTypeGetNumDisplayHeadsFunc == nil { - panic("Interface.VgpuTypeGetNumDisplayHeadsFunc: method is nil but Interface.VgpuTypeGetNumDisplayHeads was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - }{ - VgpuTypeId: vgpuTypeId, - } - mock.lockVgpuTypeGetNumDisplayHeads.Lock() - mock.calls.VgpuTypeGetNumDisplayHeads = append(mock.calls.VgpuTypeGetNumDisplayHeads, callInfo) - mock.lockVgpuTypeGetNumDisplayHeads.Unlock() - return mock.VgpuTypeGetNumDisplayHeadsFunc(vgpuTypeId) -} - -// VgpuTypeGetNumDisplayHeadsCalls gets all the calls that were made to VgpuTypeGetNumDisplayHeads. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetNumDisplayHeadsCalls()) -func (mock *Interface) VgpuTypeGetNumDisplayHeadsCalls() []struct { - VgpuTypeId nvml.VgpuTypeId -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - } - mock.lockVgpuTypeGetNumDisplayHeads.RLock() - calls = mock.calls.VgpuTypeGetNumDisplayHeads - mock.lockVgpuTypeGetNumDisplayHeads.RUnlock() - return calls -} - -// VgpuTypeGetResolution calls VgpuTypeGetResolutionFunc. -func (mock *Interface) VgpuTypeGetResolution(vgpuTypeId nvml.VgpuTypeId, n int) (uint32, uint32, nvml.Return) { - if mock.VgpuTypeGetResolutionFunc == nil { - panic("Interface.VgpuTypeGetResolutionFunc: method is nil but Interface.VgpuTypeGetResolution was just called") - } - callInfo := struct { - VgpuTypeId nvml.VgpuTypeId - N int - }{ - VgpuTypeId: vgpuTypeId, - N: n, - } - mock.lockVgpuTypeGetResolution.Lock() - mock.calls.VgpuTypeGetResolution = append(mock.calls.VgpuTypeGetResolution, callInfo) - mock.lockVgpuTypeGetResolution.Unlock() - return mock.VgpuTypeGetResolutionFunc(vgpuTypeId, n) -} - -// VgpuTypeGetResolutionCalls gets all the calls that were made to VgpuTypeGetResolution. -// Check the length with: -// -// len(mockedInterface.VgpuTypeGetResolutionCalls()) -func (mock *Interface) VgpuTypeGetResolutionCalls() []struct { - VgpuTypeId nvml.VgpuTypeId - N int -} { - var calls []struct { - VgpuTypeId nvml.VgpuTypeId - N int - } - mock.lockVgpuTypeGetResolution.RLock() - calls = mock.calls.VgpuTypeGetResolution - mock.lockVgpuTypeGetResolution.RUnlock() - return calls -} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/unit.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/unit.go deleted file mode 100644 index 64af542fd..000000000 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/unit.go +++ /dev/null @@ -1,304 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "github.com/NVIDIA/go-nvml/pkg/nvml" - "sync" -) - -// Ensure, that Unit does implement nvml.Unit. -// If this is not the case, regenerate this file with moq. -var _ nvml.Unit = &Unit{} - -// Unit is a mock implementation of nvml.Unit. -// -// func TestSomethingThatUsesUnit(t *testing.T) { -// -// // make and configure a mocked nvml.Unit -// mockedUnit := &Unit{ -// GetDevicesFunc: func() ([]nvml.Device, nvml.Return) { -// panic("mock out the GetDevices method") -// }, -// GetFanSpeedInfoFunc: func() (nvml.UnitFanSpeeds, nvml.Return) { -// panic("mock out the GetFanSpeedInfo method") -// }, -// GetLedStateFunc: func() (nvml.LedState, nvml.Return) { -// panic("mock out the GetLedState method") -// }, -// GetPsuInfoFunc: func() (nvml.PSUInfo, nvml.Return) { -// panic("mock out the GetPsuInfo method") -// }, -// GetTemperatureFunc: func(n int) (uint32, nvml.Return) { -// panic("mock out the GetTemperature method") -// }, -// GetUnitInfoFunc: func() (nvml.UnitInfo, nvml.Return) { -// panic("mock out the GetUnitInfo method") -// }, -// SetLedStateFunc: func(ledColor nvml.LedColor) nvml.Return { -// panic("mock out the SetLedState method") -// }, -// } -// -// // use mockedUnit in code that requires nvml.Unit -// // and then make assertions. -// -// } -type Unit struct { - // GetDevicesFunc mocks the GetDevices method. - GetDevicesFunc func() ([]nvml.Device, nvml.Return) - - // GetFanSpeedInfoFunc mocks the GetFanSpeedInfo method. - GetFanSpeedInfoFunc func() (nvml.UnitFanSpeeds, nvml.Return) - - // GetLedStateFunc mocks the GetLedState method. - GetLedStateFunc func() (nvml.LedState, nvml.Return) - - // GetPsuInfoFunc mocks the GetPsuInfo method. - GetPsuInfoFunc func() (nvml.PSUInfo, nvml.Return) - - // GetTemperatureFunc mocks the GetTemperature method. - GetTemperatureFunc func(n int) (uint32, nvml.Return) - - // GetUnitInfoFunc mocks the GetUnitInfo method. - GetUnitInfoFunc func() (nvml.UnitInfo, nvml.Return) - - // SetLedStateFunc mocks the SetLedState method. - SetLedStateFunc func(ledColor nvml.LedColor) nvml.Return - - // calls tracks calls to the methods. - calls struct { - // GetDevices holds details about calls to the GetDevices method. - GetDevices []struct { - } - // GetFanSpeedInfo holds details about calls to the GetFanSpeedInfo method. - GetFanSpeedInfo []struct { - } - // GetLedState holds details about calls to the GetLedState method. - GetLedState []struct { - } - // GetPsuInfo holds details about calls to the GetPsuInfo method. - GetPsuInfo []struct { - } - // GetTemperature holds details about calls to the GetTemperature method. - GetTemperature []struct { - // N is the n argument value. - N int - } - // GetUnitInfo holds details about calls to the GetUnitInfo method. - GetUnitInfo []struct { - } - // SetLedState holds details about calls to the SetLedState method. - SetLedState []struct { - // LedColor is the ledColor argument value. - LedColor nvml.LedColor - } - } - lockGetDevices sync.RWMutex - lockGetFanSpeedInfo sync.RWMutex - lockGetLedState sync.RWMutex - lockGetPsuInfo sync.RWMutex - lockGetTemperature sync.RWMutex - lockGetUnitInfo sync.RWMutex - lockSetLedState sync.RWMutex -} - -// GetDevices calls GetDevicesFunc. -func (mock *Unit) GetDevices() ([]nvml.Device, nvml.Return) { - if mock.GetDevicesFunc == nil { - panic("Unit.GetDevicesFunc: method is nil but Unit.GetDevices was just called") - } - callInfo := struct { - }{} - mock.lockGetDevices.Lock() - mock.calls.GetDevices = append(mock.calls.GetDevices, callInfo) - mock.lockGetDevices.Unlock() - return mock.GetDevicesFunc() -} - -// GetDevicesCalls gets all the calls that were made to GetDevices. -// Check the length with: -// -// len(mockedUnit.GetDevicesCalls()) -func (mock *Unit) GetDevicesCalls() []struct { -} { - var calls []struct { - } - mock.lockGetDevices.RLock() - calls = mock.calls.GetDevices - mock.lockGetDevices.RUnlock() - return calls -} - -// GetFanSpeedInfo calls GetFanSpeedInfoFunc. -func (mock *Unit) GetFanSpeedInfo() (nvml.UnitFanSpeeds, nvml.Return) { - if mock.GetFanSpeedInfoFunc == nil { - panic("Unit.GetFanSpeedInfoFunc: method is nil but Unit.GetFanSpeedInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetFanSpeedInfo.Lock() - mock.calls.GetFanSpeedInfo = append(mock.calls.GetFanSpeedInfo, callInfo) - mock.lockGetFanSpeedInfo.Unlock() - return mock.GetFanSpeedInfoFunc() -} - -// GetFanSpeedInfoCalls gets all the calls that were made to GetFanSpeedInfo. -// Check the length with: -// -// len(mockedUnit.GetFanSpeedInfoCalls()) -func (mock *Unit) GetFanSpeedInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetFanSpeedInfo.RLock() - calls = mock.calls.GetFanSpeedInfo - mock.lockGetFanSpeedInfo.RUnlock() - return calls -} - -// GetLedState calls GetLedStateFunc. -func (mock *Unit) GetLedState() (nvml.LedState, nvml.Return) { - if mock.GetLedStateFunc == nil { - panic("Unit.GetLedStateFunc: method is nil but Unit.GetLedState was just called") - } - callInfo := struct { - }{} - mock.lockGetLedState.Lock() - mock.calls.GetLedState = append(mock.calls.GetLedState, callInfo) - mock.lockGetLedState.Unlock() - return mock.GetLedStateFunc() -} - -// GetLedStateCalls gets all the calls that were made to GetLedState. -// Check the length with: -// -// len(mockedUnit.GetLedStateCalls()) -func (mock *Unit) GetLedStateCalls() []struct { -} { - var calls []struct { - } - mock.lockGetLedState.RLock() - calls = mock.calls.GetLedState - mock.lockGetLedState.RUnlock() - return calls -} - -// GetPsuInfo calls GetPsuInfoFunc. -func (mock *Unit) GetPsuInfo() (nvml.PSUInfo, nvml.Return) { - if mock.GetPsuInfoFunc == nil { - panic("Unit.GetPsuInfoFunc: method is nil but Unit.GetPsuInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetPsuInfo.Lock() - mock.calls.GetPsuInfo = append(mock.calls.GetPsuInfo, callInfo) - mock.lockGetPsuInfo.Unlock() - return mock.GetPsuInfoFunc() -} - -// GetPsuInfoCalls gets all the calls that were made to GetPsuInfo. -// Check the length with: -// -// len(mockedUnit.GetPsuInfoCalls()) -func (mock *Unit) GetPsuInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetPsuInfo.RLock() - calls = mock.calls.GetPsuInfo - mock.lockGetPsuInfo.RUnlock() - return calls -} - -// GetTemperature calls GetTemperatureFunc. -func (mock *Unit) GetTemperature(n int) (uint32, nvml.Return) { - if mock.GetTemperatureFunc == nil { - panic("Unit.GetTemperatureFunc: method is nil but Unit.GetTemperature was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetTemperature.Lock() - mock.calls.GetTemperature = append(mock.calls.GetTemperature, callInfo) - mock.lockGetTemperature.Unlock() - return mock.GetTemperatureFunc(n) -} - -// GetTemperatureCalls gets all the calls that were made to GetTemperature. -// Check the length with: -// -// len(mockedUnit.GetTemperatureCalls()) -func (mock *Unit) GetTemperatureCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetTemperature.RLock() - calls = mock.calls.GetTemperature - mock.lockGetTemperature.RUnlock() - return calls -} - -// GetUnitInfo calls GetUnitInfoFunc. -func (mock *Unit) GetUnitInfo() (nvml.UnitInfo, nvml.Return) { - if mock.GetUnitInfoFunc == nil { - panic("Unit.GetUnitInfoFunc: method is nil but Unit.GetUnitInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetUnitInfo.Lock() - mock.calls.GetUnitInfo = append(mock.calls.GetUnitInfo, callInfo) - mock.lockGetUnitInfo.Unlock() - return mock.GetUnitInfoFunc() -} - -// GetUnitInfoCalls gets all the calls that were made to GetUnitInfo. -// Check the length with: -// -// len(mockedUnit.GetUnitInfoCalls()) -func (mock *Unit) GetUnitInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetUnitInfo.RLock() - calls = mock.calls.GetUnitInfo - mock.lockGetUnitInfo.RUnlock() - return calls -} - -// SetLedState calls SetLedStateFunc. -func (mock *Unit) SetLedState(ledColor nvml.LedColor) nvml.Return { - if mock.SetLedStateFunc == nil { - panic("Unit.SetLedStateFunc: method is nil but Unit.SetLedState was just called") - } - callInfo := struct { - LedColor nvml.LedColor - }{ - LedColor: ledColor, - } - mock.lockSetLedState.Lock() - mock.calls.SetLedState = append(mock.calls.SetLedState, callInfo) - mock.lockSetLedState.Unlock() - return mock.SetLedStateFunc(ledColor) -} - -// SetLedStateCalls gets all the calls that were made to SetLedState. -// Check the length with: -// -// len(mockedUnit.SetLedStateCalls()) -func (mock *Unit) SetLedStateCalls() []struct { - LedColor nvml.LedColor -} { - var calls []struct { - LedColor nvml.LedColor - } - mock.lockSetLedState.RLock() - calls = mock.calls.SetLedState - mock.lockSetLedState.RUnlock() - return calls -} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go deleted file mode 100644 index 828f4233f..000000000 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgpuinstance.go +++ /dev/null @@ -1,933 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "github.com/NVIDIA/go-nvml/pkg/nvml" - "sync" -) - -// Ensure, that VgpuInstance does implement nvml.VgpuInstance. -// If this is not the case, regenerate this file with moq. -var _ nvml.VgpuInstance = &VgpuInstance{} - -// VgpuInstance is a mock implementation of nvml.VgpuInstance. -// -// func TestSomethingThatUsesVgpuInstance(t *testing.T) { -// -// // make and configure a mocked nvml.VgpuInstance -// mockedVgpuInstance := &VgpuInstance{ -// ClearAccountingPidsFunc: func() nvml.Return { -// panic("mock out the ClearAccountingPids method") -// }, -// GetAccountingModeFunc: func() (nvml.EnableState, nvml.Return) { -// panic("mock out the GetAccountingMode method") -// }, -// GetAccountingPidsFunc: func() ([]int, nvml.Return) { -// panic("mock out the GetAccountingPids method") -// }, -// GetAccountingStatsFunc: func(n int) (nvml.AccountingStats, nvml.Return) { -// panic("mock out the GetAccountingStats method") -// }, -// GetEccModeFunc: func() (nvml.EnableState, nvml.Return) { -// panic("mock out the GetEccMode method") -// }, -// GetEncoderCapacityFunc: func() (int, nvml.Return) { -// panic("mock out the GetEncoderCapacity method") -// }, -// GetEncoderSessionsFunc: func() (int, nvml.EncoderSessionInfo, nvml.Return) { -// panic("mock out the GetEncoderSessions method") -// }, -// GetEncoderStatsFunc: func() (int, uint32, uint32, nvml.Return) { -// panic("mock out the GetEncoderStats method") -// }, -// GetFBCSessionsFunc: func() (int, nvml.FBCSessionInfo, nvml.Return) { -// panic("mock out the GetFBCSessions method") -// }, -// GetFBCStatsFunc: func() (nvml.FBCStats, nvml.Return) { -// panic("mock out the GetFBCStats method") -// }, -// GetFbUsageFunc: func() (uint64, nvml.Return) { -// panic("mock out the GetFbUsage method") -// }, -// GetFrameRateLimitFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetFrameRateLimit method") -// }, -// GetGpuInstanceIdFunc: func() (int, nvml.Return) { -// panic("mock out the GetGpuInstanceId method") -// }, -// GetGpuPciIdFunc: func() (string, nvml.Return) { -// panic("mock out the GetGpuPciId method") -// }, -// GetLicenseInfoFunc: func() (nvml.VgpuLicenseInfo, nvml.Return) { -// panic("mock out the GetLicenseInfo method") -// }, -// GetLicenseStatusFunc: func() (int, nvml.Return) { -// panic("mock out the GetLicenseStatus method") -// }, -// GetMdevUUIDFunc: func() (string, nvml.Return) { -// panic("mock out the GetMdevUUID method") -// }, -// GetMetadataFunc: func() (nvml.VgpuMetadata, nvml.Return) { -// panic("mock out the GetMetadata method") -// }, -// GetRuntimeStateSizeFunc: func() (nvml.VgpuRuntimeState, nvml.Return) { -// panic("mock out the GetRuntimeStateSize method") -// }, -// GetTypeFunc: func() (nvml.VgpuTypeId, nvml.Return) { -// panic("mock out the GetType method") -// }, -// GetUUIDFunc: func() (string, nvml.Return) { -// panic("mock out the GetUUID method") -// }, -// GetVmDriverVersionFunc: func() (string, nvml.Return) { -// panic("mock out the GetVmDriverVersion method") -// }, -// GetVmIDFunc: func() (string, nvml.VgpuVmIdType, nvml.Return) { -// panic("mock out the GetVmID method") -// }, -// SetEncoderCapacityFunc: func(n int) nvml.Return { -// panic("mock out the SetEncoderCapacity method") -// }, -// } -// -// // use mockedVgpuInstance in code that requires nvml.VgpuInstance -// // and then make assertions. -// -// } -type VgpuInstance struct { - // ClearAccountingPidsFunc mocks the ClearAccountingPids method. - ClearAccountingPidsFunc func() nvml.Return - - // GetAccountingModeFunc mocks the GetAccountingMode method. - GetAccountingModeFunc func() (nvml.EnableState, nvml.Return) - - // GetAccountingPidsFunc mocks the GetAccountingPids method. - GetAccountingPidsFunc func() ([]int, nvml.Return) - - // GetAccountingStatsFunc mocks the GetAccountingStats method. - GetAccountingStatsFunc func(n int) (nvml.AccountingStats, nvml.Return) - - // GetEccModeFunc mocks the GetEccMode method. - GetEccModeFunc func() (nvml.EnableState, nvml.Return) - - // GetEncoderCapacityFunc mocks the GetEncoderCapacity method. - GetEncoderCapacityFunc func() (int, nvml.Return) - - // GetEncoderSessionsFunc mocks the GetEncoderSessions method. - GetEncoderSessionsFunc func() (int, nvml.EncoderSessionInfo, nvml.Return) - - // GetEncoderStatsFunc mocks the GetEncoderStats method. - GetEncoderStatsFunc func() (int, uint32, uint32, nvml.Return) - - // GetFBCSessionsFunc mocks the GetFBCSessions method. - GetFBCSessionsFunc func() (int, nvml.FBCSessionInfo, nvml.Return) - - // GetFBCStatsFunc mocks the GetFBCStats method. - GetFBCStatsFunc func() (nvml.FBCStats, nvml.Return) - - // GetFbUsageFunc mocks the GetFbUsage method. - GetFbUsageFunc func() (uint64, nvml.Return) - - // GetFrameRateLimitFunc mocks the GetFrameRateLimit method. - GetFrameRateLimitFunc func() (uint32, nvml.Return) - - // GetGpuInstanceIdFunc mocks the GetGpuInstanceId method. - GetGpuInstanceIdFunc func() (int, nvml.Return) - - // GetGpuPciIdFunc mocks the GetGpuPciId method. - GetGpuPciIdFunc func() (string, nvml.Return) - - // GetLicenseInfoFunc mocks the GetLicenseInfo method. - GetLicenseInfoFunc func() (nvml.VgpuLicenseInfo, nvml.Return) - - // GetLicenseStatusFunc mocks the GetLicenseStatus method. - GetLicenseStatusFunc func() (int, nvml.Return) - - // GetMdevUUIDFunc mocks the GetMdevUUID method. - GetMdevUUIDFunc func() (string, nvml.Return) - - // GetMetadataFunc mocks the GetMetadata method. - GetMetadataFunc func() (nvml.VgpuMetadata, nvml.Return) - - // GetRuntimeStateSizeFunc mocks the GetRuntimeStateSize method. - GetRuntimeStateSizeFunc func() (nvml.VgpuRuntimeState, nvml.Return) - - // GetTypeFunc mocks the GetType method. - GetTypeFunc func() (nvml.VgpuTypeId, nvml.Return) - - // GetUUIDFunc mocks the GetUUID method. - GetUUIDFunc func() (string, nvml.Return) - - // GetVmDriverVersionFunc mocks the GetVmDriverVersion method. - GetVmDriverVersionFunc func() (string, nvml.Return) - - // GetVmIDFunc mocks the GetVmID method. - GetVmIDFunc func() (string, nvml.VgpuVmIdType, nvml.Return) - - // SetEncoderCapacityFunc mocks the SetEncoderCapacity method. - SetEncoderCapacityFunc func(n int) nvml.Return - - // calls tracks calls to the methods. - calls struct { - // ClearAccountingPids holds details about calls to the ClearAccountingPids method. - ClearAccountingPids []struct { - } - // GetAccountingMode holds details about calls to the GetAccountingMode method. - GetAccountingMode []struct { - } - // GetAccountingPids holds details about calls to the GetAccountingPids method. - GetAccountingPids []struct { - } - // GetAccountingStats holds details about calls to the GetAccountingStats method. - GetAccountingStats []struct { - // N is the n argument value. - N int - } - // GetEccMode holds details about calls to the GetEccMode method. - GetEccMode []struct { - } - // GetEncoderCapacity holds details about calls to the GetEncoderCapacity method. - GetEncoderCapacity []struct { - } - // GetEncoderSessions holds details about calls to the GetEncoderSessions method. - GetEncoderSessions []struct { - } - // GetEncoderStats holds details about calls to the GetEncoderStats method. - GetEncoderStats []struct { - } - // GetFBCSessions holds details about calls to the GetFBCSessions method. - GetFBCSessions []struct { - } - // GetFBCStats holds details about calls to the GetFBCStats method. - GetFBCStats []struct { - } - // GetFbUsage holds details about calls to the GetFbUsage method. - GetFbUsage []struct { - } - // GetFrameRateLimit holds details about calls to the GetFrameRateLimit method. - GetFrameRateLimit []struct { - } - // GetGpuInstanceId holds details about calls to the GetGpuInstanceId method. - GetGpuInstanceId []struct { - } - // GetGpuPciId holds details about calls to the GetGpuPciId method. - GetGpuPciId []struct { - } - // GetLicenseInfo holds details about calls to the GetLicenseInfo method. - GetLicenseInfo []struct { - } - // GetLicenseStatus holds details about calls to the GetLicenseStatus method. - GetLicenseStatus []struct { - } - // GetMdevUUID holds details about calls to the GetMdevUUID method. - GetMdevUUID []struct { - } - // GetMetadata holds details about calls to the GetMetadata method. - GetMetadata []struct { - } - // GetRuntimeStateSize holds details about calls to the GetRuntimeStateSize method. - GetRuntimeStateSize []struct { - } - // GetType holds details about calls to the GetType method. - GetType []struct { - } - // GetUUID holds details about calls to the GetUUID method. - GetUUID []struct { - } - // GetVmDriverVersion holds details about calls to the GetVmDriverVersion method. - GetVmDriverVersion []struct { - } - // GetVmID holds details about calls to the GetVmID method. - GetVmID []struct { - } - // SetEncoderCapacity holds details about calls to the SetEncoderCapacity method. - SetEncoderCapacity []struct { - // N is the n argument value. - N int - } - } - lockClearAccountingPids sync.RWMutex - lockGetAccountingMode sync.RWMutex - lockGetAccountingPids sync.RWMutex - lockGetAccountingStats sync.RWMutex - lockGetEccMode sync.RWMutex - lockGetEncoderCapacity sync.RWMutex - lockGetEncoderSessions sync.RWMutex - lockGetEncoderStats sync.RWMutex - lockGetFBCSessions sync.RWMutex - lockGetFBCStats sync.RWMutex - lockGetFbUsage sync.RWMutex - lockGetFrameRateLimit sync.RWMutex - lockGetGpuInstanceId sync.RWMutex - lockGetGpuPciId sync.RWMutex - lockGetLicenseInfo sync.RWMutex - lockGetLicenseStatus sync.RWMutex - lockGetMdevUUID sync.RWMutex - lockGetMetadata sync.RWMutex - lockGetRuntimeStateSize sync.RWMutex - lockGetType sync.RWMutex - lockGetUUID sync.RWMutex - lockGetVmDriverVersion sync.RWMutex - lockGetVmID sync.RWMutex - lockSetEncoderCapacity sync.RWMutex -} - -// ClearAccountingPids calls ClearAccountingPidsFunc. -func (mock *VgpuInstance) ClearAccountingPids() nvml.Return { - if mock.ClearAccountingPidsFunc == nil { - panic("VgpuInstance.ClearAccountingPidsFunc: method is nil but VgpuInstance.ClearAccountingPids was just called") - } - callInfo := struct { - }{} - mock.lockClearAccountingPids.Lock() - mock.calls.ClearAccountingPids = append(mock.calls.ClearAccountingPids, callInfo) - mock.lockClearAccountingPids.Unlock() - return mock.ClearAccountingPidsFunc() -} - -// ClearAccountingPidsCalls gets all the calls that were made to ClearAccountingPids. -// Check the length with: -// -// len(mockedVgpuInstance.ClearAccountingPidsCalls()) -func (mock *VgpuInstance) ClearAccountingPidsCalls() []struct { -} { - var calls []struct { - } - mock.lockClearAccountingPids.RLock() - calls = mock.calls.ClearAccountingPids - mock.lockClearAccountingPids.RUnlock() - return calls -} - -// GetAccountingMode calls GetAccountingModeFunc. -func (mock *VgpuInstance) GetAccountingMode() (nvml.EnableState, nvml.Return) { - if mock.GetAccountingModeFunc == nil { - panic("VgpuInstance.GetAccountingModeFunc: method is nil but VgpuInstance.GetAccountingMode was just called") - } - callInfo := struct { - }{} - mock.lockGetAccountingMode.Lock() - mock.calls.GetAccountingMode = append(mock.calls.GetAccountingMode, callInfo) - mock.lockGetAccountingMode.Unlock() - return mock.GetAccountingModeFunc() -} - -// GetAccountingModeCalls gets all the calls that were made to GetAccountingMode. -// Check the length with: -// -// len(mockedVgpuInstance.GetAccountingModeCalls()) -func (mock *VgpuInstance) GetAccountingModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetAccountingMode.RLock() - calls = mock.calls.GetAccountingMode - mock.lockGetAccountingMode.RUnlock() - return calls -} - -// GetAccountingPids calls GetAccountingPidsFunc. -func (mock *VgpuInstance) GetAccountingPids() ([]int, nvml.Return) { - if mock.GetAccountingPidsFunc == nil { - panic("VgpuInstance.GetAccountingPidsFunc: method is nil but VgpuInstance.GetAccountingPids was just called") - } - callInfo := struct { - }{} - mock.lockGetAccountingPids.Lock() - mock.calls.GetAccountingPids = append(mock.calls.GetAccountingPids, callInfo) - mock.lockGetAccountingPids.Unlock() - return mock.GetAccountingPidsFunc() -} - -// GetAccountingPidsCalls gets all the calls that were made to GetAccountingPids. -// Check the length with: -// -// len(mockedVgpuInstance.GetAccountingPidsCalls()) -func (mock *VgpuInstance) GetAccountingPidsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetAccountingPids.RLock() - calls = mock.calls.GetAccountingPids - mock.lockGetAccountingPids.RUnlock() - return calls -} - -// GetAccountingStats calls GetAccountingStatsFunc. -func (mock *VgpuInstance) GetAccountingStats(n int) (nvml.AccountingStats, nvml.Return) { - if mock.GetAccountingStatsFunc == nil { - panic("VgpuInstance.GetAccountingStatsFunc: method is nil but VgpuInstance.GetAccountingStats was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetAccountingStats.Lock() - mock.calls.GetAccountingStats = append(mock.calls.GetAccountingStats, callInfo) - mock.lockGetAccountingStats.Unlock() - return mock.GetAccountingStatsFunc(n) -} - -// GetAccountingStatsCalls gets all the calls that were made to GetAccountingStats. -// Check the length with: -// -// len(mockedVgpuInstance.GetAccountingStatsCalls()) -func (mock *VgpuInstance) GetAccountingStatsCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetAccountingStats.RLock() - calls = mock.calls.GetAccountingStats - mock.lockGetAccountingStats.RUnlock() - return calls -} - -// GetEccMode calls GetEccModeFunc. -func (mock *VgpuInstance) GetEccMode() (nvml.EnableState, nvml.Return) { - if mock.GetEccModeFunc == nil { - panic("VgpuInstance.GetEccModeFunc: method is nil but VgpuInstance.GetEccMode was just called") - } - callInfo := struct { - }{} - mock.lockGetEccMode.Lock() - mock.calls.GetEccMode = append(mock.calls.GetEccMode, callInfo) - mock.lockGetEccMode.Unlock() - return mock.GetEccModeFunc() -} - -// GetEccModeCalls gets all the calls that were made to GetEccMode. -// Check the length with: -// -// len(mockedVgpuInstance.GetEccModeCalls()) -func (mock *VgpuInstance) GetEccModeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetEccMode.RLock() - calls = mock.calls.GetEccMode - mock.lockGetEccMode.RUnlock() - return calls -} - -// GetEncoderCapacity calls GetEncoderCapacityFunc. -func (mock *VgpuInstance) GetEncoderCapacity() (int, nvml.Return) { - if mock.GetEncoderCapacityFunc == nil { - panic("VgpuInstance.GetEncoderCapacityFunc: method is nil but VgpuInstance.GetEncoderCapacity was just called") - } - callInfo := struct { - }{} - mock.lockGetEncoderCapacity.Lock() - mock.calls.GetEncoderCapacity = append(mock.calls.GetEncoderCapacity, callInfo) - mock.lockGetEncoderCapacity.Unlock() - return mock.GetEncoderCapacityFunc() -} - -// GetEncoderCapacityCalls gets all the calls that were made to GetEncoderCapacity. -// Check the length with: -// -// len(mockedVgpuInstance.GetEncoderCapacityCalls()) -func (mock *VgpuInstance) GetEncoderCapacityCalls() []struct { -} { - var calls []struct { - } - mock.lockGetEncoderCapacity.RLock() - calls = mock.calls.GetEncoderCapacity - mock.lockGetEncoderCapacity.RUnlock() - return calls -} - -// GetEncoderSessions calls GetEncoderSessionsFunc. -func (mock *VgpuInstance) GetEncoderSessions() (int, nvml.EncoderSessionInfo, nvml.Return) { - if mock.GetEncoderSessionsFunc == nil { - panic("VgpuInstance.GetEncoderSessionsFunc: method is nil but VgpuInstance.GetEncoderSessions was just called") - } - callInfo := struct { - }{} - mock.lockGetEncoderSessions.Lock() - mock.calls.GetEncoderSessions = append(mock.calls.GetEncoderSessions, callInfo) - mock.lockGetEncoderSessions.Unlock() - return mock.GetEncoderSessionsFunc() -} - -// GetEncoderSessionsCalls gets all the calls that were made to GetEncoderSessions. -// Check the length with: -// -// len(mockedVgpuInstance.GetEncoderSessionsCalls()) -func (mock *VgpuInstance) GetEncoderSessionsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetEncoderSessions.RLock() - calls = mock.calls.GetEncoderSessions - mock.lockGetEncoderSessions.RUnlock() - return calls -} - -// GetEncoderStats calls GetEncoderStatsFunc. -func (mock *VgpuInstance) GetEncoderStats() (int, uint32, uint32, nvml.Return) { - if mock.GetEncoderStatsFunc == nil { - panic("VgpuInstance.GetEncoderStatsFunc: method is nil but VgpuInstance.GetEncoderStats was just called") - } - callInfo := struct { - }{} - mock.lockGetEncoderStats.Lock() - mock.calls.GetEncoderStats = append(mock.calls.GetEncoderStats, callInfo) - mock.lockGetEncoderStats.Unlock() - return mock.GetEncoderStatsFunc() -} - -// GetEncoderStatsCalls gets all the calls that were made to GetEncoderStats. -// Check the length with: -// -// len(mockedVgpuInstance.GetEncoderStatsCalls()) -func (mock *VgpuInstance) GetEncoderStatsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetEncoderStats.RLock() - calls = mock.calls.GetEncoderStats - mock.lockGetEncoderStats.RUnlock() - return calls -} - -// GetFBCSessions calls GetFBCSessionsFunc. -func (mock *VgpuInstance) GetFBCSessions() (int, nvml.FBCSessionInfo, nvml.Return) { - if mock.GetFBCSessionsFunc == nil { - panic("VgpuInstance.GetFBCSessionsFunc: method is nil but VgpuInstance.GetFBCSessions was just called") - } - callInfo := struct { - }{} - mock.lockGetFBCSessions.Lock() - mock.calls.GetFBCSessions = append(mock.calls.GetFBCSessions, callInfo) - mock.lockGetFBCSessions.Unlock() - return mock.GetFBCSessionsFunc() -} - -// GetFBCSessionsCalls gets all the calls that were made to GetFBCSessions. -// Check the length with: -// -// len(mockedVgpuInstance.GetFBCSessionsCalls()) -func (mock *VgpuInstance) GetFBCSessionsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetFBCSessions.RLock() - calls = mock.calls.GetFBCSessions - mock.lockGetFBCSessions.RUnlock() - return calls -} - -// GetFBCStats calls GetFBCStatsFunc. -func (mock *VgpuInstance) GetFBCStats() (nvml.FBCStats, nvml.Return) { - if mock.GetFBCStatsFunc == nil { - panic("VgpuInstance.GetFBCStatsFunc: method is nil but VgpuInstance.GetFBCStats was just called") - } - callInfo := struct { - }{} - mock.lockGetFBCStats.Lock() - mock.calls.GetFBCStats = append(mock.calls.GetFBCStats, callInfo) - mock.lockGetFBCStats.Unlock() - return mock.GetFBCStatsFunc() -} - -// GetFBCStatsCalls gets all the calls that were made to GetFBCStats. -// Check the length with: -// -// len(mockedVgpuInstance.GetFBCStatsCalls()) -func (mock *VgpuInstance) GetFBCStatsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetFBCStats.RLock() - calls = mock.calls.GetFBCStats - mock.lockGetFBCStats.RUnlock() - return calls -} - -// GetFbUsage calls GetFbUsageFunc. -func (mock *VgpuInstance) GetFbUsage() (uint64, nvml.Return) { - if mock.GetFbUsageFunc == nil { - panic("VgpuInstance.GetFbUsageFunc: method is nil but VgpuInstance.GetFbUsage was just called") - } - callInfo := struct { - }{} - mock.lockGetFbUsage.Lock() - mock.calls.GetFbUsage = append(mock.calls.GetFbUsage, callInfo) - mock.lockGetFbUsage.Unlock() - return mock.GetFbUsageFunc() -} - -// GetFbUsageCalls gets all the calls that were made to GetFbUsage. -// Check the length with: -// -// len(mockedVgpuInstance.GetFbUsageCalls()) -func (mock *VgpuInstance) GetFbUsageCalls() []struct { -} { - var calls []struct { - } - mock.lockGetFbUsage.RLock() - calls = mock.calls.GetFbUsage - mock.lockGetFbUsage.RUnlock() - return calls -} - -// GetFrameRateLimit calls GetFrameRateLimitFunc. -func (mock *VgpuInstance) GetFrameRateLimit() (uint32, nvml.Return) { - if mock.GetFrameRateLimitFunc == nil { - panic("VgpuInstance.GetFrameRateLimitFunc: method is nil but VgpuInstance.GetFrameRateLimit was just called") - } - callInfo := struct { - }{} - mock.lockGetFrameRateLimit.Lock() - mock.calls.GetFrameRateLimit = append(mock.calls.GetFrameRateLimit, callInfo) - mock.lockGetFrameRateLimit.Unlock() - return mock.GetFrameRateLimitFunc() -} - -// GetFrameRateLimitCalls gets all the calls that were made to GetFrameRateLimit. -// Check the length with: -// -// len(mockedVgpuInstance.GetFrameRateLimitCalls()) -func (mock *VgpuInstance) GetFrameRateLimitCalls() []struct { -} { - var calls []struct { - } - mock.lockGetFrameRateLimit.RLock() - calls = mock.calls.GetFrameRateLimit - mock.lockGetFrameRateLimit.RUnlock() - return calls -} - -// GetGpuInstanceId calls GetGpuInstanceIdFunc. -func (mock *VgpuInstance) GetGpuInstanceId() (int, nvml.Return) { - if mock.GetGpuInstanceIdFunc == nil { - panic("VgpuInstance.GetGpuInstanceIdFunc: method is nil but VgpuInstance.GetGpuInstanceId was just called") - } - callInfo := struct { - }{} - mock.lockGetGpuInstanceId.Lock() - mock.calls.GetGpuInstanceId = append(mock.calls.GetGpuInstanceId, callInfo) - mock.lockGetGpuInstanceId.Unlock() - return mock.GetGpuInstanceIdFunc() -} - -// GetGpuInstanceIdCalls gets all the calls that were made to GetGpuInstanceId. -// Check the length with: -// -// len(mockedVgpuInstance.GetGpuInstanceIdCalls()) -func (mock *VgpuInstance) GetGpuInstanceIdCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGpuInstanceId.RLock() - calls = mock.calls.GetGpuInstanceId - mock.lockGetGpuInstanceId.RUnlock() - return calls -} - -// GetGpuPciId calls GetGpuPciIdFunc. -func (mock *VgpuInstance) GetGpuPciId() (string, nvml.Return) { - if mock.GetGpuPciIdFunc == nil { - panic("VgpuInstance.GetGpuPciIdFunc: method is nil but VgpuInstance.GetGpuPciId was just called") - } - callInfo := struct { - }{} - mock.lockGetGpuPciId.Lock() - mock.calls.GetGpuPciId = append(mock.calls.GetGpuPciId, callInfo) - mock.lockGetGpuPciId.Unlock() - return mock.GetGpuPciIdFunc() -} - -// GetGpuPciIdCalls gets all the calls that were made to GetGpuPciId. -// Check the length with: -// -// len(mockedVgpuInstance.GetGpuPciIdCalls()) -func (mock *VgpuInstance) GetGpuPciIdCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGpuPciId.RLock() - calls = mock.calls.GetGpuPciId - mock.lockGetGpuPciId.RUnlock() - return calls -} - -// GetLicenseInfo calls GetLicenseInfoFunc. -func (mock *VgpuInstance) GetLicenseInfo() (nvml.VgpuLicenseInfo, nvml.Return) { - if mock.GetLicenseInfoFunc == nil { - panic("VgpuInstance.GetLicenseInfoFunc: method is nil but VgpuInstance.GetLicenseInfo was just called") - } - callInfo := struct { - }{} - mock.lockGetLicenseInfo.Lock() - mock.calls.GetLicenseInfo = append(mock.calls.GetLicenseInfo, callInfo) - mock.lockGetLicenseInfo.Unlock() - return mock.GetLicenseInfoFunc() -} - -// GetLicenseInfoCalls gets all the calls that were made to GetLicenseInfo. -// Check the length with: -// -// len(mockedVgpuInstance.GetLicenseInfoCalls()) -func (mock *VgpuInstance) GetLicenseInfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetLicenseInfo.RLock() - calls = mock.calls.GetLicenseInfo - mock.lockGetLicenseInfo.RUnlock() - return calls -} - -// GetLicenseStatus calls GetLicenseStatusFunc. -func (mock *VgpuInstance) GetLicenseStatus() (int, nvml.Return) { - if mock.GetLicenseStatusFunc == nil { - panic("VgpuInstance.GetLicenseStatusFunc: method is nil but VgpuInstance.GetLicenseStatus was just called") - } - callInfo := struct { - }{} - mock.lockGetLicenseStatus.Lock() - mock.calls.GetLicenseStatus = append(mock.calls.GetLicenseStatus, callInfo) - mock.lockGetLicenseStatus.Unlock() - return mock.GetLicenseStatusFunc() -} - -// GetLicenseStatusCalls gets all the calls that were made to GetLicenseStatus. -// Check the length with: -// -// len(mockedVgpuInstance.GetLicenseStatusCalls()) -func (mock *VgpuInstance) GetLicenseStatusCalls() []struct { -} { - var calls []struct { - } - mock.lockGetLicenseStatus.RLock() - calls = mock.calls.GetLicenseStatus - mock.lockGetLicenseStatus.RUnlock() - return calls -} - -// GetMdevUUID calls GetMdevUUIDFunc. -func (mock *VgpuInstance) GetMdevUUID() (string, nvml.Return) { - if mock.GetMdevUUIDFunc == nil { - panic("VgpuInstance.GetMdevUUIDFunc: method is nil but VgpuInstance.GetMdevUUID was just called") - } - callInfo := struct { - }{} - mock.lockGetMdevUUID.Lock() - mock.calls.GetMdevUUID = append(mock.calls.GetMdevUUID, callInfo) - mock.lockGetMdevUUID.Unlock() - return mock.GetMdevUUIDFunc() -} - -// GetMdevUUIDCalls gets all the calls that were made to GetMdevUUID. -// Check the length with: -// -// len(mockedVgpuInstance.GetMdevUUIDCalls()) -func (mock *VgpuInstance) GetMdevUUIDCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMdevUUID.RLock() - calls = mock.calls.GetMdevUUID - mock.lockGetMdevUUID.RUnlock() - return calls -} - -// GetMetadata calls GetMetadataFunc. -func (mock *VgpuInstance) GetMetadata() (nvml.VgpuMetadata, nvml.Return) { - if mock.GetMetadataFunc == nil { - panic("VgpuInstance.GetMetadataFunc: method is nil but VgpuInstance.GetMetadata was just called") - } - callInfo := struct { - }{} - mock.lockGetMetadata.Lock() - mock.calls.GetMetadata = append(mock.calls.GetMetadata, callInfo) - mock.lockGetMetadata.Unlock() - return mock.GetMetadataFunc() -} - -// GetMetadataCalls gets all the calls that were made to GetMetadata. -// Check the length with: -// -// len(mockedVgpuInstance.GetMetadataCalls()) -func (mock *VgpuInstance) GetMetadataCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMetadata.RLock() - calls = mock.calls.GetMetadata - mock.lockGetMetadata.RUnlock() - return calls -} - -// GetRuntimeStateSize calls GetRuntimeStateSizeFunc. -func (mock *VgpuInstance) GetRuntimeStateSize() (nvml.VgpuRuntimeState, nvml.Return) { - if mock.GetRuntimeStateSizeFunc == nil { - panic("VgpuInstance.GetRuntimeStateSizeFunc: method is nil but VgpuInstance.GetRuntimeStateSize was just called") - } - callInfo := struct { - }{} - mock.lockGetRuntimeStateSize.Lock() - mock.calls.GetRuntimeStateSize = append(mock.calls.GetRuntimeStateSize, callInfo) - mock.lockGetRuntimeStateSize.Unlock() - return mock.GetRuntimeStateSizeFunc() -} - -// GetRuntimeStateSizeCalls gets all the calls that were made to GetRuntimeStateSize. -// Check the length with: -// -// len(mockedVgpuInstance.GetRuntimeStateSizeCalls()) -func (mock *VgpuInstance) GetRuntimeStateSizeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetRuntimeStateSize.RLock() - calls = mock.calls.GetRuntimeStateSize - mock.lockGetRuntimeStateSize.RUnlock() - return calls -} - -// GetType calls GetTypeFunc. -func (mock *VgpuInstance) GetType() (nvml.VgpuTypeId, nvml.Return) { - if mock.GetTypeFunc == nil { - panic("VgpuInstance.GetTypeFunc: method is nil but VgpuInstance.GetType was just called") - } - callInfo := struct { - }{} - mock.lockGetType.Lock() - mock.calls.GetType = append(mock.calls.GetType, callInfo) - mock.lockGetType.Unlock() - return mock.GetTypeFunc() -} - -// GetTypeCalls gets all the calls that were made to GetType. -// Check the length with: -// -// len(mockedVgpuInstance.GetTypeCalls()) -func (mock *VgpuInstance) GetTypeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetType.RLock() - calls = mock.calls.GetType - mock.lockGetType.RUnlock() - return calls -} - -// GetUUID calls GetUUIDFunc. -func (mock *VgpuInstance) GetUUID() (string, nvml.Return) { - if mock.GetUUIDFunc == nil { - panic("VgpuInstance.GetUUIDFunc: method is nil but VgpuInstance.GetUUID was just called") - } - callInfo := struct { - }{} - mock.lockGetUUID.Lock() - mock.calls.GetUUID = append(mock.calls.GetUUID, callInfo) - mock.lockGetUUID.Unlock() - return mock.GetUUIDFunc() -} - -// GetUUIDCalls gets all the calls that were made to GetUUID. -// Check the length with: -// -// len(mockedVgpuInstance.GetUUIDCalls()) -func (mock *VgpuInstance) GetUUIDCalls() []struct { -} { - var calls []struct { - } - mock.lockGetUUID.RLock() - calls = mock.calls.GetUUID - mock.lockGetUUID.RUnlock() - return calls -} - -// GetVmDriverVersion calls GetVmDriverVersionFunc. -func (mock *VgpuInstance) GetVmDriverVersion() (string, nvml.Return) { - if mock.GetVmDriverVersionFunc == nil { - panic("VgpuInstance.GetVmDriverVersionFunc: method is nil but VgpuInstance.GetVmDriverVersion was just called") - } - callInfo := struct { - }{} - mock.lockGetVmDriverVersion.Lock() - mock.calls.GetVmDriverVersion = append(mock.calls.GetVmDriverVersion, callInfo) - mock.lockGetVmDriverVersion.Unlock() - return mock.GetVmDriverVersionFunc() -} - -// GetVmDriverVersionCalls gets all the calls that were made to GetVmDriverVersion. -// Check the length with: -// -// len(mockedVgpuInstance.GetVmDriverVersionCalls()) -func (mock *VgpuInstance) GetVmDriverVersionCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVmDriverVersion.RLock() - calls = mock.calls.GetVmDriverVersion - mock.lockGetVmDriverVersion.RUnlock() - return calls -} - -// GetVmID calls GetVmIDFunc. -func (mock *VgpuInstance) GetVmID() (string, nvml.VgpuVmIdType, nvml.Return) { - if mock.GetVmIDFunc == nil { - panic("VgpuInstance.GetVmIDFunc: method is nil but VgpuInstance.GetVmID was just called") - } - callInfo := struct { - }{} - mock.lockGetVmID.Lock() - mock.calls.GetVmID = append(mock.calls.GetVmID, callInfo) - mock.lockGetVmID.Unlock() - return mock.GetVmIDFunc() -} - -// GetVmIDCalls gets all the calls that were made to GetVmID. -// Check the length with: -// -// len(mockedVgpuInstance.GetVmIDCalls()) -func (mock *VgpuInstance) GetVmIDCalls() []struct { -} { - var calls []struct { - } - mock.lockGetVmID.RLock() - calls = mock.calls.GetVmID - mock.lockGetVmID.RUnlock() - return calls -} - -// SetEncoderCapacity calls SetEncoderCapacityFunc. -func (mock *VgpuInstance) SetEncoderCapacity(n int) nvml.Return { - if mock.SetEncoderCapacityFunc == nil { - panic("VgpuInstance.SetEncoderCapacityFunc: method is nil but VgpuInstance.SetEncoderCapacity was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockSetEncoderCapacity.Lock() - mock.calls.SetEncoderCapacity = append(mock.calls.SetEncoderCapacity, callInfo) - mock.lockSetEncoderCapacity.Unlock() - return mock.SetEncoderCapacityFunc(n) -} - -// SetEncoderCapacityCalls gets all the calls that were made to SetEncoderCapacity. -// Check the length with: -// -// len(mockedVgpuInstance.SetEncoderCapacityCalls()) -func (mock *VgpuInstance) SetEncoderCapacityCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockSetEncoderCapacity.RLock() - calls = mock.calls.SetEncoderCapacity - mock.lockSetEncoderCapacity.RUnlock() - return calls -} diff --git a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgputypeid.go b/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgputypeid.go deleted file mode 100644 index 467d7468b..000000000 --- a/vendor/github.com/NVIDIA/go-nvml/pkg/nvml/mock/vgputypeid.go +++ /dev/null @@ -1,621 +0,0 @@ -// Code generated by moq; DO NOT EDIT. -// github.com/matryer/moq - -package mock - -import ( - "github.com/NVIDIA/go-nvml/pkg/nvml" - "sync" -) - -// Ensure, that VgpuTypeId does implement nvml.VgpuTypeId. -// If this is not the case, regenerate this file with moq. -var _ nvml.VgpuTypeId = &VgpuTypeId{} - -// VgpuTypeId is a mock implementation of nvml.VgpuTypeId. -// -// func TestSomethingThatUsesVgpuTypeId(t *testing.T) { -// -// // make and configure a mocked nvml.VgpuTypeId -// mockedVgpuTypeId := &VgpuTypeId{ -// GetBAR1InfoFunc: func() (nvml.VgpuTypeBar1Info, nvml.Return) { -// panic("mock out the GetBAR1Info method") -// }, -// GetCapabilitiesFunc: func(vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { -// panic("mock out the GetCapabilities method") -// }, -// GetClassFunc: func() (string, nvml.Return) { -// panic("mock out the GetClass method") -// }, -// GetCreatablePlacementsFunc: func(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) { -// panic("mock out the GetCreatablePlacements method") -// }, -// GetDeviceIDFunc: func() (uint64, uint64, nvml.Return) { -// panic("mock out the GetDeviceID method") -// }, -// GetFrameRateLimitFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetFrameRateLimit method") -// }, -// GetFramebufferSizeFunc: func() (uint64, nvml.Return) { -// panic("mock out the GetFramebufferSize method") -// }, -// GetGpuInstanceProfileIdFunc: func() (uint32, nvml.Return) { -// panic("mock out the GetGpuInstanceProfileId method") -// }, -// GetLicenseFunc: func() (string, nvml.Return) { -// panic("mock out the GetLicense method") -// }, -// GetMaxInstancesFunc: func(device nvml.Device) (int, nvml.Return) { -// panic("mock out the GetMaxInstances method") -// }, -// GetMaxInstancesPerVmFunc: func() (int, nvml.Return) { -// panic("mock out the GetMaxInstancesPerVm method") -// }, -// GetNameFunc: func() (string, nvml.Return) { -// panic("mock out the GetName method") -// }, -// GetNumDisplayHeadsFunc: func() (int, nvml.Return) { -// panic("mock out the GetNumDisplayHeads method") -// }, -// GetResolutionFunc: func(n int) (uint32, uint32, nvml.Return) { -// panic("mock out the GetResolution method") -// }, -// GetSupportedPlacementsFunc: func(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) { -// panic("mock out the GetSupportedPlacements method") -// }, -// } -// -// // use mockedVgpuTypeId in code that requires nvml.VgpuTypeId -// // and then make assertions. -// -// } -type VgpuTypeId struct { - // GetBAR1InfoFunc mocks the GetBAR1Info method. - GetBAR1InfoFunc func() (nvml.VgpuTypeBar1Info, nvml.Return) - - // GetCapabilitiesFunc mocks the GetCapabilities method. - GetCapabilitiesFunc func(vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) - - // GetClassFunc mocks the GetClass method. - GetClassFunc func() (string, nvml.Return) - - // GetCreatablePlacementsFunc mocks the GetCreatablePlacements method. - GetCreatablePlacementsFunc func(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) - - // GetDeviceIDFunc mocks the GetDeviceID method. - GetDeviceIDFunc func() (uint64, uint64, nvml.Return) - - // GetFrameRateLimitFunc mocks the GetFrameRateLimit method. - GetFrameRateLimitFunc func() (uint32, nvml.Return) - - // GetFramebufferSizeFunc mocks the GetFramebufferSize method. - GetFramebufferSizeFunc func() (uint64, nvml.Return) - - // GetGpuInstanceProfileIdFunc mocks the GetGpuInstanceProfileId method. - GetGpuInstanceProfileIdFunc func() (uint32, nvml.Return) - - // GetLicenseFunc mocks the GetLicense method. - GetLicenseFunc func() (string, nvml.Return) - - // GetMaxInstancesFunc mocks the GetMaxInstances method. - GetMaxInstancesFunc func(device nvml.Device) (int, nvml.Return) - - // GetMaxInstancesPerVmFunc mocks the GetMaxInstancesPerVm method. - GetMaxInstancesPerVmFunc func() (int, nvml.Return) - - // GetNameFunc mocks the GetName method. - GetNameFunc func() (string, nvml.Return) - - // GetNumDisplayHeadsFunc mocks the GetNumDisplayHeads method. - GetNumDisplayHeadsFunc func() (int, nvml.Return) - - // GetResolutionFunc mocks the GetResolution method. - GetResolutionFunc func(n int) (uint32, uint32, nvml.Return) - - // GetSupportedPlacementsFunc mocks the GetSupportedPlacements method. - GetSupportedPlacementsFunc func(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) - - // calls tracks calls to the methods. - calls struct { - // GetBAR1Info holds details about calls to the GetBAR1Info method. - GetBAR1Info []struct { - } - // GetCapabilities holds details about calls to the GetCapabilities method. - GetCapabilities []struct { - // VgpuCapability is the vgpuCapability argument value. - VgpuCapability nvml.VgpuCapability - } - // GetClass holds details about calls to the GetClass method. - GetClass []struct { - } - // GetCreatablePlacements holds details about calls to the GetCreatablePlacements method. - GetCreatablePlacements []struct { - // Device is the device argument value. - Device nvml.Device - } - // GetDeviceID holds details about calls to the GetDeviceID method. - GetDeviceID []struct { - } - // GetFrameRateLimit holds details about calls to the GetFrameRateLimit method. - GetFrameRateLimit []struct { - } - // GetFramebufferSize holds details about calls to the GetFramebufferSize method. - GetFramebufferSize []struct { - } - // GetGpuInstanceProfileId holds details about calls to the GetGpuInstanceProfileId method. - GetGpuInstanceProfileId []struct { - } - // GetLicense holds details about calls to the GetLicense method. - GetLicense []struct { - } - // GetMaxInstances holds details about calls to the GetMaxInstances method. - GetMaxInstances []struct { - // Device is the device argument value. - Device nvml.Device - } - // GetMaxInstancesPerVm holds details about calls to the GetMaxInstancesPerVm method. - GetMaxInstancesPerVm []struct { - } - // GetName holds details about calls to the GetName method. - GetName []struct { - } - // GetNumDisplayHeads holds details about calls to the GetNumDisplayHeads method. - GetNumDisplayHeads []struct { - } - // GetResolution holds details about calls to the GetResolution method. - GetResolution []struct { - // N is the n argument value. - N int - } - // GetSupportedPlacements holds details about calls to the GetSupportedPlacements method. - GetSupportedPlacements []struct { - // Device is the device argument value. - Device nvml.Device - } - } - lockGetBAR1Info sync.RWMutex - lockGetCapabilities sync.RWMutex - lockGetClass sync.RWMutex - lockGetCreatablePlacements sync.RWMutex - lockGetDeviceID sync.RWMutex - lockGetFrameRateLimit sync.RWMutex - lockGetFramebufferSize sync.RWMutex - lockGetGpuInstanceProfileId sync.RWMutex - lockGetLicense sync.RWMutex - lockGetMaxInstances sync.RWMutex - lockGetMaxInstancesPerVm sync.RWMutex - lockGetName sync.RWMutex - lockGetNumDisplayHeads sync.RWMutex - lockGetResolution sync.RWMutex - lockGetSupportedPlacements sync.RWMutex -} - -// GetBAR1Info calls GetBAR1InfoFunc. -func (mock *VgpuTypeId) GetBAR1Info() (nvml.VgpuTypeBar1Info, nvml.Return) { - if mock.GetBAR1InfoFunc == nil { - panic("VgpuTypeId.GetBAR1InfoFunc: method is nil but VgpuTypeId.GetBAR1Info was just called") - } - callInfo := struct { - }{} - mock.lockGetBAR1Info.Lock() - mock.calls.GetBAR1Info = append(mock.calls.GetBAR1Info, callInfo) - mock.lockGetBAR1Info.Unlock() - return mock.GetBAR1InfoFunc() -} - -// GetBAR1InfoCalls gets all the calls that were made to GetBAR1Info. -// Check the length with: -// -// len(mockedVgpuTypeId.GetBAR1InfoCalls()) -func (mock *VgpuTypeId) GetBAR1InfoCalls() []struct { -} { - var calls []struct { - } - mock.lockGetBAR1Info.RLock() - calls = mock.calls.GetBAR1Info - mock.lockGetBAR1Info.RUnlock() - return calls -} - -// GetCapabilities calls GetCapabilitiesFunc. -func (mock *VgpuTypeId) GetCapabilities(vgpuCapability nvml.VgpuCapability) (bool, nvml.Return) { - if mock.GetCapabilitiesFunc == nil { - panic("VgpuTypeId.GetCapabilitiesFunc: method is nil but VgpuTypeId.GetCapabilities was just called") - } - callInfo := struct { - VgpuCapability nvml.VgpuCapability - }{ - VgpuCapability: vgpuCapability, - } - mock.lockGetCapabilities.Lock() - mock.calls.GetCapabilities = append(mock.calls.GetCapabilities, callInfo) - mock.lockGetCapabilities.Unlock() - return mock.GetCapabilitiesFunc(vgpuCapability) -} - -// GetCapabilitiesCalls gets all the calls that were made to GetCapabilities. -// Check the length with: -// -// len(mockedVgpuTypeId.GetCapabilitiesCalls()) -func (mock *VgpuTypeId) GetCapabilitiesCalls() []struct { - VgpuCapability nvml.VgpuCapability -} { - var calls []struct { - VgpuCapability nvml.VgpuCapability - } - mock.lockGetCapabilities.RLock() - calls = mock.calls.GetCapabilities - mock.lockGetCapabilities.RUnlock() - return calls -} - -// GetClass calls GetClassFunc. -func (mock *VgpuTypeId) GetClass() (string, nvml.Return) { - if mock.GetClassFunc == nil { - panic("VgpuTypeId.GetClassFunc: method is nil but VgpuTypeId.GetClass was just called") - } - callInfo := struct { - }{} - mock.lockGetClass.Lock() - mock.calls.GetClass = append(mock.calls.GetClass, callInfo) - mock.lockGetClass.Unlock() - return mock.GetClassFunc() -} - -// GetClassCalls gets all the calls that were made to GetClass. -// Check the length with: -// -// len(mockedVgpuTypeId.GetClassCalls()) -func (mock *VgpuTypeId) GetClassCalls() []struct { -} { - var calls []struct { - } - mock.lockGetClass.RLock() - calls = mock.calls.GetClass - mock.lockGetClass.RUnlock() - return calls -} - -// GetCreatablePlacements calls GetCreatablePlacementsFunc. -func (mock *VgpuTypeId) GetCreatablePlacements(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) { - if mock.GetCreatablePlacementsFunc == nil { - panic("VgpuTypeId.GetCreatablePlacementsFunc: method is nil but VgpuTypeId.GetCreatablePlacements was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockGetCreatablePlacements.Lock() - mock.calls.GetCreatablePlacements = append(mock.calls.GetCreatablePlacements, callInfo) - mock.lockGetCreatablePlacements.Unlock() - return mock.GetCreatablePlacementsFunc(device) -} - -// GetCreatablePlacementsCalls gets all the calls that were made to GetCreatablePlacements. -// Check the length with: -// -// len(mockedVgpuTypeId.GetCreatablePlacementsCalls()) -func (mock *VgpuTypeId) GetCreatablePlacementsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockGetCreatablePlacements.RLock() - calls = mock.calls.GetCreatablePlacements - mock.lockGetCreatablePlacements.RUnlock() - return calls -} - -// GetDeviceID calls GetDeviceIDFunc. -func (mock *VgpuTypeId) GetDeviceID() (uint64, uint64, nvml.Return) { - if mock.GetDeviceIDFunc == nil { - panic("VgpuTypeId.GetDeviceIDFunc: method is nil but VgpuTypeId.GetDeviceID was just called") - } - callInfo := struct { - }{} - mock.lockGetDeviceID.Lock() - mock.calls.GetDeviceID = append(mock.calls.GetDeviceID, callInfo) - mock.lockGetDeviceID.Unlock() - return mock.GetDeviceIDFunc() -} - -// GetDeviceIDCalls gets all the calls that were made to GetDeviceID. -// Check the length with: -// -// len(mockedVgpuTypeId.GetDeviceIDCalls()) -func (mock *VgpuTypeId) GetDeviceIDCalls() []struct { -} { - var calls []struct { - } - mock.lockGetDeviceID.RLock() - calls = mock.calls.GetDeviceID - mock.lockGetDeviceID.RUnlock() - return calls -} - -// GetFrameRateLimit calls GetFrameRateLimitFunc. -func (mock *VgpuTypeId) GetFrameRateLimit() (uint32, nvml.Return) { - if mock.GetFrameRateLimitFunc == nil { - panic("VgpuTypeId.GetFrameRateLimitFunc: method is nil but VgpuTypeId.GetFrameRateLimit was just called") - } - callInfo := struct { - }{} - mock.lockGetFrameRateLimit.Lock() - mock.calls.GetFrameRateLimit = append(mock.calls.GetFrameRateLimit, callInfo) - mock.lockGetFrameRateLimit.Unlock() - return mock.GetFrameRateLimitFunc() -} - -// GetFrameRateLimitCalls gets all the calls that were made to GetFrameRateLimit. -// Check the length with: -// -// len(mockedVgpuTypeId.GetFrameRateLimitCalls()) -func (mock *VgpuTypeId) GetFrameRateLimitCalls() []struct { -} { - var calls []struct { - } - mock.lockGetFrameRateLimit.RLock() - calls = mock.calls.GetFrameRateLimit - mock.lockGetFrameRateLimit.RUnlock() - return calls -} - -// GetFramebufferSize calls GetFramebufferSizeFunc. -func (mock *VgpuTypeId) GetFramebufferSize() (uint64, nvml.Return) { - if mock.GetFramebufferSizeFunc == nil { - panic("VgpuTypeId.GetFramebufferSizeFunc: method is nil but VgpuTypeId.GetFramebufferSize was just called") - } - callInfo := struct { - }{} - mock.lockGetFramebufferSize.Lock() - mock.calls.GetFramebufferSize = append(mock.calls.GetFramebufferSize, callInfo) - mock.lockGetFramebufferSize.Unlock() - return mock.GetFramebufferSizeFunc() -} - -// GetFramebufferSizeCalls gets all the calls that were made to GetFramebufferSize. -// Check the length with: -// -// len(mockedVgpuTypeId.GetFramebufferSizeCalls()) -func (mock *VgpuTypeId) GetFramebufferSizeCalls() []struct { -} { - var calls []struct { - } - mock.lockGetFramebufferSize.RLock() - calls = mock.calls.GetFramebufferSize - mock.lockGetFramebufferSize.RUnlock() - return calls -} - -// GetGpuInstanceProfileId calls GetGpuInstanceProfileIdFunc. -func (mock *VgpuTypeId) GetGpuInstanceProfileId() (uint32, nvml.Return) { - if mock.GetGpuInstanceProfileIdFunc == nil { - panic("VgpuTypeId.GetGpuInstanceProfileIdFunc: method is nil but VgpuTypeId.GetGpuInstanceProfileId was just called") - } - callInfo := struct { - }{} - mock.lockGetGpuInstanceProfileId.Lock() - mock.calls.GetGpuInstanceProfileId = append(mock.calls.GetGpuInstanceProfileId, callInfo) - mock.lockGetGpuInstanceProfileId.Unlock() - return mock.GetGpuInstanceProfileIdFunc() -} - -// GetGpuInstanceProfileIdCalls gets all the calls that were made to GetGpuInstanceProfileId. -// Check the length with: -// -// len(mockedVgpuTypeId.GetGpuInstanceProfileIdCalls()) -func (mock *VgpuTypeId) GetGpuInstanceProfileIdCalls() []struct { -} { - var calls []struct { - } - mock.lockGetGpuInstanceProfileId.RLock() - calls = mock.calls.GetGpuInstanceProfileId - mock.lockGetGpuInstanceProfileId.RUnlock() - return calls -} - -// GetLicense calls GetLicenseFunc. -func (mock *VgpuTypeId) GetLicense() (string, nvml.Return) { - if mock.GetLicenseFunc == nil { - panic("VgpuTypeId.GetLicenseFunc: method is nil but VgpuTypeId.GetLicense was just called") - } - callInfo := struct { - }{} - mock.lockGetLicense.Lock() - mock.calls.GetLicense = append(mock.calls.GetLicense, callInfo) - mock.lockGetLicense.Unlock() - return mock.GetLicenseFunc() -} - -// GetLicenseCalls gets all the calls that were made to GetLicense. -// Check the length with: -// -// len(mockedVgpuTypeId.GetLicenseCalls()) -func (mock *VgpuTypeId) GetLicenseCalls() []struct { -} { - var calls []struct { - } - mock.lockGetLicense.RLock() - calls = mock.calls.GetLicense - mock.lockGetLicense.RUnlock() - return calls -} - -// GetMaxInstances calls GetMaxInstancesFunc. -func (mock *VgpuTypeId) GetMaxInstances(device nvml.Device) (int, nvml.Return) { - if mock.GetMaxInstancesFunc == nil { - panic("VgpuTypeId.GetMaxInstancesFunc: method is nil but VgpuTypeId.GetMaxInstances was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockGetMaxInstances.Lock() - mock.calls.GetMaxInstances = append(mock.calls.GetMaxInstances, callInfo) - mock.lockGetMaxInstances.Unlock() - return mock.GetMaxInstancesFunc(device) -} - -// GetMaxInstancesCalls gets all the calls that were made to GetMaxInstances. -// Check the length with: -// -// len(mockedVgpuTypeId.GetMaxInstancesCalls()) -func (mock *VgpuTypeId) GetMaxInstancesCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockGetMaxInstances.RLock() - calls = mock.calls.GetMaxInstances - mock.lockGetMaxInstances.RUnlock() - return calls -} - -// GetMaxInstancesPerVm calls GetMaxInstancesPerVmFunc. -func (mock *VgpuTypeId) GetMaxInstancesPerVm() (int, nvml.Return) { - if mock.GetMaxInstancesPerVmFunc == nil { - panic("VgpuTypeId.GetMaxInstancesPerVmFunc: method is nil but VgpuTypeId.GetMaxInstancesPerVm was just called") - } - callInfo := struct { - }{} - mock.lockGetMaxInstancesPerVm.Lock() - mock.calls.GetMaxInstancesPerVm = append(mock.calls.GetMaxInstancesPerVm, callInfo) - mock.lockGetMaxInstancesPerVm.Unlock() - return mock.GetMaxInstancesPerVmFunc() -} - -// GetMaxInstancesPerVmCalls gets all the calls that were made to GetMaxInstancesPerVm. -// Check the length with: -// -// len(mockedVgpuTypeId.GetMaxInstancesPerVmCalls()) -func (mock *VgpuTypeId) GetMaxInstancesPerVmCalls() []struct { -} { - var calls []struct { - } - mock.lockGetMaxInstancesPerVm.RLock() - calls = mock.calls.GetMaxInstancesPerVm - mock.lockGetMaxInstancesPerVm.RUnlock() - return calls -} - -// GetName calls GetNameFunc. -func (mock *VgpuTypeId) GetName() (string, nvml.Return) { - if mock.GetNameFunc == nil { - panic("VgpuTypeId.GetNameFunc: method is nil but VgpuTypeId.GetName was just called") - } - callInfo := struct { - }{} - mock.lockGetName.Lock() - mock.calls.GetName = append(mock.calls.GetName, callInfo) - mock.lockGetName.Unlock() - return mock.GetNameFunc() -} - -// GetNameCalls gets all the calls that were made to GetName. -// Check the length with: -// -// len(mockedVgpuTypeId.GetNameCalls()) -func (mock *VgpuTypeId) GetNameCalls() []struct { -} { - var calls []struct { - } - mock.lockGetName.RLock() - calls = mock.calls.GetName - mock.lockGetName.RUnlock() - return calls -} - -// GetNumDisplayHeads calls GetNumDisplayHeadsFunc. -func (mock *VgpuTypeId) GetNumDisplayHeads() (int, nvml.Return) { - if mock.GetNumDisplayHeadsFunc == nil { - panic("VgpuTypeId.GetNumDisplayHeadsFunc: method is nil but VgpuTypeId.GetNumDisplayHeads was just called") - } - callInfo := struct { - }{} - mock.lockGetNumDisplayHeads.Lock() - mock.calls.GetNumDisplayHeads = append(mock.calls.GetNumDisplayHeads, callInfo) - mock.lockGetNumDisplayHeads.Unlock() - return mock.GetNumDisplayHeadsFunc() -} - -// GetNumDisplayHeadsCalls gets all the calls that were made to GetNumDisplayHeads. -// Check the length with: -// -// len(mockedVgpuTypeId.GetNumDisplayHeadsCalls()) -func (mock *VgpuTypeId) GetNumDisplayHeadsCalls() []struct { -} { - var calls []struct { - } - mock.lockGetNumDisplayHeads.RLock() - calls = mock.calls.GetNumDisplayHeads - mock.lockGetNumDisplayHeads.RUnlock() - return calls -} - -// GetResolution calls GetResolutionFunc. -func (mock *VgpuTypeId) GetResolution(n int) (uint32, uint32, nvml.Return) { - if mock.GetResolutionFunc == nil { - panic("VgpuTypeId.GetResolutionFunc: method is nil but VgpuTypeId.GetResolution was just called") - } - callInfo := struct { - N int - }{ - N: n, - } - mock.lockGetResolution.Lock() - mock.calls.GetResolution = append(mock.calls.GetResolution, callInfo) - mock.lockGetResolution.Unlock() - return mock.GetResolutionFunc(n) -} - -// GetResolutionCalls gets all the calls that were made to GetResolution. -// Check the length with: -// -// len(mockedVgpuTypeId.GetResolutionCalls()) -func (mock *VgpuTypeId) GetResolutionCalls() []struct { - N int -} { - var calls []struct { - N int - } - mock.lockGetResolution.RLock() - calls = mock.calls.GetResolution - mock.lockGetResolution.RUnlock() - return calls -} - -// GetSupportedPlacements calls GetSupportedPlacementsFunc. -func (mock *VgpuTypeId) GetSupportedPlacements(device nvml.Device) (nvml.VgpuPlacementList, nvml.Return) { - if mock.GetSupportedPlacementsFunc == nil { - panic("VgpuTypeId.GetSupportedPlacementsFunc: method is nil but VgpuTypeId.GetSupportedPlacements was just called") - } - callInfo := struct { - Device nvml.Device - }{ - Device: device, - } - mock.lockGetSupportedPlacements.Lock() - mock.calls.GetSupportedPlacements = append(mock.calls.GetSupportedPlacements, callInfo) - mock.lockGetSupportedPlacements.Unlock() - return mock.GetSupportedPlacementsFunc(device) -} - -// GetSupportedPlacementsCalls gets all the calls that were made to GetSupportedPlacements. -// Check the length with: -// -// len(mockedVgpuTypeId.GetSupportedPlacementsCalls()) -func (mock *VgpuTypeId) GetSupportedPlacementsCalls() []struct { - Device nvml.Device -} { - var calls []struct { - Device nvml.Device - } - mock.lockGetSupportedPlacements.RLock() - calls = mock.calls.GetSupportedPlacements - mock.lockGetSupportedPlacements.RUnlock() - return calls -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 3e8e874ce..82c9a1154 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -20,8 +20,6 @@ github.com/NVIDIA/go-nvlib/pkg/pciids ## explicit; go 1.20 github.com/NVIDIA/go-nvml/pkg/dl github.com/NVIDIA/go-nvml/pkg/nvml -github.com/NVIDIA/go-nvml/pkg/nvml/mock -github.com/NVIDIA/go-nvml/pkg/nvml/mock/dgxa100 # github.com/NVIDIA/nvidia-container-toolkit v1.18.1 ## explicit; go 1.25.0 github.com/NVIDIA/nvidia-container-toolkit/internal/config/image