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 ¶
- 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) GetTaskReqNPUNum(task *api.TaskInfo) (int, error)
- func (tp *NPUHandler) GetUsableTopFromNode(node plugin.NPUNode, disFlag bool) ([]int, error)
- func (tp *NPUHandler) InitMyJobPlugin(attr util.SchedulerJobAttr, env plugin.ScheduleEnv) error
- func (tp *NPUHandler) IsInstanceOfJobGroup() bool
- func (tp *NPUHandler) IsVaildNpuNum(value int) bool
- func (tp *NPUHandler) JudgeNodeAndTaskNPU(taskNPU int, nodeNPUTopology []int) error
- func (tp *NPUHandler) PreStartAction(ssn *framework.Session) error
- func (tp *NPUHandler) ReleaseAnnotation(_ *api.TaskInfo, node 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) SetIsNetworkFaultAttention(value bool)
- 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) SetNpuNumInvalidMap(value map[int]struct{})
- 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
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AscendHandler ¶
type AscendHandler interface {
plugin.SchedulerPlugin
SetSchedulerAttr(util.SchedulerJobAttr)
SetSchedulerEnv(plugin.ScheduleEnv)
SetMaxNodeNPUNum(int)
SetMaxCardNPUNum(int)
SetNpuNumInvalidMap(map[int]struct{})
SetIsNetworkFaultAttention(bool)
}
AscendHandler ascend npu event handler
type NPUHandler ¶
type NPUHandler struct {
plugin.SchedulerBaseAttr
util.SchedulerJobAttr
plugin.ScheduleEnv
IsNetworkFaultAttention bool
NpuNumInvalidMap map[int]struct{}
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) GetTaskReqNPUNum ¶
func (tp *NPUHandler) GetTaskReqNPUNum(task *api.TaskInfo) (int, error)
GetTaskReqNPUNum get task require npu num
func (*NPUHandler) GetUsableTopFromNode ¶
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) IsInstanceOfJobGroup ¶
func (tp *NPUHandler) IsInstanceOfJobGroup() bool
IsInstanceOfJobGroup check job is instance of job-group
func (*NPUHandler) IsVaildNpuNum ¶
func (tp *NPUHandler) IsVaildNpuNum(value int) bool
IsVaildNpuNum check the single job require is valid. eg: 16P:1,2,4,8,16;8P 1,2,4,8.
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(ssn *framework.Session) error
PreStartAction pre-processing actions for rescheduling
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) SetIsNetworkFaultAttention ¶
func (tp *NPUHandler) SetIsNetworkFaultAttention(value bool)
SetIsNetworkFaultAttention set network fault attention
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) SetNpuNumInvalidMap ¶
func (tp *NPUHandler) SetNpuNumInvalidMap(value map[int]struct{})
SetNpuNumInvalidMap Set the single job not allow number. eg: 16P:9,10,11,12,13,14,15
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
type Option ¶
type Option func(AscendHandler)
Option the func for AscendHandler add attr
func WithAnnoPreVal ¶
WithAnnoPreVal build AscendHandler WithAnnoPreVal
func WithMaxNodeNum ¶
WithMaxNodeNum build AscendHandler WithMaxNodeNum
func WithNetworkFault ¶
WithNetworkFault build AscendHandler WithNetworkFault
Source Files
¶
- frame.go
- node.go
- task.go
- type.go