Documentation
¶
Index ¶
- func CreateClockSpeedDevice(graphicsClock uint32, graphicsClockRet nvml.Return, memClock uint32, ...) device.Device
- func CreateGPMSampleDevice(uuid string, sampleGetRet nvml.Return) device.Device
- func CreateGPMSupportedDevice(uuid string, gpmDeviceSupport nvml.GpmSupport, gpmDeviceSupportRet nvml.Return) device.Device
- func CreateGSPFirmwareDevice(uuid string, gspEnabled bool, gspSupported bool, gspFirmwareRet nvml.Return) device.Device
- func CreateMemoryDevice(uuid string, memoryV2 nvml.Memory_v2, memoryV2Ret nvml.Return, ...) device.Device
- func CreatePersistenceModeDevice(uuid string, persistenceMode nvml.EnableState, persistenceModeRet nvml.Return) device.Device
- type MockDevice
- func (d *MockDevice) GetArchitectureAsString() (string, error)
- func (d *MockDevice) GetBoardId() (uint32, nvml.Return)
- func (d *MockDevice) GetBrandAsString() (string, error)
- func (d *MockDevice) GetCudaComputeCapabilityAsString() (string, error)
- func (d *MockDevice) GetFabricState() (device.FabricState, error)
- func (d *MockDevice) GetMigDevices() ([]nvlibdevice.MigDevice, error)
- func (d *MockDevice) GetMigProfiles() ([]nvlibdevice.MigProfile, error)
- func (d *MockDevice) GetMinorNumber() (int, nvml.Return)
- func (d *MockDevice) GetPCIBusID() (string, error)
- func (d *MockDevice) GetSerial() (string, nvml.Return)
- func (d *MockDevice) IsCoherent() (bool, error)
- func (d *MockDevice) IsFabricAttached() (bool, error)
- func (d *MockDevice) IsMigCapable() (bool, error)
- func (d *MockDevice) IsMigEnabled() (bool, error)
- func (d *MockDevice) PCIBusID() string
- func (d *MockDevice) UUID() string
- func (d *MockDevice) VisitMigDevices(func(j int, m nvlibdevice.MigDevice) error) error
- func (d *MockDevice) VisitMigProfiles(func(p nvlibdevice.MigProfile) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClockSpeedDevice ¶
func CreateClockSpeedDevice(graphicsClock uint32, graphicsClockRet nvml.Return, memClock uint32, memClockRet nvml.Return, uuid string) device.Device
CreateClockSpeedDevice creates a new mock device specifically for clock speed testing
func CreateGPMSampleDevice ¶
CreateGPMSampleDevice creates a mock device for GPM sample testing
func CreateGPMSupportedDevice ¶
func CreateGPMSupportedDevice( uuid string, gpmDeviceSupport nvml.GpmSupport, gpmDeviceSupportRet nvml.Return, ) device.Device
CreateGPMSupportedDevice creates a mock device for GPM support testing
func CreateGSPFirmwareDevice ¶
func CreateGSPFirmwareDevice( uuid string, gspEnabled bool, gspSupported bool, gspFirmwareRet nvml.Return, ) device.Device
CreateGSPFirmwareDevice creates a new mock device specifically for GSP firmware tests
func CreateMemoryDevice ¶
func CreateMemoryDevice(uuid string, memoryV2 nvml.Memory_v2, memoryV2Ret nvml.Return, memory nvml.Memory, memoryRet nvml.Return) device.Device
CreateMemoryDevice creates a new mock device specifically for memory tests
func CreatePersistenceModeDevice ¶
func CreatePersistenceModeDevice( uuid string, persistenceMode nvml.EnableState, persistenceModeRet nvml.Return, ) device.Device
CreatePersistenceModeDevice creates a new mock device for persistence mode testing
Types ¶
type MockDevice ¶
type MockDevice struct {
*mock.Device
Architecture string
Brand string
CudaComputeCapability string
BusID string
DeviceUUID string
Serial string
MinorNumber int
BoardID uint32
}
func NewMockDevice ¶
func NewMockDevice(device *mock.Device, architecture, brand, cudaComputeCapability, pciBusID string) *MockDevice
NewMockDevice creates a new mock device with the given parameters
func NewMockDeviceWithIDs ¶
func NewMockDeviceWithIDs(device *mock.Device, architecture, brand, cudaComputeCapability, pciBusID, uuid, serial string, minorNumber int, boardID uint32) *MockDevice
NewMockDeviceWithIDs creates a new mock device with the given parameters including serial and minor number
func (*MockDevice) GetArchitectureAsString ¶
func (d *MockDevice) GetArchitectureAsString() (string, error)
func (*MockDevice) GetBoardId ¶
func (d *MockDevice) GetBoardId() (uint32, nvml.Return)
func (*MockDevice) GetBrandAsString ¶
func (d *MockDevice) GetBrandAsString() (string, error)
func (*MockDevice) GetCudaComputeCapabilityAsString ¶
func (d *MockDevice) GetCudaComputeCapabilityAsString() (string, error)
func (*MockDevice) GetFabricState ¶
func (d *MockDevice) GetFabricState() (device.FabricState, error)
func (*MockDevice) GetMigDevices ¶
func (d *MockDevice) GetMigDevices() ([]nvlibdevice.MigDevice, error)
func (*MockDevice) GetMigProfiles ¶
func (d *MockDevice) GetMigProfiles() ([]nvlibdevice.MigProfile, error)
func (*MockDevice) GetMinorNumber ¶
func (d *MockDevice) GetMinorNumber() (int, nvml.Return)
func (*MockDevice) GetPCIBusID ¶
func (d *MockDevice) GetPCIBusID() (string, error)
func (*MockDevice) IsCoherent ¶
func (d *MockDevice) IsCoherent() (bool, error)
func (*MockDevice) IsFabricAttached ¶
func (d *MockDevice) IsFabricAttached() (bool, error)
func (*MockDevice) IsMigCapable ¶
func (d *MockDevice) IsMigCapable() (bool, error)
func (*MockDevice) IsMigEnabled ¶
func (d *MockDevice) IsMigEnabled() (bool, error)
func (*MockDevice) PCIBusID ¶
func (d *MockDevice) PCIBusID() string
func (*MockDevice) UUID ¶
func (d *MockDevice) UUID() string
func (*MockDevice) VisitMigDevices ¶
func (d *MockDevice) VisitMigDevices(func(j int, m nvlibdevice.MigDevice) error) error
func (*MockDevice) VisitMigProfiles ¶
func (d *MockDevice) VisitMigProfiles(func(p nvlibdevice.MigProfile) error) error
Click to show internal directories.
Click to hide internal directories.