Documentation ¶
Index ¶
- Constants
- Variables
- func AddGPUIndexPatch(ids []int) string
- func GetGPUIndex(pod *v1.Pod) []int
- func RemoveGPUIndexPatch() string
- 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 ( // VolcanoGPUResource extended gpu resource VolcanoGPUResource = "volcano.sh/gpu-memory" // VolcanoGPUNumber virtual GPU card number VolcanoGPUNumber = "volcano.sh/gpu-number" // 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" )
Variables ¶
View Source
var GpuNumberEnable bool
View Source
var GpuSharingEnable bool
View Source
var NodeLockEnable bool
Functions ¶
func AddGPUIndexPatch ¶
AddGPUIndexPatch returns the patch adding GPU index
func GetGPUIndex ¶
GetGPUIndex returns the index list of gpu cards
func RemoveGPUIndexPatch ¶
func RemoveGPUIndexPatch() string
RemoveGPUIndexPatch returns the patch removing GPU index
Types ¶
type GPUDevice ¶
type GPUDevice struct { // GPU ID ID int // The pods that are sharing this GPU PodMap map[string]*v1.Pod // memory per card Memory 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
GetIgnoredDevices return device names which wish vc-scheduler to ignore
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.