plan

package
v0.0.0-...-12e0a72 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOperation

type CreateOperation struct {
	// MigProfile corresponds to the profile(s) that need to be created
	MigProfile mig.Profile
	// Quantity is the amount of MigProfiles that need to be created
	Quantity int
}

type CreateOperationList

type CreateOperationList []CreateOperation

func (CreateOperationList) Equal

func (CreateOperationList) Flatten

func (c CreateOperationList) Flatten() mig.ProfileList

type DeleteOperation

type DeleteOperation struct {
	// Resources are the MIG resources that needs to be deleted
	Resources gpu.DeviceList
}

func (DeleteOperation) Equal

func (o DeleteOperation) Equal(other DeleteOperation) bool

func (DeleteOperation) GetMigProfileName

func (o DeleteOperation) GetMigProfileName() mig.ProfileName

type DeleteOperationList

type DeleteOperationList []DeleteOperation

func (DeleteOperationList) Equal

type MigConfigPlan

type MigConfigPlan struct {
	DeleteOperations DeleteOperationList
	CreateOperations CreateOperationList
}

func NewMigConfigPlan

func NewMigConfigPlan(state MigState, desired gpu.SpecAnnotationList) MigConfigPlan

func (*MigConfigPlan) Equal

func (p *MigConfigPlan) Equal(other *MigConfigPlan) bool

func (*MigConfigPlan) IsEmpty

func (p *MigConfigPlan) IsEmpty() bool

type MigState

type MigState map[int]gpu.DeviceList

MigState represents the current state in terms of MIG resources of each GPU (which index is stored as key in the map)

func NewMigState

func NewMigState(resources gpu.DeviceList) MigState

func (MigState) DeepCopy

func (s MigState) DeepCopy() MigState

func (MigState) Flatten

func (s MigState) Flatten() gpu.DeviceList

func (MigState) Matches

func (s MigState) Matches(specAnnotations gpu.SpecAnnotationList) bool

func (MigState) WithoutMigProfiles

func (s MigState) WithoutMigProfiles(gpuIndex int, migProfiles []mig.ProfileName) MigState

WithoutMigProfiles returns the state obtained after removing all the resources matching the MIG profiles on the GPU index provided as inputs

type OperationStatus

type OperationStatus struct {
	// PluginRestartRequired indicates if the operation execution requires the NVIDIA device plugin to be restarted
	PluginRestartRequired bool
	// Err corresponds to any error generated by the operation execution
	Err error
}

OperationStatus represents the outcome of the execution of an operation

Jump to

Keyboard shortcuts

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