cambricon

package
v0.37.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

func ParseConfig(fs *flag.FlagSet)

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 (dev *CambriconDevices) CheckHealth(devType string, n *corev1.Node) (bool, bool)

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) LockNode

func (dev *CambriconDevices) LockNode(n *corev1.Node, p *corev1.Pod) 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

func (dev *CambriconDevices) ReleaseNodeLock(n *corev1.Node, p *corev1.Pod) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL