Documentation ¶
Index ¶
- Constants
- type Labeler
- func Merge(labelers ...Labeler) Labeler
- func NewGPUResourceLabeler(config *spec.Config, device resource.Device, count int) (Labeler, error)
- func NewGPUResourceLabelerWithoutSharing(device resource.Device, count int) (Labeler, error)
- func NewLabelers(manager resource.Manager, vgpu vgpu.Interface, config *spec.Config) (Labeler, error)
- func NewMIGResourceLabeler(resourceName spec.ResourceName, config *spec.Config, device resource.Device, ...) (Labeler, error)
- func NewNVMLLabeler(manager resource.Manager, config *spec.Config) (Labeler, error)
- func NewResourceLabeler(manager resource.Manager, config *spec.Config) (Labeler, error)
- func NewTimestampLabeler(config *spec.Config) Labeler
- func NewVGPULabeler(vgpu vgpu.Interface) Labeler
- type Labels
- type MigDeviceCounts
Constants ¶
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 ¶
Labeler defines an interface for generating labels
func NewGPUResourceLabeler ¶
NewGPUResourceLabeler creates a resource labeler for the specified full GPU device with the specified count
func NewGPUResourceLabelerWithoutSharing ¶ added in v0.6.1
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 ¶
NewNVMLLabeler creates a new NVML-based labeler using the provided NVML library and config.
func NewResourceLabeler ¶
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 ¶
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 ¶
NewVGPULabeler creates a new VGP label manager using the provided vgpu library and config.
type Labels ¶
Labels defines a type for labels
func (Labels) WriteToFile ¶
WriteToFile writes labels to the specified path. The file is written atomocally
type MigDeviceCounts ¶
MigDeviceCounts maintains a count of unique MIG device types across all GPUs on a node