plan

package
v0.0.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 4 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 mig.DeviceResourceList
}

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 mig.GPUSpecAnnotationList) 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]mig.DeviceResourceList

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 mig.DeviceResourceList) MigState

func (MigState) DeepCopy

func (s MigState) DeepCopy() MigState

func (MigState) Flatten

func (s MigState) Flatten() mig.DeviceResourceList

func (MigState) Matches

func (s MigState) Matches(specAnnotations []mig.GPUSpecAnnotation) 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