gpudevice

package
v0.1.0-rc7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	LLMOSPrefix         = "llmos.ai"
	LabelGPUNodeRoleKey = LLMOSPrefix + "/gpu-node"

	GPUStackPrefix   = "gpustack.llmos.ai"
	LabelNodeNameKey = GPUStackPrefix + "/node-name"

	NodeHandshakeAnnotation = "volcano.sh/node-vgpu-handshake"
	AssignedNodeAnnotations = "volcano.sh/vgpu-node"
)

Variables

This section is empty.

Functions

func ParseDeviceInfo

func ParseDeviceInfo(devInfo *autils.DeviceInfo) gpustackv1.GPUDeviceInfo

func Register

func Register(_ context.Context, mgmt *config.Management) error

Types

type GPUDevice

type GPUDevice struct {
	PodName   string `json:"podName"`
	Index     int    `json:"index"`
	Vendor    string `json:"vendor,omitempty"`
	UUID      string `json:"uuid,omitempty"`
	UsedMem   int32  `json:"usedMem,omitempty"`
	UsedCores int32  `json:"usedCores,omitempty"`
}

type NodeDeviceInfo

type NodeDeviceInfo struct {
	Annotations map[string]string
}

type NodeDeviceThreadSafeCache

type NodeDeviceThreadSafeCache struct {
	// contains filtered or unexported fields
}

NodeDeviceThreadSafeCache is a structure to hold the cache

func NewThreadSafeCache

func NewThreadSafeCache() *NodeDeviceThreadSafeCache

NewThreadSafeCache initializes a new cache of NodeDeviceInfo

func (*NodeDeviceThreadSafeCache) Delete

func (c *NodeDeviceThreadSafeCache) Delete(key string)

Delete removes a key from the cache in a thread-safe way

func (*NodeDeviceThreadSafeCache) Get

Get retrieves a value from the cache in a thread-safe way

func (*NodeDeviceThreadSafeCache) Set

func (c *NodeDeviceThreadSafeCache) Set(key string, value NodeDeviceInfo)

Set adds or updates a value in the cache in a thread-safe way

Jump to

Keyboard shortcuts

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