Documentation ¶
Index ¶
- Variables
- type GpuSharing
- func (in *GpuSharing) DeepCopy() *GpuSharing
- func (in *GpuSharing) DeepCopyInto(out *GpuSharing)
- func (s *GpuSharing) GetMpsConfig() (*MpsConfig, error)
- func (s *GpuSharing) GetTimeSlicingConfig() (*TimeSlicingConfig, error)
- func (s *GpuSharing) IsMps() bool
- func (s *GpuSharing) IsTimeSlicing() bool
- type GpuSharingStrategy
- type Interface
- type MigDeviceSharing
- func (in *MigDeviceSharing) DeepCopy() *MigDeviceSharing
- func (in *MigDeviceSharing) DeepCopyInto(out *MigDeviceSharing)
- func (s *MigDeviceSharing) GetMpsConfig() (*MpsConfig, error)
- func (s *MigDeviceSharing) GetTimeSlicingConfig() (*TimeSlicingConfig, error)
- func (s *MigDeviceSharing) IsMps() bool
- func (s *MigDeviceSharing) IsTimeSlicing() bool
- type MigDeviceSharingStrategy
- type MpsConfig
- type MpsPerDevicePinnedMemoryLimit
- func (in MpsPerDevicePinnedMemoryLimit) DeepCopy() MpsPerDevicePinnedMemoryLimit
- func (in MpsPerDevicePinnedMemoryLimit) DeepCopyInto(out *MpsPerDevicePinnedMemoryLimit)
- func (m MpsPerDevicePinnedMemoryLimit) Normalize(uuids []string, defaultPinnedDeviceMemoryLimit *resource.Quantity) (map[string]string, error)
- type TimeSliceDuration
- type TimeSlicingConfig
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidDeviceSelector error = errors.New("invalid device")
ErrInvalidDeviceSelector indicates that a device index or UUID was invalid.
var ErrInvalidLimit error = errors.New("invalid limit")
ErrInvalidLimit indicates that a limit was invalid.
Functions ¶
This section is empty.
Types ¶
type GpuSharing ¶
type GpuSharing struct { // +kubebuilder:default=TimeSlicing // +kubebuilder:validation:Required Strategy GpuSharingStrategy `json:"strategy"` TimeSlicingConfig *TimeSlicingConfig `json:"timeSlicingConfig,omitempty"` MpsConfig *MpsConfig `json:"mpsConfig,omitempty"` }
GpuSharing holds the current sharing strategy for GPUs and its settings. +kubebuilder:validation:MaxProperties=2
func (*GpuSharing) DeepCopy ¶
func (in *GpuSharing) DeepCopy() *GpuSharing
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GpuSharing.
func (*GpuSharing) DeepCopyInto ¶
func (in *GpuSharing) DeepCopyInto(out *GpuSharing)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GpuSharing) GetMpsConfig ¶
func (s *GpuSharing) GetMpsConfig() (*MpsConfig, error)
GetMpsConfig returns the MPS config that applies to the given strategy.
func (*GpuSharing) GetTimeSlicingConfig ¶
func (s *GpuSharing) GetTimeSlicingConfig() (*TimeSlicingConfig, error)
GetTimeSlicingConfig returns the timeslicing config that applies to the given strategy.
func (*GpuSharing) IsMps ¶
func (s *GpuSharing) IsMps() bool
IsMps checks if the MPS strategy is applied.
func (*GpuSharing) IsTimeSlicing ¶
func (s *GpuSharing) IsTimeSlicing() bool
IsTimeSlicing checks if the TimeSlicing strategy is applied.
type GpuSharingStrategy ¶
type GpuSharingStrategy string
GpuSharingStrategy encodes the valid Sharing strategies as a string. +kubebuilder:validation:Enum=TimeSlicing;MPS
const ( TimeSlicingStrategy GpuSharingStrategy = "TimeSlicing" MpsStrategy GpuSharingStrategy = "MPS" )
These constants represent the different Sharing strategies.
type Interface ¶
type Interface interface { IsTimeSlicing() bool IsMps() bool GetTimeSlicingConfig() (*TimeSlicingConfig, error) GetMpsConfig() (*MpsConfig, error) }
Sharing provides methods to check if a given sharing strategy is selected and grab its configuration. +k8s:deepcopy-gen=false
type MigDeviceSharing ¶
type MigDeviceSharing struct { // +kubebuilder:default=TimeSlicing // +kubebuilder:validation:Required Strategy GpuSharingStrategy `json:"strategy"` MpsConfig *MpsConfig `json:"mpsConfig,omitempty"` }
MigDeviceSharing holds the current sharing strategy for MIG Devices and its settings. +kubebuilder:validation:MaxProperties=2
func (*MigDeviceSharing) DeepCopy ¶
func (in *MigDeviceSharing) DeepCopy() *MigDeviceSharing
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigDeviceSharing.
func (*MigDeviceSharing) DeepCopyInto ¶
func (in *MigDeviceSharing) DeepCopyInto(out *MigDeviceSharing)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigDeviceSharing) GetMpsConfig ¶
func (s *MigDeviceSharing) GetMpsConfig() (*MpsConfig, error)
GetMpsConfig returns the MPS config that applies to the given strategy.
func (*MigDeviceSharing) GetTimeSlicingConfig ¶
func (s *MigDeviceSharing) GetTimeSlicingConfig() (*TimeSlicingConfig, error)
GetTimeSlicingConfig returns the timeslicing config that applies to the given strategy.
func (*MigDeviceSharing) IsMps ¶
func (s *MigDeviceSharing) IsMps() bool
IsMps checks if the MPS strategy is applied.
func (*MigDeviceSharing) IsTimeSlicing ¶
func (s *MigDeviceSharing) IsTimeSlicing() bool
IsTimeSlicing checks if the TimeSlicing strategy is applied.
type MigDeviceSharingStrategy ¶
type MigDeviceSharingStrategy string
MigDeviceSharingStrategy encodes the valid Sharing strategies as a string. +kubebuilder:validation:Enum=MPS
type MpsConfig ¶
type MpsConfig struct { DefaultActiveThreadPercentage *int `json:"defaultActiveThreadPercentage,omitempty"` // DefaultPinnedDeviceMemoryLimit represents the pinned memory limit to be applied for all devices. // This can be overridden for specific devices by specifying an associated entry DefaultPerDevicePinnedMemoryLimit for the device. DefaultPinnedDeviceMemoryLimit *resource.Quantity `json:"defaultPinnedDeviceMemoryLimit,omitempty"` // DefaultPerDevicePinnedMemoryLimit represents the pinned memory limit per device associated with an MPS daemon. // This is defined as a map of device index or UUI to a memory limit and overrides a setting applied using DefaultPinnedDeviceMemoryLimit. DefaultPerDevicePinnedMemoryLimit MpsPerDevicePinnedMemoryLimit `json:"defaultPerDevicePinnedMemoryLimit,omitempty"` }
MpsConfig provides the configuring for an MPS control daemon.
func (*MpsConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MpsConfig.
func (*MpsConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MpsPerDevicePinnedMemoryLimit ¶
MpsPerDevicePinnedMemoryLimit holds the string representation of the limits across multiple devices.
func (MpsPerDevicePinnedMemoryLimit) DeepCopy ¶
func (in MpsPerDevicePinnedMemoryLimit) DeepCopy() MpsPerDevicePinnedMemoryLimit
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MpsPerDevicePinnedMemoryLimit.
func (MpsPerDevicePinnedMemoryLimit) DeepCopyInto ¶
func (in MpsPerDevicePinnedMemoryLimit) DeepCopyInto(out *MpsPerDevicePinnedMemoryLimit)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (MpsPerDevicePinnedMemoryLimit) Normalize ¶
func (m MpsPerDevicePinnedMemoryLimit) Normalize(uuids []string, defaultPinnedDeviceMemoryLimit *resource.Quantity) (map[string]string, error)
Normalize converts the specified per-device pinned memory limits to limits for the devices that are to be allocated. If provided, the defaultPinnedDeviceMemoryLimit is applied to each device before being overridden by specific values.
type TimeSliceDuration ¶
type TimeSliceDuration string
TimeSliceDuration encodes the valid timeslice duration as a string. +kubebuilder:validation:Enum=Default;Short;Medium;Long
const ( DefaultTimeSlice TimeSliceDuration = "Default" ShortTimeSlice TimeSliceDuration = "Short" MediumTimeSlice TimeSliceDuration = "Medium" LongTimeSlice TimeSliceDuration = "Long" )
These constants represent the different TimeSlicing configurations.
func (TimeSliceDuration) Int ¶
func (c TimeSliceDuration) Int() int
Int returns the integer representations of a timeslice duration.
type TimeSlicingConfig ¶
type TimeSlicingConfig struct { // +kubebuilder:default=Default TimeSlice *TimeSliceDuration `json:"timeSlice,omitempty"` }
TimeSlicingSettings provides the settings for CUDA time-slicing..
func (*TimeSlicingConfig) DeepCopy ¶
func (in *TimeSlicingConfig) DeepCopy() *TimeSlicingConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeSlicingConfig.
func (*TimeSlicingConfig) DeepCopyInto ¶
func (in *TimeSlicingConfig) DeepCopyInto(out *TimeSlicingConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.