nvidia

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2018 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DockerPlugin   = "nvidia-docker"
	DeviceCtl      = "/dev/nvidiactl"
	DeviceUVM      = "/dev/nvidia-uvm"
	DeviceUVMTools = "/dev/nvidia-uvm-tools"
)

Variables

This section is empty.

Functions

func Copy

func Copy(src, dst string) error

func GetCUDAVersion

func GetCUDAVersion() (string, error)

func GetControlDevicePaths

func GetControlDevicePaths() ([]string, error)

func GetDriverVersion

func GetDriverVersion() (string, error)

func Init

func Init() error

func LoadUVM

func LoadUVM() error

func Shutdown

func Shutdown() error

Types

type CUDADevice

type CUDADevice cuda.Device

type Device

type Device struct {
	*NVMLDevice
	*CUDADevice
}

func FilterDevices

func FilterDevices(devs []Device, ids []string) ([]Device, error)

func LookupDevices

func LookupDevices(s ...LookupStrategy) (devs []Device, err error)

func (*Device) Status

func (d *Device) Status() (*DeviceStatus, error)

type DeviceStatus

type DeviceStatus struct {
	*NVMLDeviceStatus
}

type FileCloneStrategy

type FileCloneStrategy interface {
	Clone(src, dst string) error
}

type LinkOrCopyStrategy

type LinkOrCopyStrategy struct{}

func (LinkOrCopyStrategy) Clone

func (s LinkOrCopyStrategy) Clone(src, dst string) error

type LinkStrategy

type LinkStrategy struct{}

func (LinkStrategy) Clone

func (s LinkStrategy) Clone(src, dst string) error

type LookupStrategy

type LookupStrategy uint
const (
	LookupMinimal LookupStrategy = iota
)

type NVMLDevice

type NVMLDevice nvml.Device

type NVMLDeviceStatus

type NVMLDeviceStatus nvml.DeviceStatus

type Volume

type Volume struct {
	*VolumeInfo

	Path    string
	Version string
	// contains filtered or unexported fields
}

func (*Volume) Create

func (v *Volume) Create(s FileCloneStrategy) (err error)

func (*Volume) Exists

func (v *Volume) Exists(version ...string) (bool, error)

func (*Volume) ListVersions

func (v *Volume) ListVersions() ([]string, error)

func (*Volume) Remove

func (v *Volume) Remove(version ...string) error

type VolumeInfo

type VolumeInfo struct {
	Name         string
	Mountpoint   string
	MountOptions string
	Components   components
}

type VolumeMap

type VolumeMap map[string]*Volume

func LookupVolumes

func LookupVolumes(prefix, ver string, vi []VolumeInfo) (vols VolumeMap, err error)

Jump to

Keyboard shortcuts

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