nvidia

package
v0.0.0-...-f849f17 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OptimisticLockErrorMsg = "the object has been modified; please apply your changes to the latest version and try again"

	EnvResourceIndex           = "OPENXPU_XPU_SHARES_INDEX"
	EnvResourceByPod           = "OPENXPU_XPU_SHARES_POD"
	EnvResourceByContainer     = "OPENXPU_XPU_SHARES"
	EnvResourceByDev           = "OPENXPU_XPU_SHARES_TOTAL"
	EnvAssignedFlag            = "OPENXPU_XPU_SHARES_ALLOCATED"
	EnvResourceAssumeTime      = "OPENXPU_XPU_SHARES_FILTER_STAMP"
	EnvResourceAssignTime      = "OPENXPU_XPU_SHARES_ALLOCATED_STAMP"
	EnvNodeLabelForDisableCGPU = "xpu.disable.isolation"

	GiBPrefix    = ShareUnit("GiB")
	MiBPrefix    = ShareUnit("MiB")
	XPUShareUnit = 1000
)

Variables

This section is empty.

Functions

func NewSharedGPUManager

func NewSharedGPUManager(enableMPS, healthCheck bool, bp ShareUnit) *sharedGPUManager

func StackTrace

func StackTrace(all bool) string

Types

type NvidiaDevicePlugin

type NvidiaDevicePlugin struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

NvidiaDevicePlugin implements the Kubernetes device plugin API

func NewNvidiaDevicePlugin

func NewNvidiaDevicePlugin(mps, healthCheck bool) (*NvidiaDevicePlugin, error)

NewNvidiaDevicePlugin returns an initialized NvidiaDevicePlugin

func (*NvidiaDevicePlugin) Allocate

Allocate which return list of devices.

func (*NvidiaDevicePlugin) GetDeviceNameByIndex

func (m *NvidiaDevicePlugin) GetDeviceNameByIndex(index uint) (name string, found bool)

func (*NvidiaDevicePlugin) GetDevicePluginOptions

func (*NvidiaDevicePlugin) ListAndWatch

ListAndWatch lists devices and update that list according to the health status

func (*NvidiaDevicePlugin) Register

func (m *NvidiaDevicePlugin) Register(kubeletEndpoint, resourceName string) error

Register registers the device plugin for the given resourceName with Kubelet.

func (*NvidiaDevicePlugin) Serve

func (m *NvidiaDevicePlugin) Serve() error

Serve starts the gRPC server and register the device plugin to Kubelet

func (*NvidiaDevicePlugin) Start

func (m *NvidiaDevicePlugin) Start() error

Start starts the gRPC server of the device plugin

func (*NvidiaDevicePlugin) Stop

func (m *NvidiaDevicePlugin) Stop() error

Stop stops the gRPC server

type ShareUnit

type ShareUnit string

ShareUnit describes GPU Share

Jump to

Keyboard shortcuts

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