Documentation ¶
Index ¶
- Constants
- func AssignedNonTerminatedPod(pod *v1.Pod) bool
- func GetGPUCountInNode(node *v1.Node) int
- func GetGPUIDFromAnnotation(pod *v1.Pod) int
- func GetGPUIDFromEnv(pod *v1.Pod) int
- func GetGPUMemoryFromContainerResource(container v1.Container) int
- func GetGPUMemoryFromPodAnnotation(pod *v1.Pod) (gpuMemory uint)
- func GetGPUMemoryFromPodEnv(pod *v1.Pod) (gpuMemory uint)
- func GetGPUMemoryFromPodResource(pod *v1.Pod) int
- func GetTotalGPUMemory(node *v1.Node) int
- func GetUpdatedPodAnnotationSpec(oldPod *v1.Pod, devId int, totalGPUMemByDev int) (newPod *v1.Pod)
- func GetUpdatedPodEnvSpec(oldPod *v1.Pod, devId int, totalGPUMemByDev int) (newPod *v1.Pod)
- func IsCompletePod(pod *v1.Pod) bool
- func IsGPUSharingNode(node *v1.Node) bool
- func IsGPUsharingPod(pod *v1.Pod) bool
- func PatchPodAnnotationSpec(oldPod *v1.Pod, devId int, totalGPUMemByDev int) ([]byte, error)
Constants ¶
const ( ResourceName = "cerit.io/gpu-mem" CountName = "cerit.io/gpu-count" EnvNVGPU = "NVIDIA_VISIBLE_DEVICES" EnvResourceIndex = "CERIT_IO_GPU_MEM_IDX" EnvResourceByPod = "CERIT_IO_GPU_MEM_POD" EnvResourceByDev = "CERIT_IO_GPU_MEM_DEV" EnvAssignedFlag = "CERIT_IO_GPU_MEM_ASSIGNED" EnvResourceAssumeTime = "CERIT_IO_GPU_MEM_ASSUME_TIME" )
Variables ¶
This section is empty.
Functions ¶
func AssignedNonTerminatedPod ¶
AssignedNonTerminatedPod selects pods that are assigned and non-terminal (scheduled and running).
func GetGPUIDFromAnnotation ¶
GetGPUIDFromAnnotation gets GPU ID from Annotation
func GetGPUMemoryFromContainerResource ¶
GetGPUMemoryFromPodResource gets GPU Memory of the Container
func GetGPUMemoryFromPodAnnotation ¶
GetGPUMemoryFromPodAnnotation gets the GPU Memory of the pod, choose the larger one between gpu memory and gpu init container memory
func GetGPUMemoryFromPodEnv ¶
GetGPUMemoryFromPodEnv gets the GPU Memory of the pod, choose the larger one between gpu memory and gpu init container memory
func GetGPUMemoryFromPodResource ¶
GetGPUMemoryFromPodResource gets GPU Memory of the Pod
func GetTotalGPUMemory ¶
Get the total GPU memory of the Node
func GetUpdatedPodAnnotationSpec ¶
GetUpdatedPodAnnotationSpec updates pod env with devId
func GetUpdatedPodEnvSpec ¶
GetUpdatedPodEnvSpec updates pod env with devId
func IsCompletePod ¶
IsCompletePod determines if the pod is complete
func IsGPUsharingPod ¶
IsGPUsharingPod determines if it's the pod for GPU sharing
Types ¶
This section is empty.