nvml

package module
v0.0.0-...-936f405 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 5 Imported by: 0

README

go-nvml

cgo bindings for NVML

Install NVML
wget http://developer.download.nvidia.com/compute/cuda/7.5/Prod/gdk/gdk_linux_amd64_352_79_release.run
sudo sh gdk_linux_amd64_352_79_release.run
Example

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 Clock

type Clock struct {
	Graphics    uint
	GraphicsMax uint
	SM          uint
	SMMax       uint
	Mem         uint
	MemMax      uint
}

type Device

type Device struct {
	// contains filtered or unexported fields
}

func GetDeviceByIndex

func GetDeviceByIndex(idx uint) (Device, error)

func (*Device) Bar1Memory

func (d *Device) Bar1Memory() (Memory, error)

func (*Device) Clock

func (d *Device) Clock() (Clock, error)

func (*Device) ComputeMode

func (d *Device) ComputeMode() (string, error)

func (*Device) FanSpeed

func (d *Device) FanSpeed() (uint, error)

func (*Device) Memory

func (d *Device) Memory() (Memory, error)

func (*Device) MinorName

func (d *Device) MinorName() (uint, error)

func (*Device) Name

func (d *Device) Name() (string, error)

func (*Device) PciInfo

func (d *Device) PciInfo() (PciInfo, error)

func (*Device) PerformanceState

func (d *Device) PerformanceState() (string, error)

func (*Device) PowerState

func (d *Device) PowerState() (string, error)

func (*Device) PowerUsage

func (d *Device) PowerUsage() (uint, error)

func (*Device) RunningProcess

func (d *Device) RunningProcess() ([]Process, error)

func (*Device) Temperature

func (d *Device) Temperature() (uint, error)

func (*Device) TemperatureThreshold

func (d *Device) TemperatureThreshold() (TemperatureThreshold, error)

func (*Device) UUID

func (d *Device) UUID() (string, error)

func (*Device) UtilizationRates

func (d *Device) UtilizationRates() (UtilizationRate, error)

type Memory

type Memory struct {
	Total uint64
	Free  uint64
	Used  uint64
}

type PciInfo

type PciInfo struct {
	BusId          string
	Domain         uint
	Bus            uint
	Device         uint
	PciDeviceId    uint
	PciSubSystemId uint
	// contains filtered or unexported fields
}

type Process

type Process struct {
	PID        uint
	Name       string
	MemoryUsed uint64
}

type TemperatureThreshold

type TemperatureThreshold struct {
	Slowdown uint
	Shutdown uint
}

type UtilizationRate

type UtilizationRate struct {
	GPU    uint
	Memory uint
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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