Documentation
¶
Index ¶
- func GetMigCapabilityDevicePaths() (map[string]string, error)
- func GetMigDeviceNodePaths(uuid string) ([]string, error)
- func GetMigDevicePartsByUUID(uuid string) (string, uint, uint, error)
- type DeviceInfo
- func (devices *DeviceInfo) AssertAllMigEnabledDevicesAreValid(uniform bool) error
- func (devices *DeviceInfo) GetAllMigDevices() ([]*nvml.Device, error)
- func (devices *DeviceInfo) GetDevicesWithMigDisabled() ([]*nvml.Device, error)
- func (devices *DeviceInfo) GetDevicesWithMigEnabled() ([]*nvml.Device, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMigCapabilityDevicePaths ¶
GetMigCapabilityDevicePaths returns a mapping of MIG capability path to device node path
func GetMigDeviceNodePaths ¶
GetMigDeviceNodePaths returns a list of device node paths associated with a MIG device
Types ¶
type DeviceInfo ¶
type DeviceInfo struct {
// contains filtered or unexported fields
}
DeviceInfo stores information about all devices on the node
func NewDeviceInfo ¶
func NewDeviceInfo() *DeviceInfo
NewDeviceInfo creates a new DeviceInfo struct and returns a pointer to it.
func (*DeviceInfo) AssertAllMigEnabledDevicesAreValid ¶
func (devices *DeviceInfo) AssertAllMigEnabledDevicesAreValid(uniform bool) error
AssertAllMigEnabledDevicesAreValid ensures that all devices with migEnabled=true are valid. This means: * They have at least 1 mig devices associated with them * If (uniform == true) all MIG devices are associated with the same profile Returns nil if the device is valid, or an error if these are not valid
func (*DeviceInfo) GetAllMigDevices ¶
func (devices *DeviceInfo) GetAllMigDevices() ([]*nvml.Device, error)
GetAllMigDevices returns a list of all MIG devices.
func (*DeviceInfo) GetDevicesWithMigDisabled ¶
func (devices *DeviceInfo) GetDevicesWithMigDisabled() ([]*nvml.Device, error)
GetDevicesWithMigDisabled returns a list of devices with migEnabled=false
func (*DeviceInfo) GetDevicesWithMigEnabled ¶
func (devices *DeviceInfo) GetDevicesWithMigEnabled() ([]*nvml.Device, error)
GetDevicesWithMigEnabled returns a list of devices with migEnabled=true