Documentation ¶
Index ¶
- Constants
- Variables
- func AddResourcesToNodeTreeCache(nodeName string, nodeResources types.ResourceList)
- func ConvertToBestGPURequests(podInfo *types.PodInfo) bool
- func RemoveNodeFromNodeTreeCache(nodeName string)
- func SetGPUReqs(cont *types.ContainerInfo)
- func TranslateGPUContainerResources(alloc types.ResourceList, cont types.ContainerInfo) types.ResourceList
- func TranslateGPUResources(neededGPUs int64, nodeResources types.ResourceList, ...) types.ResourceList
- func TranslatePodGPUResources(nodeInfo *types.NodeInfo, podInfo *types.PodInfo) (error, bool)
- type NvidiaGPUScheduler
- func (ns *NvidiaGPUScheduler) AddNode(nodeName string, nodeInfo *types.NodeInfo)
- func (ns *NvidiaGPUScheduler) GetName() string
- func (ns *NvidiaGPUScheduler) PodAllocate(nodeInfo *types.NodeInfo, podInfo *types.PodInfo) error
- func (ns *NvidiaGPUScheduler) PodFitsDevice(nodeInfo *types.NodeInfo, podInfo *types.PodInfo, fillAllocateFrom bool) (bool, []devicescheduler.PredicateFailureReason, float64)
- func (ns *NvidiaGPUScheduler) RemoveNode(nodeName string)
- func (ns *NvidiaGPUScheduler) ReturnPodResources(nodeInfo *types.NodeInfo, podInfo *types.PodInfo) error
- func (ns *NvidiaGPUScheduler) TakePodResources(nodeInfo *types.NodeInfo, podInfo *types.PodInfo) error
- func (ns *NvidiaGPUScheduler) UsingGroupScheduler() bool
Constants ¶
View Source
const ( // auto topology generation "0" means default (everything in its own group) GPUTopologyGeneration types.ResourceName = "gpu/gpu-generate-topology" )
Variables ¶
View Source
var NodeCacheMap = make(map[*sctypes.SortedTreeNode]treeInfo)
View Source
var NodeLocationMap = make(map[string]*sctypes.SortedTreeNode)
Functions ¶
func AddResourcesToNodeTreeCache ¶
func AddResourcesToNodeTreeCache(nodeName string, nodeResources types.ResourceList)
func ConvertToBestGPURequests ¶
find total GPUs needed
func RemoveNodeFromNodeTreeCache ¶
func RemoveNodeFromNodeTreeCache(nodeName string)
func SetGPUReqs ¶
func SetGPUReqs(cont *types.ContainerInfo)
func TranslateGPUContainerResources ¶
func TranslateGPUContainerResources(alloc types.ResourceList, cont types.ContainerInfo) types.ResourceList
func TranslateGPUResources ¶
func TranslateGPUResources(neededGPUs int64, nodeResources types.ResourceList, containerRequests types.ResourceList) types.ResourceList
TranslateGPUResources translates GPU resources to max level advertised by the node
Types ¶
type NvidiaGPUScheduler ¶
type NvidiaGPUScheduler struct { }
func (*NvidiaGPUScheduler) AddNode ¶
func (ns *NvidiaGPUScheduler) AddNode(nodeName string, nodeInfo *types.NodeInfo)
force translation to two levels
func (*NvidiaGPUScheduler) GetName ¶
func (ns *NvidiaGPUScheduler) GetName() string
func (*NvidiaGPUScheduler) PodAllocate ¶
func (*NvidiaGPUScheduler) PodFitsDevice ¶
func (ns *NvidiaGPUScheduler) PodFitsDevice(nodeInfo *types.NodeInfo, podInfo *types.PodInfo, fillAllocateFrom bool) (bool, []devicescheduler.PredicateFailureReason, float64)
func (*NvidiaGPUScheduler) RemoveNode ¶
func (ns *NvidiaGPUScheduler) RemoveNode(nodeName string)
func (*NvidiaGPUScheduler) ReturnPodResources ¶
func (*NvidiaGPUScheduler) TakePodResources ¶
func (*NvidiaGPUScheduler) UsingGroupScheduler ¶
func (ns *NvidiaGPUScheduler) UsingGroupScheduler() bool
Click to show internal directories.
Click to hide internal directories.