Documentation ¶
Index ¶
- Constants
- Variables
- func NewClient() (kubernetes.Interface, error)
- type ContainerDevice
- type ContainerDeviceRequest
- type ContainerDevices
- type GPUDevice
- type GPUDevices
- func (gs *GPUDevices) AddResource(pod *v1.Pod)
- func (gs *GPUDevices) Allocate(kubeClient kubernetes.Interface, pod *v1.Pod) error
- func (gs *GPUDevices) FilterNode(pod *v1.Pod) (int, string, error)
- func (gs *GPUDevices) GetIgnoredDevices() []string
- func (gs *GPUDevices) GetStatus() string
- func (gs *GPUDevices) HasDeviceRequest(pod *v1.Pod) bool
- func (gs *GPUDevices) Release(kubeClient kubernetes.Interface, pod *v1.Pod) error
- func (gs *GPUDevices) SubResource(pod *v1.Pod)
Constants ¶
View Source
const ( GPUInUse = "nvidia.com/use-gputype" GPUNoUse = "nvidia.com/nouse-gputype" AssignedTimeAnnotations = "volcano.sh/vgpu-time" AssignedIDsAnnotations = "volcano.sh/vgpu-ids-new" AssignedIDsToAllocateAnnotations = "volcano.sh/devices-to-allocate" AssignedNodeAnnotations = "volcano.sh/vgpu-node" BindTimeAnnotations = "volcano.sh/bind-time" DeviceBindPhase = "volcano.sh/bind-phase" NvidiaGPUDevice = "NVIDIA" // VolcanoVGPUMemory extended gpu memory VolcanoVGPUMemory = "volcano.sh/vgpu-memory" // VolcanoVGPUMemoryPercentage extends gpu memory VolcanoVGPUMemoryPercentage = "volcano.sh/vgpu-memory-percentage" // VolcanoVGPUCores indicates utilization percentage of vgpu VolcanoVGPUCores = "volcano.sh/vgpu-cores" // VolcanoVGPUNumber virtual GPU card number VolcanoVGPUNumber = "volcano.sh/vgpu-number" // VolcanoVGPURegister virtual gpu information registered from device-plugin to scheduler VolcanoVGPURegister = "volcano.sh/node-vgpu-register" // VolcanoVGPUHandshake for vgpu VolcanoVGPUHandshake = "volcano.sh/node-vgpu-handshake" // PredicateTime is the key of predicate time PredicateTime = "volcano.sh/predicate-time" // GPUIndex is the key of gpu index GPUIndex = "volcano.sh/gpu-index" // UnhealthyGPUIDs list of unhealthy gpu ids UnhealthyGPUIDs = "volcano.sh/gpu-unhealthy-ids" // DeviceName used to indicate this device DeviceName = "vgpu4pd" )
Variables ¶
View Source
var NodeLockEnable bool
View Source
var VGPUEnable bool
Functions ¶
Types ¶
type ContainerDevice ¶
type ContainerDeviceRequest ¶
type ContainerDevices ¶
type ContainerDevices []ContainerDevice
type GPUDevice ¶
type GPUDevice struct { // GPU ID ID int // GPU Unique ID UUID string // The pods that are sharing this GPU PodMap map[string]*v1.Pod // memory per card Memory uint // max sharing number Number uint // type of this number Type string // Health condition of this GPU Health bool // number of allocated UsedNum uint // number of device memory allocated UsedMem uint // number of core used UsedCore uint }
GPUDevice include gpu id, memory and the pods that are sharing it.
type GPUDevices ¶
func NewGPUDevices ¶
func NewGPUDevices(name string, node *v1.Node) *GPUDevices
func (*GPUDevices) AddResource ¶
func (gs *GPUDevices) AddResource(pod *v1.Pod)
AddResource adds the pod to GPU pool if it is assigned
func (*GPUDevices) Allocate ¶
func (gs *GPUDevices) Allocate(kubeClient kubernetes.Interface, pod *v1.Pod) error
func (*GPUDevices) FilterNode ¶
func (*GPUDevices) GetIgnoredDevices ¶
func (gs *GPUDevices) GetIgnoredDevices() []string
func (*GPUDevices) GetStatus ¶
func (gs *GPUDevices) GetStatus() string
func (*GPUDevices) HasDeviceRequest ¶
func (gs *GPUDevices) HasDeviceRequest(pod *v1.Pod) bool
func (*GPUDevices) Release ¶
func (gs *GPUDevices) Release(kubeClient kubernetes.Interface, pod *v1.Pod) error
func (*GPUDevices) SubResource ¶
func (gs *GPUDevices) SubResource(pod *v1.Pod)
SubResource frees the gpu hold by the pod
Click to show internal directories.
Click to hide internal directories.