gpudeviceresource

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResetResourcesMsg  = "reset node gpu resources"
	UpdateResourcesMsg = "node gpu resources from device"
	UpdateLabelsMsg    = "node gpu labels from device"

	NeedSyncForResourceDiffMsg = "gpu resource diff is big than threshold"
	NeedSyncForGPUModelMsgFmt  = "gpu device label %s changed"
)
View Source
const PluginName = "GPUDeviceResource"

Variables

View Source
var (
	// ResourceNames are the known resources reconciled by the plugin from devices to nodes.
	// TODO: support custom resources.
	ResourceNames = []corev1.ResourceName{
		extension.ResourceGPU,
		extension.ResourceGPUCore,
		extension.ResourceGPUMemory,
		extension.ResourceGPUMemoryRatio,
		extension.ResourceGPUShared,
	}
	// Labels are the known labels reconciled by the plugin from devices to nodes.
	Labels = []string{
		extension.LabelGPUModel,
		extension.LabelGPUDriverVersion,
	}
)

Functions

This section is empty.

Types

type DeviceHandler

type DeviceHandler struct{}

func (*DeviceHandler) Create

func (*DeviceHandler) Delete

func (*DeviceHandler) Generic

func (*DeviceHandler) Update

type Plugin

type Plugin struct{}

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) NeedSync

func (p *Plugin) NeedSync(strategy *configuration.ColocationStrategy, oldNode, newNode *corev1.Node) (bool, string)

func (*Plugin) NeedSyncMeta

func (p *Plugin) NeedSyncMeta(_ *configuration.ColocationStrategy, oldNode, newNode *corev1.Node) (bool, string)

func (*Plugin) Prepare

func (*Plugin) Reset

func (p *Plugin) Reset(node *corev1.Node, message string) []framework.ResourceItem

func (*Plugin) Setup

func (p *Plugin) Setup(opt *framework.Option) error

Jump to

Keyboard shortcuts

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