Documentation
¶
Overview ¶
Package IXML Bindings
Index ¶
- Constants
- func GetHandleByUUID(Uuid string) (Device, Return)
- func GpmSampleAlloc() (GpmSample, Return)
- type ClockInfo
- type ClockType
- type Device
- func (x *Device) Free()
- func (device Device) GetBoardPosition() (uint32, Return)
- func (device Device) GetClockInfo() (ClockInfo, Return)
- func (device Device) GetComputeRunningProcesses() ([]Info, Return)
- func (device Device) GetCurrentClocksThrottleReasons() (uint64, Return)
- func (device Device) GetEccErros() (uint32, uint32, Return)
- func (device Device) GetFanSpeed() (uint32, Return)
- func (device Device) GetFanSpeed_v2(Fan int) (uint32, Return)
- func (device Device) GetGPUVoltage() (uint32, uint32, Return)
- func (device Device) GetHealth() (uint64, Return)
- func (device Device) GetIndex() (int, Return)
- func (device Device) GetMemoryInfo() (Memory, Return)
- func (device Device) GetMemoryInfo_v2() (Memory, Return)
- func (device Device) GetMinorNumber() (int, Return)
- func (device Device) GetName() (string, Return)
- func (device Device) GetPciInfo() (PciInfo, Return)
- func (device Device) GetPcieReplayCounter() (uint32, Return)
- func (device Device) GetPowerManagementDefaultLimit() (uint32, Return)
- func (device Device) GetPowerManagementLimit() (uint32, Return)
- func (device Device) GetPowerManagementLimitConstraints() (uint32, uint32, Return)
- func (device Device) GetPowerUsage() (uint32, Return)
- func (device Device) GetTemperature() (uint32, Return)
- func (device Device) GetTemperatureThreshold(thresholdType TemperatureThresholds) (uint32, Return)
- func (device Device) GetTopology(device2 Device) (GpuTopologyLevel, Return)
- func (device Device) GetUUID() (string, Return)
- func (device Device) GetUtilizationRates() (Utilization, Return)
- func (device Device) GpmQueryDeviceSupport() (GpmSupport, Return)
- func (device Device) GpmSampleGet(gpmSample GpmSample) Return
- func (x *Device) PassRef() *C.nvmlDevice_t
- func (x *Device) Ref() *C.nvmlDevice_t
- type EventSet
- type GpmMetric
- type GpmMetricId
- type GpmMetricsGetType
- type GpmSample
- type GpmSupport
- type GpuTopologyLevel
- type Info
- type Memory
- type Memory_v2
- type PciInfo
- type ProcessInfo
- type ProcessInfo_v1
- type Return
- func AbsInit(path string) Return
- func DeviceGetCount() (uint, Return)
- func DeviceGetHandleByIndex(Index uint, device *Device) Return
- func DeviceGetPowerManagementDefaultLimit(device Device) (uint32, Return)
- func DeviceGetPowerManagementLimit(device Device) (uint32, Return)
- func DeviceGetPowerManagementLimitConstraints(device Device) (uint32, uint32, Return)
- func DeviceGetTemperatureThreshold(device Device, thresholdType TemperatureThresholds) (uint32, Return)
- func GetOnSameBoard(device1, device2 Device) (int, Return)
- func GpmMetricsGet(metricsGet *GpmMetricsGetType) Return
- func Init() Return
- func Shutdown() Return
- func SystemGetCudaDriverVersion() (string, Return)
- func SystemGetCudaDriverVersion_v2() (string, Return)
- func SystemGetDriverVersion() (string, Return)
- type TemperatureSensors
- type TemperatureThresholds
- type Utilization
Constants ¶
const ( // GPM_METRICS_GET_VERSION as defined in ixml/api.h:400 GPM_METRICS_GET_VERSION = 1 // GPM_SUPPORT_VERSION as defined in ixml/api.h:411 GPM_SUPPORT_VERSION = 1 // DEVICE_UUID_BUFFER_SIZE as defined in ixml/api.h:415 DEVICE_UUID_BUFFER_SIZE = 80 // SYSTEM_DRIVER_VERSION_BUFFER_SIZE as defined in ixml/api.h:420 SYSTEM_DRIVER_VERSION_BUFFER_SIZE = 80 // DEVICE_NAME_BUFFER_SIZE as defined in ixml/api.h:425 DEVICE_NAME_BUFFER_SIZE = 64 // DEVICE_NAME_V2_BUFFER_SIZE as defined in ixml/api.h:430 DEVICE_NAME_V2_BUFFER_SIZE = 96 // DEVICE_PCI_BUS_ID_BUFFER_SIZE as defined in ixml/api.h:435 DEVICE_PCI_BUS_ID_BUFFER_SIZE = 32 // DEVICE_PCI_BUS_ID_BUFFER_V2_SIZE as defined in ixml/api.h:440 DEVICE_PCI_BUS_ID_BUFFER_V2_SIZE = 16 // HealthSYSHUBError as defined in ixml/api.h:442 HealthSYSHUBError = int64(0x0000000000000001) // HealthMCError as defined in ixml/api.h:443 HealthMCError = int64(0x0000000000000002) // HealthOverTempError as defined in ixml/api.h:444 HealthOverTempError = int64(0x0000000000000004) // HealthOverVoltageError as defined in ixml/api.h:445 HealthOverVoltageError = int64(0x0000000000000008) // HealthECCError as defined in ixml/api.h:446 HealthECCError = int64(0x0000000000000010) // HealthMemoryError as defined in ixml/api.h:447 HealthMemoryError = int64(0x0000000000000020) // HealthPCIEError as defined in ixml/api.h:448 HealthPCIEError = int64(0x0000000000000040) // HealthOK as defined in ixml/api.h:449 HealthOK = int64(0x0000000000000000) // NO_UNVERSIONED_FUNC_DEFS as defined in go-ixml/<predefined>:349 NO_UNVERSIONED_FUNC_DEFS = 1 )
Variables ¶
This section is empty.
Functions ¶
func GetHandleByUUID ¶
func GpmSampleAlloc ¶
Types ¶
type Device ¶
type Device struct {
Handle *_Ctype_struct_nvmlDevice_st
}
func NewDevice ¶
func NewDevice() *Device
NewDevice allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewDeviceRef ¶
NewDeviceRef converts the C object reference into a raw struct reference without wrapping.
func (Device) GetBoardPosition ¶
func (Device) GetClockInfo ¶
func (Device) GetComputeRunningProcesses ¶
func (Device) GetCurrentClocksThrottleReasons ¶
func (Device) GetFanSpeed ¶
func (Device) GetMemoryInfo ¶
func (Device) GetMemoryInfo_v2 ¶
func (Device) GetMinorNumber ¶
func (Device) GetPciInfo ¶
func (Device) GetPcieReplayCounter ¶
func (Device) GetPowerManagementDefaultLimit ¶
func (Device) GetPowerManagementLimit ¶
func (Device) GetPowerManagementLimitConstraints ¶
func (Device) GetPowerUsage ¶
func (Device) GetTemperature ¶
func (Device) GetTemperatureThreshold ¶
func (device Device) GetTemperatureThreshold(thresholdType TemperatureThresholds) (uint32, Return)
func (Device) GetTopology ¶
func (device Device) GetTopology(device2 Device) (GpuTopologyLevel, Return)
func (Device) GetUtilizationRates ¶
func (device Device) GetUtilizationRates() (Utilization, Return)
func (Device) GpmQueryDeviceSupport ¶
func (device Device) GpmQueryDeviceSupport() (GpmSupport, Return)
func (Device) GpmSampleGet ¶
func (*Device) PassRef ¶
func (x *Device) PassRef() *C.nvmlDevice_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*Device) Ref ¶
func (x *Device) Ref() *C.nvmlDevice_t
Ref returns a reference to C object as it is.
type EventSet ¶
type EventSet struct {
Handle *_Ctype_struct_nvmlEventSet_st
}
func NewEventSet ¶
func NewEventSet() *EventSet
NewEventSet allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewEventSetRef ¶
NewEventSetRef converts the C object reference into a raw struct reference without wrapping.
func (*EventSet) PassRef ¶
func (x *EventSet) PassRef() *C.nvmlEventSet_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*EventSet) Ref ¶
func (x *EventSet) Ref() *C.nvmlEventSet_t
Ref returns a reference to C object as it is.
type GpmMetricId ¶
type GpmMetricId int32
GpmMetricId as declared in ixml/api.h:345
const ( GPM_METRIC_GRAPHICS_UTIL GpmMetricId = 1 GPM_METRIC_SM_UTIL GpmMetricId = 2 GPM_METRIC_SM_OCCUPANCY GpmMetricId = 3 GPM_METRIC_INTEGER_UTIL GpmMetricId = 4 GPM_METRIC_ANY_TENSOR_UTIL GpmMetricId = 5 GPM_METRIC_DFMA_TENSOR_UTIL GpmMetricId = 6 GPM_METRIC_HMMA_TENSOR_UTIL GpmMetricId = 7 GPM_METRIC_IMMA_TENSOR_UTIL GpmMetricId = 9 GPM_METRIC_DRAM_BW_UTIL GpmMetricId = 10 GPM_METRIC_FP64_UTIL GpmMetricId = 11 GPM_METRIC_FP32_UTIL GpmMetricId = 12 GPM_METRIC_FP16_UTIL GpmMetricId = 13 GPM_METRIC_PCIE_TX_PER_SEC GpmMetricId = 20 GPM_METRIC_PCIE_RX_PER_SEC GpmMetricId = 21 GPM_METRIC_NVDEC_0_UTIL GpmMetricId = 30 GPM_METRIC_NVDEC_1_UTIL GpmMetricId = 31 GPM_METRIC_NVDEC_2_UTIL GpmMetricId = 32 GPM_METRIC_NVDEC_3_UTIL GpmMetricId = 33 GPM_METRIC_NVDEC_4_UTIL GpmMetricId = 34 GPM_METRIC_NVDEC_5_UTIL GpmMetricId = 35 GPM_METRIC_NVDEC_6_UTIL GpmMetricId = 36 GPM_METRIC_NVDEC_7_UTIL GpmMetricId = 37 GPM_METRIC_NVJPG_0_UTIL GpmMetricId = 40 GPM_METRIC_NVJPG_1_UTIL GpmMetricId = 41 GPM_METRIC_NVJPG_2_UTIL GpmMetricId = 42 GPM_METRIC_NVJPG_3_UTIL GpmMetricId = 43 GPM_METRIC_NVJPG_4_UTIL GpmMetricId = 44 GPM_METRIC_NVJPG_5_UTIL GpmMetricId = 45 GPM_METRIC_NVJPG_6_UTIL GpmMetricId = 46 GPM_METRIC_NVJPG_7_UTIL GpmMetricId = 47 GPM_METRIC_NVOFA_0_UTIL GpmMetricId = 50 GPM_METRIC_NVLINK_TOTAL_RX_PER_SEC GpmMetricId = 60 GPM_METRIC_NVLINK_TOTAL_TX_PER_SEC GpmMetricId = 61 GPM_METRIC_NVLINK_L0_RX_PER_SEC GpmMetricId = 62 GPM_METRIC_NVLINK_L0_TX_PER_SEC GpmMetricId = 63 GPM_METRIC_NVLINK_L1_RX_PER_SEC GpmMetricId = 64 GPM_METRIC_NVLINK_L1_TX_PER_SEC GpmMetricId = 65 GPM_METRIC_NVLINK_L2_RX_PER_SEC GpmMetricId = 66 GPM_METRIC_NVLINK_L2_TX_PER_SEC GpmMetricId = 67 GPM_METRIC_NVLINK_L3_RX_PER_SEC GpmMetricId = 68 GPM_METRIC_NVLINK_L3_TX_PER_SEC GpmMetricId = 69 GPM_METRIC_NVLINK_L4_RX_PER_SEC GpmMetricId = 70 GPM_METRIC_NVLINK_L4_TX_PER_SEC GpmMetricId = 71 GPM_METRIC_NVLINK_L5_RX_PER_SEC GpmMetricId = 72 GPM_METRIC_NVLINK_L5_TX_PER_SEC GpmMetricId = 73 GPM_METRIC_NVLINK_L6_RX_PER_SEC GpmMetricId = 74 GPM_METRIC_NVLINK_L6_TX_PER_SEC GpmMetricId = 75 GPM_METRIC_NVLINK_L7_RX_PER_SEC GpmMetricId = 76 GPM_METRIC_NVLINK_L7_TX_PER_SEC GpmMetricId = 77 GPM_METRIC_NVLINK_L8_RX_PER_SEC GpmMetricId = 78 GPM_METRIC_NVLINK_L8_TX_PER_SEC GpmMetricId = 79 GPM_METRIC_NVLINK_L9_RX_PER_SEC GpmMetricId = 80 GPM_METRIC_NVLINK_L9_TX_PER_SEC GpmMetricId = 81 GPM_METRIC_NVLINK_L10_RX_PER_SEC GpmMetricId = 82 GPM_METRIC_NVLINK_L10_TX_PER_SEC GpmMetricId = 83 GPM_METRIC_NVLINK_L11_RX_PER_SEC GpmMetricId = 84 GPM_METRIC_NVLINK_L11_TX_PER_SEC GpmMetricId = 85 GPM_METRIC_NVLINK_L12_RX_PER_SEC GpmMetricId = 86 GPM_METRIC_NVLINK_L12_TX_PER_SEC GpmMetricId = 87 GPM_METRIC_NVLINK_L13_RX_PER_SEC GpmMetricId = 88 GPM_METRIC_NVLINK_L13_TX_PER_SEC GpmMetricId = 89 GPM_METRIC_NVLINK_L14_RX_PER_SEC GpmMetricId = 90 GPM_METRIC_NVLINK_L14_TX_PER_SEC GpmMetricId = 91 GPM_METRIC_NVLINK_L15_RX_PER_SEC GpmMetricId = 92 GPM_METRIC_NVLINK_L15_TX_PER_SEC GpmMetricId = 93 GPM_METRIC_NVLINK_L16_RX_PER_SEC GpmMetricId = 94 GPM_METRIC_NVLINK_L16_TX_PER_SEC GpmMetricId = 95 GPM_METRIC_NVLINK_L17_RX_PER_SEC GpmMetricId = 96 GPM_METRIC_NVLINK_L17_TX_PER_SEC GpmMetricId = 97 GPM_METRIC_MAX GpmMetricId = 98 )
GpmMetricId enumeration from ixml/api.h:345
type GpmMetricsGetType ¶
type GpmMetricsGetType struct { Version uint32 NumMetrics uint32 Sample1 GpmSample Sample2 GpmSample Metrics [98]GpmMetric }
GpmMetricsGetType includes interface types for GpmSample instead of nvmlGpmSample
type GpmSupport ¶
type GpuTopologyLevel ¶
type GpuTopologyLevel int32
GpuTopologyLevel as declared in ixml/api.h:256
const ( TOPOLOGY_INTERNAL GpuTopologyLevel = iota TOPOLOGY_SINGLE GpuTopologyLevel = 10 TOPOLOGY_MULTIPLE GpuTopologyLevel = 20 TOPOLOGY_HOSTBRIDGE GpuTopologyLevel = 30 TOPOLOGY_NODE GpuTopologyLevel = 40 TOPOLOGY_SYSTEM GpuTopologyLevel = 50 )
GpuTopologyLevel enumeration from ixml/api.h:256
type Memory ¶
func NewMemory ¶
func NewMemory() *Memory
NewMemory allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewMemoryRef ¶
NewMemoryRef converts the C object reference into a raw struct reference without wrapping.
func (*Memory) PassRef ¶
func (x *Memory) PassRef() *C.nvmlMemory_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*Memory) Ref ¶
func (x *Memory) Ref() *C.nvmlMemory_t
Ref returns a reference to C object as it is.
type Memory_v2 ¶
func NewMemory_v2 ¶
func NewMemory_v2() *Memory_v2
NewMemory_v2 allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewMemory_v2Ref ¶
NewMemory_v2Ref converts the C object reference into a raw struct reference without wrapping.
func (*Memory_v2) PassRef ¶
func (x *Memory_v2) PassRef() *C.nvmlMemory_v2_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*Memory_v2) Ref ¶
func (x *Memory_v2) Ref() *C.nvmlMemory_v2_t
Ref returns a reference to C object as it is.
type PciInfo ¶
type PciInfo struct { BusIdLegacy [16]int8 Domain uint32 Bus uint32 Device uint32 PciDeviceId uint32 PciSubSystemId uint32 BusId [32]int8 }
func NewPciInfo ¶
func NewPciInfo() *PciInfo
NewPciInfo allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewPciInfoRef ¶
NewPciInfoRef converts the C object reference into a raw struct reference without wrapping.
func (*PciInfo) PassRef ¶
func (x *PciInfo) PassRef() *C.nvmlPciInfo_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*PciInfo) Ref ¶
func (x *PciInfo) Ref() *C.nvmlPciInfo_t
Ref returns a reference to C object as it is.
type ProcessInfo ¶
type ProcessInfo_v1 ¶
type Return ¶
type Return int32
Return as declared in ixml/api.h:129
const ( SUCCESS Return = iota ERROR_UNINITIALIZED Return = 1 ERROR_INVALID_ARGUMENT Return = 2 ERROR_NOT_SUPPORTED Return = 3 ERROR_NO_PERMISSION Return = 4 ERROR_ALREADY_INITIALIZED Return = 5 ERROR_NOT_FOUND Return = 6 ERROR_INSUFFICIENT_SIZE Return = 7 ERROR_INSUFFICIENT_POWER Return = 8 ERROR_DRIVER_NOT_LOADED Return = 9 ERROR_TIMEOUT Return = 10 ERROR_IRQ_ISSUE Return = 11 ERROR_LIBRARY_NOT_FOUND Return = 12 ERROR_FUNCTION_NOT_FOUND Return = 13 ERROR_CORRUPTED_INFOROM Return = 14 ERROR_GPU_IS_LOST Return = 15 ERROR_RESET_REQUIRED Return = 16 ERROR_OPERATING_SYSTEM Return = 17 ERROR_LIB_RM_VERSION_MISMATCH Return = 18 ERROR_IN_USE Return = 19 ERROR_MEMORY Return = 20 ERROR_NO_DATA Return = 21 ERROR_VGPU_ECC_NOT_SUPPORTED Return = 22 ERROR_INSUFFICIENT_RESOURCES Return = 23 ERROR_FREQ_NOT_SUPPORTED Return = 24 ERROR_ARGUMENT_VERSION_MISMATCH Return = 25 ERROR_UNKNOWN Return = 999 )
Return enumeration from ixml/api.h:129
func DeviceGetCount ¶
func DeviceGetHandleByIndex ¶
func DeviceGetTemperatureThreshold ¶
func DeviceGetTemperatureThreshold(device Device, thresholdType TemperatureThresholds) (uint32, Return)
func GetOnSameBoard ¶
func GpmMetricsGet ¶
func GpmMetricsGet(metricsGet *GpmMetricsGetType) Return
func SystemGetDriverVersion ¶
type TemperatureSensors ¶
type TemperatureSensors int32
TemperatureSensors as declared in ixml/api.h:201
const ( TEMPERATURE_GPU TemperatureSensors = iota TEMPERATURE_COUNT TemperatureSensors = 1 )
TemperatureSensors enumeration from ixml/api.h:201
type TemperatureThresholds ¶
type TemperatureThresholds int32
TemperatureThresholds as declared in ixml/api.h:190
const ( TEMPERATURE_THRESHOLD_SHUTDOWN TemperatureThresholds = iota TEMPERATURE_THRESHOLD_SLOWDOWN TemperatureThresholds = 1 TEMPERATURE_THRESHOLD_MEM_MAX TemperatureThresholds = 2 TEMPERATURE_THRESHOLD_GPU_MAX TemperatureThresholds = 3 TEMPERATURE_THRESHOLD_ACOUSTIC_MIN TemperatureThresholds = 4 TEMPERATURE_THRESHOLD_ACOUSTIC_CURR TemperatureThresholds = 5 TEMPERATURE_THRESHOLD_ACOUSTIC_MAX TemperatureThresholds = 6 TEMPERATURE_THRESHOLD_COUNT TemperatureThresholds = 7 )
TemperatureThresholds enumeration from ixml/api.h:190
type Utilization ¶
func NewUtilization ¶
func NewUtilization() *Utilization
NewUtilization allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewUtilizationRef ¶
func NewUtilizationRef(ref unsafe.Pointer) *Utilization
NewUtilizationRef converts the C object reference into a raw struct reference without wrapping.
func (*Utilization) Free ¶
func (x *Utilization) Free()
Free cleanups the referenced memory using C free.
func (*Utilization) PassRef ¶
func (x *Utilization) PassRef() *C.nvmlUtilization_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*Utilization) Ref ¶
func (x *Utilization) Ref() *C.nvmlUtilization_t
Ref returns a reference to C object as it is.