Documentation ¶
Index ¶
- func NVMLInit() error
- type Device
- func (gpu *Device) BoardId() (uint, error)
- func (gpu *Device) CurrPCIeLinkGeneration() (uint, error)
- func (gpu *Device) CurrPCIeLinkWidth() (uint, error)
- func (gpu *Device) EnforcedPowerLimit() (uint, error)
- func (gpu *Device) Error(cerror C.nvmlReturn_t) error
- func (gpu *Device) FanSpeed() (uint, error)
- func (gpu *Device) Index() (uint, error)
- func (gpu *Device) InforomConfigurationChecksum() (uint, error)
- func (gpu *Device) InforomImageVersion() (string, error)
- func (gpu *Device) MaxPCIeLinkGeneration() (uint, error)
- func (gpu *Device) MaxPCIeLinkWidth() (uint, error)
- func (gpu *Device) MemoryInfo() (NVMLMemory, error)
- func (gpu *Device) MinorNumber() (uint, error)
- func (gpu *Device) MultiGpuBoard() (bool, error)
- func (gpu *Device) Name() (string, error)
- func (gpu *Device) PCIeReplayCounter() (uint, error)
- func (gpu *Device) PowerManagementDefaultLimit() (uint, error)
- func (gpu *Device) PowerManagementLimit() (uint, error)
- func (gpu *Device) PowerState() (int, error)
- func (gpu *Device) PowerUsage() (uint, error)
- func (gpu *Device) Serial() (string, error)
- func (gpu *Device) Temp() (uint, error)
- func (gpu *Device) UUID() (string, error)
- func (gpu *Device) VbiosVersion() (string, error)
- type NVMLMemory
- type TestDevice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func GetAllGPUs ¶
GetAllGPUs will return a slice of type Device for all NVML devices present on the host system
func NewDevice ¶
func NewDevice(cdevice C.nvmlDevice_t) (*Device, error)
NewDevice is a contstructor function for Device structs. Given an nvmlDevice_t object as input, it populates some static property fields and returns a Device
func (*Device) BoardId ¶
BoardID returns the device boardId, which will be identical for GPUs connected to the same PLX
func (*Device) CurrPCIeLinkGeneration ¶
CurrPCIeLinkGeneration returns the current PCIe link generation number
func (*Device) CurrPCIeLinkWidth ¶
CurrPCIeLinkWidth returns the current PCIe link width
func (*Device) EnforcedPowerLimit ¶
EnforcedPowerLimit returns the effective power limit that the driver enforces after taking into account all limiters.
func (*Device) Error ¶
func (gpu *Device) Error(cerror C.nvmlReturn_t) error
Return a proper golang error of representation of the nvmlReturn_t error
func (*Device) FanSpeed ¶
FanSpeed returns the current fan speed of the device, on devices that have fans.
func (*Device) InforomConfigurationChecksum ¶
InforomConfigurationChecksum returns the checksum of the configuration stored in the device's inforom. (Can be used to verify identical configuration between devices.)
func (*Device) InforomImageVersion ¶
InforomImageVersion returns the global inforom image version
func (*Device) MaxPCIeLinkGeneration ¶
MaxPCIeLinkGeneration returns the maximum PCIe link generation possible with this device and system.
func (*Device) MaxPCIeLinkWidth ¶
MaxPCIeLinkWidth returns the maximum PCIe link width possible with this device and system
func (*Device) MemoryInfo ¶
func (gpu *Device) MemoryInfo() (NVMLMemory, error)
MemoryInfo returns a NVMLMemory struct populated with the amount of memory used, free, and in total on the device, in bytes.
func (*Device) MinorNumber ¶
MinorNumber returns the minor number of the device. The minor number is the integer such that the device node file for the GPU will be /dev/nvidia[Device.MinorNumber]
func (*Device) PCIeReplayCounter ¶
PCIeReplayCounter returns the replay counter and rollover info.
func (*Device) PowerManagementDefaultLimit ¶
PowerManagementDefaultLimit returns the upper limit for the amount of power the card is allowed to draw, in mW.
func (*Device) PowerManagementLimit ¶
PowerManagementLimit returns the power management limit for the device, in mW
func (*Device) PowerState ¶
func (*Device) PowerUsage ¶
PowerUsage returns the current power usage of the device, in mW.
func (*Device) VbiosVersion ¶
VbiosVersion returns the VBIOS version of the device
type NVMLMemory ¶
Go correspondent of the C.nvmlMemory_t struct. Memory in bytes
type TestDevice ¶
type TestDevice struct {
Device
}