Documentation ¶
Overview ¶
Package ROCM SMI bindings
Index ¶
- Constants
- Variables
- func ComputeProcessByPid(Pid uint32) (RSMI_process_info, RSMI_status)
- func ComputeProcesses() ([]RSMI_process_info, RSMI_status)
- func CounterRead(Handle RSMI_event_handle) (RSMI_counter_value, RSMI_status)
- func DeviceCounterCreate(Device DeviceHandle, Type RSMI_event_type) (RSMI_event_handle, RSMI_status)
- func DeviceGetClockFrequency(Device DeviceHandle, Clock RSMI_clk_type) (RSMI_frequencies, RSMI_status)
- func DeviceGetEccCount(Device DeviceHandle, Block RSMI_gpu_block) (RSMI_error_count, RSMI_status)
- func DeviceGetEccStatus(Device DeviceHandle, Block RSMI_gpu_block) (RSMI_ras_err_state, RSMI_status)
- func DeviceGetHandleByIndex(Index int) (DeviceHandle, RSMI_status)
- func DeviceGetLinkType(SrcDevice DeviceHandle, DstDevice DeviceHandle) (uint64, RSMI_IO_LINK_TYPE, RSMI_status)
- func DeviceGetMemoryReservedPages(Device DeviceHandle) ([]RSMI_retired_page_record, RSMI_status)
- func DeviceGetMetrics(Device DeviceHandle) (RSMI_gpu_metrics, RSMI_status)
- func DeviceGetPciBandwidth(Device DeviceHandle) (RSMI_pcie_bandwidth, RSMI_status)
- func DeviceGetPciInfo(Device DeviceHandle) (Pci_info, RSMI_status)
- func DeviceGetPerfLevel(Device DeviceHandle) (RSMI_dev_perf_level, RSMI_status)
- func DeviceGetPowerProfile(Device DeviceHandle, Sensor uint32) (RSMI_power_profile_status, RSMI_status)
- func DeviceGetUtilizationCounters(Device DeviceHandle) ([]RSMI_utilization_counter, uint64, RSMI_status)
- func DeviceGetVoltageFrequencyCurve(Device DeviceHandle) (RSMI_od_volt_freq_data, RSMI_status)
- func DeviceGetVoltageFrequencyCurveRegions(Device DeviceHandle) ([]RSMI_freq_volt_region, RSMI_status)
- func DeviceXgmiErrorStatus(Device DeviceHandle) (RSMI_xgmi_status, RSMI_status)
- func GetEventNotification(TimeoutMs int32) ([]RSMI_evt_notification_data, RSMI_status)
- func StatusStringNoError(Status RSMI_status) string
- func Version() (RSMI_version, RSMI_status)
- type DeviceHandle
- func (Device DeviceHandle) CounterCreate(Type RSMI_event_type) (RSMI_event_handle, RSMI_status)
- func (Device DeviceHandle) CounterGetAvailable(EventGroup RSMI_event_group) (uint32, RSMI_status)
- func (Device DeviceHandle) CounterGroupSupported(EventGroup RSMI_event_group) RSMI_status
- func (Device DeviceHandle) GetBrand() (string, RSMI_status)
- func (Device DeviceHandle) GetBusyPercent() (uint32, RSMI_status)
- func (Device DeviceHandle) GetClockFrequency(Clock RSMI_clk_type) (RSMI_frequencies, RSMI_status)
- func (Device DeviceHandle) GetDefaultPowerCap() (uint64, RSMI_status)
- func (Device DeviceHandle) GetDrmRenverMinor() (uint32, RSMI_status)
- func (Device DeviceHandle) GetEccCount(Block RSMI_gpu_block) (RSMI_error_count, RSMI_status)
- func (Device DeviceHandle) GetEccMask() (uint64, RSMI_status)
- func (Device DeviceHandle) GetEccStatus(Block RSMI_gpu_block) (RSMI_ras_err_state, RSMI_status)
- func (Device DeviceHandle) GetEnergyCount() (uint64, float32, uint64, RSMI_status)
- func (Device DeviceHandle) GetFanRpms(Sensor uint32) (int64, RSMI_status)
- func (Device DeviceHandle) GetFanSpeed(Sensor uint32) (int64, RSMI_status)
- func (Device DeviceHandle) GetFirmwareVersion(Block RSMI_fw_block) (uint64, RSMI_status)
- func (Device DeviceHandle) GetLinkType(DstDevice DeviceHandle) (uint64, RSMI_IO_LINK_TYPE, RSMI_status)
- func (Device DeviceHandle) GetLinkWeight(DstDevice DeviceHandle) (uint64, RSMI_status)
- func (Device DeviceHandle) GetMaxFanSpeed(Sensor uint32) (uint64, RSMI_status)
- func (Device DeviceHandle) GetMemoryReservedPages() ([]RSMI_retired_page_record, RSMI_status)
- func (Device DeviceHandle) GetMemoryUtilization() (uint32, RSMI_status)
- func (Device DeviceHandle) GetMetrics() (RSMI_gpu_metrics, RSMI_status)
- func (Device DeviceHandle) GetMinMaxBandwidth(DstDevice DeviceHandle) (uint64, uint64, RSMI_status)
- func (Device DeviceHandle) GetName() (string, RSMI_status)
- func (Device DeviceHandle) GetNumaAffinity() (uint32, RSMI_status)
- func (Device DeviceHandle) GetNumaNode() (uint32, RSMI_status)
- func (Device DeviceHandle) GetOverdriveLevel() (uint32, RSMI_status)
- func (Device DeviceHandle) GetPciBandwidth() (RSMI_pcie_bandwidth, RSMI_status)
- func (Device DeviceHandle) GetPciId() (uint64, RSMI_status)
- func (Device DeviceHandle) GetPciInfo() (Pci_info, RSMI_status)
- func (Device DeviceHandle) GetPciReplayCounter() (uint64, RSMI_status)
- func (Device DeviceHandle) GetPciThroughput() (uint64, uint64, uint64, RSMI_status)
- func (Device DeviceHandle) GetPerfLevel() (RSMI_dev_perf_level, RSMI_status)
- func (Device DeviceHandle) GetPowerAverage(Sensor uint32) (uint64, RSMI_status)
- func (Device DeviceHandle) GetPowerCap(Sensor uint32) (uint64, RSMI_status)
- func (Device DeviceHandle) GetPowerCapRange(Sensor uint32) (uint64, uint64, RSMI_status)
- func (Device DeviceHandle) GetPowerProfile(Sensor uint32) (RSMI_power_profile_status, RSMI_status)
- func (Device DeviceHandle) GetSerialNumber() (string, RSMI_status)
- func (Device DeviceHandle) GetSku() (string, RSMI_status)
- func (Device DeviceHandle) GetSubsystemId() (uint16, RSMI_status)
- func (Device DeviceHandle) GetSubsystemName() (string, RSMI_status)
- func (Device DeviceHandle) GetTemperatureMetric(Sensor RSMI_temperature_type, Metric RSMI_temperature_metric) (int64, RSMI_status)
- func (Device DeviceHandle) GetTotalMemory(Type RSMI_memory_type) (uint64, RSMI_status)
- func (Device DeviceHandle) GetUniqueId() (uint64, RSMI_status)
- func (Device DeviceHandle) GetUsedMemory(Type RSMI_memory_type) (uint64, RSMI_status)
- func (Device DeviceHandle) GetUtilizationCounters() ([]RSMI_utilization_counter, uint64, RSMI_status)
- func (Device DeviceHandle) GetVbiosVersionString() (string, RSMI_status)
- func (Device DeviceHandle) GetVendorId() (uint16, RSMI_status)
- func (Device DeviceHandle) GetVendorName() (string, RSMI_status)
- func (Device DeviceHandle) GetVoltageFrequencyCurve() (RSMI_od_volt_freq_data, RSMI_status)
- func (Device DeviceHandle) GetVoltageFrequencyCurveRegions() ([]RSMI_freq_volt_region, RSMI_status)
- func (Device DeviceHandle) GetVoltageMetric(Sensor RSMI_voltage_type, Metric RSMI_voltage_metric) (int64, RSMI_status)
- func (Device DeviceHandle) GetVramVendor() (string, RSMI_status)
- func (d *DeviceHandle) ID() uint16
- func (d *DeviceHandle) Index() uint32
- func (Device DeviceHandle) InitEventNotification() RSMI_status
- func (Device DeviceHandle) IsP2PAccessible(DstDevice DeviceHandle) (bool, RSMI_status)
- func (Device DeviceHandle) Reset() RSMI_status
- func (Device DeviceHandle) ResetFan(Sensor uint32) RSMI_status
- func (Device DeviceHandle) SetClockFrequency(Clock RSMI_clk_type, FreqMask uint64) RSMI_status
- func (Device DeviceHandle) SetClockInfo(Level RSMI_freq_ind, ClockFreq uint64, Clock RSMI_clk_type) RSMI_status
- func (Device DeviceHandle) SetClockRange(MinFreq uint64, MaxFreq uint64, Clock RSMI_clk_type) RSMI_status
- func (Device DeviceHandle) SetDeterminismMode(Clock uint64) RSMI_status
- func (Device DeviceHandle) SetEventNotificationMask(Mask uint64) RSMI_status
- func (Device DeviceHandle) SetFanSpeed(Sensor uint32, Speed uint64) RSMI_status
- func (Device DeviceHandle) SetOverdriveLevel(Overdrive uint32) RSMI_status
- func (Device DeviceHandle) SetPciBandwidth(Mask uint64) RSMI_status
- func (Device DeviceHandle) SetPerfLevel(Level RSMI_dev_perf_level) RSMI_status
- func (Device DeviceHandle) SetPowerCap(Sensor uint32, Mask uint64) RSMI_status
- func (Device DeviceHandle) SetPowerProfile(Preset RSMI_power_profile_preset_masks) RSMI_status
- func (Device DeviceHandle) SetVoltageInfo(Vpoint uint32, ClockFreq uint64, Voltage uint64) RSMI_status
- func (Device DeviceHandle) StopEventNotification() RSMI_status
- func (d *DeviceHandle) Supported() map[string]map[uint64][]uint64
- func (Device DeviceHandle) XgmiErrorReset() RSMI_status
- func (Device DeviceHandle) XgmiErrorStatus() (RSMI_xgmi_status, RSMI_status)
- func (Device DeviceHandle) XgmiHiveId() (uint64, RSMI_status)
- type Kfd_mmio_remap
- type Kfd_smi_event
- type Pci_info
- type RSMI_IO_LINK_TYPE
- type RSMI_UTILIZATION_COUNTER_TYPE
- type RSMI_bit_field
- type RSMI_clk_type
- type RSMI_counter_command
- type RSMI_counter_value
- type RSMI_dev_perf_level
- type RSMI_error_count
- type RSMI_event_group
- type RSMI_event_handle
- type RSMI_event_type
- type RSMI_evt_notification_data
- type RSMI_evt_notification_type
- type RSMI_freq_ind
- type RSMI_freq_volt_region
- type RSMI_frequencies
- type RSMI_func_id_iter_handle
- type RSMI_func_id_value
- type RSMI_fw_block
- type RSMI_gpu_block
- type RSMI_gpu_metrics
- type RSMI_helper_function
- type RSMI_helper_function_variants
- type RSMI_helper_variants
- type RSMI_init_flags
- type RSMI_memory_page_status
- type RSMI_memory_type
- type RSMI_od_vddc_point
- type RSMI_od_volt_curve
- type RSMI_od_volt_freq_data
- type RSMI_pcie_bandwidth
- type RSMI_power_profile_preset_masks
- type RSMI_power_profile_status
- type RSMI_process_info
- type RSMI_range
- type RSMI_ras_err_state
- type RSMI_retired_page_record
- type RSMI_status
- func ComponentVersionString(Component RSMI_sw_component) (string, RSMI_status)
- func ComputeProcessGpus(Pid uint32) ([]uint32, RSMI_status)
- func CounterControl(Handle RSMI_event_handle, Cmd RSMI_counter_command) RSMI_status
- func CounterDestroy(Handle RSMI_event_handle) RSMI_status
- func DeviceCounterGetAvailable(Device DeviceHandle, EventGroup RSMI_event_group) (uint32, RSMI_status)
- func DeviceCounterGroupSupported(Device DeviceHandle, EventGroup RSMI_event_group) RSMI_status
- func DeviceGetBrand(Device DeviceHandle) (string, RSMI_status)
- func DeviceGetBusyPercent(Device DeviceHandle) (uint32, RSMI_status)
- func DeviceGetDefaultPowerCap(Device DeviceHandle) (uint64, RSMI_status)
- func DeviceGetDrmRenderMinor(Device DeviceHandle) (uint32, RSMI_status)
- func DeviceGetEccMask(Device DeviceHandle) (uint64, RSMI_status)
- func DeviceGetEnergyCount(Device DeviceHandle) (uint64, float32, uint64, RSMI_status)
- func DeviceGetFanRpms(Device DeviceHandle, Sensor uint32) (int64, RSMI_status)
- func DeviceGetFanSpeed(Device DeviceHandle, Sensor uint32) (int64, RSMI_status)
- func DeviceGetFirmwareVersion(Device DeviceHandle, Block RSMI_fw_block) (uint64, RSMI_status)
- func DeviceGetLinkWeight(SrcDevice DeviceHandle, DstDevice DeviceHandle) (uint64, RSMI_status)
- func DeviceGetMaxFanSpeed(Device DeviceHandle, Sensor uint32) (uint64, RSMI_status)
- func DeviceGetMemoryUtilization(Device DeviceHandle) (uint32, RSMI_status)
- func DeviceGetMinMaxBandwidth(SrcDevice DeviceHandle, DstDevice DeviceHandle) (uint64, uint64, RSMI_status)
- func DeviceGetName(Device DeviceHandle) (string, RSMI_status)
- func DeviceGetNumaAffinity(Device DeviceHandle) (uint32, RSMI_status)
- func DeviceGetNumaNode(Device DeviceHandle) (uint32, RSMI_status)
- func DeviceGetOverdriveLevel(Device DeviceHandle) (uint32, RSMI_status)
- func DeviceGetPciId(Device DeviceHandle) (uint64, RSMI_status)
- func DeviceGetPciReplayCounter(Device DeviceHandle) (uint64, RSMI_status)
- func DeviceGetPciThroughput(Device DeviceHandle) (uint64, uint64, uint64, RSMI_status)
- func DeviceGetPowerAverage(Device DeviceHandle, Sensor uint32) (uint64, RSMI_status)
- func DeviceGetPowerCap(Device DeviceHandle, Sensor uint32) (uint64, RSMI_status)
- func DeviceGetPowerCapRange(Device DeviceHandle, Sensor uint32) (uint64, uint64, RSMI_status)
- func DeviceGetSerialNumber(Device DeviceHandle) (string, RSMI_status)
- func DeviceGetSubsystemId(Device DeviceHandle) (uint16, RSMI_status)
- func DeviceGetSubsystemName(Device DeviceHandle) (string, RSMI_status)
- func DeviceGetTemperatureMetric(Device DeviceHandle, Sensor RSMI_temperature_type, ...) (int64, RSMI_status)
- func DeviceGetTotalMemory(Device DeviceHandle, Type RSMI_memory_type) (uint64, RSMI_status)
- func DeviceGetUniqueId(Device DeviceHandle) (uint64, RSMI_status)
- func DeviceGetUsedMemory(Device DeviceHandle, Type RSMI_memory_type) (uint64, RSMI_status)
- func DeviceGetVbiosVersionString(Device DeviceHandle) (string, RSMI_status)
- func DeviceGetVendorId(Device DeviceHandle) (uint16, RSMI_status)
- func DeviceGetVendorName(Device DeviceHandle) (string, RSMI_status)
- func DeviceGetVoltageMetric(Device DeviceHandle, Sensor RSMI_voltage_type, Metric RSMI_voltage_metric) (int64, RSMI_status)
- func DeviceGetVramVendor(Device DeviceHandle) (string, RSMI_status)
- func DeviceInitEventNotification(Device DeviceHandle) RSMI_status
- func DeviceIsP2PAccessible(SrcDevice DeviceHandle, DstDevice DeviceHandle) (bool, RSMI_status)
- func DeviceReset(Device DeviceHandle) RSMI_status
- func DeviceResetFan(Device DeviceHandle, Sensor uint32) RSMI_status
- func DeviceSetClockFrequency(Device DeviceHandle, Clock RSMI_clk_type, FreqMask uint64) RSMI_status
- func DeviceSetClockInfo(Device DeviceHandle, Level RSMI_freq_ind, ClockFreq uint64, ...) RSMI_status
- func DeviceSetClockRange(Device DeviceHandle, MinFreq uint64, MaxFreq uint64, Clock RSMI_clk_type) RSMI_status
- func DeviceSetDeterminismMode(Device DeviceHandle, Clock uint64) RSMI_status
- func DeviceSetEventNotificationMask(Device DeviceHandle, Mask uint64) RSMI_status
- func DeviceSetFanSpeed(Device DeviceHandle, Sensor uint32, Speed uint64) RSMI_status
- func DeviceSetPciBandwidth(Device DeviceHandle, Mask uint64) RSMI_status
- func DeviceSetPowerCap(Device DeviceHandle, Sensor uint32, Mask uint64) RSMI_status
- func DeviceSetPowerProfile(Device DeviceHandle, Preset RSMI_power_profile_preset_masks) RSMI_status
- func DeviceSetVoltageInfo(Device DeviceHandle, Vpoint uint32, ClockFreq uint64, Voltage uint64) RSMI_status
- func DeviceStopEventNotification(Device DeviceHandle) RSMI_status
- func DeviceXgmiErrorReset(Device DeviceHandle) RSMI_status
- func DeviceXgmiHiveId(Device DeviceHandle) (uint64, RSMI_status)
- func Init() RSMI_status
- func InitWithFlags(Flags uint64) RSMI_status
- func NumMonitorDevices() (int, RSMI_status)
- func Shutdown() RSMI_status
- func StatusString(Status RSMI_status) (string, RSMI_status)
- type RSMI_sw_component
- type RSMI_temperature_metric
- type RSMI_temperature_type
- type RSMI_utilization_counter
- type RSMI_version
- type RSMI_voltage_metric
- type RSMI_voltage_type
- type RSMI_xgmi_status
Constants ¶
const ( // MAX_NUM_FREQUENCIES as defined in rocm_smi/rocm_smi.h:73 MAX_NUM_FREQUENCIES = 32 // MAX_FAN_SPEED as defined in rocm_smi/rocm_smi.h:77 MAX_FAN_SPEED = 255 // NUM_VOLTAGE_CURVE_POINTS as defined in rocm_smi/rocm_smi.h:80 NUM_VOLTAGE_CURVE_POINTS = 3 // GPU_METRICS_API_FORMAT_VER as defined in rocm_smi/rocm_smi.h:834 GPU_METRICS_API_FORMAT_VER = 1 // GPU_METRICS_API_CONTENT_VER_1 as defined in rocm_smi/rocm_smi.h:837 GPU_METRICS_API_CONTENT_VER_1 = 1 // GPU_METRICS_API_CONTENT_VER_2 as defined in rocm_smi/rocm_smi.h:838 GPU_METRICS_API_CONTENT_VER_2 = 2 // GPU_METRICS_API_CONTENT_VER_3 as defined in rocm_smi/rocm_smi.h:839 GPU_METRICS_API_CONTENT_VER_3 = 3 // NUM_HBM_INSTANCES as defined in rocm_smi/rocm_smi.h:842 NUM_HBM_INSTANCES = 4 // DEFAULT_VARIANT as defined in rocm_smi/rocm_smi.h:935 DEFAULT_VARIANT = 18446744073709551615 // HELPER_MAX_NAME_LEN as defined in rocm_smi/rocm_smi_helpers.h:7 HELPER_MAX_NAME_LEN = 200 // HELPER_MAX_FUNCTIONS as defined in rocm_smi/rocm_smi_helpers.h:8 HELPER_MAX_FUNCTIONS = 300 // HELPER_MAX_SENSORS as defined in rocm_smi/rocm_smi_helpers.h:9 HELPER_MAX_SENSORS = 30 // HELPER_MAX_VARIANTS as defined in rocm_smi/rocm_smi_helpers.h:10 HELPER_MAX_VARIANTS = 100 )
Variables ¶
var DeviceGetSku = deviceGetSkuFake
DeviceGetSku gets the SKU for a device. This function will attempt to obtain the SKU from the Product Information FRU chip, present on server ASICs
Note: There are versions of the rocm_smi library which do not export the function rsmi_dev_sku_get. Therefore the bindings
perform a symbol lookup at initialization. If it is not available, the deviceGetSkuFake function is assigned to DeviceGetSku
Returns STATUS_SUCCESS when call was successful. Returns STATUS_NOT_SUPPORTED when installed software or hardware does not support this function with the given arguments. Returns STATUS_INVALID_ARGS when the provided arguments are not valid.
var DeviceSetOverdriveLevel = deviceSetOverdriveLevel_v1
DeviceSetOverdriveLevel sets the overdrive percent associated with the device.
Note: The RSMI library provides two functions to set the overdrive level. Which function is called by DeviceSetOverdriveLevel is
determined at initialization.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_PERMISSION function requires root access.
var DeviceSetPerfLevel = deviceSetPerfLevel_v1
DeviceSetPerfLevel set the PowerPlay performance level associated with the device.
Note: The RSMI library provides two functions to set the performance level. Which function is called by DeviceSetPerfLevel is
determined at initialization.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_PERMISSION function requires root access.
Functions ¶
func ComputeProcessByPid ¶
func ComputeProcessByPid(Pid uint32) (RSMI_process_info, RSMI_status)
ComputeProcessByPid gets process information about a specific process.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_NOT_FOUND is returned if there was no process information found for the provided Pid.
func ComputeProcesses ¶
func ComputeProcesses() ([]RSMI_process_info, RSMI_status)
ComputeProcesses gets process information about processes currently using GPU.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_INSUFFICIENT_SIZE should not happen as the size is retrieved and a big enough slice allocated.
func CounterRead ¶
func CounterRead(Handle RSMI_event_handle) (RSMI_counter_value, RSMI_status)
CounterRead reads the current value of a performance counter.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_PERMISSION function requires root access.
func DeviceCounterCreate ¶
func DeviceCounterCreate(Device DeviceHandle, Type RSMI_event_type) (RSMI_event_handle, RSMI_status)
DeviceCounterCreate creates a performance counter object.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_OUT_OF_RESOURCES unable to allocate memory for counter. STATUS_PERMISSION function requires root access.
func DeviceGetClockFrequency ¶
func DeviceGetClockFrequency(Device DeviceHandle, Clock RSMI_clk_type) (RSMI_frequencies, RSMI_status)
DeviceGetClockFrequency gets the list of possible system clock speeds of device for a specified clock type.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetEccCount ¶
func DeviceGetEccCount(Device DeviceHandle, Block RSMI_gpu_block) (RSMI_error_count, RSMI_status)
DeviceGetEccCount retrieves the error counts for a GPU block.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetEccStatus ¶
func DeviceGetEccStatus(Device DeviceHandle, Block RSMI_gpu_block) (RSMI_ras_err_state, RSMI_status)
DeviceGetEccStatus retrieves the ECC status for a GPU block.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetHandleByIndex ¶
func DeviceGetHandleByIndex(Index int) (DeviceHandle, RSMI_status)
DeviceGetHandleByIndex gets the device handle associated with the device with provided device index. It also reads the supported functions and their supported arguments. It retrieves also the **not** unique ID.
Returns STATUS_SUCCESS when call was successful. Returns STATUS_NOT_SUPPORTED when installed software or hardware does not support this function with the given arguments. Returns STATUS_INVALID_ARGS when the provided arguments are not valid.
func DeviceGetLinkType ¶
func DeviceGetLinkType(SrcDevice DeviceHandle, DstDevice DeviceHandle) (uint64, RSMI_IO_LINK_TYPE, RSMI_status)
DeviceGetLinkType retrieves the hops and the connection type between 2 GPUs.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetMemoryReservedPages ¶
func DeviceGetMemoryReservedPages(Device DeviceHandle) ([]RSMI_retired_page_record, RSMI_status)
DeviceGetMemoryReservedPages gets information about reserved ("retired") memory pages.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_INSUFFICIENT_SIZE should not happen, the size is retrieved and a big enough slice allocated.
func DeviceGetMetrics ¶
func DeviceGetMetrics(Device DeviceHandle) (RSMI_gpu_metrics, RSMI_status)
DeviceGetMetrics retrieves the GPU metrics information.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetPciBandwidth ¶
func DeviceGetPciBandwidth(Device DeviceHandle) (RSMI_pcie_bandwidth, RSMI_status)
DeviceGetPciBandwidth gets the list of possible PCIe bandwidths that are available.
STATUS_SUCCESS call was successful.
func DeviceGetPciInfo ¶
func DeviceGetPciInfo(Device DeviceHandle) (Pci_info, RSMI_status)
DeviceGetPciInfo gets the unique PCI device identifier associated with the device split into its parts: PCI domain, PCI bus, PCI device and function.
Note: This is an own addition to simply usage, it uses DeviceGetPciId to retrieve the actual PCI identifer and splits it into the parts.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetPerfLevel ¶
func DeviceGetPerfLevel(Device DeviceHandle) (RSMI_dev_perf_level, RSMI_status)
DeviceGetPerfLevel gets the performance level of the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetPowerProfile ¶
func DeviceGetPowerProfile(Device DeviceHandle, Sensor uint32) (RSMI_power_profile_status, RSMI_status)
DeviceGetPowerProfile gets the list of available preset power profiles and an indication of which profile is currently active.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetUtilizationCounters ¶
func DeviceGetUtilizationCounters(Device DeviceHandle) ([]RSMI_utilization_counter, uint64, RSMI_status)
DeviceGetUtilizationCounters gets coarse grain utilization counter of the specified device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetVoltageFrequencyCurve ¶
func DeviceGetVoltageFrequencyCurve(Device DeviceHandle) (RSMI_od_volt_freq_data, RSMI_status)
DeviceGetVoltageFrequencyCurve retrieves the voltage/frequency curve information.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetVoltageFrequencyCurveRegions ¶
func DeviceGetVoltageFrequencyCurveRegions(Device DeviceHandle) ([]RSMI_freq_volt_region, RSMI_status)
DeviceGetVoltageFrequencyCurveRegions retrieves the current valid regions in the frequency/voltage space.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceXgmiErrorStatus ¶
func DeviceXgmiErrorStatus(Device DeviceHandle) (RSMI_xgmi_status, RSMI_status)
DeviceXgmiErrorStatus retrieves the XGMI error status for a device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func GetEventNotification ¶
func GetEventNotification(TimeoutMs int32) ([]RSMI_evt_notification_data, RSMI_status)
GetEventNotification collects event notifications, waiting a specified amount of time.
STATUS_SUCCESS call was successful. STATUS_NO_DATA No events were found to collect.
func StatusStringNoError ¶
func StatusStringNoError(Status RSMI_status) string
StatusStringNoError returns the string representation for the given RSMI_status. Version without returing RSMI_status for simpler usage.
Note: Created manually since the the c-for-go parser does not generate a version with &cStr
STATUS_SUCCESS is returned upon successful call.
func Version ¶
func Version() (RSMI_version, RSMI_status)
Version gets the major, minor, patch and build string for the currently running build of RSMI.
STATUS_SUCCESS is returned upon successful call.
Types ¶
type DeviceHandle ¶
type DeviceHandle struct {
// contains filtered or unexported fields
}
DeviceHandle Virtual device handle for the usage with the functions provided by the rocm_smi package to have similar handling as other packages by first getting the handle for a device index and use this in all subsequent calls.
func (DeviceHandle) CounterCreate ¶
func (Device DeviceHandle) CounterCreate(Type RSMI_event_type) (RSMI_event_handle, RSMI_status)
CounterCreate creates a performance counter object.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_OUT_OF_RESOURCES unable to allocate memory for counter. STATUS_PERMISSION function requires root access.
func (DeviceHandle) CounterGetAvailable ¶
func (Device DeviceHandle) CounterGetAvailable(EventGroup RSMI_event_group) (uint32, RSMI_status)
DeviceCounterGetAvailable gets the number of currently available counters.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) CounterGroupSupported ¶
func (Device DeviceHandle) CounterGroupSupported(EventGroup RSMI_event_group) RSMI_status
CounterGroupSupported tells if an event group is supported by a given device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments.
func (DeviceHandle) GetBrand ¶
func (Device DeviceHandle) GetBrand() (string, RSMI_status)
DeviceGetBrand gets the brand string of a gpu device. If the sku associated with the device is not found as one of the values contained within rsmi_dev_brand_get, then this function will return the device marketing name as a string instead of the brand name.
Returns STATUS_SUCCESS when call was successful. Returns STATUS_NOT_SUPPORTED when installed software or hardware does not support this function with the given arguments. Returns STATUS_INVALID_ARGS when the provided arguments are not valid. Returns STATUS_INSUFFICIENT_SIZE when the vendor name is longer than defaultRsmiStringLength characters.
func (DeviceHandle) GetBusyPercent ¶
func (Device DeviceHandle) GetBusyPercent() (uint32, RSMI_status)
GetBusyPercent gets the percentage of time device is busy doing any processing.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetClockFrequency ¶
func (Device DeviceHandle) GetClockFrequency(Clock RSMI_clk_type) (RSMI_frequencies, RSMI_status)
GetClockFrequency gets the list of possible system clock speeds of device for a specified clock type.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetDefaultPowerCap ¶
func (Device DeviceHandle) GetDefaultPowerCap() (uint64, RSMI_status)
GetDefaultPowerCap gets the default power cap for the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetDrmRenverMinor ¶
func (Device DeviceHandle) GetDrmRenverMinor() (uint32, RSMI_status)
DeviceGetDrmRenderMinor gets the drm minor number associated with the device
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetEccCount ¶
func (Device DeviceHandle) GetEccCount(Block RSMI_gpu_block) (RSMI_error_count, RSMI_status)
GetEccCount retrieves the error counts for a GPU block.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetEccMask ¶
func (Device DeviceHandle) GetEccMask() (uint64, RSMI_status)
GetEccMask retrieved the enabled ECC bit-mask.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetEccStatus ¶
func (Device DeviceHandle) GetEccStatus(Block RSMI_gpu_block) (RSMI_ras_err_state, RSMI_status)
GetEccStatus retrieves the ECC status for a GPU block.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetEnergyCount ¶
func (Device DeviceHandle) GetEnergyCount() (uint64, float32, uint64, RSMI_status)
GetEnergyCount gets the energy accumulator counter of the device. It returns the power, the resolution and the timestamp.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetFanRpms ¶
func (Device DeviceHandle) GetFanRpms(Sensor uint32) (int64, RSMI_status)
GetFanRpms gets the fan speed in RPMs of the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetFanSpeed ¶
func (Device DeviceHandle) GetFanSpeed(Sensor uint32) (int64, RSMI_status)
GetFanSpeed gets the fan speed for the specified device as a value relative to MAX_FAN_SPEED.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetFirmwareVersion ¶
func (Device DeviceHandle) GetFirmwareVersion(Block RSMI_fw_block) (uint64, RSMI_status)
GetFirmwareVersion gets the firmware versions for a device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetLinkType ¶
func (Device DeviceHandle) GetLinkType(DstDevice DeviceHandle) (uint64, RSMI_IO_LINK_TYPE, RSMI_status)
GetLinkType retrieves the hops and the connection type between 2 GPUs.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetLinkWeight ¶
func (Device DeviceHandle) GetLinkWeight(DstDevice DeviceHandle) (uint64, RSMI_status)
GetLinkWeight retrieves the weight for a connection between 2 GPUs.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetMaxFanSpeed ¶
func (Device DeviceHandle) GetMaxFanSpeed(Sensor uint32) (uint64, RSMI_status)
DeviceGetMaxFanSpeed gets the max. fan speed of the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetMemoryReservedPages ¶
func (Device DeviceHandle) GetMemoryReservedPages() ([]RSMI_retired_page_record, RSMI_status)
GetMemoryReservedPages gets information about reserved ("retired") memory pages.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_INSUFFICIENT_SIZE should not happen, the size is retrieved and a big enough slice allocated.
func (DeviceHandle) GetMemoryUtilization ¶
func (Device DeviceHandle) GetMemoryUtilization() (uint32, RSMI_status)
GetMemoryUtilization gets the percentage of time any device memory is being used.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetMetrics ¶
func (Device DeviceHandle) GetMetrics() (RSMI_gpu_metrics, RSMI_status)
GetMetrics retrieves the GPU metrics information.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetMinMaxBandwidth ¶
func (Device DeviceHandle) GetMinMaxBandwidth(DstDevice DeviceHandle) (uint64, uint64, RSMI_status)
GetMinMaxBandwidth retreives minimal and maximal IO link bandwidth between 2 GPUs.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetName ¶
func (Device DeviceHandle) GetName() (string, RSMI_status)
GetName gets the name string of a gpu device. If the integer ID associated with the device is not found in one of the system files containing device name information (e.g. /usr/share/misc/pci.ids), then this function will return the hex device ID as a string.
Returns STATUS_SUCCESS when call was successful. Returns STATUS_NOT_SUPPORTED when installed software or hardware does not support this function with the given arguments. Returns STATUS_INVALID_ARGS when the provided arguments are not valid. Returns STATUS_INSUFFICIENT_SIZE when the vendor name is longer than defaultRsmiStringLength characters.
func (DeviceHandle) GetNumaAffinity ¶
func (Device DeviceHandle) GetNumaAffinity() (uint32, RSMI_status)
GetNumaAffinity gets the NUMA node associated with a device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetNumaNode ¶
func (Device DeviceHandle) GetNumaNode() (uint32, RSMI_status)
GetNumaNode retrieves the NUMA CPU node number for a device.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetOverdriveLevel ¶
func (Device DeviceHandle) GetOverdriveLevel() (uint32, RSMI_status)
GetOverdriveLevel gets the overdrive percent associated with the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetPciBandwidth ¶
func (Device DeviceHandle) GetPciBandwidth() (RSMI_pcie_bandwidth, RSMI_status)
GetPciBandwidth gets the list of possible PCIe bandwidths that are available.
STATUS_SUCCESS call was successful.
func (DeviceHandle) GetPciId ¶
func (Device DeviceHandle) GetPciId() (uint64, RSMI_status)
DeviceGetPciId gets the unique PCI device identifier associated with the device
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetPciInfo ¶
func (Device DeviceHandle) GetPciInfo() (Pci_info, RSMI_status)
GetPciInfo gets the unique PCI device identifier associated with the device split into its parts: PCI domain, PCI bus, PCI device and function.
Note: This is an own addition to simply usage, it uses DeviceGetPciId to retrieve the actual PCI identifer and splits it into the parts.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetPciReplayCounter ¶
func (Device DeviceHandle) GetPciReplayCounter() (uint64, RSMI_status)
GetPciReplayCounter gets the PCIe replay counter.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetPciThroughput ¶
func (Device DeviceHandle) GetPciThroughput() (uint64, uint64, uint64, RSMI_status)
GetPciThroughput gets PCIe traffic information for the device. This function returns the number of bytes sent and received in 1 second and the maximum possible packet size.
Note: The function blocks execution for 1 second.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments.
func (DeviceHandle) GetPerfLevel ¶
func (Device DeviceHandle) GetPerfLevel() (RSMI_dev_perf_level, RSMI_status)
GetPerfLevel gets the performance level of the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetPowerAverage ¶
func (Device DeviceHandle) GetPowerAverage(Sensor uint32) (uint64, RSMI_status)
GetPowerAverage gets the average power consumption of the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetPowerCap ¶
func (Device DeviceHandle) GetPowerCap(Sensor uint32) (uint64, RSMI_status)
GetPowerCap gets the cap on power which, when reached, causes the system to take action to reduce power.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetPowerCapRange ¶
func (Device DeviceHandle) GetPowerCapRange(Sensor uint32) (uint64, uint64, RSMI_status)
GetPowerCapRange gets the range of valid values (maximum and minimum) for the power cap.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetPowerProfile ¶
func (Device DeviceHandle) GetPowerProfile(Sensor uint32) (RSMI_power_profile_status, RSMI_status)
GetPowerProfile gets the list of available preset power profiles and an indication of which profile is currently active.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetSerialNumber ¶
func (Device DeviceHandle) GetSerialNumber() (string, RSMI_status)
GetSerialNumber gets the serial number string for a device
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_INSUFFICIENT_SIZE is returned if version string is larger than defaultRsmiStringLength bytes.
func (DeviceHandle) GetSku ¶
func (Device DeviceHandle) GetSku() (string, RSMI_status)
GetSku gets the SKU for a device.. This function will attempt to obtain the SKU from the Product Information FRU chip, present on server ASICs
Note: There are versions of the rocm_smi library which do not export the function rsmi_dev_sku_get. Therefore the bindings
perform a symbol lookup at initialization. If it is not available, the deviceGetSkuFake function is assigned to DeviceGetSku
Returns STATUS_SUCCESS when call was successful. Returns STATUS_NOT_SUPPORTED when installed software or hardware does not support this function with the given arguments. Returns STATUS_INVALID_ARGS when the provided arguments are not valid.
func (DeviceHandle) GetSubsystemId ¶
func (Device DeviceHandle) GetSubsystemId() (uint16, RSMI_status)
DeviceGetSubsystemId gets the subsystem device id associated with the device
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetSubsystemName ¶
func (Device DeviceHandle) GetSubsystemName() (string, RSMI_status)
GetSubsystemName gets the name string for the device subsytem
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_INSUFFICIENT_SIZE is returned if version string is larger than defaultRsmiStringLength bytes.
func (DeviceHandle) GetTemperatureMetric ¶
func (Device DeviceHandle) GetTemperatureMetric(Sensor RSMI_temperature_type, Metric RSMI_temperature_metric) (int64, RSMI_status)
GetTemperatureMetric gets the temperature metric value for the specified metric, from the specified temperature sensor on the specified device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetTotalMemory ¶
func (Device DeviceHandle) GetTotalMemory(Type RSMI_memory_type) (uint64, RSMI_status)
GetTotalMemory get the total amount of memory that exists.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetUniqueId ¶
func (Device DeviceHandle) GetUniqueId() (uint64, RSMI_status)
DeviceGetUniqueId gets Unique ID
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetUsedMemory ¶
func (Device DeviceHandle) GetUsedMemory(Type RSMI_memory_type) (uint64, RSMI_status)
GetUsedMemory gets the current memory usage.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetUtilizationCounters ¶
func (Device DeviceHandle) GetUtilizationCounters() ([]RSMI_utilization_counter, uint64, RSMI_status)
GetUtilizationCounters gets coarse grain utilization counter of the specified device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetVbiosVersionString ¶
func (Device DeviceHandle) GetVbiosVersionString() (string, RSMI_status)
GetVbiosVersionString gets the VBIOS identifer string.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetVendorId ¶
func (Device DeviceHandle) GetVendorId() (uint16, RSMI_status)
GetVendorId gets the device vendor id associated with the device
Returns STATUS_SUCCESS when call was successful. Returns STATUS_NOT_SUPPORTED when installed software or hardware does not support this function with the given arguments. Returns STATUS_INVALID_ARGS when the provided arguments are not valid.
func (DeviceHandle) GetVendorName ¶
func (Device DeviceHandle) GetVendorName() (string, RSMI_status)
GetVendorName gets the name string for a give vendor ID. If the integer ID associated with the vendor is not found in one of the system files containing device name information (e.g. /usr/share/misc/pci.ids), then this function will return the hex vendor ID as a string.
Returns STATUS_SUCCESS when call was successful. Returns STATUS_NOT_SUPPORTED when installed software or hardware does not support this function with the given arguments. Returns STATUS_INVALID_ARGS when the provided arguments are not valid. Returns STATUS_INSUFFICIENT_SIZE when the vendor name is longer than defaultRsmiStringLength characters.
func (DeviceHandle) GetVoltageFrequencyCurve ¶
func (Device DeviceHandle) GetVoltageFrequencyCurve() (RSMI_od_volt_freq_data, RSMI_status)
DeviceGetVoltageFrequencyCurve retrieves the voltage/frequency curve information.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetVoltageFrequencyCurveRegions ¶
func (Device DeviceHandle) GetVoltageFrequencyCurveRegions() ([]RSMI_freq_volt_region, RSMI_status)
GetVoltageFrequencyCurveRegions retrieves the current valid regions in the frequency/voltage space.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetVoltageMetric ¶
func (Device DeviceHandle) GetVoltageMetric(Sensor RSMI_voltage_type, Metric RSMI_voltage_metric) (int64, RSMI_status)
GetVoltageMetric gets the voltage metric value for the specified metric, from the specified voltage sensor on the specified device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) GetVramVendor ¶
func (Device DeviceHandle) GetVramVendor() (string, RSMI_status)
GetVramVendor gets the vram vendor string of a gpu device.
Returns STATUS_SUCCESS when call was successful. Returns STATUS_INSUFFICIENT_SIZE when the vram vendor name is longer than defaultRsmiStringLength characters.
func (*DeviceHandle) ID ¶
func (d *DeviceHandle) ID() uint16
ID returns the device ID for the device. This ID is an identification of the type of device, so calling this function for different devices will give the same value if they are kind of device. Consequently, this function should not be used to distinguish one device from another. DeviceGetPciId() should be used to get a unique identifier.
func (*DeviceHandle) Index ¶
func (d *DeviceHandle) Index() uint32
Index returns the device index in the system
func (DeviceHandle) InitEventNotification ¶
func (Device DeviceHandle) InitEventNotification() RSMI_status
InitEventNotification prepares to collect event notifications for a GPU.
STATUS_SUCCESS call was successful.
func (DeviceHandle) IsP2PAccessible ¶
func (Device DeviceHandle) IsP2PAccessible(DstDevice DeviceHandle) (bool, RSMI_status)
IsP2PAccessible returns the P2P availability status between 2 GPUs.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) Reset ¶
func (Device DeviceHandle) Reset() RSMI_status
Reset resets the GPU associated with the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) ResetFan ¶
func (Device DeviceHandle) ResetFan(Sensor uint32) RSMI_status
ResetFan resets the fan to automatic driver control.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments.
func (DeviceHandle) SetClockFrequency ¶
func (Device DeviceHandle) SetClockFrequency(Clock RSMI_clk_type, FreqMask uint64) RSMI_status
SetClockFrequency controls the set of allowed frequencies that can be used for the specified clock.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_PERMISSION function requires root access.
func (DeviceHandle) SetClockInfo ¶
func (Device DeviceHandle) SetClockInfo(Level RSMI_freq_ind, ClockFreq uint64, Clock RSMI_clk_type) RSMI_status
SetClockInfo sets the clock frequency information. Only usable with clock types CLK_TYPE_SYS and CLK_TYPE_MEM.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) SetClockRange ¶
func (Device DeviceHandle) SetClockRange(MinFreq uint64, MaxFreq uint64, Clock RSMI_clk_type) RSMI_status
SetClockRange sets the clock range information. Only usable with clock types CLK_TYPE_SYS and CLK_TYPE_MEM.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) SetDeterminismMode ¶
func (Device DeviceHandle) SetDeterminismMode(Clock uint64) RSMI_status
SetDeterminismMode enters performance determinism mode with provided device. The performance determinism mode, which enforces a GFXCLK frequency SoftMax limit per GPU set by the user. This prevents the GFXCLK PLL from stretching when running the same workload on different GPUS, making performance variation minimal. The performance level is set to DEV_PERF_LEVEL_DETERMINISM.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) SetEventNotificationMask ¶
func (Device DeviceHandle) SetEventNotificationMask(Mask uint64) RSMI_status
SetEventNotificationMask specifies which events to collect for a device. The events set in mask are OR'd together.
STATUS_SUCCESS call was successful. STATUS_INIT_ERROR is returned if DeviceInitEventNotification() has not been called before.
func (DeviceHandle) SetFanSpeed ¶
func (Device DeviceHandle) SetFanSpeed(Sensor uint32, Speed uint64) RSMI_status
SetFanSpeed sets the fan speed for the specified device with the provided speed, in RPMs.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_PERMISSION function requires root access.
func (DeviceHandle) SetOverdriveLevel ¶
func (Device DeviceHandle) SetOverdriveLevel(Overdrive uint32) RSMI_status
SetOverdriveLevel sets the overdrive percent associated with the device.
Note: The RSMI library provides two functions to set the overdrive level. Which function is called by SetOverdriveLevel is
determined at initialization.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_PERMISSION function requires root access.
func (DeviceHandle) SetPciBandwidth ¶
func (Device DeviceHandle) SetPciBandwidth(Mask uint64) RSMI_status
SetPciBandwidth controls the set of allowed PCIe bandwidths that can be used.
STATUS_SUCCESS call was successful. STATUS_PERMISSION function requires root access.
func (DeviceHandle) SetPerfLevel ¶
func (Device DeviceHandle) SetPerfLevel(Level RSMI_dev_perf_level) RSMI_status
SetPerfLevel set the PowerPlay performance level associated with the device.
Note: The RSMI library provides two functions to set the performance level. Which function is called by SetPerfLevel is
determined at initialization.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_PERMISSION function requires root access.
func (DeviceHandle) SetPowerCap ¶
func (Device DeviceHandle) SetPowerCap(Sensor uint32, Mask uint64) RSMI_status
SetPowerCap sets the power cap value to a set of available settings selectable through a mask.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_PERMISSION function requires root access.
func (DeviceHandle) SetPowerProfile ¶
func (Device DeviceHandle) SetPowerProfile(Preset RSMI_power_profile_preset_masks) RSMI_status
SetPowerProfile set the power profile.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. (not documented but likely). STATUS_PERMISSION function requires root access.
func (DeviceHandle) SetVoltageInfo ¶
func (Device DeviceHandle) SetVoltageInfo(Vpoint uint32, ClockFreq uint64, Voltage uint64) RSMI_status
SetVoltageInfo sets the voltage curve points. the Vpoint argument can be 1,2 or 3 or STATUS_NOT_SUPPORTED is returned.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) StopEventNotification ¶
func (Device DeviceHandle) StopEventNotification() RSMI_status
StopEventNotification closes any file handles and free any resources used by event notification for a GPU.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS resources for the given device have either already been freed, or were never allocated by DeviceInitEventNotification.
func (*DeviceHandle) Supported ¶
func (d *DeviceHandle) Supported() map[string]map[uint64][]uint64
Supported returns the supported functions and their arguments. The structure is
Go or C function name (like DeviceGetName and rsmi_dev_name_get)
Default variant identifier (DEFAULT_VARIANT) or a value usable for temperature, memory and other types listed in the const.go
If the parent is DEFAULT_VARIANT: List with single entry containing the default usable value for temperature, memory, etc. type
If it is a usable value: There might be a list of sub_values which relate to the second argument like DeviceGetTemperatureMetric with its RSMI_temperature_type and RSMI_temperature_metric, first the sensors and second min, max or current.
This information is used when calling one of the functions listed and the arguments are compared to avoid (maybe) costly calls to the RSMI library.
func (DeviceHandle) XgmiErrorReset ¶
func (Device DeviceHandle) XgmiErrorReset() RSMI_status
XgmiErrorReset resets the XGMI error status for a device.
STATUS_SUCCESS call was successful.
func (DeviceHandle) XgmiErrorStatus ¶
func (Device DeviceHandle) XgmiErrorStatus() (RSMI_xgmi_status, RSMI_status)
XgmiErrorStatus retrieves the XGMI error status for a device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func (DeviceHandle) XgmiHiveId ¶
func (Device DeviceHandle) XgmiHiveId() (uint64, RSMI_status)
XgmiHiveId retrieves the XGMI hive id for a device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
type Kfd_mmio_remap ¶
type Kfd_mmio_remap int32
Kfd_mmio_remap as declared in rocm_smi/kfd_ioctl.h:561
type RSMI_IO_LINK_TYPE ¶
type RSMI_IO_LINK_TYPE int32
RSMI_IO_LINK_TYPE as declared in rocm_smi/rocm_smi.h:621
const ( IOLINK_TYPE_UNDEFINED RSMI_IO_LINK_TYPE = iota IOLINK_TYPE_PCIEXPRESS RSMI_IO_LINK_TYPE = 1 IOLINK_TYPE_XGMI RSMI_IO_LINK_TYPE = 2 IOLINK_TYPE_NUMIOLINKTYPES RSMI_IO_LINK_TYPE = 3 IOLINK_TYPE_SIZE RSMI_IO_LINK_TYPE = -1 )
RSMI_IO_LINK_TYPE enumeration from rocm_smi/rocm_smi.h:621
type RSMI_UTILIZATION_COUNTER_TYPE ¶
type RSMI_UTILIZATION_COUNTER_TYPE int32
RSMI_UTILIZATION_COUNTER_TYPE as declared in rocm_smi/rocm_smi.h:632
const ( UTILIZATION_COUNTER_FIRST RSMI_UTILIZATION_COUNTER_TYPE = iota COARSE_GRAIN_GFX_ACTIVITY RSMI_UTILIZATION_COUNTER_TYPE = 0 COARSE_GRAIN_MEM_ACTIVITY RSMI_UTILIZATION_COUNTER_TYPE = 1 UTILIZATION_COUNTER_LAST RSMI_UTILIZATION_COUNTER_TYPE = 1 )
RSMI_UTILIZATION_COUNTER_TYPE enumeration from rocm_smi/rocm_smi.h:632
type RSMI_bit_field ¶
type RSMI_bit_field uint64
type RSMI_clk_type ¶
type RSMI_clk_type int32
RSMI_clk_type as declared in rocm_smi/rocm_smi.h:351
const ( CLK_TYPE_SYS RSMI_clk_type = iota CLK_TYPE_FIRST RSMI_clk_type = 0 CLK_TYPE_DF RSMI_clk_type = 1 CLK_TYPE_DCEF RSMI_clk_type = 2 CLK_TYPE_SOC RSMI_clk_type = 3 CLK_TYPE_MEM RSMI_clk_type = 4 CLK_TYPE_LAST RSMI_clk_type = 4 CLK_INVALID RSMI_clk_type = -1 )
RSMI_clk_type enumeration from rocm_smi/rocm_smi.h:351
type RSMI_counter_command ¶
type RSMI_counter_command int32
RSMI_counter_command as declared in rocm_smi/rocm_smi.h:290
const ( CNTR_CMD_START RSMI_counter_command = iota CNTR_CMD_STOP RSMI_counter_command = 1 )
RSMI_counter_command enumeration from rocm_smi/rocm_smi.h:290
type RSMI_counter_value ¶
func NewRSMI_counter_value ¶
func NewRSMI_counter_value() *RSMI_counter_value
NewRSMI_counter_value allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_counter_valueRef ¶
func NewRSMI_counter_valueRef(ref unsafe.Pointer) *RSMI_counter_value
NewRSMI_counter_valueRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_counter_value) Free ¶
func (x *RSMI_counter_value) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_counter_value) PassRef ¶
func (x *RSMI_counter_value) PassRef() *C.rsmi_counter_value_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_counter_value) Ref ¶
func (x *RSMI_counter_value) Ref() *C.rsmi_counter_value_t
Ref returns a reference to C object as it is.
type RSMI_dev_perf_level ¶
type RSMI_dev_perf_level int32
RSMI_dev_perf_level as declared in rocm_smi/rocm_smi.h:176
const ( DEV_PERF_LEVEL_AUTO RSMI_dev_perf_level = iota DEV_PERF_LEVEL_FIRST RSMI_dev_perf_level = 0 DEV_PERF_LEVEL_LOW RSMI_dev_perf_level = 1 DEV_PERF_LEVEL_HIGH RSMI_dev_perf_level = 2 DEV_PERF_LEVEL_MANUAL RSMI_dev_perf_level = 3 DEV_PERF_LEVEL_STABLE_STD RSMI_dev_perf_level = 4 DEV_PERF_LEVEL_STABLE_PEAK RSMI_dev_perf_level = 5 DEV_PERF_LEVEL_STABLE_MIN_MCLK RSMI_dev_perf_level = 6 DEV_PERF_LEVEL_STABLE_MIN_SCLK RSMI_dev_perf_level = 7 DEV_PERF_LEVEL_DETERMINISM RSMI_dev_perf_level = 8 DEV_PERF_LEVEL_LAST RSMI_dev_perf_level = 8 DEV_PERF_LEVEL_UNKNOWN RSMI_dev_perf_level = 256 )
RSMI_dev_perf_level enumeration from rocm_smi/rocm_smi.h:176
type RSMI_error_count ¶
func NewRSMI_error_count ¶
func NewRSMI_error_count() *RSMI_error_count
NewRSMI_error_count allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_error_countRef ¶
func NewRSMI_error_countRef(ref unsafe.Pointer) *RSMI_error_count
NewRSMI_error_countRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_error_count) Free ¶
func (x *RSMI_error_count) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_error_count) PassRef ¶
func (x *RSMI_error_count) PassRef() *C.rsmi_error_count_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_error_count) Ref ¶
func (x *RSMI_error_count) Ref() *C.rsmi_error_count_t
Ref returns a reference to C object as it is.
type RSMI_event_group ¶
type RSMI_event_group int32
RSMI_event_group as declared in rocm_smi/rocm_smi.h:212
const ( EVNT_GRP_XGMI RSMI_event_group = iota EVNT_GRP_XGMI_DATA_OUT RSMI_event_group = 10 EVNT_GRP_INVALID RSMI_event_group = -1 )
RSMI_event_group enumeration from rocm_smi/rocm_smi.h:212
type RSMI_event_handle ¶
type RSMI_event_handle uint32
func (RSMI_event_handle) CounterControl ¶
func (Handle RSMI_event_handle) CounterControl(Cmd RSMI_counter_command) RSMI_status
CounterControl issues performance counter control commands.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_PERMISSION function requires root access.
func (RSMI_event_handle) CounterDestroy ¶
func (Handle RSMI_event_handle) CounterDestroy() RSMI_status
CounterDestroy deallocates a performance counter object.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_PERMISSION function requires root access.
func (RSMI_event_handle) CounterRead ¶
func (Handle RSMI_event_handle) CounterRead() (RSMI_counter_value, RSMI_status)
CounterRead reads the current value of a performance counter.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_PERMISSION function requires root access.
type RSMI_event_type ¶
type RSMI_event_type int32
RSMI_event_type as declared in rocm_smi/rocm_smi.h:281
const ( EVNT_FIRST RSMI_event_type = iota EVNT_XGMI_FIRST RSMI_event_type = 0 EVNT_XGMI_0_NOP_TX RSMI_event_type = 0 EVNT_XGMI_0_REQUEST_TX RSMI_event_type = 1 EVNT_XGMI_0_RESPONSE_TX RSMI_event_type = 2 EVNT_XGMI_0_BEATS_TX RSMI_event_type = 3 EVNT_XGMI_1_NOP_TX RSMI_event_type = 4 EVNT_XGMI_1_REQUEST_TX RSMI_event_type = 5 EVNT_XGMI_1_RESPONSE_TX RSMI_event_type = 6 EVNT_XGMI_1_BEATS_TX RSMI_event_type = 7 EVNT_XGMI_LAST RSMI_event_type = 7 EVNT_XGMI_DATA_OUT_FIRST RSMI_event_type = 10 EVNT_XGMI_DATA_OUT_0 RSMI_event_type = 10 EVNT_XGMI_DATA_OUT_1 RSMI_event_type = 11 EVNT_XGMI_DATA_OUT_2 RSMI_event_type = 12 EVNT_XGMI_DATA_OUT_3 RSMI_event_type = 13 EVNT_XGMI_DATA_OUT_4 RSMI_event_type = 14 EVNT_XGMI_DATA_OUT_5 RSMI_event_type = 15 EVNT_XGMI_DATA_OUT_LAST RSMI_event_type = 15 EVNT_LAST RSMI_event_type = 15 )
RSMI_event_type enumeration from rocm_smi/rocm_smi.h:281
type RSMI_evt_notification_data ¶
func NewRSMI_evt_notification_data ¶
func NewRSMI_evt_notification_data() *RSMI_evt_notification_data
NewRSMI_evt_notification_data allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_evt_notification_dataRef ¶
func NewRSMI_evt_notification_dataRef(ref unsafe.Pointer) *RSMI_evt_notification_data
NewRSMI_evt_notification_dataRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_evt_notification_data) Free ¶
func (x *RSMI_evt_notification_data) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_evt_notification_data) PassRef ¶
func (x *RSMI_evt_notification_data) PassRef() *C.rsmi_evt_notification_data_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_evt_notification_data) Ref ¶
func (x *RSMI_evt_notification_data) Ref() *C.rsmi_evt_notification_data_t
Ref returns a reference to C object as it is.
type RSMI_evt_notification_type ¶
type RSMI_evt_notification_type int32
RSMI_evt_notification_type as declared in rocm_smi/rocm_smi.h:314
const ( EVT_NOTIF_VMFAULT RSMI_evt_notification_type = 1 EVT_NOTIF_FIRST RSMI_evt_notification_type = 1 EVT_NOTIF_THERMAL_THROTTLE RSMI_evt_notification_type = 2 EVT_NOTIF_GPU_PRE_RESET RSMI_evt_notification_type = 3 EVT_NOTIF_GPU_POST_RESET RSMI_evt_notification_type = 4 EVT_NOTIF_LAST RSMI_evt_notification_type = 4 )
RSMI_evt_notification_type enumeration from rocm_smi/rocm_smi.h:314
type RSMI_freq_ind ¶
type RSMI_freq_ind int32
RSMI_freq_ind as declared in rocm_smi/rocm_smi.h:547
const ( FREQ_IND_MIN RSMI_freq_ind = iota FREQ_IND_MAX RSMI_freq_ind = 1 FREQ_IND_INVALID RSMI_freq_ind = -1 )
RSMI_freq_ind enumeration from rocm_smi/rocm_smi.h:547
type RSMI_freq_volt_region ¶
type RSMI_freq_volt_region struct { Freq_range RSMI_range Volt_range RSMI_range }
func NewRSMI_freq_volt_region ¶
func NewRSMI_freq_volt_region() *RSMI_freq_volt_region
NewRSMI_freq_volt_region allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_freq_volt_regionRef ¶
func NewRSMI_freq_volt_regionRef(ref unsafe.Pointer) *RSMI_freq_volt_region
NewRSMI_freq_volt_regionRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_freq_volt_region) Free ¶
func (x *RSMI_freq_volt_region) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_freq_volt_region) PassRef ¶
func (x *RSMI_freq_volt_region) PassRef() *C.rsmi_freq_volt_region_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_freq_volt_region) Ref ¶
func (x *RSMI_freq_volt_region) Ref() *C.rsmi_freq_volt_region_t
Ref returns a reference to C object as it is.
type RSMI_frequencies ¶
func NewRSMI_frequencies ¶
func NewRSMI_frequencies() *RSMI_frequencies
NewRSMI_frequencies allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_frequenciesRef ¶
func NewRSMI_frequenciesRef(ref unsafe.Pointer) *RSMI_frequencies
NewRSMI_frequenciesRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_frequencies) Free ¶
func (x *RSMI_frequencies) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_frequencies) PassRef ¶
func (x *RSMI_frequencies) PassRef() *C.rsmi_frequencies_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_frequencies) Ref ¶
func (x *RSMI_frequencies) Ref() *C.rsmi_frequencies_t
Ref returns a reference to C object as it is.
type RSMI_func_id_iter_handle ¶
type RSMI_func_id_iter_handle *_Ctype_struct_rsmi_func_id_iter_handle
type RSMI_func_id_value ¶
type RSMI_func_id_value [sizeofRSMI_func_id_value]byte
type RSMI_fw_block ¶
type RSMI_fw_block int32
RSMI_fw_block as declared in rocm_smi/rocm_smi.h:581
const ( FW_BLOCK_FIRST RSMI_fw_block = iota FW_BLOCK_ASD RSMI_fw_block = 0 FW_BLOCK_CE RSMI_fw_block = 1 FW_BLOCK_DMCU RSMI_fw_block = 2 FW_BLOCK_MC RSMI_fw_block = 3 FW_BLOCK_ME RSMI_fw_block = 4 FW_BLOCK_MEC RSMI_fw_block = 5 FW_BLOCK_MEC2 RSMI_fw_block = 6 FW_BLOCK_PFP RSMI_fw_block = 7 FW_BLOCK_RLC RSMI_fw_block = 8 FW_BLOCK_RLC_SRLC RSMI_fw_block = 9 FW_BLOCK_RLC_SRLG RSMI_fw_block = 10 FW_BLOCK_RLC_SRLS RSMI_fw_block = 11 FW_BLOCK_SDMA RSMI_fw_block = 12 FW_BLOCK_SDMA2 RSMI_fw_block = 13 FW_BLOCK_SMC RSMI_fw_block = 14 FW_BLOCK_SOS RSMI_fw_block = 15 FW_BLOCK_TA_RAS RSMI_fw_block = 16 FW_BLOCK_TA_XGMI RSMI_fw_block = 17 FW_BLOCK_UVD RSMI_fw_block = 18 FW_BLOCK_VCE RSMI_fw_block = 19 FW_BLOCK_VCN RSMI_fw_block = 20 FW_BLOCK_LAST RSMI_fw_block = 20 )
RSMI_fw_block enumeration from rocm_smi/rocm_smi.h:581
type RSMI_gpu_block ¶
type RSMI_gpu_block int32
RSMI_gpu_block as declared in rocm_smi/rocm_smi.h:505
const ( GPU_BLOCK_INVALID RSMI_gpu_block = iota GPU_BLOCK_FIRST RSMI_gpu_block = 1 GPU_BLOCK_UMC RSMI_gpu_block = 1 GPU_BLOCK_SDMA RSMI_gpu_block = 2 GPU_BLOCK_GFX RSMI_gpu_block = 4 GPU_BLOCK_MMHUB RSMI_gpu_block = 8 GPU_BLOCK_ATHUB RSMI_gpu_block = 16 GPU_BLOCK_PCIE_BIF RSMI_gpu_block = 32 GPU_BLOCK_HDP RSMI_gpu_block = 64 GPU_BLOCK_XGMI_WAFL RSMI_gpu_block = 128 GPU_BLOCK_DF RSMI_gpu_block = 256 GPU_BLOCK_SMN RSMI_gpu_block = 512 GPU_BLOCK_SEM RSMI_gpu_block = 1024 GPU_BLOCK_MP0 RSMI_gpu_block = 2048 GPU_BLOCK_MP1 RSMI_gpu_block = 4096 GPU_BLOCK_FUSE RSMI_gpu_block = 8192 GPU_BLOCK_LAST RSMI_gpu_block = 8192 GPU_BLOCK_RESERVED RSMI_gpu_block = 0 )
RSMI_gpu_block enumeration from rocm_smi/rocm_smi.h:505
type RSMI_gpu_metrics ¶
type RSMI_gpu_metrics struct { Common_header _Ctype_struct_metrics_table_header_t Temperature_edge uint16 Temperature_hotspot uint16 Temperature_mem uint16 Temperature_vrgfx uint16 Temperature_vrsoc uint16 Temperature_vrmem uint16 Average_gfx_activity uint16 Average_umc_activity uint16 Average_mm_activity uint16 Average_socket_power uint16 Energy_accumulator uint64 System_clock_counter uint64 Average_gfxclk_frequency uint16 Average_socclk_frequency uint16 Average_uclk_frequency uint16 Average_vclk0_frequency uint16 Average_dclk0_frequency uint16 Average_vclk1_frequency uint16 Average_dclk1_frequency uint16 Current_gfxclk uint16 Current_socclk uint16 Current_uclk uint16 Current_vclk0 uint16 Current_dclk0 uint16 Current_vclk1 uint16 Current_dclk1 uint16 Throttle_status uint32 Current_fan_speed uint16 Pcie_link_width uint16 Pcie_link_speed uint16 Padding uint16 Gfx_activity_acc uint32 Mem_actvity_acc uint32 Temperature_hbm [4]uint16 }
func NewRSMI_gpu_metrics ¶
func NewRSMI_gpu_metrics() *RSMI_gpu_metrics
NewRSMI_gpu_metrics allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_gpu_metricsRef ¶
func NewRSMI_gpu_metricsRef(ref unsafe.Pointer) *RSMI_gpu_metrics
NewRSMI_gpu_metricsRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_gpu_metrics) Free ¶
func (x *RSMI_gpu_metrics) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_gpu_metrics) PassRef ¶
func (x *RSMI_gpu_metrics) PassRef() *C.rsmi_gpu_metrics_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_gpu_metrics) Ref ¶
func (x *RSMI_gpu_metrics) Ref() *C.rsmi_gpu_metrics_t
Ref returns a reference to C object as it is.
type RSMI_helper_function ¶
type RSMI_helper_function struct { Functions int32 Functionlist [300]RSMI_helper_function_variants }
func NewRSMI_helper_function ¶
func NewRSMI_helper_function() *RSMI_helper_function
NewRSMI_helper_function allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_helper_functionRef ¶
func NewRSMI_helper_functionRef(ref unsafe.Pointer) *RSMI_helper_function
NewRSMI_helper_functionRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_helper_function) Free ¶
func (x *RSMI_helper_function) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_helper_function) PassRef ¶
func (x *RSMI_helper_function) PassRef() *C.rsmi_helper_function_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_helper_function) Ref ¶
func (x *RSMI_helper_function) Ref() *C.rsmi_helper_function_t
Ref returns a reference to C object as it is.
type RSMI_helper_function_variants ¶
type RSMI_helper_function_variants struct { Name [200]int8 Sensors int32 Sensorlist [30]RSMI_helper_variants }
func NewRSMI_helper_function_variants ¶
func NewRSMI_helper_function_variants() *RSMI_helper_function_variants
NewRSMI_helper_function_variants allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_helper_function_variantsRef ¶
func NewRSMI_helper_function_variantsRef(ref unsafe.Pointer) *RSMI_helper_function_variants
NewRSMI_helper_function_variantsRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_helper_function_variants) Free ¶
func (x *RSMI_helper_function_variants) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_helper_function_variants) PassRef ¶
func (x *RSMI_helper_function_variants) PassRef() *C.rsmi_helper_function_variants_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_helper_function_variants) Ref ¶
func (x *RSMI_helper_function_variants) Ref() *C.rsmi_helper_function_variants_t
Ref returns a reference to C object as it is.
type RSMI_helper_variants ¶
func NewRSMI_helper_variants ¶
func NewRSMI_helper_variants() *RSMI_helper_variants
NewRSMI_helper_variants allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_helper_variantsRef ¶
func NewRSMI_helper_variantsRef(ref unsafe.Pointer) *RSMI_helper_variants
NewRSMI_helper_variantsRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_helper_variants) Free ¶
func (x *RSMI_helper_variants) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_helper_variants) PassRef ¶
func (x *RSMI_helper_variants) PassRef() *C.rsmi_helper_variants_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_helper_variants) Ref ¶
func (x *RSMI_helper_variants) Ref() *C.rsmi_helper_variants_t
Ref returns a reference to C object as it is.
type RSMI_init_flags ¶
type RSMI_init_flags int32
RSMI_init_flags as declared in rocm_smi/rocm_smi.h:147
const ( INIT_FLAG_ALL_GPUS RSMI_init_flags = 1 INIT_FLAG_RESRV_TEST1 RSMI_init_flags = 0 )
RSMI_init_flags enumeration from rocm_smi/rocm_smi.h:147
type RSMI_memory_page_status ¶
type RSMI_memory_page_status int32
RSMI_memory_page_status as declared in rocm_smi/rocm_smi.h:610
const ( MEM_PAGE_STATUS_RESERVED RSMI_memory_page_status = iota MEM_PAGE_STATUS_PENDING RSMI_memory_page_status = 1 MEM_PAGE_STATUS_UNRESERVABLE RSMI_memory_page_status = 2 )
RSMI_memory_page_status enumeration from rocm_smi/rocm_smi.h:610
type RSMI_memory_type ¶
type RSMI_memory_type int32
RSMI_memory_type as declared in rocm_smi/rocm_smi.h:536
const ( MEM_TYPE_FIRST RSMI_memory_type = iota MEM_TYPE_VRAM RSMI_memory_type = 0 MEM_TYPE_VIS_VRAM RSMI_memory_type = 1 MEM_TYPE_GTT RSMI_memory_type = 2 MEM_TYPE_LAST RSMI_memory_type = 2 )
RSMI_memory_type enumeration from rocm_smi/rocm_smi.h:536
type RSMI_od_vddc_point ¶
func NewRSMI_od_vddc_point ¶
func NewRSMI_od_vddc_point() *RSMI_od_vddc_point
NewRSMI_od_vddc_point allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_od_vddc_pointRef ¶
func NewRSMI_od_vddc_pointRef(ref unsafe.Pointer) *RSMI_od_vddc_point
NewRSMI_od_vddc_pointRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_od_vddc_point) Free ¶
func (x *RSMI_od_vddc_point) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_od_vddc_point) PassRef ¶
func (x *RSMI_od_vddc_point) PassRef() *C.rsmi_od_vddc_point_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_od_vddc_point) Ref ¶
func (x *RSMI_od_vddc_point) Ref() *C.rsmi_od_vddc_point_t
Ref returns a reference to C object as it is.
type RSMI_od_volt_curve ¶
type RSMI_od_volt_curve struct {
Points [3]RSMI_od_vddc_point
}
func NewRSMI_od_volt_curve ¶
func NewRSMI_od_volt_curve() *RSMI_od_volt_curve
NewRSMI_od_volt_curve allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_od_volt_curveRef ¶
func NewRSMI_od_volt_curveRef(ref unsafe.Pointer) *RSMI_od_volt_curve
NewRSMI_od_volt_curveRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_od_volt_curve) Free ¶
func (x *RSMI_od_volt_curve) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_od_volt_curve) PassRef ¶
func (x *RSMI_od_volt_curve) PassRef() *C.rsmi_od_volt_curve_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_od_volt_curve) Ref ¶
func (x *RSMI_od_volt_curve) Ref() *C.rsmi_od_volt_curve_t
Ref returns a reference to C object as it is.
type RSMI_od_volt_freq_data ¶
type RSMI_od_volt_freq_data struct { Curr_sclk_range RSMI_range Curr_mclk_range RSMI_range Sclk_freq_limits RSMI_range Mclk_freq_limits RSMI_range Curve RSMI_od_volt_curve Num_regions uint32 Pad_cgo_0 [4]byte }
func NewRSMI_od_volt_freq_data ¶
func NewRSMI_od_volt_freq_data() *RSMI_od_volt_freq_data
NewRSMI_od_volt_freq_data allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_od_volt_freq_dataRef ¶
func NewRSMI_od_volt_freq_dataRef(ref unsafe.Pointer) *RSMI_od_volt_freq_data
NewRSMI_od_volt_freq_dataRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_od_volt_freq_data) Free ¶
func (x *RSMI_od_volt_freq_data) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_od_volt_freq_data) PassRef ¶
func (x *RSMI_od_volt_freq_data) PassRef() *C.rsmi_od_volt_freq_data_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_od_volt_freq_data) Ref ¶
func (x *RSMI_od_volt_freq_data) Ref() *C.rsmi_od_volt_freq_data_t
Ref returns a reference to C object as it is.
type RSMI_pcie_bandwidth ¶
type RSMI_pcie_bandwidth struct { Rate RSMI_frequencies Lanes [32]uint32 }
func NewRSMI_pcie_bandwidth ¶
func NewRSMI_pcie_bandwidth() *RSMI_pcie_bandwidth
NewRSMI_pcie_bandwidth allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_pcie_bandwidthRef ¶
func NewRSMI_pcie_bandwidthRef(ref unsafe.Pointer) *RSMI_pcie_bandwidth
NewRSMI_pcie_bandwidthRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_pcie_bandwidth) Free ¶
func (x *RSMI_pcie_bandwidth) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_pcie_bandwidth) PassRef ¶
func (x *RSMI_pcie_bandwidth) PassRef() *C.rsmi_pcie_bandwidth_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_pcie_bandwidth) Ref ¶
func (x *RSMI_pcie_bandwidth) Ref() *C.rsmi_pcie_bandwidth_t
Ref returns a reference to C object as it is.
type RSMI_power_profile_preset_masks ¶
type RSMI_power_profile_preset_masks int32
RSMI_power_profile_preset_masks as declared in rocm_smi/rocm_smi.h:474
const ( PWR_PROF_PRST_CUSTOM_MASK RSMI_power_profile_preset_masks = 1 PWR_PROF_PRST_VIDEO_MASK RSMI_power_profile_preset_masks = 2 PWR_PROF_PRST_POWER_SAVING_MASK RSMI_power_profile_preset_masks = 4 PWR_PROF_PRST_COMPUTE_MASK RSMI_power_profile_preset_masks = 8 PWR_PROF_PRST_VR_MASK RSMI_power_profile_preset_masks = 16 PWR_PROF_PRST_3D_FULL_SCR_MASK RSMI_power_profile_preset_masks = 32 PWR_PROF_PRST_BOOTUP_DEFAULT RSMI_power_profile_preset_masks = 64 PWR_PROF_PRST_LAST RSMI_power_profile_preset_masks = 64 PWR_PROF_PRST_INVALID RSMI_power_profile_preset_masks = -1 )
RSMI_power_profile_preset_masks enumeration from rocm_smi/rocm_smi.h:474
type RSMI_power_profile_status ¶
type RSMI_power_profile_status struct { Available_profiles uint64 Current int64 Num_profiles uint32 Pad_cgo_0 [4]byte }
func NewRSMI_power_profile_status ¶
func NewRSMI_power_profile_status() *RSMI_power_profile_status
NewRSMI_power_profile_status allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_power_profile_statusRef ¶
func NewRSMI_power_profile_statusRef(ref unsafe.Pointer) *RSMI_power_profile_status
NewRSMI_power_profile_statusRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_power_profile_status) Free ¶
func (x *RSMI_power_profile_status) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_power_profile_status) PassRef ¶
func (x *RSMI_power_profile_status) PassRef() *C.rsmi_power_profile_status_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_power_profile_status) Ref ¶
func (x *RSMI_power_profile_status) Ref() *C.rsmi_power_profile_status_t
Ref returns a reference to C object as it is.
type RSMI_process_info ¶
type RSMI_process_info struct { Process_id uint32 Pasid uint32 Vram_usage uint64 Sdma_usage uint64 Cu_occupancy uint32 Pad_cgo_0 [4]byte }
func NewRSMI_process_info ¶
func NewRSMI_process_info() *RSMI_process_info
NewRSMI_process_info allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_process_infoRef ¶
func NewRSMI_process_infoRef(ref unsafe.Pointer) *RSMI_process_info
NewRSMI_process_infoRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_process_info) Free ¶
func (x *RSMI_process_info) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_process_info) PassRef ¶
func (x *RSMI_process_info) PassRef() *C.rsmi_process_info_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_process_info) Ref ¶
func (x *RSMI_process_info) Ref() *C.rsmi_process_info_t
Ref returns a reference to C object as it is.
type RSMI_range ¶
func NewRSMI_range ¶
func NewRSMI_range() *RSMI_range
NewRSMI_range allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_rangeRef ¶
func NewRSMI_rangeRef(ref unsafe.Pointer) *RSMI_range
NewRSMI_rangeRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_range) Free ¶
func (x *RSMI_range) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_range) PassRef ¶
func (x *RSMI_range) PassRef() *C.rsmi_range_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_range) Ref ¶
func (x *RSMI_range) Ref() *C.rsmi_range_t
Ref returns a reference to C object as it is.
type RSMI_ras_err_state ¶
type RSMI_ras_err_state int32
RSMI_ras_err_state as declared in rocm_smi/rocm_smi.h:523
const ( RAS_ERR_STATE_NONE RSMI_ras_err_state = iota RAS_ERR_STATE_DISABLED RSMI_ras_err_state = 1 RAS_ERR_STATE_PARITY RSMI_ras_err_state = 2 RAS_ERR_STATE_SING_C RSMI_ras_err_state = 3 RAS_ERR_STATE_MULT_UC RSMI_ras_err_state = 4 RAS_ERR_STATE_POISON RSMI_ras_err_state = 5 RAS_ERR_STATE_ENABLED RSMI_ras_err_state = 6 RAS_ERR_STATE_LAST RSMI_ras_err_state = 6 RAS_ERR_STATE_INVALID RSMI_ras_err_state = -1 )
RSMI_ras_err_state enumeration from rocm_smi/rocm_smi.h:523
type RSMI_retired_page_record ¶
func NewRSMI_retired_page_record ¶
func NewRSMI_retired_page_record() *RSMI_retired_page_record
NewRSMI_retired_page_record allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_retired_page_recordRef ¶
func NewRSMI_retired_page_recordRef(ref unsafe.Pointer) *RSMI_retired_page_record
NewRSMI_retired_page_recordRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_retired_page_record) Free ¶
func (x *RSMI_retired_page_record) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_retired_page_record) PassRef ¶
func (x *RSMI_retired_page_record) PassRef() *C.rsmi_retired_page_record_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_retired_page_record) Ref ¶
func (x *RSMI_retired_page_record) Ref() *C.rsmi_retired_page_record_t
Ref returns a reference to C object as it is.
type RSMI_status ¶
type RSMI_status int32
RSMI_status as declared in rocm_smi/rocm_smi.h:131
const ( STATUS_SUCCESS RSMI_status = iota STATUS_INVALID_ARGS RSMI_status = 1 STATUS_NOT_SUPPORTED RSMI_status = 2 STATUS_FILE_ERROR RSMI_status = 3 STATUS_PERMISSION RSMI_status = 4 STATUS_OUT_OF_RESOURCES RSMI_status = 5 STATUS_INTERNAL_EXCEPTION RSMI_status = 6 STATUS_INPUT_OUT_OF_BOUNDS RSMI_status = 7 STATUS_INIT_ERROR RSMI_status = 8 INITIALIZATION_ERROR RSMI_status = 8 STATUS_NOT_YET_IMPLEMENTED RSMI_status = 9 STATUS_NOT_FOUND RSMI_status = 10 STATUS_INSUFFICIENT_SIZE RSMI_status = 11 STATUS_INTERRUPT RSMI_status = 12 STATUS_UNEXPECTED_SIZE RSMI_status = 13 STATUS_NO_DATA RSMI_status = 14 STATUS_UNEXPECTED_DATA RSMI_status = 15 STATUS_BUSY RSMI_status = 16 STATUS_REFCOUNT_OVERFLOW RSMI_status = 17 STATUS_UNKNOWN_ERROR RSMI_status = -1 )
RSMI_status enumeration from rocm_smi/rocm_smi.h:131
func ComponentVersionString ¶
func ComponentVersionString(Component RSMI_sw_component) (string, RSMI_status)
ComponentVersionString gets the driver version string for the current system. Given a software component, this function will return the driver version string for the current system.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_INSUFFICIENT_SIZE is returned if version string is larger than defaultRsmiStringLength bytes.
func ComputeProcessGpus ¶
func ComputeProcessGpus(Pid uint32) ([]uint32, RSMI_status)
ComputeProcessGpus gets the device indices currently being used by a process
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_INSUFFICIENT_SIZE should not happen as the size is retrieved and a big enough slice allocated.
func CounterControl ¶
func CounterControl(Handle RSMI_event_handle, Cmd RSMI_counter_command) RSMI_status
CounterControl issues performance counter control commands.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_PERMISSION function requires root access.
func CounterDestroy ¶
func CounterDestroy(Handle RSMI_event_handle) RSMI_status
CounterDestroy deallocates a performance counter object.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_PERMISSION function requires root access.
func DeviceCounterGetAvailable ¶
func DeviceCounterGetAvailable(Device DeviceHandle, EventGroup RSMI_event_group) (uint32, RSMI_status)
DeviceCounterGetAvailable gets the number of currently available counters.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceCounterGroupSupported ¶
func DeviceCounterGroupSupported(Device DeviceHandle, EventGroup RSMI_event_group) RSMI_status
DeviceCounterGroupSupported tells if an event group is supported by a given device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments.
func DeviceGetBrand ¶
func DeviceGetBrand(Device DeviceHandle) (string, RSMI_status)
DeviceGetBrand gets the brand string of a gpu device. If the sku associated with the device is not found as one of the values contained within rsmi_dev_brand_get, then this function will return the device marketing name as a string instead of the brand name.
Returns STATUS_SUCCESS when call was successful. Returns STATUS_NOT_SUPPORTED when installed software or hardware does not support this function with the given arguments. Returns STATUS_INVALID_ARGS when the provided arguments are not valid. Returns STATUS_INSUFFICIENT_SIZE when the vendor name is longer than defaultRsmiStringLength characters.
func DeviceGetBusyPercent ¶
func DeviceGetBusyPercent(Device DeviceHandle) (uint32, RSMI_status)
DeviceGetBusyPercent gets the percentage of time device is busy doing any processing.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetDefaultPowerCap ¶
func DeviceGetDefaultPowerCap(Device DeviceHandle) (uint64, RSMI_status)
DeviceGetDefaultPowerCap gets the default power cap for the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetDrmRenderMinor ¶
func DeviceGetDrmRenderMinor(Device DeviceHandle) (uint32, RSMI_status)
DeviceGetDrmRenderMinor gets the drm minor number associated with the device
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetEccMask ¶
func DeviceGetEccMask(Device DeviceHandle) (uint64, RSMI_status)
DeviceGetEccMask retrieved the enabled ECC bit-mask.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetEnergyCount ¶
func DeviceGetEnergyCount(Device DeviceHandle) (uint64, float32, uint64, RSMI_status)
DeviceGetEnergyCount gets the energy accumulator counter of the device. It returns the power, the resolution and the timestamp.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetFanRpms ¶
func DeviceGetFanRpms(Device DeviceHandle, Sensor uint32) (int64, RSMI_status)
DeviceGetFanRpms gets the fan speed in RPMs of the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetFanSpeed ¶
func DeviceGetFanSpeed(Device DeviceHandle, Sensor uint32) (int64, RSMI_status)
DeviceGetFanSpeed gets the fan speed for the specified device as a value relative to MAX_FAN_SPEED.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetFirmwareVersion ¶
func DeviceGetFirmwareVersion(Device DeviceHandle, Block RSMI_fw_block) (uint64, RSMI_status)
DeviceGetFirmwareVersion gets the firmware versions for a device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetLinkWeight ¶
func DeviceGetLinkWeight(SrcDevice DeviceHandle, DstDevice DeviceHandle) (uint64, RSMI_status)
DeviceGetLinkWeight retrieves the weight for a connection between 2 GPUs.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetMaxFanSpeed ¶
func DeviceGetMaxFanSpeed(Device DeviceHandle, Sensor uint32) (uint64, RSMI_status)
DeviceGetMaxFanSpeed gets the max. fan speed of the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetMemoryUtilization ¶
func DeviceGetMemoryUtilization(Device DeviceHandle) (uint32, RSMI_status)
DeviceGetMemoryUtilization gets the percentage of time any device memory is being used.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetMinMaxBandwidth ¶
func DeviceGetMinMaxBandwidth(SrcDevice DeviceHandle, DstDevice DeviceHandle) (uint64, uint64, RSMI_status)
DeviceGetMinMaxBandwidth retreives minimal and maximal IO link bandwidth between 2 GPUs.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetName ¶
func DeviceGetName(Device DeviceHandle) (string, RSMI_status)
DeviceGetName gets the name string of a gpu device. If the integer ID associated with the device is not found in one of the system files containing device name information (e.g. /usr/share/misc/pci.ids), then this function will return the hex device ID as a string.
Returns STATUS_SUCCESS when call was successful. Returns STATUS_NOT_SUPPORTED when installed software or hardware does not support this function with the given arguments. Returns STATUS_INVALID_ARGS when the provided arguments are not valid. Returns STATUS_INSUFFICIENT_SIZE when the vendor name is longer than defaultRsmiStringLength characters.
func DeviceGetNumaAffinity ¶
func DeviceGetNumaAffinity(Device DeviceHandle) (uint32, RSMI_status)
DeviceGetNumaAffinity gets the NUMA node associated with a device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetNumaNode ¶
func DeviceGetNumaNode(Device DeviceHandle) (uint32, RSMI_status)
DeviceGetNumaNode retrieves the NUMA CPU node number for a device.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetOverdriveLevel ¶
func DeviceGetOverdriveLevel(Device DeviceHandle) (uint32, RSMI_status)
DeviceGetOverdriveLevel gets the overdrive percent associated with the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetPciId ¶
func DeviceGetPciId(Device DeviceHandle) (uint64, RSMI_status)
DeviceGetPciId gets the unique PCI device identifier associated with the device
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetPciReplayCounter ¶
func DeviceGetPciReplayCounter(Device DeviceHandle) (uint64, RSMI_status)
DeviceGetPciReplayCounter gets the PCIe replay counter.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetPciThroughput ¶
func DeviceGetPciThroughput(Device DeviceHandle) (uint64, uint64, uint64, RSMI_status)
DeviceGetPciThroughput gets PCIe traffic information for the device. This function returns the number of bytes sent and received in 1 second and the maximum possible packet size.
Note: The function blocks execution for 1 second.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments.
func DeviceGetPowerAverage ¶
func DeviceGetPowerAverage(Device DeviceHandle, Sensor uint32) (uint64, RSMI_status)
DeviceGetPowerAverage gets the average power consumption of the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetPowerCap ¶
func DeviceGetPowerCap(Device DeviceHandle, Sensor uint32) (uint64, RSMI_status)
DeviceGetPowerCap gets the cap on power which, when reached, causes the system to take action to reduce power.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetPowerCapRange ¶
func DeviceGetPowerCapRange(Device DeviceHandle, Sensor uint32) (uint64, uint64, RSMI_status)
DeviceGetPowerCapRange gets the range of valid values (maximum and minimum) for the power cap.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetSerialNumber ¶
func DeviceGetSerialNumber(Device DeviceHandle) (string, RSMI_status)
DeviceGetSerial gets the serial number string for a device
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_INSUFFICIENT_SIZE is returned if version string is larger than defaultRsmiStringLength bytes.
func DeviceGetSubsystemId ¶
func DeviceGetSubsystemId(Device DeviceHandle) (uint16, RSMI_status)
DeviceGetSubsystemId gets the subsystem device id associated with the device
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetSubsystemName ¶
func DeviceGetSubsystemName(Device DeviceHandle) (string, RSMI_status)
DeviceGetSubsystemName gets the name string for the device subsytem
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_INSUFFICIENT_SIZE is returned if version string is larger than defaultRsmiStringLength bytes.
func DeviceGetTemperatureMetric ¶
func DeviceGetTemperatureMetric(Device DeviceHandle, Sensor RSMI_temperature_type, Metric RSMI_temperature_metric) (int64, RSMI_status)
DeviceGetTemperatureMetric gets the temperature metric value for the specified metric, from the specified temperature sensor on the specified device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetTotalMemory ¶
func DeviceGetTotalMemory(Device DeviceHandle, Type RSMI_memory_type) (uint64, RSMI_status)
DeviceGetTotalMemory get the total amount of memory that exists.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetUniqueId ¶
func DeviceGetUniqueId(Device DeviceHandle) (uint64, RSMI_status)
DeviceGetUniqueId gets Unique ID
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetUsedMemory ¶
func DeviceGetUsedMemory(Device DeviceHandle, Type RSMI_memory_type) (uint64, RSMI_status)
DeviceGetUsedMemory gets the current memory usage.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetVbiosVersionString ¶
func DeviceGetVbiosVersionString(Device DeviceHandle) (string, RSMI_status)
DeviceGetVbiosVersionString gets the VBIOS identifer string.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetVendorId ¶
func DeviceGetVendorId(Device DeviceHandle) (uint16, RSMI_status)
DeviceGetVendorId gets the device vendor id associated with the device
Returns STATUS_SUCCESS when call was successful. Returns STATUS_NOT_SUPPORTED when installed software or hardware does not support this function with the given arguments. Returns STATUS_INVALID_ARGS when the provided arguments are not valid.
func DeviceGetVendorName ¶
func DeviceGetVendorName(Device DeviceHandle) (string, RSMI_status)
DeviceGetVendorName gets the name string for a give vendor ID. If the integer ID associated with the vendor is not found in one of the system files containing device name information (e.g. /usr/share/misc/pci.ids), then this function will return the hex vendor ID as a string.
Returns STATUS_SUCCESS when call was successful. Returns STATUS_NOT_SUPPORTED when installed software or hardware does not support this function with the given arguments. Returns STATUS_INVALID_ARGS when the provided arguments are not valid. Returns STATUS_INSUFFICIENT_SIZE when the vendor name is longer than defaultRsmiStringLength characters.
func DeviceGetVoltageMetric ¶
func DeviceGetVoltageMetric(Device DeviceHandle, Sensor RSMI_voltage_type, Metric RSMI_voltage_metric) (int64, RSMI_status)
DeviceGetVoltageMetric gets the voltage metric value for the specified metric, from the specified voltage sensor on the specified device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceGetVramVendor ¶
func DeviceGetVramVendor(Device DeviceHandle) (string, RSMI_status)
DeviceGetVramVendor gets the vram vendor string of a gpu device.
Returns STATUS_SUCCESS when call was successful. Returns STATUS_INSUFFICIENT_SIZE when the vram vendor name is longer than defaultRsmiStringLength characters.
func DeviceInitEventNotification ¶
func DeviceInitEventNotification(Device DeviceHandle) RSMI_status
DeviceInitEventNotification prepares to collect event notifications for a GPU.
STATUS_SUCCESS call was successful.
func DeviceIsP2PAccessible ¶
func DeviceIsP2PAccessible(SrcDevice DeviceHandle, DstDevice DeviceHandle) (bool, RSMI_status)
DeviceIsP2PAccessible returns the P2P availability status between 2 GPUs.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceReset ¶
func DeviceReset(Device DeviceHandle) RSMI_status
DeviceReset resets the GPU associated with the device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceResetFan ¶
func DeviceResetFan(Device DeviceHandle, Sensor uint32) RSMI_status
DeviceResetFan resets the fan to automatic driver control.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments.
func DeviceSetClockFrequency ¶
func DeviceSetClockFrequency(Device DeviceHandle, Clock RSMI_clk_type, FreqMask uint64) RSMI_status
DeviceSetClockFrequency controls the set of allowed frequencies that can be used for the specified clock.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_PERMISSION function requires root access.
func DeviceSetClockInfo ¶
func DeviceSetClockInfo(Device DeviceHandle, Level RSMI_freq_ind, ClockFreq uint64, Clock RSMI_clk_type) RSMI_status
DeviceSetClockInfo sets the clock frequency information. Only usable with clock types CLK_TYPE_SYS and CLK_TYPE_MEM.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceSetClockRange ¶
func DeviceSetClockRange(Device DeviceHandle, MinFreq uint64, MaxFreq uint64, Clock RSMI_clk_type) RSMI_status
DeviceSetClockRange sets the clock range information. Only usable with clock types CLK_TYPE_SYS and CLK_TYPE_MEM.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceSetDeterminismMode ¶
func DeviceSetDeterminismMode(Device DeviceHandle, Clock uint64) RSMI_status
DeviceSetDeterminismMode enters performance determinism mode with provided device. The performance determinism mode, which enforces a GFXCLK frequency SoftMax limit per GPU set by the user. This prevents the GFXCLK PLL from stretching when running the same workload on different GPUS, making performance variation minimal. The performance level is set to DEV_PERF_LEVEL_DETERMINISM.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceSetEventNotificationMask ¶
func DeviceSetEventNotificationMask(Device DeviceHandle, Mask uint64) RSMI_status
DeviceSetEventNotificationMask specifies which events to collect for a device. The events set in mask are OR'd together.
STATUS_SUCCESS call was successful. STATUS_INIT_ERROR is returned if DeviceInitEventNotification() has not been called before.
func DeviceSetFanSpeed ¶
func DeviceSetFanSpeed(Device DeviceHandle, Sensor uint32, Speed uint64) RSMI_status
DeviceSetFanSpeed sets the fan speed for the specified device with the provided speed, in RPMs.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_PERMISSION function requires root access.
func DeviceSetPciBandwidth ¶
func DeviceSetPciBandwidth(Device DeviceHandle, Mask uint64) RSMI_status
DeviceSetPciBandwidth controls the set of allowed PCIe bandwidths that can be used.
STATUS_SUCCESS call was successful. STATUS_PERMISSION function requires root access.
func DeviceSetPowerCap ¶
func DeviceSetPowerCap(Device DeviceHandle, Sensor uint32, Mask uint64) RSMI_status
DeviceSetPowerCap sets the power cap value to a set of available settings selectable through a mask.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. STATUS_PERMISSION function requires root access.
func DeviceSetPowerProfile ¶
func DeviceSetPowerProfile(Device DeviceHandle, Preset RSMI_power_profile_preset_masks) RSMI_status
DeviceSetPowerProfile set the power profile.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid. (not documented but likely). STATUS_PERMISSION function requires root access.
func DeviceSetVoltageInfo ¶
func DeviceSetVoltageInfo(Device DeviceHandle, Vpoint uint32, ClockFreq uint64, Voltage uint64) RSMI_status
DeviceSetVoltageInfo sets the voltage curve points. the Vpoint argument can be 1,2 or 3 or STATUS_NOT_SUPPORTED is returned.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func DeviceStopEventNotification ¶
func DeviceStopEventNotification(Device DeviceHandle) RSMI_status
DeviceStopEventNotification closes any file handles and free any resources used by event notification for a GPU.
STATUS_SUCCESS call was successful. STATUS_INVALID_ARGS resources for the given device have either already been freed, or were never allocated by DeviceInitEventNotification.
func DeviceXgmiErrorReset ¶
func DeviceXgmiErrorReset(Device DeviceHandle) RSMI_status
DeviceXgmiErrorReset resets the XGMI error status for a device.
STATUS_SUCCESS call was successful.
func DeviceXgmiHiveId ¶
func DeviceXgmiHiveId(Device DeviceHandle) (uint64, RSMI_status)
DeviceXgmiHiveId retrieves the XGMI hive id for a device.
STATUS_SUCCESS call was successful. STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments. STATUS_INVALID_ARGS the provided arguments are not valid.
func Init ¶
func Init() RSMI_status
Init initializes ROCm SMI on all AMD GPUs. When called, this initializes internal data structures, including those corresponding to sources of information that SMI provides. This version of the Init function specifies no RSMI_init_flags.
STATUS_SUCCESS is returned upon successful call.
func InitWithFlags ¶
func InitWithFlags(Flags uint64) RSMI_status
InitWithFlags Init initializes ROCm SMI. When called, this initializes internal data structures, including those corresponding to sources of information that SMI provides. This version uses the Flags argument as RSMI_init_flags:
INIT_FLAG_ALL_GPUS: Attempt to add all GPUs found (including non-AMD) to the list of devices from which SMI information can be retrieved. By default, only AMD devices are enumerated by RSMI.
STATUS_SUCCESS is returned upon successful call.
The function panics if the ROCm SMI library cannot be found or opened.
func NumMonitorDevices ¶
func NumMonitorDevices() (int, RSMI_status)
NumMonitorDevices gets the number of devices that have monitor information. The number of devices which have monitors is returned. Monitors are referenced by the index which can be between 0 and the returned num_devices - 1.
Returns STATUS_SUCCESS upon successful call.
func Shutdown ¶
func Shutdown() RSMI_status
Shutdown shuts down ROCm SMI and does any necessary clean up.
The function panics if the ROCm SMI library cannot be closed.
func StatusString ¶
func StatusString(Status RSMI_status) (string, RSMI_status)
StatusString returns the string representation for the given RSMI_status.
Note: Created manually since the the c-for-go parser does not generate a version with &cStr.
STATUS_SUCCESS is returned upon successful call.
type RSMI_sw_component ¶
type RSMI_sw_component int32
RSMI_sw_component as declared in rocm_smi/rocm_smi.h:191
const ( SW_COMP_FIRST RSMI_sw_component = iota SW_COMP_DRIVER RSMI_sw_component = 0 SW_COMP_LAST RSMI_sw_component = 0 )
RSMI_sw_component enumeration from rocm_smi/rocm_smi.h:191
type RSMI_temperature_metric ¶
type RSMI_temperature_metric int32
RSMI_temperature_metric as declared in rocm_smi/rocm_smi.h:397
const ( TEMP_CURRENT RSMI_temperature_metric = iota TEMP_FIRST RSMI_temperature_metric = 0 TEMP_MAX RSMI_temperature_metric = 1 TEMP_MIN RSMI_temperature_metric = 2 TEMP_MAX_HYST RSMI_temperature_metric = 3 TEMP_MIN_HYST RSMI_temperature_metric = 4 TEMP_CRITICAL RSMI_temperature_metric = 5 TEMP_CRITICAL_HYST RSMI_temperature_metric = 6 TEMP_EMERGENCY RSMI_temperature_metric = 7 TEMP_EMERGENCY_HYST RSMI_temperature_metric = 8 TEMP_CRIT_MIN RSMI_temperature_metric = 9 TEMP_CRIT_MIN_HYST RSMI_temperature_metric = 10 TEMP_OFFSET RSMI_temperature_metric = 11 TEMP_LOWEST RSMI_temperature_metric = 12 TEMP_HIGHEST RSMI_temperature_metric = 13 TEMP_LAST RSMI_temperature_metric = 13 )
RSMI_temperature_metric enumeration from rocm_smi/rocm_smi.h:397
type RSMI_temperature_type ¶
type RSMI_temperature_type int32
RSMI_temperature_type as declared in rocm_smi/rocm_smi.h:417
const ( TEMP_TYPE_FIRST RSMI_temperature_type = iota TEMP_TYPE_EDGE RSMI_temperature_type = 0 TEMP_TYPE_JUNCTION RSMI_temperature_type = 1 TEMP_TYPE_MEMORY RSMI_temperature_type = 2 TEMP_TYPE_HBM_0 RSMI_temperature_type = 3 TEMP_TYPE_HBM_1 RSMI_temperature_type = 4 TEMP_TYPE_HBM_2 RSMI_temperature_type = 5 TEMP_TYPE_HBM_3 RSMI_temperature_type = 6 TEMP_TYPE_LAST RSMI_temperature_type = 6 TEMP_TYPE_INVALID RSMI_temperature_type = -1 )
RSMI_temperature_type enumeration from rocm_smi/rocm_smi.h:417
type RSMI_utilization_counter ¶
func NewRSMI_utilization_counter ¶
func NewRSMI_utilization_counter() *RSMI_utilization_counter
NewRSMI_utilization_counter allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_utilization_counterRef ¶
func NewRSMI_utilization_counterRef(ref unsafe.Pointer) *RSMI_utilization_counter
NewRSMI_utilization_counterRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_utilization_counter) Free ¶
func (x *RSMI_utilization_counter) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_utilization_counter) PassRef ¶
func (x *RSMI_utilization_counter) PassRef() *C.rsmi_utilization_counter_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_utilization_counter) Ref ¶
func (x *RSMI_utilization_counter) Ref() *C.rsmi_utilization_counter_t
Ref returns a reference to C object as it is.
type RSMI_version ¶
func NewRSMI_version ¶
func NewRSMI_version() *RSMI_version
NewRSMI_version allocates a new C object of this type and converts the reference into a raw struct reference without wrapping.
func NewRSMI_versionRef ¶
func NewRSMI_versionRef(ref unsafe.Pointer) *RSMI_version
NewRSMI_versionRef converts the C object reference into a raw struct reference without wrapping.
func (*RSMI_version) Free ¶
func (x *RSMI_version) Free()
Free cleanups the referenced memory using C free.
func (*RSMI_version) PassRef ¶
func (x *RSMI_version) PassRef() *C.rsmi_version_t
PassRef returns a reference to C object as it is or allocates a new C object of this type.
func (*RSMI_version) Ref ¶
func (x *RSMI_version) Ref() *C.rsmi_version_t
Ref returns a reference to C object as it is.
type RSMI_voltage_metric ¶
type RSMI_voltage_metric int32
RSMI_voltage_metric as declared in rocm_smi/rocm_smi.h:437
const ( VOLT_CURRENT RSMI_voltage_metric = iota VOLT_FIRST RSMI_voltage_metric = 0 VOLT_MAX RSMI_voltage_metric = 1 VOLT_MIN_CRIT RSMI_voltage_metric = 2 VOLT_MIN RSMI_voltage_metric = 3 VOLT_MAX_CRIT RSMI_voltage_metric = 4 VOLT_AVERAGE RSMI_voltage_metric = 5 VOLT_LOWEST RSMI_voltage_metric = 6 VOLT_HIGHEST RSMI_voltage_metric = 7 VOLT_LAST RSMI_voltage_metric = 7 )
RSMI_voltage_metric enumeration from rocm_smi/rocm_smi.h:437
type RSMI_voltage_type ¶
type RSMI_voltage_type int32
RSMI_voltage_type as declared in rocm_smi/rocm_smi.h:450
const ( VOLT_TYPE_FIRST RSMI_voltage_type = iota VOLT_TYPE_VDDGFX RSMI_voltage_type = 0 VOLT_TYPE_LAST RSMI_voltage_type = 0 VOLT_TYPE_INVALID RSMI_voltage_type = -1 )
RSMI_voltage_type enumeration from rocm_smi/rocm_smi.h:450
type RSMI_xgmi_status ¶
type RSMI_xgmi_status int32
RSMI_xgmi_status as declared in rocm_smi/rocm_smi.h:590
const ( XGMI_STATUS_NO_ERRORS RSMI_xgmi_status = iota XGMI_STATUS_ERROR RSMI_xgmi_status = 1 XGMI_STATUS_MULTIPLE_ERRORS RSMI_xgmi_status = 2 )
RSMI_xgmi_status enumeration from rocm_smi/rocm_smi.h:590