Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCudaVersion ¶
GetCudaVersion get which CUDA version is used.
func GetDriverVersion ¶
GetDriverVersion get the current driver version.
Types ¶
type Device ¶
type Device interface { // DeviceGetName returns the name of the gpu. DeviceGetName() (string, error) // DeviceGetMinorNumber returns the minor number. DeviceGetMinorNumber() (uint, error) // DeviceGetMinorSlice returns the minor number slice. DeviceGetMinorSlice() ([]uint, error) // DeviceGetUUID returns the uuid of the gpu. DeviceGetUUID() (string, error) // DeviceGetUUIDSlice returns the uuid slice of the gpus on the same board. DeviceGetUUIDSlice() ([]string, error) // DeviceGetIndex returns the index of the gpu. DeviceGetIndex() (uint, error) // DeviceGetFanSpeed returns the value of the gpu fan speed. DeviceGetFanSpeed() (uint, error) // DeviceGetMemoryInfo returns the memory status of the gpu. DeviceGetMemoryInfo() (MemoryInfo, error) // DeviceGetTemperature returns the current temperature of the gpu. DeviceGetTemperature() (uint, error) // DeviceGetPciInfo returns the pci information of the gpu. DeviceGetPciInfo() (PciInfo, error) // DeviceGetPowerUsage returns the current power usage of the gpu. DeviceGetPowerUsage() (uint, error) // DeviceGetPowerLimitConstraints returns the power limitation of the gpu. DeviceGetPowerLimitConstraints() (PowerLimitConstraints, error) // DeviceGetClockInfo returns the sm clock and memory clock of the gpu. DeviceGetClockInfo() (ClockInfo, error) // DeviceGetUtilization returns gpu and memory used percent. DeviceGetUtilization() (Utilization, error) }
Device defines the implementation of specified device.
func NewDeviceByIndex ¶
NewDeviceByIndex creates a device instance by index.
func NewDeviceByUUID ¶
NewDeviceByUUID create a device instance by uuid.
type Event ¶
type Event interface { // RegisterEventforDevice register a event for specified device. RegisterEventsForDevice(uuid string, eventType EventType) error // WaitForEvent wait a event during the timeout. WaitForEvent(timeout uint) (EventData, error) // DeleteEventSet delete the registered event. EventSetFree() error }
Event defines the implementation of a event.
type EventType ¶
type EventType uint64
const (
XidCriticalError EventType = eventTypeXidCriticalError
)
type MemoryInfo ¶
MemoryInfo contains information of a gpu device.
type PciInfo ¶
type PciInfo struct { Bus uint BusId string BusIdLegacy string Device uint Domain uint PciDeviceId uint PciSubSystemId uint }
PciInfo contains of information of a gpu device.
type PowerLimitConstraints ¶
PowerLimitConstraints contains of the limitation of a gpu device.
type Utilization ¶
Utilization contains of the percent of gpu and memory used.
Click to show internal directories.
Click to hide internal directories.