algorithm

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Tiresias matains a number of logical queues instead of using a continuous
	// priority spectrum, and demote the job to the next queue when its GPU time
	// crosses queue threshold.
	// TiresiasQueueNum of 2 means priority could be value of {0, 1}, and
	// priority 0 has the highest priority.
	TiresiasQueueNum = 2

	// Threshold of each queue (secs).
	// map{priority: threshold}
	TiresiasThresholdsSec = map[int]float64{
		0: 3600,
		1: math.Inf(1),
	}

	// Tiresias defines the STARVELIMIT as promoteKnob * last execution time.
	// training job will be promoted th the highest priority queue if it has been
	// waiting longer than the STARVELIMIT.
	TiresiasPromoteKnob = 8
)

Settings described in the original Tiresias paper.

View Source
var (
	// E-Tiresias triggers compaction if the number of pending jobs > the
	// compaction threshold.
	ElasticTiresiasCompactionThreshold = 10
)

Settings described in the original EDL paper.

Functions

func TiresiasDemotePriority

func TiresiasDemotePriority(priority int) int

func TiresiasPromotePriority

func TiresiasPromotePriority(priority int) int

Types

type AFSL

type AFSL struct {
	// contains filtered or unexported fields
}

func NewAFSL

func NewAFSL(id string) *AFSL

func (*AFSL) GetName

func (a *AFSL) GetName() string

func (*AFSL) NeedJobInfo added in v0.2.2

func (a *AFSL) NeedJobInfo() bool

func (*AFSL) Schedule

func (a *AFSL) Schedule(jobs ReadyJobs, totalGPU int) (result types.JobScheduleResult)

type ElasticFIFO

type ElasticFIFO struct {
	// contains filtered or unexported fields
}

func NewElasticFIFO

func NewElasticFIFO(id string) *ElasticFIFO

func (*ElasticFIFO) GetName

func (a *ElasticFIFO) GetName() string

func (*ElasticFIFO) NeedJobInfo added in v0.2.2

func (a *ElasticFIFO) NeedJobInfo() bool

func (*ElasticFIFO) Schedule

func (a *ElasticFIFO) Schedule(jobs ReadyJobs, totalGPU int) (result types.JobScheduleResult)

type ElasticSRJF

type ElasticSRJF struct {
	// contains filtered or unexported fields
}

func NewElasticSRJF

func NewElasticSRJF(id string) *ElasticSRJF

func (*ElasticSRJF) GetName

func (a *ElasticSRJF) GetName() string

func (*ElasticSRJF) NeedJobInfo added in v0.2.2

func (a *ElasticSRJF) NeedJobInfo() bool

func (*ElasticSRJF) Schedule

func (a *ElasticSRJF) Schedule(jobs ReadyJobs, totalGPU int) (result types.JobScheduleResult)

type ElasticTiresias

type ElasticTiresias struct {
	// contains filtered or unexported fields
}

func NewElasticTiresias

func NewElasticTiresias(id string) *ElasticTiresias

func (*ElasticTiresias) GetName

func (a *ElasticTiresias) GetName() string

func (*ElasticTiresias) NeedJobInfo added in v0.2.2

func (a *ElasticTiresias) NeedJobInfo() bool

func (*ElasticTiresias) Schedule

func (a *ElasticTiresias) Schedule(jobs ReadyJobs, totalGPU int) (result types.JobScheduleResult)

type FIFO

type FIFO struct {
	// contains filtered or unexported fields
}

func NewFIFO

func NewFIFO(id string) *FIFO

func (*FIFO) GetName

func (a *FIFO) GetName() string

func (*FIFO) NeedJobInfo added in v0.2.2

func (a *FIFO) NeedJobInfo() bool

func (*FIFO) Schedule

func (a *FIFO) Schedule(jobs ReadyJobs, totalGPU int) (result types.JobScheduleResult)

type FfDLOptimizer

type FfDLOptimizer struct {
	// contains filtered or unexported fields
}

func NewFfDLOptimizer

func NewFfDLOptimizer(id string) *FfDLOptimizer

func (*FfDLOptimizer) GetName

func (a *FfDLOptimizer) GetName() string

func (*FfDLOptimizer) NeedJobInfo added in v0.2.2

func (a *FfDLOptimizer) NeedJobInfo() bool

func (*FfDLOptimizer) Schedule

func (a *FfDLOptimizer) Schedule(jobs ReadyJobs, totalGPU int) (result types.JobScheduleResult)

type ReadyJobs

type ReadyJobs []trainingjob.TrainingJob

type SRJF

type SRJF struct {
	// contains filtered or unexported fields
}

func NewSRJF

func NewSRJF(id string) *SRJF

func (*SRJF) GetName

func (a *SRJF) GetName() string

func (*SRJF) NeedJobInfo added in v0.2.2

func (a *SRJF) NeedJobInfo() bool

func (*SRJF) Schedule

func (a *SRJF) Schedule(jobs ReadyJobs, totalGPU int) (result types.JobScheduleResult)

type SchedulerAlgorithm

type SchedulerAlgorithm interface {
	Schedule(ReadyJobs, int) types.JobScheduleResult
	GetName() string
	// Whether need training job info for scheduling
	NeedJobInfo() bool
}

SchedulerAlgorithm is an interface implemented by things that know how to schedule training jobs

func NewAlgorithmFactory

func NewAlgorithmFactory(algorithm string, schedulerID string) (SchedulerAlgorithm, error)

type Tiresias

type Tiresias struct {
	// contains filtered or unexported fields
}

func NewTiresias

func NewTiresias(id string) *Tiresias

func (*Tiresias) GetName

func (a *Tiresias) GetName() string

func (*Tiresias) NeedJobInfo added in v0.2.2

func (a *Tiresias) NeedJobInfo() bool

func (*Tiresias) Schedule

func (a *Tiresias) Schedule(jobs ReadyJobs, totalGPU int) (result types.JobScheduleResult)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL