nvml

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device interface {
}

type GPUUtilization

type GPUUtilization struct {
	GPU    uint
	Memory uint
}

type LinuxDevice

type LinuxDevice = nvml_linux.Device

type LinuxNvmlClient

type LinuxNvmlClient struct {
}

func New

func New() (*LinuxNvmlClient, error)

func (*LinuxNvmlClient) DeviceGetHandleByIndex

func (client *LinuxNvmlClient) DeviceGetHandleByIndex(index uint) (Device, error)

func (*LinuxNvmlClient) DeviceGetMemoryInfo

func (client *LinuxNvmlClient) DeviceGetMemoryInfo(device Device) (Memory, error)

func (*LinuxNvmlClient) DeviceGetUtilizationRates

func (client *LinuxNvmlClient) DeviceGetUtilizationRates(device Device) (GPUUtilization, error)

func (*LinuxNvmlClient) GetDeviceCount

func (client *LinuxNvmlClient) GetDeviceCount() (uint, error)

func (*LinuxNvmlClient) Init

func (client *LinuxNvmlClient) Init() error

func (*LinuxNvmlClient) Shutdown

func (client *LinuxNvmlClient) Shutdown() error

type Memory

type Memory struct {
	Total uint64 // Total installed FB memory (in bytes).
	Free  uint64 // Unallocated FB memory (in bytes).
	Used  uint64 // Allocated FB memory (in bytes).
}

type NvmlClient

type NvmlClient interface {
	Init() error
	Shutdown() error
	GetDeviceCount() (uint, error)

	DeviceGetHandleByIndex(index uint) (Device, error)
	DeviceGetMemoryInfo(device Device) (Memory, error)
	DeviceGetUtilizationRates(device Device) (GPUUtilization, error)
}

Jump to

Keyboard shortcuts

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