v1

package
v0.1.0-rc4 Latest Latest
Warning

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

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

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=gpustack.llmos.ai

+k8s:deepcopy-gen=package +groupName=gpustack.llmos.ai

+k8s:deepcopy-gen=package +groupName=gpustack.llmos.ai

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var (
	// DeviceInitialized indicates whether the GPU device has been initialized
	DeviceInitialized condition.Cond = "Initialized"
)
View Source
var (
	GPUDeviceResourceName = "gpudevices"
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: gpustack.GroupName, Version: "v1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type GPUDevice

type GPUDevice struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   GPUDeviceSpec   `json:"spec,omitempty"`
	Status GPUDeviceStatus `json:"status,omitempty"`
}

GPUDevice describes a GPU accelerator device

func NewGPUDevice

func NewGPUDevice(namespace, name string, obj GPUDevice) *GPUDevice

func (*GPUDevice) DeepCopy

func (in *GPUDevice) DeepCopy() *GPUDevice

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUDevice.

func (*GPUDevice) DeepCopyInto

func (in *GPUDevice) DeepCopyInto(out *GPUDevice)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GPUDevice) DeepCopyObject

func (in *GPUDevice) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GPUDeviceInfo

type GPUDeviceInfo struct {
	// UUID is the GPU Device UUID
	UUID string `json:"uuid,omitempty"`
	// Index is the index of the GPU device
	Index *int `json:"index,omitempty"`
	// Vendor is the vendor name of the GPU device
	Vendor string `json:"vendor,omitempty"`
	// DevName is the name of the GPU device
	DevName string `json:"devName,omitempty"`
	// MaxCount is the maximum number of splitter instances that can be created from this GPU
	MaxCount int32 `json:"maxCount,omitempty"`
	// VRAM is the amount of video RAM in MB
	VRAM int32 `json:"vram,omitempty"`
	// CUDACores is the number of CUDA cores available on the GPU device
	CUDACores int32 `json:"cudaCores,omitempty"`
	// DevCores is the total percentage number of cores available on the GPU
	DevCores int32 `json:"devCores,omitempty"`
	// Numa is the NUMA node where the GPU device is located
	Numa int `json:"numa,omitempty"`
	// Health indicates whether the GPU device is healthy
	Health bool `json:"health,omitempty"`
}

func (*GPUDeviceInfo) DeepCopy

func (in *GPUDeviceInfo) DeepCopy() *GPUDeviceInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUDeviceInfo.

func (*GPUDeviceInfo) DeepCopyInto

func (in *GPUDeviceInfo) DeepCopyInto(out *GPUDeviceInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GPUDeviceList

type GPUDeviceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []GPUDevice `json:"items"`
}

GPUDeviceList is a list of GPUDevice resources

func (*GPUDeviceList) DeepCopy

func (in *GPUDeviceList) DeepCopy() *GPUDeviceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUDeviceList.

func (*GPUDeviceList) DeepCopyInto

func (in *GPUDeviceList) DeepCopyInto(out *GPUDeviceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GPUDeviceList) DeepCopyObject

func (in *GPUDeviceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GPUDeviceSpec

type GPUDeviceSpec struct {
}

GPUDeviceSpec defines the desired state of GPUDevice

func (*GPUDeviceSpec) DeepCopy

func (in *GPUDeviceSpec) DeepCopy() *GPUDeviceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUDeviceSpec.

func (*GPUDeviceSpec) DeepCopyInto

func (in *GPUDeviceSpec) DeepCopyInto(out *GPUDeviceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GPUDeviceStatus

type GPUDeviceStatus struct {
	Conditions []common.Condition `json:"conditions,omitempty"`
	// NodeName is the name of the node where the GPU device is located
	NodeName string `json:"nodeName,omitempty"`
	// InternalIP is the internal IP address of the node where the GPU device is located
	InternalIP string `json:"internalIP,omitempty"`
	// GPUDeviceInfo is the information of the GPU device
	GPUDeviceInfo `json:",inline"`
	// Pods is the list of pods that are using this GPU device
	Pods []GPUPod `json:"pods,omitempty"`
	// State describes the current state of the GPU device
	State string `json:"state,omitempty"`
}

GPUDeviceStatus defines the observed state of GPUDevice

func (*GPUDeviceStatus) DeepCopy

func (in *GPUDeviceStatus) DeepCopy() *GPUDeviceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUDeviceStatus.

func (*GPUDeviceStatus) DeepCopyInto

func (in *GPUDeviceStatus) DeepCopyInto(out *GPUDeviceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GPUPod

type GPUPod struct {
	// Name is the namespace:name of the pod, e.g. "default:my-pod"
	Name string `json:"name"`
	// MemReq is the amount of memory requested by the pod
	MemReq int32 `json:"memReq,omitempty"`
	// MemPercentageReq is the percentage of memory requested by the pod
	MemPercentageReq int32 `json:"memPercentageReq,omitempty"`
	// CoresReq is the number of cores requested by the pod
	CoresReq int32 `json:"coresReq,omitempty"`
}

func (*GPUPod) DeepCopy

func (in *GPUPod) DeepCopy() *GPUPod

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUPod.

func (*GPUPod) DeepCopyInto

func (in *GPUPod) DeepCopyInto(out *GPUPod)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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