nvml

package
v0.0.0-...-e0141d8 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCPUAffinity        = errors.New("failed to retrieve CPU affinity")
	ErrUnsupportedP2PLink = errors.New("unsupported P2P link type")
	ErrUnsupportedGPU     = errors.New("unsupported GPU device")
)

Functions

func GetDeviceCount

func GetDeviceCount() (uint, error)

func GetDriverVersion

func GetDriverVersion() (string, error)

func Init

func Init() error

func Shutdown

func Shutdown() error

Types

type ClockInfo

type ClockInfo struct {
	Cores  *uint
	Memory *uint
}

type Device

type Device struct {
	UUID        string
	Path        string
	Model       *string
	Power       *uint
	CPUAffinity *uint
	PCI         PCIInfo
	Clocks      ClockInfo
	Topology    []P2PLink
	// contains filtered or unexported fields
}

func NewDevice

func NewDevice(idx uint) (device *Device, err error)

func NewDeviceLite

func NewDeviceLite(idx uint) (device *Device, err error)

func (*Device) Status

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

type DeviceStatus

type DeviceStatus struct {
	Power       *uint
	Temperature *uint
	Utilization UtilizationInfo
	Memory      MemoryInfo
	Clocks      ClockInfo
	PCI         PCIStatusInfo
	Processes   []ProcessInfo
}

type ECCErrorsInfo

type ECCErrorsInfo struct {
	L1Cache *uint64
	L2Cache *uint64
	Global  *uint64
}

type MemoryInfo

type MemoryInfo struct {
	GlobalUsed *uint64
	ECCErrors  ECCErrorsInfo
}
type P2PLink struct {
	BusID string
	Link  P2PLinkType
}

type P2PLinkType

type P2PLinkType uint
const (
	P2PLinkUnknown P2PLinkType = iota
	P2PLinkCrossCPU
	P2PLinkSameCPU
	P2PLinkHostBridge
	P2PLinkMultiSwitch
	P2PLinkSingleSwitch
	P2PLinkSameBoard
)
func GetP2PLink(dev1, dev2 *Device) (link P2PLinkType, err error)

func (P2PLinkType) String

func (t P2PLinkType) String() string

type PCIInfo

type PCIInfo struct {
	BusID     string
	BAR1      *uint64
	Bandwidth *uint
}

type PCIStatusInfo

type PCIStatusInfo struct {
	BAR1Used   *uint64
	Throughput PCIThroughputInfo
}

type PCIThroughputInfo

type PCIThroughputInfo struct {
	RX *uint
	TX *uint
}

type ProcessInfo

type ProcessInfo struct {
	PID        uint
	Name       string
	MemoryUsed uint64
}

type UtilizationInfo

type UtilizationInfo struct {
	GPU     *uint
	Memory  *uint
	Encoder *uint
	Decoder *uint
}

Jump to

Keyboard shortcuts

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