lm

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MigStrategyNone   = "none"
	MigStrategySingle = "single"
	MigStrategyMixed  = "mixed"
)

Constants representing different MIG strategies.

Variables

This section is empty.

Functions

This section is empty.

Types

type Labeler

type Labeler interface {
	Labels() (Labels, error)
}

Labeler defines an interface for generating labels

func Merge

func Merge(labelers ...Labeler) Labeler

Merge converts a set of labelers to a single composite labeler.

func NewGPUResourceLabeler

func NewGPUResourceLabeler(config *spec.Config, device resource.Device, count int) (Labeler, error)

NewGPUResourceLabeler creates a resource labeler for the specified full GPU device with the specified count

func NewGPUResourceLabelerWithoutSharing added in v0.6.1

func NewGPUResourceLabelerWithoutSharing(device resource.Device, count int) (Labeler, error)

NewGPUResourceLabelerWithoutSharing creates a resource labeler for the specified device that does not apply sharing labels.

func NewLabelers

func NewLabelers(manager resource.Manager, vgpu vgpu.Interface, config *spec.Config) (Labeler, error)

NewLabelers constructs the required labelers from the specified config

func NewMIGResourceLabeler

func NewMIGResourceLabeler(resourceName spec.ResourceName, config *spec.Config, device resource.Device, count int) (Labeler, error)

NewMIGResourceLabeler creates a resource labeler for the specified full GPU device with the specified resource name.

func NewNVMLLabeler

func NewNVMLLabeler(manager resource.Manager, config *spec.Config) (Labeler, error)

NewNVMLLabeler creates a new NVML-based labeler using the provided NVML library and config.

func NewResourceLabeler

func NewResourceLabeler(manager resource.Manager, config *spec.Config) (Labeler, error)

NewResourceLabeler creates a labeler for available GPU resources. These include full GPU labels as well as labels specific to the mig-strategy specified.

func NewTimestampLabeler

func NewTimestampLabeler(config *spec.Config) Labeler

NewTimestampLabeler creates a new label manager for generating timestamp labels from the specified config. If the noTimestamp option is set an empty label manager is returned.

func NewVGPULabeler

func NewVGPULabeler(vgpu vgpu.Interface) Labeler

NewVGPULabeler creates a new VGP label manager using the provided vgpu library and config.

type Labels

type Labels map[string]string

Labels defines a type for labels

func (Labels) Labels

func (labels Labels) Labels() (Labels, error)

Labels also implements the Labeler interface

func (Labels) Output added in v0.8.0

func (labels Labels) Output(path string, nodeFeatureAPI bool) error

Output creates labels according to the specified output format.

func (Labels) UpdateFile added in v0.8.0

func (labels Labels) UpdateFile(path string) error

UpdateFile writes labels to the specified path. The file is written atomocally

func (Labels) UpdateNodeFeatureObject added in v0.8.0

func (labels Labels) UpdateNodeFeatureObject() error

UpdateNodeFeatureObject creates/updates the node-specific NodeFeature custom resource.

func (Labels) WriteTo added in v0.7.0

func (labels Labels) WriteTo(output io.Writer) (int64, error)

WriteTo writes labels to the specified writer

type MigDeviceCounts

type MigDeviceCounts map[string]int

MigDeviceCounts maintains a count of unique MIG device types across all GPUs on a node

Jump to

Keyboard shortcuts

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