Documentation ¶
Overview ¶
Package vnpu is using for HuaWei Ascend pin vnpu allocation.
Package vnpu is using for HuaWei Ascend pin vnpu allocation.
Package vnpu is using for HuaWei Ascend pin vnpu allocation.
Package vnpu is using for HuaWei Ascend pin vnpu allocation.
Package vnpu is using for HuaWei Ascend pin vnpu allocation.
Package vnpu is using for HuaWei Ascend pin vnpu allocation.
Index ¶
- Constants
- func GetSegmentFailureTaskIDs(ssn *framework.Session, namespace string) []api.TaskID
- type Action
- type DynamicVNPU
- func (tp *DynamicVNPU) GetTemplateByResReq(taskResReq util.VResource, vt VTemplate) (string, error)
- func (tp *DynamicVNPU) ReleaseAnnotation(task *api.TaskInfo, node plugin.NPUNode) *plugin.NPUNode
- func (tp *DynamicVNPU) ScoreBestNPUNodes(task *api.TaskInfo, nodes []*api.NodeInfo, scoreMap map[string]float64) error
- func (tp *DynamicVNPU) SetNPUTopologyToPodFn(task *api.TaskInfo, node plugin.NPUNode, taskResReq util.VResource, ...)
- func (tp *DynamicVNPU) UpdateNodeInfo(node plugin.NPUNode, allocChipID string, taskResReq util.VResource) *plugin.NPUNode
- func (tp *DynamicVNPU) UpdateNodeInfoSegment(node plugin.NPUNode, allocChipID string, taskResReq util.VResource) *plugin.NPUNode
- func (tp *DynamicVNPU) UpdateNodeInfoWhole(node plugin.NPUNode, allocChipIDs string) *plugin.NPUNode
- func (tp *DynamicVNPU) UseAnnotation(task *api.TaskInfo, node plugin.NPUNode, taskResReq util.VResource, ...) *plugin.NPUNode
- type StaticVNPU
- func (tp *StaticVNPU) CheckNodeNPUByTask(task *api.TaskInfo, node plugin.NPUNode, _ util.VResource) error
- func (tp *StaticVNPU) ScoreBestNPUNodes(task *api.TaskInfo, _ []*api.NodeInfo, scoreMap map[string]float64) error
- func (tp *StaticVNPU) UseAnnotation(task *api.TaskInfo, node plugin.NPUNode, _ util.VResource, _ VTemplate) *plugin.NPUNode
- type VTemplate
- type VirtualNPU
- func (tp *VirtualNPU) CheckNodeNPUByDyTask(task *api.TaskInfo, node plugin.NPUNode, taskResReq util.VResource) error
- func (tp *VirtualNPU) GetTaskResource(task *api.TaskInfo, node plugin.NPUNode) (util.VResource, error)
- func (tp *VirtualNPU) IsNodeHasDifferentUnFinishedTask(taskInfo *api.TaskInfo, nodeInf plugin.NPUNode, taskResReq util.VResource) error
Constants ¶
const ( // PodEventMsgNoResourceFailed dp pod segment failed msg for not enough resource. PodEventMsgNoResourceFailed = "NoNPUResource" // PodEventMsgDyCutFailed dp pod segment failed msg for DCMI failed. PodEventMsgDyCutFailed = "NPUSegmentFailed" // PodEventReasonAllocateFailed dp pod segment failed reason PodEventReasonAllocateFailed = "UnexpectedAdmissionError" // DyCutFailedError for device-plugin cut failed error. DyCutFailedError = "chipDyCutErr" // PodEventTypeAllocateFailed dp pod segment failed type PodEventTypeAllocateFailed = "Warning" // Ascend310PCard test name of Ascend310P Ascend310PCard = "Ascend310P-8" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DynamicVNPU ¶
type DynamicVNPU struct { DowngradeCache map[string][]string // taskName: nodes // for Concurrent task. not same core request task only has one on a node in same time. // nodeName: templateName:taskUID ConCache map[string]map[string]map[api.TaskID]struct{} // contains filtered or unexported fields }
DynamicVNPU dynamic VNPU struct.
func (*DynamicVNPU) GetTemplateByResReq ¶
GetTemplateByResReq get template by resource request.
func (*DynamicVNPU) ReleaseAnnotation ¶
ReleaseAnnotation release Annotation, in dy is release ConCache.
func (*DynamicVNPU) ScoreBestNPUNodes ¶
func (tp *DynamicVNPU) ScoreBestNPUNodes(task *api.TaskInfo, nodes []*api.NodeInfo, scoreMap map[string]float64) error
ScoreBestNPUNodes node with the least free resource would be sorted to higher rank
func (*DynamicVNPU) SetNPUTopologyToPodFn ¶
func (tp *DynamicVNPU) SetNPUTopologyToPodFn(task *api.TaskInfo, node plugin.NPUNode, taskResReq util.VResource, allocChipID string, chipVTemplate VTemplate)
SetNPUTopologyToPodFn write chip to pod annotation AscendNPUCore
func (*DynamicVNPU) UpdateNodeInfo ¶
func (tp *DynamicVNPU) UpdateNodeInfo(node plugin.NPUNode, allocChipID string, taskResReq util.VResource) *plugin.NPUNode
UpdateNodeInfo vnpu update npuNode after allocation
func (*DynamicVNPU) UpdateNodeInfoSegment ¶
func (tp *DynamicVNPU) UpdateNodeInfoSegment(node plugin.NPUNode, allocChipID string, taskResReq util.VResource) *plugin.NPUNode
UpdateNodeInfoSegment vnpu update npuNode after allocation for segmentation tasks
func (*DynamicVNPU) UpdateNodeInfoWhole ¶
func (tp *DynamicVNPU) UpdateNodeInfoWhole(node plugin.NPUNode, allocChipIDs string) *plugin.NPUNode
UpdateNodeInfoWhole vnpu update npuNode after allocation for whole card tasks
type StaticVNPU ¶
type StaticVNPU struct {
// contains filtered or unexported fields
}
StaticVNPU Static VNPU struct.
func (*StaticVNPU) CheckNodeNPUByTask ¶
func (tp *StaticVNPU) CheckNodeNPUByTask(task *api.TaskInfo, node plugin.NPUNode, _ util.VResource) error
CheckNodeNPUByTask pass for static
func (*StaticVNPU) ScoreBestNPUNodes ¶
func (tp *StaticVNPU) ScoreBestNPUNodes(task *api.TaskInfo, _ []*api.NodeInfo, scoreMap map[string]float64) error
ScoreBestNPUNodes pass for static
type VirtualNPU ¶
type VirtualNPU struct { StaticByConf bool VT VTemplate StaticVNPU DynamicVNPU }
VirtualNPU vnpu struct
func (*VirtualNPU) CheckNodeNPUByDyTask ¶
func (tp *VirtualNPU) CheckNodeNPUByDyTask(task *api.TaskInfo, node plugin.NPUNode, taskResReq util.VResource) error
CheckNodeNPUByDyTask check chip on node has enough resource, fault chips are not in list, unstable excluded
func (*VirtualNPU) GetTaskResource ¶
func (tp *VirtualNPU) GetTaskResource(task *api.TaskInfo, node plugin.NPUNode) (util.VResource, error)
GetTaskResource get vTask used resource.
func (*VirtualNPU) IsNodeHasDifferentUnFinishedTask ¶
func (tp *VirtualNPU) IsNodeHasDifferentUnFinishedTask(taskInfo *api.TaskInfo, nodeInf plugin.NPUNode, taskResReq util.VResource) error
IsNodeHasDifferentUnFinishedTask judge the node wither has the different template unfinished job.