Documentation ¶
Index ¶
- Constants
- func AssignedNonTerminatedPod(pod *v1.Pod) bool
- func GetGpuCountFromPodAnnotation(pod *v1.Pod) (gpuCount int64)
- func GetGpuCountInNode(node *v1.Node) int
- func GetGpuIdFromAnnotation(pod *v1.Pod) (id string)
- func GetGpuIdListFromAnnotation(pod *v1.Pod) (idl []int, err error)
- func GetGpuMemoryAndCountFromPodAnnotation(pod *v1.Pod) (gpuMem int64, gpuNum int64)
- func GetGpuMemoryFromPodAnnotation(pod *v1.Pod) (gpuMemory int64)
- func GetGpuModel(node *v1.Node) string
- func GetTotalGpuMemory(node *v1.Node) int64
- func GetUpdatedPodAnnotationSpec(oldPod *v1.Pod, devId string) (newPod *v1.Pod)
- func GpuIdStrToIntList(id string) (idl []int, err error)
- func IsCompletePod(pod *v1.Pod) bool
- func IsGpuSharingNode(node *v1.Node) bool
Constants ¶
const ( ResourceName = "alibabacloud.com/gpu-mem" // Pod's GPU Memory request for each GPU CountName = "alibabacloud.com/gpu-count" // Pod's GPU number request => Total GPU Memory == Resource * Count DeviceIndex = "alibabacloud.com/gpu-index" // Exists when the pod are assigned/predefined to a GPU device AssumeTime = "alibabacloud.com/assume-time" // To retrieve the scheduling latency ModelName = "alibabacloud.com/gpu-card-model" // node annotation )
Variables ¶
This section is empty.
Functions ¶
func AssignedNonTerminatedPod ¶
AssignedNonTerminatedPod selects pods that are assigned and non-terminal (scheduled and running).
func GetGpuCountFromPodAnnotation ¶
GetGpuCountFromPodAnnotation gets the GPU Count of the pod
func GetGpuCountInNode ¶
GetGpuCountInNode Get the GPU count of the node
func GetGpuIdFromAnnotation ¶
GetGpuIdFromAnnotation gets GPU ID from Annotation, could be "1" or "0-1-2-3" for multi-GPU allocations
func GetGpuIdListFromAnnotation ¶
GetGpuIdListFromAnnotation gets GPU ID List from Annotation, could be [1] or [0, 1, 2, 3] for multi-GPU allocations
func GetGpuMemoryAndCountFromPodAnnotation ¶
GetGpuMemoryAndCountFromPodAnnotation gets GPU Memory (for each GPU) and GPU Number requested by the Pod
func GetGpuMemoryFromPodAnnotation ¶
GetGpuMemoryFromPodAnnotation gets the GPU Memory of the pod
func GetGpuModel ¶
func GetTotalGpuMemory ¶
GetTotalGpuMemory Get the total GPU memory of the Node
func GetUpdatedPodAnnotationSpec ¶
GetUpdatedPodAnnotationSpec updates pod env with devId
func GpuIdStrToIntList ¶
GpuIdStrToIntList follows the string formed in func (n *GpuNodeInfo) AllocateGpuId
func IsCompletePod ¶
IsCompletePod determines if the pod is complete
func IsGpuSharingNode ¶
IsGpuSharingNode Is the Node for GPU sharing
Types ¶
This section is empty.