job

package
Version: v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GPUPool

type GPUPool struct {
	sync.Mutex
	// contains filtered or unexported fields
}

GPUPool manages GPU ids

func NewGPUPool

func NewGPUPool(n int) *GPUPool

NewGPUPool create a new GPUPool of given size

func (*GPUPool) Get

func (p *GPUPool) Get() int

Get returns the smallest GPU id that is available

func (*GPUPool) Put

func (p *GPUPool) Put(id int)

Put puts an GPU id back to the pool

type Job

type Job struct {
	StartTime    time.Time
	ConfigServer string
	Strategy     base.Strategy
	Parent       plan.PeerID
	HostList     plan.HostList
	PortRange    plan.PortRange
	Prog         string
	Args         []string
	LogDir       string

	AllowNVLink bool
}

func (Job) CreateProcs

func (j Job) CreateProcs(cluster plan.Cluster, host uint32) []proc.Proc

func (Job) DebugString

func (j Job) DebugString() string

func (Job) NewProc

func (j Job) NewProc(peer plan.PeerID, gpuID int, initClusterVersion int, cluster plan.Cluster) proc.Proc

func (Job) ProgAndArgs

func (j Job) ProgAndArgs() []string

Jump to

Keyboard shortcuts

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