algorithm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: MIT Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type AlgoAffinityGroup

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

type Cell

type Cell interface {
	GetChain() CellChain
	GetLevel() CellLevel
	GetPriority() CellPriority
	SetPriority(CellPriority)
	GetName() string
	GetParent() Cell
	SetParent(Cell)
	GetChildren() CellList
	SetChildren(CellList)
}

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 CellChain

type CellChain string // name of a cell chain (type of the top-level cell)

type CellLevel

type CellLevel int32 // starts from 1

type CellList

type CellList []Cell

CellList is a list of cells at a certain level of a chain.

func (CellList) String

func (cl CellList) String() string

type CellPriority

type CellPriority int32

type CellRequest

type CellRequest struct {
	VC            api.VirtualClusterName
	ReservationId api.ReservationId
	Chain         CellChain
	Level         CellLevel
	Priority      CellPriority
}

type ChainCellList

type ChainCellList map[CellLevel]CellList

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) 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) 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
}

func NewHivedAlgorithm

func NewHivedAlgorithm(sConfig *api.Config) *HivedAlgorithm

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) 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) *PhysicalCell

func (*PhysicalCell) AddPod

func (c *PhysicalCell) AddPod(pod types.UID)

func (*PhysicalCell) ClearPhysicalCellList

func (c *PhysicalCell) ClearPhysicalCellList()

func (*PhysicalCell) DeletePod

func (c *PhysicalCell) DeletePod(pod types.UID)

func (*PhysicalCell) GetName

func (c *PhysicalCell) GetName() string

func (*PhysicalCell) GetPhysicalCellList

func (c *PhysicalCell) GetPhysicalCellList() ChainCellList

func (*PhysicalCell) GetPhysicalPlacement

func (c *PhysicalCell) GetPhysicalPlacement() ([]string, []int32)

func (*PhysicalCell) GetPhysicalPlacementString

func (c *PhysicalCell) GetPhysicalPlacementString() string

func (*PhysicalCell) GetVirtualCell

func (c *PhysicalCell) GetVirtualCell() *VirtualCell

func (*PhysicalCell) HasPod

func (c *PhysicalCell) HasPod() bool

func (*PhysicalCell) InitPhysicalCellList

func (c *PhysicalCell) InitPhysicalCellList()

func (*PhysicalCell) IsReserved

func (c *PhysicalCell) IsReserved() bool

func (*PhysicalCell) SetPhysicalResources

func (c *PhysicalCell) SetPhysicalResources(nodes []string, gpuIndices []int32)

func (*PhysicalCell) SetReserved

func (c *PhysicalCell) SetReserved(reserved 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, 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) 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) SetReservation

func (c *VirtualCell) SetReservation(rid api.ReservationId)

Jump to

Keyboard shortcuts

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