Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterDetail ¶ added in v1.41.0
type FilterRegistry ¶
type FilterRegistry struct {
// contains filtered or unexported fields
}
FilterRegistry provides an immutable collection of GPU filters with methods to create new instances with additional filters
func NewFilterRegistry ¶
func NewFilterRegistry() *FilterRegistry
NewFilterRegistry creates a new empty filter registry
func (*FilterRegistry) Apply ¶
func (fr *FilterRegistry) Apply( ctx context.Context, workerPodKey tfv1.NameNamespace, gpus []*tfv1.GPU, isSimulateSchedule bool, ) ([]*tfv1.GPU, []FilterDetail, error)
Apply applies the filters in this registry to the given GPU list Filters are applied in the order they were added (parent filters first)
func (*FilterRegistry) With ¶
func (fr *FilterRegistry) With(filters ...GPUFilter) *FilterRegistry
With creates a new FilterRegistry with the provided filters added The original FilterRegistry is not modified
type GPUFilter ¶
type GPUFilter interface {
// Filter filters the list of GPUs and returns only those that pass the filter criteria
// The implementation should not modify the input slice
Filter(ctx context.Context, workerPodKey tfv1.NameNamespace, gpus []*tfv1.GPU) ([]*tfv1.GPU, error)
Name() string
}
GPUFilter defines an interface for filtering GPU candidates
type GPUIndexFilter ¶ added in v1.55.0
type GPUIndexFilter struct {
// contains filtered or unexported fields
}
GPUIndexFilter filters GPUs based on required GPU indices
func NewGPUIndexFilter ¶ added in v1.55.0
func NewGPUIndexFilter(requiredIndices []int32) *GPUIndexFilter
NewGPUIndexFilter creates a new GPUIndexFilter with the specified indices
func (*GPUIndexFilter) Filter ¶ added in v1.55.0
func (f *GPUIndexFilter) Filter(ctx context.Context, workerPodKey tfv1.NameNamespace, gpus []*tfv1.GPU) ([]*tfv1.GPU, error)
Filter implements GPUFilter.Filter
func (*GPUIndexFilter) Name ¶ added in v1.55.0
func (f *GPUIndexFilter) Name() string
type GPUIsolationModeFilter ¶ added in v1.55.0
type GPUIsolationModeFilter struct {
// contains filtered or unexported fields
}
GPUIsolationModeFilter filters GPUs based on their isolation mode
func NewGPUIsolationModeFilter ¶ added in v1.55.0
func NewGPUIsolationModeFilter(isolationMode tfv1.IsolationModeType) *GPUIsolationModeFilter
NewGPUIsolationModeFilter creates a new filter that matches GPUs with the specified isolation mode
func (*GPUIsolationModeFilter) Filter ¶ added in v1.55.0
func (f *GPUIsolationModeFilter) Filter(ctx context.Context, workerPodKey tfv1.NameNamespace, gpus []*tfv1.GPU) ([]*tfv1.GPU, error)
Filter implements GPUFilter interface
func (*GPUIsolationModeFilter) Name ¶ added in v1.55.0
func (f *GPUIsolationModeFilter) Name() string
type GPUModelFilter ¶ added in v1.30.0
type GPUModelFilter struct {
// contains filtered or unexported fields
}
GPUModelFilter filters GPUs based on their model (e.g., A100, H100)
func NewGPUModelFilter ¶ added in v1.30.0
func NewGPUModelFilter(model string) *GPUModelFilter
NewGPUModelFilter creates a new filter that matches GPUs with the specified model
func (*GPUModelFilter) Filter ¶ added in v1.30.0
func (f *GPUModelFilter) Filter(ctx context.Context, workerPodKey tfv1.NameNamespace, gpus []*tfv1.GPU) ([]*tfv1.GPU, error)
Filter implements GPUFilter interface
func (*GPUModelFilter) Name ¶ added in v1.41.0
func (f *GPUModelFilter) Name() string
type GPUVendorFilter ¶ added in v1.55.0
type GPUVendorFilter struct {
// contains filtered or unexported fields
}
GPUVendorFilter filters GPUs based on their vendor
func NewGPUVendorFilter ¶ added in v1.55.0
func NewGPUVendorFilter(vendor string) *GPUVendorFilter
NewGPUVendorFilter creates a new filter that matches GPUs with the specified vendor
func (*GPUVendorFilter) Filter ¶ added in v1.55.0
func (f *GPUVendorFilter) Filter(ctx context.Context, workerPodKey tfv1.NameNamespace, gpus []*tfv1.GPU) ([]*tfv1.GPU, error)
Filter implements GPUFilter interface
func (*GPUVendorFilter) Name ¶ added in v1.55.0
func (f *GPUVendorFilter) Name() string
type NodeAffinityFilter ¶ added in v1.34.6
type NodeAffinityFilter struct {
// contains filtered or unexported fields
}
func NewNodeAffinityFilter ¶ added in v1.34.6
func NewNodeAffinityFilter(c client.Reader, nodeAffinity *corev1.NodeAffinity) *NodeAffinityFilter
func (*NodeAffinityFilter) Filter ¶ added in v1.34.6
func (f *NodeAffinityFilter) Filter(ctx context.Context, workerPodKey tfv1.NameNamespace, gpus []*tfv1.GPU) ([]*tfv1.GPU, error)
Filter
func (*NodeAffinityFilter) Name ¶ added in v1.41.0
func (f *NodeAffinityFilter) Name() string
type PartitionTemplateFilter ¶ added in v1.55.0
type PartitionTemplateFilter struct {
// contains filtered or unexported fields
}
PartitionTemplateFilter filters GPUs based on partition template availability Only applies when isolation mode is partitioned
func NewPartitionTemplateFilter ¶ added in v1.55.0
func NewPartitionTemplateFilter( isolationMode tfv1.IsolationModeType, requiredTemplateID string, maxPartitionsMap map[string]uint32, partitionTemplateMap map[string]map[string]config.PartitionTemplateInfo, ) *PartitionTemplateFilter
NewPartitionTemplateFilter creates a new PartitionTemplateFilter
func (*PartitionTemplateFilter) Filter ¶ added in v1.55.0
func (f *PartitionTemplateFilter) Filter(ctx context.Context, workerPodKey tfv1.NameNamespace, gpus []*tfv1.GPU) ([]*tfv1.GPU, error)
Filter implements GPUFilter.Filter
func (*PartitionTemplateFilter) Name ¶ added in v1.55.0
func (f *PartitionTemplateFilter) Name() string
type PhaseFilter ¶
type PhaseFilter struct {
// contains filtered or unexported fields
}
PhaseFilter filters GPUs based on their operational phase
func NewPhaseFilter ¶
func NewPhaseFilter(allowedPhases ...tfv1.TensorFusionGPUPhase) *PhaseFilter
NewPhaseFilter creates a new PhaseFilter with the specified allowed phases
func (*PhaseFilter) Filter ¶
func (f *PhaseFilter) Filter(ctx context.Context, workerPodKey tfv1.NameNamespace, gpus []*tfv1.GPU) ([]*tfv1.GPU, error)
Filter implements GPUFilter.Filter
func (*PhaseFilter) Name ¶ added in v1.41.0
func (f *PhaseFilter) Name() string
type ResourceFilter ¶
type ResourceFilter struct {
// contains filtered or unexported fields
}
ResourceFilter filters GPUs based on available resources
func NewResourceFilter ¶
func NewResourceFilter(required tfv1.Resource) *ResourceFilter
NewResourceFilter creates a new ResourceFilter with the specified resource requirements
func (*ResourceFilter) Filter ¶
func (f *ResourceFilter) Filter(ctx context.Context, workerPodKey tfv1.NameNamespace, gpus []*tfv1.GPU) ([]*tfv1.GPU, error)
Filter implements GPUFilter.Filter
func (*ResourceFilter) Name ¶ added in v1.41.0
func (f *ResourceFilter) Name() string
type SameNodeFilter ¶
type SameNodeFilter struct {
// contains filtered or unexported fields
}
SameNodeFilter ensures that the selected GPUs are from the same node
func NewSameNodeFilter ¶
func NewSameNodeFilter(count uint) *SameNodeFilter
NewSameNodeFilter creates a new SameNodeFilter with the specified count
func (*SameNodeFilter) Filter ¶
func (f *SameNodeFilter) Filter(ctx context.Context, workerPodKey tfv1.NameNamespace, gpus []*tfv1.GPU) ([]*tfv1.GPU, error)
Filter implements GPUFilter.Filter It groups GPUs by node and returns only those nodes that have at least 'count' GPUs Must run at last step, otherwise some nodes and gpus passed may not valid at following steps
func (*SameNodeFilter) Name ¶ added in v1.41.0
func (f *SameNodeFilter) Name() string