Documentation
¶
Index ¶
- type ComputeUtilization
- type DataResponse
- type DeviceInfo
- type DeviceSpec
- type ErrorResponse
- type GPUUsageMetrics
- type IsolationMode
- type LimiterInfo
- type ListLimitersResponse
- type ListPodsResponse
- type ListProcessesResponse
- type MemoryUtilization
- type MessageAndDataResponse
- type Mount
- type NodeInfo
- type PodInfo
- type ProcessInfo
- type ProcessInformation
- type StatusResponse
- type TrapResponse
- type VirtualizationCapabilities
- type WorkerAllocation
- type WorkerInfo
- type WorkerMetrics
- type WorkerStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ComputeUtilization ¶
ComputeUtilization represents compute utilization for a process on a device DEPRECATED: Use ProcessInformation instead
type DataResponse ¶
type DataResponse[T any] struct { Data T `json:"data"` }
DataResponse is a generic response wrapper for data-only responses +k8s:deepcopy-gen=false
type DeviceInfo ¶
type DeviceInfo struct {
UUID string
Vendor string
Model string
Index int32
NUMANode int32
TotalMemoryBytes uint64
MaxTflops float64
VirtualizationCapabilities VirtualizationCapabilities
Properties map[string]string
Healthy bool
ParentUUID string
// Host - Guest device node mapping, eg /dev/nvidia0 -> /dev/nvidia0
// When multiple device allocated, deduplicated by device node
DeviceNode map[string]string
// Env to inject to guest
DeviceEnv map[string]string
IsolationMode IsolationMode
}
DeviceInfo represents discovered GPU device information +k8s:deepcopy-gen=true
func (*DeviceInfo) DeepCopy ¶
func (in *DeviceInfo) DeepCopy() *DeviceInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceInfo.
func (*DeviceInfo) DeepCopyInto ¶
func (in *DeviceInfo) DeepCopyInto(out *DeviceInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeviceSpec ¶
type DeviceSpec struct {
GuestPath string `json:"guestPath,omitempty"`
HostPath string `json:"hostPath,omitempty"`
Permissions string `json:"permissions,omitempty"`
}
DeviceSpec specifies a host device to mount into a container. +k8s:deepcopy-gen=true
func (*DeviceSpec) DeepCopy ¶
func (in *DeviceSpec) DeepCopy() *DeviceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeviceSpec.
func (*DeviceSpec) DeepCopyInto ¶
func (in *DeviceSpec) DeepCopyInto(out *DeviceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
ErrorResponse represents an error response
type GPUUsageMetrics ¶
type GPUUsageMetrics struct {
DeviceUUID string
MemoryBytes uint64
MemoryPercentage float64
ComputePercentage float64
ComputeTflops float64
Rx float64 // PCIe RX in KB
Tx float64 // PCIe TX in KB
Temperature float64
PowerUsage int64 // in watts
ExtraMetrics map[string]float64
}
GPUUsageMetrics represents GPU device metrics +k8s:deepcopy-gen=true
func (*GPUUsageMetrics) DeepCopy ¶
func (in *GPUUsageMetrics) DeepCopy() *GPUUsageMetrics
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GPUUsageMetrics.
func (*GPUUsageMetrics) DeepCopyInto ¶
func (in *GPUUsageMetrics) DeepCopyInto(out *GPUUsageMetrics)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IsolationMode ¶
type IsolationMode = tfv1.IsolationModeType
IsolationMode represents the isolation mode for worker processes
type LimiterInfo ¶
type LimiterInfo struct {
WorkerUID string `json:"worker_uid"`
Requests *tfv1.Resource `json:"requests,omitempty"`
Limits *tfv1.Resource `json:"limits,omitempty"`
}
LimiterInfo represents worker limiter information (used in legacy.go)
type ListLimitersResponse ¶
type ListLimitersResponse struct {
Limiters []LimiterInfo `json:"limiters"`
}
ListLimitersResponse represents the response from GET /api/v1/limiter (used in legacy.go)
type ListPodsResponse ¶
type ListPodsResponse struct {
Pods []PodInfo `json:"pods"`
}
ListPodsResponse represents the response from GET /api/v1/pod (used in legacy.go)
type ListProcessesResponse ¶
type ListProcessesResponse struct {
Processes []ProcessInfo `json:"processes"`
}
ListProcessesResponse represents the response from GET /api/v1/process (used in legacy.go)
type MemoryUtilization ¶
type MemoryUtilization struct {
ProcessID string
DeviceUUID string
UsedBytes uint64
ReservedBytes uint64
}
MemoryUtilization represents memory utilization for a process on a device DEPRECATED: Use ProcessInformation instead
type MessageAndDataResponse ¶
MessageAndDataResponse is a generic response wrapper for responses with message and data
type Mount ¶
type Mount struct {
GuestPath string `json:"guestPath,omitempty"`
HostPath string `json:"hostPath,omitempty"`
}
Mount specifies a host volume to mount into a container. where device library or tools are installed on host and container +k8s:deepcopy-gen=true
func (*Mount) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mount.
func (*Mount) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodInfo ¶
type PodInfo struct {
PodName string `json:"pod_name"`
Namespace string `json:"namespace"`
GPUIDs []string `json:"gpu_uuids"`
TflopsLimit *float64 `json:"tflops_limit,omitempty"`
VramLimit *uint64 `json:"vram_limit,omitempty"`
QoSLevel tfv1.QoSLevel `json:"qos_level,omitempty"`
}
PodInfo represents pod information for the /api/v1/pod endpoint (used in legacy.go)
type ProcessInfo ¶
type ProcessInfo struct {
WorkerUID string `json:"worker_uid"`
ProcessMapping map[string]string `json:"process_mapping"` // container PID -> host PID
}
ProcessInfo represents process mapping information (used in legacy.go)
type ProcessInformation ¶
type ProcessInformation struct {
ProcessID string
DeviceUUID string
ComputeUtilizationPercent float64
ActiveSMs uint64
TotalSMs uint64
MemoryUsedBytes uint64
MemoryReservedBytes uint64
MemoryUtilizationPercent float64
}
ProcessInformation represents combined compute and memory utilization for a process on a device This follows AMD SMI style API design, combining both metrics in a single structure +k8s:deepcopy-gen=true
func (*ProcessInformation) DeepCopy ¶
func (in *ProcessInformation) DeepCopy() *ProcessInformation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProcessInformation.
func (*ProcessInformation) DeepCopyInto ¶
func (in *ProcessInformation) DeepCopyInto(out *ProcessInformation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatusResponse ¶
type StatusResponse struct {
Status string `json:"status"`
}
StatusResponse represents a simple status response
type TrapResponse ¶
type TrapResponse struct {
Message string `json:"message"`
SnapshotCount int `json:"snapshot_count"`
}
TrapResponse represents the response from POST /api/v1/trap (used in legacy.go)
type VirtualizationCapabilities ¶
type VirtualizationCapabilities struct {
SupportsPartitioning bool
SupportsSoftIsolation bool
SupportsHardIsolation bool
SupportsSnapshot bool
SupportsMetrics bool
MaxPartitions uint32
MaxWorkersPerDevice uint32
}
VirtualizationCapabilities represents virtualization capabilities +k8s:deepcopy-gen=true
func (*VirtualizationCapabilities) DeepCopy ¶
func (in *VirtualizationCapabilities) DeepCopy() *VirtualizationCapabilities
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualizationCapabilities.
func (*VirtualizationCapabilities) DeepCopyInto ¶
func (in *VirtualizationCapabilities) DeepCopyInto(out *VirtualizationCapabilities)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkerAllocation ¶
type WorkerAllocation struct {
WorkerInfo *WorkerInfo
// the complete or partitioned device info
DeviceInfos []*DeviceInfo
Envs map[string]string
Mounts []*Mount
Devices []*DeviceSpec
}
+k8s:deepcopy-gen=true
func (*WorkerAllocation) DeepCopy ¶
func (in *WorkerAllocation) DeepCopy() *WorkerAllocation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerAllocation.
func (*WorkerAllocation) DeepCopyInto ¶
func (in *WorkerAllocation) DeepCopyInto(out *WorkerAllocation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkerInfo ¶
type WorkerInfo struct {
WorkerUID string
Namespace string
WorkerName string
AllocatedDevices []string
Status WorkerStatus
QoS tfv1.QoSLevel
IsolationMode IsolationMode
Requests tfv1.Resource
Limits tfv1.Resource
WorkloadName string
WorkloadNamespace string
// Only set for partitioned mode
PartitionTemplateID string
// Extra information from backend
Labels map[string]string
Annotations map[string]string
DeletedAt int64
}
+k8s:deepcopy-gen=true
func (*WorkerInfo) DeepCopy ¶
func (in *WorkerInfo) DeepCopy() *WorkerInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerInfo.
func (*WorkerInfo) DeepCopyInto ¶
func (in *WorkerInfo) DeepCopyInto(out *WorkerInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkerInfo) Description ¶
func (w *WorkerInfo) Description() string
Description returns the display description for the worker in list views
func (*WorkerInfo) FilterValue ¶
func (w *WorkerInfo) FilterValue() string
func (*WorkerInfo) Title ¶
func (w *WorkerInfo) Title() string
Title returns the display title for the worker in list views
type WorkerMetrics ¶
type WorkerMetrics struct {
DeviceUUID string
WorkerUID string
ProcessID string
MemoryBytes uint64
MemoryPercentage float64
ComputeTflops float64
ComputePercentage float64
ExtraMetrics map[string]float64
}
WorkerMetrics represents worker process metrics on a device +k8s:deepcopy-gen=true
func (*WorkerMetrics) DeepCopy ¶
func (in *WorkerMetrics) DeepCopy() *WorkerMetrics
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerMetrics.
func (*WorkerMetrics) DeepCopyInto ¶
func (in *WorkerMetrics) DeepCopyInto(out *WorkerMetrics)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkerStatus ¶
type WorkerStatus string
const ( WorkerStatusPending WorkerStatus = "Pending" WorkerStatusDeviceAllocating WorkerStatus = "DeviceAllocating" WorkerStatusRunning WorkerStatus = "Running" WorkerStatusTerminated WorkerStatus = "Terminated" )