job

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 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 Envs

type Envs map[string]string

type GPUPool added in v0.2.2

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

GPUPool manages GPU ids

func NewGPUPool added in v0.2.2

func NewGPUPool(n int) *GPUPool

NewGPUPool create a new GPUPool of given size

func (*GPUPool) Get added in v0.2.2

func (p *GPUPool) Get() int

Get returns the smallest GPU id that is available

func (*GPUPool) Put added in v0.2.2

func (p *GPUPool) Put(id int)

Put puts an GPU id back to the pool

type Job

type Job struct {
	ConfigServer string
	Strategy     kb.Strategy
	Parent       plan.PeerID
	HostList     plan.HostList
	PortRange    plan.PortRange
	Prog         string
	Args         []string
	LogDir       string

	AllowNVLink bool
}

func (Job) CreateAllProcs

func (j Job) CreateAllProcs(pl plan.PeerList) []Proc

func (Job) CreateProcs

func (j Job) CreateProcs(pl plan.PeerList, host uint32) []Proc

func (Job) NewProc

func (j Job) NewProc(peer plan.PeerID, gpuID int, initClusterVersion int, pl plan.PeerList) Proc

type Proc

type Proc struct {
	Name    string
	Prog    string
	Args    []string
	Envs    Envs
	IPv4    uint32
	PubAddr string
	LogDir  string
}

Proc represents a process

func (Proc) Cmd

func (p Proc) Cmd() *exec.Cmd

func (Proc) Script

func (p Proc) Script() string

Jump to

Keyboard shortcuts

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