gpuresources

package
v1.44.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const CycleStateAllocateRequest = "allocateRequest"
View Source
const CycleStateGPUSchedulingResult = "gpuSchedulingResult"
View Source
const Name = "GPUResourcesFit"
View Source
const SchedulerSimulationKey = "schedulerSimulation"

Variables

This section is empty.

Functions

This section is empty.

Types

type GPUFit

type GPUFit struct {
	// contains filtered or unexported fields
}

func (*GPUFit) AddPod added in v1.44.0

func (s *GPUFit) AddPod(ctx context.Context, state fwk.CycleState, pod *v1.Pod, podInfoToAdd fwk.PodInfo, nodeInfo fwk.NodeInfo) *fwk.Status

func (*GPUFit) Filter

func (s *GPUFit) Filter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodeInfo fwk.NodeInfo) *fwk.Status

func (*GPUFit) Name

func (s *GPUFit) Name() string

func (*GPUFit) PostBind added in v1.41.5

func (s *GPUFit) PostBind(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodeName string)

func (*GPUFit) PreFilter

func (s *GPUFit) PreFilter(ctx context.Context, state fwk.CycleState, pod *v1.Pod, _ []fwk.NodeInfo) (*framework.PreFilterResult, *fwk.Status)

func (*GPUFit) PreFilterExtensions

func (s *GPUFit) PreFilterExtensions() framework.PreFilterExtensions

func (*GPUFit) RemovePod added in v1.44.0

func (s *GPUFit) RemovePod(ctx context.Context, state fwk.CycleState, pod *v1.Pod, podInfoToRemove fwk.PodInfo, nodeInfo fwk.NodeInfo) *fwk.Status

func (*GPUFit) Reserve

func (s *GPUFit) Reserve(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodeName string) *fwk.Status

func (*GPUFit) Score

func (s *GPUFit) Score(
	ctx context.Context,
	state fwk.CycleState,
	pod *v1.Pod,
	nodeInfo fwk.NodeInfo,
) (int64, *fwk.Status)

func (*GPUFit) ScoreExtensions

func (s *GPUFit) ScoreExtensions() framework.ScoreExtensions

func (*GPUFit) Unreserve

func (s *GPUFit) Unreserve(ctx context.Context, state fwk.CycleState, pod *v1.Pod, nodeName string)

type GPUSchedulingStateData

type GPUSchedulingStateData struct {
	// PreFilter stage compose valid nodes and their GPUs
	NodeGPUs map[string][]*tfv1.GPU

	// Score stage compose each node's each GPU's score,
	// node store is sum of GPU score
	ValidNodeGPUScore map[string]map[string]int

	ValidNodeNotMatchingGPUScore map[string]map[string]int

	// In Reserve stage, bind GPUs to pod, update allocator cache
	// In PostBind stage, fetch final GPUs call Pod patch API to update annotation
	FinalGPUs []string

	// Preempt pods
	PreemptPods sync.Map

	// IsPreemption
	IsPreemption bool
}

func (*GPUSchedulingStateData) Clone

type PluginFactoryFunc

type PluginFactoryFunc func(ctx context.Context, obj runtime.Object, handle framework.Handle) (framework.Plugin, error)

func NewWithDeps

func NewWithDeps(allocator *gpuallocator.GpuAllocator, client client.Client) PluginFactoryFunc

Jump to

Keyboard shortcuts

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