gpu

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrUnsupportedGPUType means that requeted GPU/OpenCL isolation type is not supported
	ErrUnsupportedGPUType = errors.New("requeted GPU type is not supported")
)

Functions

This section is empty.

Types

type Args

type Args map[string]interface{}

Args are mode dependant options

type Config

type Config struct {
	Type string `yaml:"type"`
	Args Args   `yaml:"args"`
}

Config contains options related to NVIDIA GPU support

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 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, cfg *Config) (Tuner, error)

New creates Tuner based on provided config. It may return ErrUnsupportedGPUType if the platform does not support requested iso type Currently supported type: nil, nvidiadocker, embedded

Jump to

Keyboard shortcuts

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