mig

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMigCapabilityDevicePaths

func GetMigCapabilityDevicePaths() (map[string]string, error)

GetMigCapabilityDevicePaths returns a mapping of MIG capability path to device node path

func GetMigDeviceNodePaths

func GetMigDeviceNodePaths(uuid string) ([]string, error)

GetMigDeviceNodePaths returns a list of device node paths associated with a MIG device

func GetMigDevicePartsByUUID

func GetMigDevicePartsByUUID(uuid string) (string, uint, uint, error)

GetMigDevicePartsByUUID returns the parent GPU UUID and GI and CI ids of the 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

Jump to

Keyboard shortcuts

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