Documentation
¶
Index ¶
- Constants
- Variables
- type GpuConfig
- 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
- func (s *GpuSharing) Validate() error
- type GpuSharingStrategy
- type ImexChannelConfig
- type Interface
- type MigDeviceConfig
- 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
- func (s *MigDeviceSharing) Validate() error
- 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 Sharing
- type TimeSliceInterval
- type TimeSlicingConfig
Constants ¶
const ( GroupName = "gpu.nvidia.com" Version = "v1alpha1" GpuConfigKind = "GpuConfig" MigDeviceConfigKind = "MigDeviceConfig" ImexChannelConfigKind = "ImexChannelConfig" )
const ( TimeSlicingStrategy = "TimeSlicing" MpsStrategy = "MPS" )
These constants represent the different Sharing strategies.
Variables ¶
var Decoder runtime.Decoder
Decoder implements a decoder for objects in this API group.
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 GpuConfig ¶
type GpuConfig struct { metav1.TypeMeta `json:",inline"` Sharing *GpuSharing `json:"sharing,omitempty"` }
GpuConfig holds the set of parameters for configuring a GPU.
func DefaultGpuConfig ¶
func DefaultGpuConfig() *GpuConfig
DefaultGpuConfig provides the default GPU configuration.
func (*GpuConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GpuConfig.
func (*GpuConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GpuConfig) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GpuSharing ¶
type GpuSharing struct { 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.
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.
func (*GpuSharing) Validate ¶
func (s *GpuSharing) Validate() error
Validate ensures that GpuSharing has a valid set of values.
type GpuSharingStrategy ¶
type GpuSharingStrategy string
GpuSharingStrategy encodes the valid Sharing strategies as a string.
func (GpuSharingStrategy) Validate ¶
func (s GpuSharingStrategy) Validate() error
Validate ensures that GpuSharingStrategy has a valid set of values.
type ImexChannelConfig ¶
ImexChannelConfig holds the set of parameters for configuring an ImexChannel.
func DefaultImexChannelConfig ¶
func DefaultImexChannelConfig() *ImexChannelConfig
DefaultImexChannelConfig provides the default ImexChannel configuration.
func (*ImexChannelConfig) DeepCopy ¶
func (in *ImexChannelConfig) DeepCopy() *ImexChannelConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImexChannelConfig.
func (*ImexChannelConfig) DeepCopyInto ¶
func (in *ImexChannelConfig) DeepCopyInto(out *ImexChannelConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ImexChannelConfig) DeepCopyObject ¶
func (in *ImexChannelConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ImexChannelConfig) Normalize ¶
func (c *ImexChannelConfig) Normalize() error
Normalize updates a ImexChannelConfig config with implied default values based on other settings.
func (*ImexChannelConfig) Validate ¶
func (c *ImexChannelConfig) Validate() error
Validate ensures that ImexChannelConfig has a valid set of values.
type MigDeviceConfig ¶
type MigDeviceConfig struct { metav1.TypeMeta `json:",inline"` Sharing *MigDeviceSharing `json:"sharing,omitempty"` }
MigDeviceConfig holds the set of parameters for configuring a MIG device.
func DefaultMigDeviceConfig ¶
func DefaultMigDeviceConfig() *MigDeviceConfig
DefaultMigDeviceConfig provides the default Mig Device configuration.
func (*MigDeviceConfig) DeepCopy ¶
func (in *MigDeviceConfig) DeepCopy() *MigDeviceConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigDeviceConfig.
func (*MigDeviceConfig) DeepCopyInto ¶
func (in *MigDeviceConfig) DeepCopyInto(out *MigDeviceConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MigDeviceConfig) DeepCopyObject ¶
func (in *MigDeviceConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MigDeviceConfig) Normalize ¶
func (c *MigDeviceConfig) Normalize() error
Normalize updates a MigDeviceConfig config with implied default values based on other settings.
func (*MigDeviceConfig) Validate ¶
func (c *MigDeviceConfig) Validate() error
Validate ensures that MigDeviceConfig has a valid set of values.
type MigDeviceSharing ¶
type MigDeviceSharing struct { Strategy GpuSharingStrategy `json:"strategy"` MpsConfig *MpsConfig `json:"mpsConfig,omitempty"` }
MigDeviceSharing holds the current sharing strategy for MIG Devices and its settings.
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.
func (*MigDeviceSharing) Validate ¶
func (s *MigDeviceSharing) Validate() error
Validate ensures that MigDeviceSharing has a valid set of values.
type MigDeviceSharingStrategy ¶
type MigDeviceSharingStrategy string
MigDeviceSharingStrategy encodes the valid Sharing strategies as a string.
func (MigDeviceSharingStrategy) Validate ¶
func (s MigDeviceSharingStrategy) Validate() error
Validate ensures that MigDeviceSharingStrategy has a valid set of values.
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 Sharing ¶
type Sharing 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 TimeSliceInterval ¶
type TimeSliceInterval string
TimeSliceInterval encodes the valid timeslice duration as a string.
const ( DefaultTimeSlice TimeSliceInterval = "Default" ShortTimeSlice TimeSliceInterval = "Short" MediumTimeSlice TimeSliceInterval = "Medium" LongTimeSlice TimeSliceInterval = "Long" )
These constants represent the different TimeSlicing configurations.
func (TimeSliceInterval) Int ¶
func (t TimeSliceInterval) Int() int
Int returns the integer representations of a timeslice duration.
func (TimeSliceInterval) Validate ¶
func (t TimeSliceInterval) Validate() error
Validate ensures that TimeSliceInterval has a valid set of values.
type TimeSlicingConfig ¶
type TimeSlicingConfig struct {
Interval *TimeSliceInterval `json:"interval,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.
func (*TimeSlicingConfig) Validate ¶
func (c *TimeSlicingConfig) Validate() error
Validate ensures that TimeSlicingConfig has a valid set of values.