Documentation
¶
Overview ¶
Package nslb is using for HuaWei Ascend pin tor affinity.
Package nslb is using for HuaWei Ascend pin tor affinity.
Package nslb is using for HuaWei Ascend pin tor affinity.
Package nslb is using for HuaWei Ascend pin tor affinity.
Package nslb is using for HuaWei Ascend pin tor affinity.
Package nslb is using for HuaWei Ascend pin tor affinity.
Index ¶
- Constants
- func InitPolicyHandler(attr util.SchedulerJobAttr, env plugin.ScheduleEnv) (plugin.SchedulerPluginNeed, bool)
- type TorHandler
- func (th *TorHandler) CheckNodeNPUByTask(_ *api.TaskInfo, _ plugin.NPUNode) error
- func (th *TorHandler) GetPluginName() string
- func (th *TorHandler) InitMyJobPlugin(_ util.SchedulerJobAttr, _ plugin.ScheduleEnv) error
- func (th *TorHandler) PreStartAction(_ *framework.Session) error
- func (th *TorHandler) ReleaseAnnotation(_ *api.TaskInfo, node plugin.NPUNode) *plugin.NPUNode
- func (th *TorHandler) ScoreBestNPUNodes(_ *api.TaskInfo, _ []*api.NodeInfo, _ map[string]float64) error
- func (th *TorHandler) UseAnnotation(_ *api.TaskInfo, node plugin.NPUNode) *plugin.NPUNode
- func (th *TorHandler) ValidNPUJob() *api.ValidateResult
- type TorHandlerV1
- type TorHandlerV2
- func (th *TorHandlerV2) CheckNodeNPUByTask(task *api.TaskInfo, node plugin.NPUNode) error
- func (th *TorHandlerV2) PreStartAction(ssn *framework.Session) error
- func (th *TorHandlerV2) ScoreBestNPUNodes(task *api.TaskInfo, nodes []*api.NodeInfo, scoreMap map[string]float64) error
- func (th *TorHandlerV2) UseAnnotation(task *api.TaskInfo, node plugin.NPUNode) *plugin.NPUNode
- type TorSingleLevelHandler
Constants ¶
const ( // NormalSchema the value of normal tor affinity NormalSchema = "normal-schema" // NullTag the value means not use tor affinity NullTag = "null" // SingleLayer the single layer switch value of tor level in configmap SingleLayer = "single_layer" // TorAffinityKey the key of tor affinity TorAffinityKey = "tor-affinity" // LargeModelTag the value of large model LargeModelTag = "large-model-schema" SharedTorIp = "sharedTorIp" // TorNodeCMName the Name of tor info configmap TorNodeCMName = "basic-tor-node-cm" TorShareCMName = "tor-share-cm" // TorInfoCMKey the key of tor info in configmap TorInfoCMKey = "tor_info" // TorLevelCMKey the key of tor level in configmap TorLevelCMKey = "tor_level" )
Variables ¶
This section is empty.
Functions ¶
func InitPolicyHandler ¶
func InitPolicyHandler(attr util.SchedulerJobAttr, env plugin.ScheduleEnv) (plugin.SchedulerPluginNeed, bool)
InitPolicyHandler init nslb policy handler
Types ¶
type TorHandler ¶
type TorHandler struct {
ServerList []*plugin.Tor
Job *plugin.SchedulerJob
// contains filtered or unexported fields
}
TorHandler tor handler is a struct that handles the tor affinity job
func (*TorHandler) CheckNodeNPUByTask ¶
CheckNodeNPUByTask check nod npu meet task req
func (*TorHandler) GetPluginName ¶
func (th *TorHandler) GetPluginName() string
GetPluginName return tor handler plugin name
func (*TorHandler) InitMyJobPlugin ¶
func (th *TorHandler) InitMyJobPlugin(_ util.SchedulerJobAttr, _ plugin.ScheduleEnv) error
InitMyJobPlugin set attr and env for plugin
func (*TorHandler) PreStartAction ¶
func (th *TorHandler) PreStartAction(_ *framework.Session) error
PreStartAction pre-processing actions for rescheduling
func (*TorHandler) ReleaseAnnotation ¶
ReleaseAnnotation release annotation
func (*TorHandler) ScoreBestNPUNodes ¶
func (th *TorHandler) ScoreBestNPUNodes(_ *api.TaskInfo, _ []*api.NodeInfo, _ map[string]float64) error
ScoreBestNPUNodes score node by calculate task req npu num and node npu top
func (*TorHandler) UseAnnotation ¶
UseAnnotation select npu for task from node
func (*TorHandler) ValidNPUJob ¶
func (th *TorHandler) ValidNPUJob() *api.ValidateResult
ValidNPUJob check job req npu num
type TorHandlerV1 ¶
type TorHandlerV1 struct {
TorHandler
// contains filtered or unexported fields
}
TorHandlerV1 nslb v1 handler
func (*TorHandlerV1) CheckNodeNPUByTask ¶
CheckNodeNPUByTask check nod npu meet task req
func (*TorHandlerV1) PreStartAction ¶
func (th *TorHandlerV1) PreStartAction(ssn *framework.Session) error
PreStartAction pre-processing actions for rescheduling
type TorHandlerV2 ¶
type TorHandlerV2 struct {
TorHandler
// contains filtered or unexported fields
}
TorHandlerV2 nslb v2 handler
func (*TorHandlerV2) CheckNodeNPUByTask ¶
CheckNodeNPUByTask check nod npu meet task req
func (*TorHandlerV2) PreStartAction ¶
func (th *TorHandlerV2) PreStartAction(ssn *framework.Session) error
PreStartAction pre-processing actions for rescheduling
type TorSingleLevelHandler ¶
type TorSingleLevelHandler struct {
TorHandler
}
TorSingleLevelHandler single level tor handler
Source Files
¶
- frame.go
- nslbv1.go
- nslbv2.go
- single_layer_tor.go
- type.go
- util.go