Documentation ¶
Index ¶
- func CellEqual(c1 Cell, c2 Cell) bool
- func NewTopologyAwareScheduler(ccl ChainCellList, levelGpuNum map[CellLevel]int32, crossPriorityPack bool, ...) *topologyAwareScheduler
- func ParseConfig(sConfig *api.Config) (map[CellChain]ChainCellList, map[CellChain]map[CellLevel]int32, ...)
- type AlgoAffinityGroup
- type Cell
- type CellChain
- type CellLevel
- type CellList
- type CellPriority
- type ChainCellList
- type GenericCell
- func (c *GenericCell) AtOrHigherThanNode() bool
- func (c *GenericCell) GetChain() CellChain
- func (c *GenericCell) GetChildren() CellList
- func (c *GenericCell) GetLevel() CellLevel
- func (c *GenericCell) GetParent() Cell
- func (c *GenericCell) GetPriority() CellPriority
- func (c *GenericCell) GetTotalGpuNum() int32
- func (c *GenericCell) GetUsedGpuNumAtPriorities() map[CellPriority]int32
- func (c *GenericCell) IncreaseUsedGpuNumAtPriority(p CellPriority, delta int32)
- func (c *GenericCell) SetChildren(children CellList)
- func (c *GenericCell) SetParent(p Cell)
- func (c *GenericCell) SetPriority(p CellPriority)
- type HivedAlgorithm
- func (h *HivedAlgorithm) AddAllocatedPod(pod *core.Pod)
- func (h *HivedAlgorithm) AddNode(node *core.Node)
- func (h *HivedAlgorithm) DeleteAllocatedPod(pod *core.Pod)
- func (h *HivedAlgorithm) DeleteNode(node *core.Node)
- func (h *HivedAlgorithm) GetAffinityGroup(name string) api.AffinityGroup
- func (h *HivedAlgorithm) GetAffinityGroups() api.AffinityGroupList
- func (h *HivedAlgorithm) Schedule(pod *core.Pod, suggestedNodes []string) internal.PodScheduleResult
- func (h *HivedAlgorithm) UpdateNode(oldNode, newNode *core.Node)
- type PhysicalCell
- func (c *PhysicalCell) AddAffinityGroup(g *AlgoAffinityGroup)
- func (c *PhysicalCell) DeleteAffinityGroup(g *AlgoAffinityGroup)
- func (c *PhysicalCell) GetAffinityGroup() *AlgoAffinityGroup
- func (c *PhysicalCell) GetName() string
- func (c *PhysicalCell) GetPhysicalPlacement() ([]string, []int32)
- func (c *PhysicalCell) GetPhysicalPlacementString() string
- func (c *PhysicalCell) GetPreBoundVirtualCell() *VirtualCell
- func (c *PhysicalCell) GetVirtualCell() *VirtualCell
- func (c *PhysicalCell) IsReserved() bool
- func (c *PhysicalCell) IsSplit() bool
- func (c *PhysicalCell) SetPhysicalResources(nodes []string, gpuIndices []int32)
- func (c *PhysicalCell) SetPreBoundVirtualCell(vc *VirtualCell)
- func (c *PhysicalCell) SetReserved(reserved bool)
- func (c *PhysicalCell) SetSplit(split bool)
- func (c *PhysicalCell) SetVirtualCell(vc *VirtualCell)
- type VirtualCell
- func (c *VirtualCell) GetIndex() int32
- func (c *VirtualCell) GetName() string
- func (c *VirtualCell) GetPhysicalCell() *PhysicalCell
- func (c *VirtualCell) GetPreAssignedCell() *VirtualCell
- func (c *VirtualCell) GetPreBoundPhysicalCell() *PhysicalCell
- func (c *VirtualCell) SetIndex(i int32)
- func (c *VirtualCell) SetPhysicalCell(pc *PhysicalCell)
- func (c *VirtualCell) SetPreAssignedCell(vc *VirtualCell)
- func (c *VirtualCell) SetPreBoundPhysicalCell(pc *PhysicalCell)
- func (c *VirtualCell) SetReservation(rid api.ReservationId)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTopologyAwareScheduler ¶ added in v0.2.0
func NewTopologyAwareScheduler(ccl ChainCellList, levelGpuNum map[CellLevel]int32, crossPriorityPack bool, considerSuggestedNodes bool) *topologyAwareScheduler
NewTopologyAwareScheduler initializes the scheduler by extracting node-level cells (lower-level if no node-level) from a chain cell list.
func ParseConfig ¶
func ParseConfig(sConfig *api.Config) ( map[CellChain]ChainCellList, map[CellChain]map[CellLevel]int32, map[string][]CellChain, map[CellChain]map[CellLevel]api.CellType, map[api.VirtualClusterName]map[CellChain]ChainCellList, map[api.VirtualClusterName]map[api.ReservationId]ChainCellList, map[api.VirtualClusterName]map[api.ReservationId]*PhysicalCell, )
Types ¶
type AlgoAffinityGroup ¶
type AlgoAffinityGroup struct {
// contains filtered or unexported fields
}
AlgoAffinityGroup is the algorithm-internal representation of an affinity group.
func (*AlgoAffinityGroup) ToAffinityGroup ¶ added in v0.2.4
func (aag *AlgoAffinityGroup) ToAffinityGroup() api.AffinityGroup
type Cell ¶
type Cell interface { GetChain() CellChain GetLevel() CellLevel GetPriority() CellPriority SetPriority(CellPriority) GetName() string GetParent() Cell SetParent(Cell) GetChildren() CellList SetChildren(CellList) AtOrHigherThanNode() bool GetTotalGpuNum() int32 GetUsedGpuNumAtPriorities() map[CellPriority]int32 IncreaseUsedGpuNumAtPriority(CellPriority, int32) }
A Cell represents a set of GPUs affinitized by their interconnection topology. Cells are organized as a tree through pointers to their parents / children.
type CellPriority ¶
type CellPriority int32
type ChainCellList ¶
ChainCellList maps each level in a chain to a CellList.
func NewChainCellList ¶
func NewChainCellList(top CellLevel) ChainCellList
func (ChainCellList) String ¶
func (ccl ChainCellList) String() string
type GenericCell ¶
type GenericCell struct {
// contains filtered or unexported fields
}
func (*GenericCell) AtOrHigherThanNode ¶ added in v0.2.0
func (c *GenericCell) AtOrHigherThanNode() bool
func (*GenericCell) GetChain ¶
func (c *GenericCell) GetChain() CellChain
func (*GenericCell) GetChildren ¶
func (c *GenericCell) GetChildren() CellList
func (*GenericCell) GetLevel ¶
func (c *GenericCell) GetLevel() CellLevel
func (*GenericCell) GetParent ¶
func (c *GenericCell) GetParent() Cell
func (*GenericCell) GetPriority ¶
func (c *GenericCell) GetPriority() CellPriority
func (*GenericCell) GetTotalGpuNum ¶ added in v0.2.0
func (c *GenericCell) GetTotalGpuNum() int32
func (*GenericCell) GetUsedGpuNumAtPriorities ¶ added in v0.2.0
func (c *GenericCell) GetUsedGpuNumAtPriorities() map[CellPriority]int32
func (*GenericCell) IncreaseUsedGpuNumAtPriority ¶ added in v0.2.0
func (c *GenericCell) IncreaseUsedGpuNumAtPriority(p CellPriority, delta int32)
func (*GenericCell) SetChildren ¶
func (c *GenericCell) SetChildren(children CellList)
func (*GenericCell) SetParent ¶
func (c *GenericCell) SetParent(p Cell)
func (*GenericCell) SetPriority ¶
func (c *GenericCell) SetPriority(p CellPriority)
type HivedAlgorithm ¶
type HivedAlgorithm struct {
// contains filtered or unexported fields
}
HivedAlgorithm implements an internal.SchedulerAlgorithm. It schedules pods using the algorithm of HiveD. Note that the topologyAwareScheduler used in this struct is not another implementation of SchedulerAlgorithm; that is a specific algorithm for pod placement, used in intra-VC scheduling and opportunistic pod scheduling.
func NewHivedAlgorithm ¶
func NewHivedAlgorithm(sConfig *api.Config) *HivedAlgorithm
NewHivedAlgorithm initializes a HivedAlgorithm from the config file
func (*HivedAlgorithm) AddAllocatedPod ¶
func (h *HivedAlgorithm) AddAllocatedPod(pod *core.Pod)
func (*HivedAlgorithm) AddNode ¶
func (h *HivedAlgorithm) AddNode(node *core.Node)
func (*HivedAlgorithm) DeleteAllocatedPod ¶
func (h *HivedAlgorithm) DeleteAllocatedPod(pod *core.Pod)
func (*HivedAlgorithm) DeleteNode ¶
func (h *HivedAlgorithm) DeleteNode(node *core.Node)
func (*HivedAlgorithm) GetAffinityGroup ¶ added in v0.2.4
func (h *HivedAlgorithm) GetAffinityGroup(name string) api.AffinityGroup
func (*HivedAlgorithm) GetAffinityGroups ¶ added in v0.2.4
func (h *HivedAlgorithm) GetAffinityGroups() api.AffinityGroupList
func (*HivedAlgorithm) Schedule ¶
func (h *HivedAlgorithm) Schedule(pod *core.Pod, suggestedNodes []string) internal.PodScheduleResult
func (*HivedAlgorithm) UpdateNode ¶
func (h *HivedAlgorithm) UpdateNode(oldNode, newNode *core.Node)
type PhysicalCell ¶
type PhysicalCell struct { GenericCell // contains filtered or unexported fields }
PhysicalCell defines a cell in the physical cluster.
func NewPhysicalCell ¶
func NewPhysicalCell(c CellChain, l CellLevel, g bool, n int32) *PhysicalCell
func (*PhysicalCell) AddAffinityGroup ¶ added in v0.2.0
func (c *PhysicalCell) AddAffinityGroup(g *AlgoAffinityGroup)
func (*PhysicalCell) DeleteAffinityGroup ¶ added in v0.2.0
func (c *PhysicalCell) DeleteAffinityGroup(g *AlgoAffinityGroup)
func (*PhysicalCell) GetAffinityGroup ¶ added in v0.2.0
func (c *PhysicalCell) GetAffinityGroup() *AlgoAffinityGroup
func (*PhysicalCell) GetName ¶
func (c *PhysicalCell) GetName() string
func (*PhysicalCell) GetPhysicalPlacement ¶
func (c *PhysicalCell) GetPhysicalPlacement() ([]string, []int32)
func (*PhysicalCell) GetPhysicalPlacementString ¶
func (c *PhysicalCell) GetPhysicalPlacementString() string
func (*PhysicalCell) GetPreBoundVirtualCell ¶ added in v0.2.0
func (c *PhysicalCell) GetPreBoundVirtualCell() *VirtualCell
func (*PhysicalCell) GetVirtualCell ¶
func (c *PhysicalCell) GetVirtualCell() *VirtualCell
func (*PhysicalCell) IsReserved ¶
func (c *PhysicalCell) IsReserved() bool
func (*PhysicalCell) IsSplit ¶ added in v0.2.0
func (c *PhysicalCell) IsSplit() bool
func (*PhysicalCell) SetPhysicalResources ¶
func (c *PhysicalCell) SetPhysicalResources(nodes []string, gpuIndices []int32)
func (*PhysicalCell) SetPreBoundVirtualCell ¶ added in v0.2.0
func (c *PhysicalCell) SetPreBoundVirtualCell(vc *VirtualCell)
func (*PhysicalCell) SetReserved ¶
func (c *PhysicalCell) SetReserved(reserved bool)
func (*PhysicalCell) SetSplit ¶ added in v0.2.0
func (c *PhysicalCell) SetSplit(split bool)
func (*PhysicalCell) SetVirtualCell ¶
func (c *PhysicalCell) SetVirtualCell(vc *VirtualCell)
type VirtualCell ¶
type VirtualCell struct { GenericCell // contains filtered or unexported fields }
VirtualCell defines a cell in a VC.
func NewVirtualCell ¶
func NewVirtualCell(vc api.VirtualClusterName, c CellChain, l CellLevel, g bool, n int32, i int32, pac *VirtualCell) *VirtualCell
func (*VirtualCell) GetIndex ¶
func (c *VirtualCell) GetIndex() int32
func (*VirtualCell) GetName ¶
func (c *VirtualCell) GetName() string
func (*VirtualCell) GetPhysicalCell ¶
func (c *VirtualCell) GetPhysicalCell() *PhysicalCell
func (*VirtualCell) GetPreAssignedCell ¶
func (c *VirtualCell) GetPreAssignedCell() *VirtualCell
func (*VirtualCell) GetPreBoundPhysicalCell ¶ added in v0.2.0
func (c *VirtualCell) GetPreBoundPhysicalCell() *PhysicalCell
func (*VirtualCell) SetIndex ¶
func (c *VirtualCell) SetIndex(i int32)
func (*VirtualCell) SetPhysicalCell ¶
func (c *VirtualCell) SetPhysicalCell(pc *PhysicalCell)
func (*VirtualCell) SetPreAssignedCell ¶
func (c *VirtualCell) SetPreAssignedCell(vc *VirtualCell)
func (*VirtualCell) SetPreBoundPhysicalCell ¶ added in v0.2.0
func (c *VirtualCell) SetPreBoundPhysicalCell(pc *PhysicalCell)
func (*VirtualCell) SetReservation ¶
func (c *VirtualCell) SetReservation(rid api.ReservationId)