testutil

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClockSpeedDevice added in v0.4.3

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

Types

type MockDevice added in v0.4.3

type MockDevice struct {
	*mock.Device
	Architecture          string
	Brand                 string
	CudaComputeCapability string
	PCIBusID              string
}

func NewMockDevice added in v0.4.3

func NewMockDevice(device *mock.Device, architecture, brand, cudaComputeCapability, pciBusID string) *MockDevice

NewMockDevice creates a new mock device with the given parameters

func (*MockDevice) GetArchitectureAsString added in v0.4.3

func (d *MockDevice) GetArchitectureAsString() (string, error)

func (*MockDevice) GetBrandAsString added in v0.4.3

func (d *MockDevice) GetBrandAsString() (string, error)

func (*MockDevice) GetCudaComputeCapabilityAsString added in v0.4.3

func (d *MockDevice) GetCudaComputeCapabilityAsString() (string, error)

func (*MockDevice) GetMigDevices added in v0.4.3

func (d *MockDevice) GetMigDevices() ([]device.MigDevice, error)

func (*MockDevice) GetMigProfiles added in v0.4.3

func (d *MockDevice) GetMigProfiles() ([]device.MigProfile, error)

func (*MockDevice) GetPCIBusID added in v0.4.3

func (d *MockDevice) GetPCIBusID() (string, error)

func (*MockDevice) IsFabricAttached added in v0.4.3

func (d *MockDevice) IsFabricAttached() (bool, error)

func (*MockDevice) IsMigCapable added in v0.4.3

func (d *MockDevice) IsMigCapable() (bool, error)

func (*MockDevice) IsMigEnabled added in v0.4.3

func (d *MockDevice) IsMigEnabled() (bool, error)

func (*MockDevice) VisitMigDevices added in v0.4.3

func (d *MockDevice) VisitMigDevices(func(j int, m device.MigDevice) error) error

func (*MockDevice) VisitMigProfiles added in v0.4.3

func (d *MockDevice) VisitMigProfiles(func(p device.MigProfile) error) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL