Documentation
¶
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type ComputeDomain
- type ComputeDomainChannelConfig
- func (in *ComputeDomainChannelConfig) DeepCopy() *ComputeDomainChannelConfig
- func (in *ComputeDomainChannelConfig) DeepCopyInto(out *ComputeDomainChannelConfig)
- func (in *ComputeDomainChannelConfig) DeepCopyObject() runtime.Object
- func (c *ComputeDomainChannelConfig) Normalize() error
- func (c *ComputeDomainChannelConfig) Validate() error
- type ComputeDomainChannelSpec
- type ComputeDomainClique
- type ComputeDomainCliqueList
- type ComputeDomainDaemonConfig
- func (in *ComputeDomainDaemonConfig) DeepCopy() *ComputeDomainDaemonConfig
- func (in *ComputeDomainDaemonConfig) DeepCopyInto(out *ComputeDomainDaemonConfig)
- func (in *ComputeDomainDaemonConfig) DeepCopyObject() runtime.Object
- func (c *ComputeDomainDaemonConfig) Normalize() error
- func (c *ComputeDomainDaemonConfig) Validate() error
- type ComputeDomainDaemonInfo
- type ComputeDomainList
- type ComputeDomainNode
- type ComputeDomainResourceClaimTemplate
- type ComputeDomainSpec
- type ComputeDomainStatus
- 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 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
- type VfioDeviceConfig
Constants ¶
const ( GroupName = "resource.nvidia.com" Version = "v1beta1" GpuConfigKind = "GpuConfig" MigDeviceConfigKind = "MigDeviceConfig" VfioDeviceConfigKind = "VfioDeviceConfig" ComputeDomainChannelConfigKind = "ComputeDomainChannelConfig" ComputeDomainDaemonConfigKind = "ComputeDomainDaemonConfig" ComputeDomainKind = "ComputeDomain" ComputeDomainCliqueKind = "ComputeDomainClique" )
const ( ComputeDomainStatusNone = "" ComputeDomainStatusReady = "Ready" ComputeDomainStatusNotReady = "NotReady" ComputeDomainChannelAllocationModeSingle = "Single" ComputeDomainChannelAllocationModeAll = "All" )
const ( TimeSlicingStrategy = "TimeSlicing" MpsStrategy = "MPS" )
These constants represent the different Sharing strategies.
Variables ¶
var ( // SchemeBuilder initializes a scheme builder. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to a scheme. AddToScheme = SchemeBuilder.AddToScheme )
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.
var NonstrictDecoder runtime.Decoder
NonstrictDecoder implements a decoder for objects in this API group. Silently drops unknown fields in the input. Used for deserializing checkpoint data (JSON that may have been created by older or newer versions of this driver).
var SchemeGroupVersion = schema.GroupVersion{ Group: GroupName, Version: Version, }
SchemeGroupVersion is group version used to register these objects.
var StrictDecoder runtime.Decoder
StrictDecoder implements a decoder for objects in this API group. Fails upon unknown fields in the input. Is the preferable choice when processing input directly provided by the user (example: opaque config JSON provided in a resource claim, validated only in the NodePrepareResources code path when no validating webhook is deployed).
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Types ¶
type ComputeDomain ¶
type ComputeDomain struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ComputeDomainSpec `json:"spec,omitempty"`
// Global ComputeDomain status. Can be used to guide debugging efforts.
// Workload however should not rely on inspecting this field at any point
// during its lifecycle.
Status ComputeDomainStatus `json:"status,omitempty"`
}
ComputeDomain prepares a set of nodes to run a multi-node workload in.
func (*ComputeDomain) DeepCopy ¶
func (in *ComputeDomain) DeepCopy() *ComputeDomain
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeDomain.
func (*ComputeDomain) DeepCopyInto ¶
func (in *ComputeDomain) DeepCopyInto(out *ComputeDomain)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComputeDomain) DeepCopyObject ¶
func (in *ComputeDomain) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComputeDomainChannelConfig ¶
type ComputeDomainChannelConfig struct {
metav1.TypeMeta `json:",inline"`
DomainID string `json:"domainID"`
AllocationMode string `json:"allocationMode,omitempty"`
}
ComputeDomainChannelConfig holds the set of parameters for configuring an ComputeDomainChannel.
func DefaultComputeDomainChannelConfig ¶
func DefaultComputeDomainChannelConfig() *ComputeDomainChannelConfig
DefaultComputeDomainChannelConfig provides the default ComputeDomainChannel configuration.
func (*ComputeDomainChannelConfig) DeepCopy ¶
func (in *ComputeDomainChannelConfig) DeepCopy() *ComputeDomainChannelConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeDomainChannelConfig.
func (*ComputeDomainChannelConfig) DeepCopyInto ¶
func (in *ComputeDomainChannelConfig) DeepCopyInto(out *ComputeDomainChannelConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComputeDomainChannelConfig) DeepCopyObject ¶
func (in *ComputeDomainChannelConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ComputeDomainChannelConfig) Normalize ¶
func (c *ComputeDomainChannelConfig) Normalize() error
Normalize updates a ComputeDomainChannelConfig config with implied default values based on other settings.
func (*ComputeDomainChannelConfig) Validate ¶
func (c *ComputeDomainChannelConfig) Validate() error
Validate ensures that ComputeDomainDaemonConfig has a valid set of values.
type ComputeDomainChannelSpec ¶
type ComputeDomainChannelSpec struct {
ResourceClaimTemplate ComputeDomainResourceClaimTemplate `json:"resourceClaimTemplate"`
// Allows for requesting all IMEX channels (the maximum per IMEX domain) or
// precisely one.
// +kubebuilder:validation:Enum=All;Single
// +kubebuilder:default:=Single
// +kubebuilder:validation:Optional
AllocationMode string `json:"allocationMode,omitempty"`
}
ComputeDomainChannelSpec provides the spec for a channel used to run a workload inside a ComputeDomain.
func (*ComputeDomainChannelSpec) DeepCopy ¶
func (in *ComputeDomainChannelSpec) DeepCopy() *ComputeDomainChannelSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeDomainChannelSpec.
func (*ComputeDomainChannelSpec) DeepCopyInto ¶
func (in *ComputeDomainChannelSpec) DeepCopyInto(out *ComputeDomainChannelSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComputeDomainClique ¶
type ComputeDomainClique struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// +listType=map
// +listMapKey=nodeName
Daemons []*ComputeDomainDaemonInfo `json:"daemons,omitempty"`
}
ComputeDomainClique holds information about a specific clique within a ComputeDomain. It is created in the driver namespace and named as "<computeDomainUID>.<cliqueID>".
func (*ComputeDomainClique) DeepCopy ¶
func (in *ComputeDomainClique) DeepCopy() *ComputeDomainClique
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeDomainClique.
func (*ComputeDomainClique) DeepCopyInto ¶
func (in *ComputeDomainClique) DeepCopyInto(out *ComputeDomainClique)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComputeDomainClique) DeepCopyObject ¶
func (in *ComputeDomainClique) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComputeDomainCliqueList ¶
type ComputeDomainCliqueList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ComputeDomainClique `json:"items"`
}
ComputeDomainCliqueList provides a list of ComputeDomainCliques.
func (*ComputeDomainCliqueList) DeepCopy ¶
func (in *ComputeDomainCliqueList) DeepCopy() *ComputeDomainCliqueList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeDomainCliqueList.
func (*ComputeDomainCliqueList) DeepCopyInto ¶
func (in *ComputeDomainCliqueList) DeepCopyInto(out *ComputeDomainCliqueList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComputeDomainCliqueList) DeepCopyObject ¶
func (in *ComputeDomainCliqueList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComputeDomainDaemonConfig ¶
type ComputeDomainDaemonConfig struct {
metav1.TypeMeta `json:",inline"`
DomainID string `json:"domainID"`
}
ComputeDomainDaemonConfig holds the set of parameters for configuring an ComputeDomainDaemon.
func DefaultComputeDomainDaemonConfig ¶
func DefaultComputeDomainDaemonConfig() *ComputeDomainDaemonConfig
DefaultComputeDomainDaemonConfig provides the default ComputeDomainDaemon configuration.
func (*ComputeDomainDaemonConfig) DeepCopy ¶
func (in *ComputeDomainDaemonConfig) DeepCopy() *ComputeDomainDaemonConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeDomainDaemonConfig.
func (*ComputeDomainDaemonConfig) DeepCopyInto ¶
func (in *ComputeDomainDaemonConfig) DeepCopyInto(out *ComputeDomainDaemonConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComputeDomainDaemonConfig) DeepCopyObject ¶
func (in *ComputeDomainDaemonConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ComputeDomainDaemonConfig) Normalize ¶
func (c *ComputeDomainDaemonConfig) Normalize() error
Normalize updates a ComputeDomainDaemonConfig config with implied default values based on other settings.
func (*ComputeDomainDaemonConfig) Validate ¶
func (c *ComputeDomainDaemonConfig) Validate() error
Validate ensures that ComputeDomainDaemonConfig has a valid set of values.
type ComputeDomainDaemonInfo ¶
type ComputeDomainDaemonInfo struct {
NodeName string `json:"nodeName"`
IPAddress string `json:"ipAddress"`
CliqueID string `json:"cliqueID"`
// The Index field is used to ensure a consistent IP-to-DNS name
// mapping across all machines within an IMEX domain. Each node's index
// directly determines its DNS name within a given NVLink partition
// (i.e. clique). In other words, the 2-tuple of (CliqueID, Index) will
// always be unique. This field is marked as optional (but not
// omitempty) in order to support downgrades and avoid an API bump.
// +kubebuilder:validation:Optional
Index int `json:"index"`
// The Status field tracks the readiness of the IMEX daemon running on
// this node. It gets switched to Ready whenever the IMEX daemon is
// ready to broker GPU memory exchanges and switches to NotReady when
// it is not. It is marked as optional in order to support downgrades
// and avoid an API bump.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Enum=Ready;NotReady
// +kubebuilder:default:=NotReady
Status string `json:"status,omitempty"`
}
ComputeDomainDaemonInfo provides information about each daemon in a ComputeDomainClique.
func (*ComputeDomainDaemonInfo) DeepCopy ¶
func (in *ComputeDomainDaemonInfo) DeepCopy() *ComputeDomainDaemonInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeDomainDaemonInfo.
func (*ComputeDomainDaemonInfo) DeepCopyInto ¶
func (in *ComputeDomainDaemonInfo) DeepCopyInto(out *ComputeDomainDaemonInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComputeDomainList ¶
type ComputeDomainList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ComputeDomain `json:"items"`
}
ComputeDomainList provides a list of ComputeDomains.
func (*ComputeDomainList) DeepCopy ¶
func (in *ComputeDomainList) DeepCopy() *ComputeDomainList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeDomainList.
func (*ComputeDomainList) DeepCopyInto ¶
func (in *ComputeDomainList) DeepCopyInto(out *ComputeDomainList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ComputeDomainList) DeepCopyObject ¶
func (in *ComputeDomainList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ComputeDomainNode ¶
type ComputeDomainNode struct {
Name string `json:"name"`
IPAddress string `json:"ipAddress"`
CliqueID string `json:"cliqueID"`
// The Index field is used to ensure a consistent IP-to-DNS name
// mapping across all machines within an IMEX domain. Each node's index
// directly determines its DNS name within a given NVLink partition
// (i.e. clique). In other words, the 2-tuple of (CliqueID, Index) will
// always be unique. This field is marked as optional (but not
// omitempty) in order to support downgrades and avoid an API bump.
// +kubebuilder:validation:Optional
Index int `json:"index"`
// The Status field tracks the readiness of the IMEX daemon running on
// this node. It gets switched to Ready whenever the IMEX daemon is
// ready to broker GPU memory exchanges and switches to NotReady when
// it is not. It is marked as optional in order to support downgrades
// and avoid an API bump.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Enum=Ready;NotReady
// +kubebuilder:default:=NotReady
Status string `json:"status,omitempty"`
}
ComputeDomainNode provides information about each node added to a ComputeDomain.
func (*ComputeDomainNode) DeepCopy ¶
func (in *ComputeDomainNode) DeepCopy() *ComputeDomainNode
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeDomainNode.
func (*ComputeDomainNode) DeepCopyInto ¶
func (in *ComputeDomainNode) DeepCopyInto(out *ComputeDomainNode)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComputeDomainResourceClaimTemplate ¶
type ComputeDomainResourceClaimTemplate struct {
Name string `json:"name"`
}
ComputeDomainResourceClaimTemplate provides the details of the ResourceClaimTemplate to generate.
func (*ComputeDomainResourceClaimTemplate) DeepCopy ¶
func (in *ComputeDomainResourceClaimTemplate) DeepCopy() *ComputeDomainResourceClaimTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeDomainResourceClaimTemplate.
func (*ComputeDomainResourceClaimTemplate) DeepCopyInto ¶
func (in *ComputeDomainResourceClaimTemplate) DeepCopyInto(out *ComputeDomainResourceClaimTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComputeDomainSpec ¶
type ComputeDomainSpec struct {
// Intended number of IMEX daemons (i.e., individual compute nodes) in the
// ComputeDomain. Must be zero or greater.
//
// With `featureGates.IMEXDaemonsWithDNSNames=true` (the default), this is
// recommended to be set to zero. Workload must implement and consult its
// own source of truth for the number of workers online before trying to
// share GPU memory (and hence triggering IMEX interaction). When non-zero,
// `numNodes` is used only for automatically updating the global
// ComputeDomain `Status` (indicating `Ready` when the number of ready IMEX
// daemons equals `numNodes`). In this mode, a `numNodes` value greater than
// zero in particular does not gate the startup of IMEX daemons: individual
// IMEX daemons are started immediately without waiting for its peers, and
// any workload pod gets released right after its local IMEX daemon has
// started.
//
// With `featureGates.IMEXDaemonsWithDNSNames=false`, `numNodes` must be set
// to the expected number of worker nodes joining the ComputeDomain. In that
// mode, all workload pods are held back (with containers in state
// `ContainerCreating`) until the underlying IMEX domain has been joined by
// `numNodes` IMEX daemons. Pods from more than `numNodes` nodes trying to
// join the ComputeDomain may lead to unexpected behavior.
//
// The `numNodes` parameter is deprecated and will be removed in the next
// API version.
NumNodes int `json:"numNodes"`
Channel *ComputeDomainChannelSpec `json:"channel"`
}
ComputeDomainSpec provides the spec for a ComputeDomain.
func (*ComputeDomainSpec) DeepCopy ¶
func (in *ComputeDomainSpec) DeepCopy() *ComputeDomainSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeDomainSpec.
func (*ComputeDomainSpec) DeepCopyInto ¶
func (in *ComputeDomainSpec) DeepCopyInto(out *ComputeDomainSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ComputeDomainStatus ¶
type ComputeDomainStatus struct {
// +kubebuilder:validation:Enum=Ready;NotReady
// +kubebuilder:default=NotReady
Status string `json:"status"`
// +listType=map
// +listMapKey=name
Nodes []*ComputeDomainNode `json:"nodes,omitempty"`
}
ComputeDomainStatus provides the status for a ComputeDomain.
func (*ComputeDomainStatus) DeepCopy ¶
func (in *ComputeDomainStatus) DeepCopy() *ComputeDomainStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeDomainStatus.
func (*ComputeDomainStatus) DeepCopyInto ¶
func (in *ComputeDomainStatus) DeepCopyInto(out *ComputeDomainStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 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.
type VfioDeviceConfig ¶
VfioDeviceConfig holds the set of parameters for configuring a VFIO device.
func DefaultVfioDeviceConfig ¶
func DefaultVfioDeviceConfig() *VfioDeviceConfig
DefaultVfioDeviceConfig provides the default configuration of a VFIO device.
func (*VfioDeviceConfig) DeepCopy ¶
func (in *VfioDeviceConfig) DeepCopy() *VfioDeviceConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VfioDeviceConfig.
func (*VfioDeviceConfig) DeepCopyInto ¶
func (in *VfioDeviceConfig) DeepCopyInto(out *VfioDeviceConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VfioDeviceConfig) DeepCopyObject ¶
func (in *VfioDeviceConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*VfioDeviceConfig) Normalize ¶
func (c *VfioDeviceConfig) Normalize() error
Normalize updates a VfioDeviceConfig config with implied default values based on other settings.
func (*VfioDeviceConfig) Validate ¶
func (c *VfioDeviceConfig) Validate() error
Validate ensures that VfioDeviceConfig has a valid set of values.