gpu

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVendorByName added in v0.3.2

func GetVendorByName(vendor string) (sonm.GPUVendorType, error)

Types

type NilTuner

type NilTuner struct{}

NilTuner is just a null pattern

func (NilTuner) Close

func (NilTuner) Close() error

func (NilTuner) Tune

func (NilTuner) Tune(hostconfig *container.HostConfig) error

type Option added in v0.3.2

type Option func(*tunerOptions)

func WithOptions added in v0.3.2

func WithOptions(raw map[string]string) Option

func WithSocketDir added in v0.3.2

func WithSocketDir(dir string) Option

type Tuner

type Tuner interface {
	Tune(hostconfig *container.HostConfig) error
	Close() error
}

Tuner is responsible for preparing GPU-friendly environment and baking proper options in container.HostConfig

func New

func New(ctx context.Context, gpuType pb.GPUVendorType, opts ...Option) (Tuner, error)

New creates Tuner based on provided config. Currently supported type: "radeon" or "nvidia". if type is undefined, nilTuner will be returned.

Jump to

Keyboard shortcuts

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