Documentation ¶
Index ¶
- Constants
- Variables
- func ParseConfig(fs *flag.FlagSet)
- type CambriconDevices
- func (dev *CambriconDevices) AssertNuma(annos map[string]string) bool
- func (dev *CambriconDevices) CheckHealth(devType string, n *corev1.Node) (bool, bool)
- func (dev *CambriconDevices) CheckType(annos map[string]string, d util.DeviceUsage, n util.ContainerDeviceRequest) (bool, bool, bool)
- func (dev *CambriconDevices) CheckUUID(annos map[string]string, d util.DeviceUsage) bool
- func (dev *CambriconDevices) CommonWord() string
- func (dev *CambriconDevices) GenerateResourceRequests(ctr *corev1.Container) util.ContainerDeviceRequest
- func (dev *CambriconDevices) GetNodeDevices(n corev1.Node) ([]*api.DeviceInfo, error)
- func (dev *CambriconDevices) LockNode(n *corev1.Node, p *corev1.Pod) error
- func (dev *CambriconDevices) MutateAdmission(ctr *corev1.Container) (bool, error)
- func (dev *CambriconDevices) NodeCleanUp(nn string) error
- func (dev *CambriconDevices) PatchAnnotations(annoinput *map[string]string, pd util.PodDevices) map[string]string
- func (dev *CambriconDevices) ReleaseNodeLock(n *corev1.Node, p *corev1.Pod) error
Constants ¶
View Source
const ( CambriconMLUDevice = "MLU" CambriconMLUCommonWord = "MLU" MluMemSplitLimit = "CAMBRICON_SPLIT_MEMS" MluMemSplitIndex = "CAMBRICON_SPLIT_VISIBLE_DEVICES" MluMemSplitEnable = "CAMBRICON_SPLIT_ENABLE" MLUInUse = "cambricon.com/use-mlutype" MLUNoUse = "cambricon.com/nouse-mlutype" // MLUUseUUID is user can use specify MLU device for set MLU UUID. MLUUseUUID = "cambricon.com/use-gpuuuid" // MLUNoUseUUID is user can not use specify MLU device for set MLU UUID. MLUNoUseUUID = "cambricon.com/nouse-gpuuuid" DsmluLockTime = "cambricon.com/dsmlu.lock" DsmluProfile = "CAMBRICON_DSMLU_PROFILE" DsmluResourceAssigned = "CAMBRICON_DSMLU_ASSIGHED" )
Variables ¶
View Source
var ( MLUResourceCount string MLUResourceMemory string MLUResourceCores string )
Functions ¶
func ParseConfig ¶
Types ¶
type CambriconDevices ¶
type CambriconDevices struct { }
func InitMLUDevice ¶
func InitMLUDevice() *CambriconDevices
func (*CambriconDevices) AssertNuma ¶
func (dev *CambriconDevices) AssertNuma(annos map[string]string) bool
func (*CambriconDevices) CheckHealth ¶
func (*CambriconDevices) CheckType ¶
func (dev *CambriconDevices) CheckType(annos map[string]string, d util.DeviceUsage, n util.ContainerDeviceRequest) (bool, bool, bool)
func (*CambriconDevices) CheckUUID ¶
func (dev *CambriconDevices) CheckUUID(annos map[string]string, d util.DeviceUsage) bool
func (*CambriconDevices) CommonWord ¶
func (dev *CambriconDevices) CommonWord() string
func (*CambriconDevices) GenerateResourceRequests ¶
func (dev *CambriconDevices) GenerateResourceRequests(ctr *corev1.Container) util.ContainerDeviceRequest
func (*CambriconDevices) GetNodeDevices ¶
func (dev *CambriconDevices) GetNodeDevices(n corev1.Node) ([]*api.DeviceInfo, error)
func (*CambriconDevices) MutateAdmission ¶
func (dev *CambriconDevices) MutateAdmission(ctr *corev1.Container) (bool, error)
func (*CambriconDevices) NodeCleanUp ¶
func (dev *CambriconDevices) NodeCleanUp(nn string) error
func (*CambriconDevices) PatchAnnotations ¶
func (dev *CambriconDevices) PatchAnnotations(annoinput *map[string]string, pd util.PodDevices) map[string]string
func (*CambriconDevices) ReleaseNodeLock ¶
Click to show internal directories.
Click to hide internal directories.