Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNodeInitialized ¶
IsNodeInitialized checks if the GPU Partitioning on the provided node has already been initialized is initialized. A node is initialized if it has GPU Spec partitioning annotations, and according to these annotations all the GPUs of the node have at least one GPU partition.
func NewPartitioningPlanId ¶
func NewPartitioningPlanId() string
Types ¶
type Actuator ¶
type Actuator interface {
Apply(ctx context.Context, snapshot Snapshot, plan PartitioningPlan) (bool, error)
}
func NewActuator ¶
func NewActuator(client client.Client, partitioner Partitioner) Actuator
type NodeInitializer ¶
type PartitionCalculator ¶
type PartitionCalculator interface {
GetPartitioning(node PartitionableNode) state.NodePartitioning
}
type PartitionableNode ¶
type Partitioner ¶
type PartitioningPlan ¶
type PartitioningPlan struct { DesiredState state.PartitioningState // contains filtered or unexported fields }
func NewPartitioningPlan ¶
func NewPartitioningPlan(s state.PartitioningState) PartitioningPlan
func (PartitioningPlan) GetId ¶
func (p PartitioningPlan) GetId() string
type Planner ¶
type Planner interface {
Plan(ctx context.Context, snapshot Snapshot, pendingPods []v1.Pod) (PartitioningPlan, error)
}
func NewPlanner ¶
func NewPlanner(partitioner PartitionCalculator, sliceCalculator gpu.SliceCalculator, schedulerFramework framework.Framework) Planner
type SliceTracker ¶
type SliceTracker struct {
// contains filtered or unexported fields
}
SliceTracker is a utility struct for tracking the lacking GPU slices of a list of pods
func NewSliceTracker ¶
func NewSliceTracker(snapshot Snapshot, calculator gpu.SliceCalculator, pods []v1.Pod) SliceTracker
func (SliceTracker) GetLackingSlices ¶
func (t SliceTracker) GetLackingSlices() map[gpu.Slice]int
func (SliceTracker) GetRequestedSlices ¶
func (t SliceTracker) GetRequestedSlices() map[gpu.Slice]int
func (SliceTracker) Remove ¶
func (t SliceTracker) Remove(pod v1.Pod)
type Snapshot ¶
type Snapshot interface { GetPartitioningState() state.PartitioningState GetCandidateNodes() []PartitionableNode GetLackingSlices(pod v1.Pod) map[gpu.Slice]int SetNode(n PartitionableNode) Fork() error Commit() Revert() GetNode(name string) (PartitionableNode, bool) GetNodes() map[string]PartitionableNode AddPod(node string, pod v1.Pod) error Clone() Snapshot }
func NewClusterSnapshot ¶
func NewClusterSnapshot( nodes map[string]PartitionableNode, partitioner PartitionCalculator, sliceCalculator gpu.SliceCalculator, sliceFilter gpu.SliceFilter, ) Snapshot
type SnapshotTaker ¶
type SnapshotTaker interface {
TakeSnapshot(clusterState *state.ClusterState) (Snapshot, error)
}
type SorterAdapter ¶
func NewPodSorter ¶
func NewPodSorter(sliceCalculator gpu.SliceCalculator) SorterAdapter
Click to show internal directories.
Click to hide internal directories.