Documentation ¶
Overview ¶
Package base is using for HuaWei Ascend pin affinity schedule.
Package base is using for HuaWei Ascend pin affinity schedule.
Package base is using for HuaWei Ascend pin affinity schedule.
Package base is using for HuaWei Ascend pin affinity schedule.
Index ¶
- Constants
- func New(name string) plugin.ISchedulerPlugin
- type AscendHandler
- type NPUHandler
- func (tp *NPUHandler) CheckNodeNPUByTask(task *api.TaskInfo, node plugin.NPUNode) error
- func (tp *NPUHandler) GetCardNumGroupsFromTop(nodeNPUTopology []int) [][]int
- func (tp *NPUHandler) GetReHandle() interface{}
- func (tp *NPUHandler) GetTaskReqNPUNum(task *api.TaskInfo) (int, error)
- func (tp *NPUHandler) GetUsableTopFromNode(node plugin.NPUNode) ([]int, error)
- func (tp *NPUHandler) InitMyJobPlugin(attr util.SchedulerJobAttr, env plugin.ScheduleEnv) error
- func (tp *NPUHandler) JudgeNodeAndTaskNPU(taskNPU int, nodeNPUTopology []int) error
- func (tp *NPUHandler) PreStartAction(_ interface{}, ssn *framework.Session) error
- func (tp *NPUHandler) PreStopAction(env *plugin.ScheduleEnv) error
- func (tp *NPUHandler) ReleaseAnnotation(_ *api.TaskInfo, _ plugin.NPUNode) *plugin.NPUNode
- func (tp *NPUHandler) ScoreBestNPUNodes(task *api.TaskInfo, nodes []*api.NodeInfo, scoreMap map[string]float64) error
- func (tp *NPUHandler) SelectNPUFromNode(task *api.TaskInfo, node plugin.NPUNode) ([]int, error)
- func (tp *NPUHandler) SetMaxCardNPUNum(num int)
- func (tp *NPUHandler) SetMaxNodeNPUNum(num int)
- func (tp *NPUHandler) SetNPUTopologyToPodFn(task *api.TaskInfo, top []int, node plugin.NPUNode)
- func (tp *NPUHandler) SetSchedulerAttr(attr util.SchedulerJobAttr)
- func (tp *NPUHandler) SetSchedulerEnv(env plugin.ScheduleEnv)
- func (tp *NPUHandler) UpdateNodeInfo(node plugin.NPUNode, usedTop []int) *plugin.NPUNode
- func (tp *NPUHandler) UseAnnotation(task *api.TaskInfo, node plugin.NPUNode) *plugin.NPUNode
- func (tp *NPUHandler) ValidNPUJob() *api.ValidateResult
Constants ¶
const PluginName = "base"
PluginName plugin name
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AscendHandler ¶
type AscendHandler interface { plugin.ISchedulerPlugin SetSchedulerAttr(util.SchedulerJobAttr) SetSchedulerEnv(plugin.ScheduleEnv) SetMaxNodeNPUNum(int) SetMaxCardNPUNum(int) }
AscendHandler ascend npu event handler
type NPUHandler ¶
type NPUHandler struct { plugin.SchedulerPlugin util.SchedulerJobAttr plugin.ScheduleEnv ReHandle *rescheduling.ReScheduler MaxNodeNPUNum int MaxCardNPUNum int }
NPUHandler base npu handler
func (*NPUHandler) CheckNodeNPUByTask ¶
CheckNodeNPUByTask check nod npu meet task req
func (*NPUHandler) GetCardNumGroupsFromTop ¶
func (tp *NPUHandler) GetCardNumGroupsFromTop(nodeNPUTopology []int) [][]int
GetCardNumGroupsFromTop get the chip for each card from nodeTop
func (*NPUHandler) GetReHandle ¶
func (tp *NPUHandler) GetReHandle() interface{}
GetReHandle do something after schedule
func (*NPUHandler) GetTaskReqNPUNum ¶
func (tp *NPUHandler) GetTaskReqNPUNum(task *api.TaskInfo) (int, error)
GetTaskReqNPUNum get task require npu num
func (*NPUHandler) GetUsableTopFromNode ¶
func (tp *NPUHandler) GetUsableTopFromNode(node plugin.NPUNode) ([]int, error)
GetUsableTopFromNode Get ascend node usable top.
func (*NPUHandler) InitMyJobPlugin ¶
func (tp *NPUHandler) InitMyJobPlugin(attr util.SchedulerJobAttr, env plugin.ScheduleEnv) error
InitMyJobPlugin set attr and env for plugin
func (*NPUHandler) JudgeNodeAndTaskNPU ¶
func (tp *NPUHandler) JudgeNodeAndTaskNPU(taskNPU int, nodeNPUTopology []int) error
JudgeNodeAndTaskNPU judge node and task npu num
func (*NPUHandler) PreStartAction ¶
func (tp *NPUHandler) PreStartAction(_ interface{}, ssn *framework.Session) error
PreStartAction do something before schedule PreStartAction pre-processing actions for rescheduling
func (*NPUHandler) PreStopAction ¶
func (tp *NPUHandler) PreStopAction(env *plugin.ScheduleEnv) error
PreStopAction post-processing actions for re-scheduling
func (*NPUHandler) ReleaseAnnotation ¶
ReleaseAnnotation release annotation
func (*NPUHandler) ScoreBestNPUNodes ¶
func (tp *NPUHandler) ScoreBestNPUNodes(task *api.TaskInfo, nodes []*api.NodeInfo, scoreMap map[string]float64) error
ScoreBestNPUNodes score node by calculate task req npu num and node npu top
func (*NPUHandler) SelectNPUFromNode ¶
SelectNPUFromNode select npu from node for task
func (*NPUHandler) SetMaxCardNPUNum ¶
func (tp *NPUHandler) SetMaxCardNPUNum(num int)
SetMaxCardNPUNum set max npu num per card
func (*NPUHandler) SetMaxNodeNPUNum ¶
func (tp *NPUHandler) SetMaxNodeNPUNum(num int)
SetMaxNodeNPUNum set max npu num per node
func (*NPUHandler) SetNPUTopologyToPodFn ¶
SetNPUTopologyToPodFn set task select npu to pod annotation
func (*NPUHandler) SetSchedulerAttr ¶
func (tp *NPUHandler) SetSchedulerAttr(attr util.SchedulerJobAttr)
SetSchedulerAttr set scheduler attribute for plugin
func (*NPUHandler) SetSchedulerEnv ¶
func (tp *NPUHandler) SetSchedulerEnv(env plugin.ScheduleEnv)
SetSchedulerEnv set scheduler env for plugin
func (*NPUHandler) UpdateNodeInfo ¶
UpdateNodeInfo update node info
func (*NPUHandler) UseAnnotation ¶
UseAnnotation select npu for task from node
func (*NPUHandler) ValidNPUJob ¶
func (tp *NPUHandler) ValidNPUJob() *api.ValidateResult
ValidNPUJob check job req npu num