Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 ¶
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, gpus []tfv1.GPU) ([]tfv1.GPU, error) }
GPUFilter defines an interface for filtering GPU candidates
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
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
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