rocm_smi.h Source File#
rocm_smi.h
Go to the documentation of this file.
4612 rsmi_dev_metrics_system_clock_counter_get(uint32_t dv_ind, uint64_t* system_clock_counter_value);
4821 rsmi_dev_metrics_pcie_bandwidth_inst_get(uint32_t dv_ind, uint64_t* pcie_bandwidth_inst_value);
4878 rsmi_dev_metrics_pcie_replay_rover_count_acc_get(uint32_t dv_ind, uint64_t* pcie_count_acc_value);
4897 rsmi_dev_metrics_pcie_nak_sent_count_acc_get(uint32_t dv_ind, uint32_t* pcie_nak_sent_count_acc_value);
4916 rsmi_dev_metrics_pcie_nak_rcvd_count_acc_get(uint32_t dv_ind, uint32_t* pcie_nak_rcvd_count_acc_value);
4982 rsmi_dev_metrics_vcn_activity_get(uint32_t dv_ind, GPUMetricVcnActivity_t* vcn_activity_value);
5003 rsmi_dev_metrics_jpeg_activity_get(uint32_t dv_ind, GPUMetricJpegActivity_t* jpeg_activity_value);
5024 rsmi_dev_metrics_xgmi_read_data_get(uint32_t dv_ind, GPUMetricXgmiReadDataAcc_t* xgmi_read_data_acc_value);
5045 rsmi_dev_metrics_xgmi_write_data_get(uint32_t dv_ind, GPUMetricXgmiWriteDataAcc_t* xgmi_write_data_acc_value);
5066 rsmi_dev_metrics_curr_gfxclk_get(uint32_t dv_ind, GPUMetricCurrGfxClk_t* current_gfxclk_value);
5087 rsmi_dev_metrics_curr_socclk_get(uint32_t dv_ind, GPUMetricCurrSocClk_t* current_socclk_value);
5319 rsmi_dev_metrics_avg_gfx_clock_frequency_get(uint32_t dv_ind, uint16_t* clock_frequency_value);
5338 rsmi_dev_metrics_avg_soc_clock_frequency_get(uint32_t dv_ind, uint16_t* clock_frequency_value);
rsmi_status_t rsmi_func_iter_value_get(rsmi_func_id_iter_handle_t handle, rsmi_func_id_value_t *value)
Get the value associated with a function/variant iterator.
rsmi_status_t rsmi_dev_supported_variant_iterator_open(rsmi_func_id_iter_handle_t obj_h, rsmi_func_id_iter_handle_t *var_iter)
Get a variant iterator for a given handle.
rsmi_status_t rsmi_func_iter_next(rsmi_func_id_iter_handle_t handle)
Advance a function identifer iterator.
rsmi_status_t rsmi_dev_supported_func_iterator_close(rsmi_func_id_iter_handle_t *handle)
Close a variant iterator handle.
rsmi_status_t rsmi_dev_supported_func_iterator_open(uint32_t dv_ind, rsmi_func_id_iter_handle_t *handle)
Get a function name iterator of supported RSMI functions for a device.
rsmi_status_t rsmi_dev_compute_partition_reset(uint32_t dv_ind)
Reverts a selected device's compute partition setting back to its boot state.
rsmi_status_t rsmi_dev_compute_partition_set(uint32_t dv_ind, rsmi_compute_partition_type_t compute_partition)
Modifies a selected device's compute partition setting.
rsmi_status_t rsmi_dev_compute_partition_get(uint32_t dv_ind, char *compute_partition, uint32_t len)
Retrieves the current compute partitioning for a desired device.
rsmi_status_t rsmi_dev_ecc_status_get(uint32_t dv_ind, rsmi_gpu_block_t block, rsmi_ras_err_state_t *state)
Retrieve the ECC status for a GPU block.
rsmi_status_t rsmi_dev_ecc_enabled_get(uint32_t dv_ind, uint64_t *enabled_blocks)
Retrieve the enabled ECC bit-mask.
rsmi_status_t rsmi_dev_ecc_count_get(uint32_t dv_ind, rsmi_gpu_block_t block, rsmi_error_count_t *ec)
Retrieve the error counts for a GPU block.
rsmi_status_t rsmi_status_string(rsmi_status_t status, const char **status_string)
Get a description of a provided RSMI error status.
rsmi_status_t rsmi_event_notification_stop(uint32_t dv_ind)
Close any file handles and free any resources used by event notification for a GPU.
rsmi_status_t rsmi_event_notification_get(int timeout_ms, uint32_t *num_elem, rsmi_evt_notification_data_t *data)
Collect event notifications, waiting a specified amount of time.
rsmi_status_t rsmi_event_notification_init(uint32_t dv_ind)
Prepare to collect event notifications for a GPU.
rsmi_status_t rsmi_event_notification_mask_set(uint32_t dv_ind, uint64_t mask)
Specify which events to collect for a device.
rsmi_status_t rsmi_dev_metrics_curr_fan_speed_get(uint32_t dv_ind, uint16_t *fan_speed_value)
Get the 'curr_fan_speed' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_dclock1_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_dclock1_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_volt_mem_get(uint32_t dv_ind, uint16_t *voltage_value)
Get the 'volt_mem' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_volt_gfx_get(uint32_t dv_ind, uint16_t *voltage_value)
Get the 'volt_gfx' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_hotspot_get(uint32_t dv_ind, uint16_t *hotspot_value)
Get the 'temp_hotspot' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_replay_count_acc_get(uint32_t dv_ind, uint64_t *pcie_count_acc_value)
Get the 'pcie_replay_count_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_gfx_activity_acc_get(uint32_t dv_ind, uint32_t *gfx_activity_acc_value)
Get the 'gfx_activity_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_gfx_activity_get(uint32_t dv_ind, uint16_t *gfx_activity_value)
Get the 'avg_gfx_activity' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_bandwidth_acc_get(uint32_t dv_ind, uint64_t *pcie_bandwidth_acc_value)
Get the 'pcie_bandwidth_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_socket_power_get(uint32_t dv_ind, uint16_t *socket_power_value)
Get the 'curr_socket_power' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_soc_clock_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_soc_clock_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_bandwidth_inst_get(uint32_t dv_ind, uint64_t *pcie_bandwidth_inst_value)
Get the 'pcie_bandwidth_inst' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_vrmem_get(uint32_t dv_ind, uint16_t *vrmem_value)
Get the 'temp_vrmem' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_socclk_get(uint32_t dv_ind, GPUMetricCurrSocClk_t *current_socclk_value)
Get the 'curr_socclk' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_xgmi_link_speed_get(uint32_t dv_ind, uint16_t *xgmi_link_speed_value)
Get the 'xgmi_link_speed' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_throttle_status_get(uint32_t dv_ind, uint32_t *throttle_status_value)
Get the 'throttle_status' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_vclk1_get(uint32_t dv_ind, uint16_t *current_vclk_value)
Get the 'curr_vclk1' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_system_clock_counter_get(uint32_t dv_ind, uint64_t *system_clock_counter_value)
Get the 'system_clock_counter' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_l0_recov_count_acc_get(uint32_t dv_ind, uint64_t *pcie_count_acc_value)
Get the 'pcie_l0_recov_count_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_dclk1_get(uint32_t dv_ind, uint16_t *current_dclk_value)
Get the 'curr_dclk1' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_link_speed_get(uint32_t dv_ind, uint16_t *pcie_link_speed_value)
Get the 'pcie_link_speed' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_vcn_activity_get(uint32_t dv_ind, GPUMetricVcnActivity_t *vcn_activity_value)
Get the 'vcn_activity' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_volt_soc_get(uint32_t dv_ind, uint16_t *voltage_value)
Get the 'volt_soc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_gfxclk_lock_status_get(uint32_t dv_ind, uint32_t *gfxclk_lock_status_value)
Get the 'gfxclk_lock_status' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_edge_get(uint32_t dv_ind, uint16_t *edge_value)
Get the 'temp_edge' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_xgmi_link_width_get(uint32_t dv_ind, uint16_t *xgmi_link_width_value)
Get the 'xgmi_link_width' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_gfx_clock_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_gfx_clock_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_mem_activity_acc_get(uint32_t dv_ind, uint32_t *mem_activity_acc_value)
Get the 'mem_activity_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_mm_activity_get(uint32_t dv_ind, uint16_t *mm_activity_value)
Get the 'avg_mm_activity' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_link_width_get(uint32_t dv_ind, uint16_t *pcie_link_width_value)
Get the 'pcie_link_width' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_xgmi_read_data_get(uint32_t dv_ind, GPUMetricXgmiReadDataAcc_t *xgmi_read_data_acc_value)
Get the 'xgmi_read_data' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_dclock0_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_dclock0_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_gfxclk_get(uint32_t dv_ind, GPUMetricCurrGfxClk_t *current_gfxclk_value)
Get the 'curr_gfxclk' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_xcd_counter_get(uint32_t dv_ind, uint16_t *xcd_counter_value)
Get the 'xcd_counter' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_vrsoc_get(uint32_t dv_ind, uint16_t *vrsoc_value)
Get the 'temp_vrsoc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_mem_get(uint32_t dv_ind, uint16_t *mem_value)
Get the 'temp_mem' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_header_info_get(uint32_t dv_ind, metrics_table_header_t *header_value)
Get the 'metrics_header_info' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_replay_rover_count_acc_get(uint32_t dv_ind, uint64_t *pcie_count_acc_value)
Get the 'pcie_replay_rover_count_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_indep_throttle_status_get(uint32_t dv_ind, uint64_t *throttle_status_value)
Get the 'indep_throttle_status' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_nak_sent_count_acc_get(uint32_t dv_ind, uint32_t *pcie_nak_sent_count_acc_value)
Get the 'pcie_nak_sent_count_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_hbm_get(uint32_t dv_ind, GPUMetricTempHbm_t *temp_hbm_value)
Get the 'temp_hbm' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_dclk0_get(uint32_t dv_ind, GPUMetricCurrDClk0_t *current_dclk_value)
Get the 'curr_dclk0' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_socket_power_get(uint32_t dv_ind, uint16_t *socket_power_value)
Get the 'avg_socket_power' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_umc_activity_get(uint32_t dv_ind, uint16_t *umc_activity_value)
Get the 'avg_umc_activity' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_vclock0_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_vclock0_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_nak_rcvd_count_acc_get(uint32_t dv_ind, uint32_t *pcie_nak_rcvd_count_acc_value)
Get the 'pcie_nak_rcvd_count_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_vrgfx_get(uint32_t dv_ind, uint16_t *vrgfx_value)
Get the 'temp_vrgfx' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_energy_acc_get(uint32_t dv_ind, uint64_t *energy_acc_value)
Get the 'energy_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_uclock_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_uclock_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_uclk_get(uint32_t dv_ind, uint16_t *uclk_value)
Get the 'curr_uclk' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_vclock1_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_vclock1_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_firmware_timestamp_get(uint32_t dv_ind, uint64_t *firmware_timestamp_value)
Get the 'firmware_timestamp' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_log_get(uint32_t dv_ind)
Get the log from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_vclk0_get(uint32_t dv_ind, GPUMetricCurrVClk0_t *current_vclk_value)
Get the 'curr_vclk0' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_xgmi_write_data_get(uint32_t dv_ind, GPUMetricXgmiWriteDataAcc_t *xgmi_write_data_acc_value)
Get the 'xgmi_write_data' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_jpeg_activity_get(uint32_t dv_ind, GPUMetricJpegActivity_t *jpeg_activity_value)
Get the 'jpeg_activity' from the GPU metrics associated with the device.
rsmi_status_t rsmi_topo_get_link_type(uint32_t dv_ind_src, uint32_t dv_ind_dst, uint64_t *hops, RSMI_IO_LINK_TYPE *type)
Retrieve the hops and the connection type between GPU to GPU/CPU.
rsmi_status_t rsmi_topo_get_link_weight(uint32_t dv_ind_src, uint32_t dv_ind_dst, uint64_t *weight)
Retrieve the weight for a connection between 2 GPUs.
rsmi_status_t rsmi_minmax_bandwidth_get(uint32_t dv_ind_src, uint32_t dv_ind_dst, uint64_t *min_bandwidth, uint64_t *max_bandwidth)
Retreive minimal and maximal io link bandwidth between 2 GPUs.
rsmi_status_t rsmi_is_P2P_accessible(uint32_t dv_ind_src, uint32_t dv_ind_dst, bool *accessible)
Return P2P availability status between 2 GPUs.
rsmi_status_t rsmi_topo_get_numa_node_number(uint32_t dv_ind, uint32_t *numa_node)
Retrieve the NUMA CPU node number for a device.
rsmi_status_t rsmi_dev_name_get(uint32_t dv_ind, char *name, size_t len)
Get the name string of a gpu device.
rsmi_status_t rsmi_dev_unique_id_get(uint32_t dv_ind, uint64_t *id)
Get Unique ID.
rsmi_status_t rsmi_num_monitor_devices(uint32_t *num_devices)
Get the number of devices that have monitor information.
rsmi_status_t rsmi_dev_vram_vendor_get(uint32_t dv_ind, char *brand, uint32_t len)
Get the vram vendor string of a gpu device.
rsmi_status_t rsmi_dev_sku_get(uint32_t dv_ind, char *sku)
Get the SKU for a desired device associated with the device with provided device index.
rsmi_status_t rsmi_dev_drm_render_minor_get(uint32_t dv_ind, uint32_t *minor)
Get the drm minor number associated with this device.
rsmi_status_t rsmi_dev_subsystem_id_get(uint32_t dv_ind, uint16_t *id)
Get the subsystem device id associated with the device with provided device index.
rsmi_status_t rsmi_dev_xgmi_physical_id_get(uint32_t dv_ind, uint16_t *id)
Get the XGMI physical id associated with the device.
rsmi_status_t rsmi_dev_serial_number_get(uint32_t dv_ind, char *serial_num, uint32_t len)
Get the serial number string for a device.
rsmi_status_t rsmi_dev_vendor_name_get(uint32_t dv_ind, char *name, size_t len)
Get the name string for a give vendor ID.
rsmi_status_t rsmi_dev_brand_get(uint32_t dv_ind, char *brand, uint32_t len)
Get the brand string of a gpu device.
rsmi_status_t rsmi_dev_id_get(uint32_t dv_ind, uint16_t *id)
Get the device id associated with the device with provided device index.
rsmi_status_t rsmi_dev_subsystem_name_get(uint32_t dv_ind, char *name, size_t len)
Get the name string for the device subsytem.
rsmi_status_t rsmi_dev_revision_get(uint32_t dv_ind, uint16_t *revision)
Get the device revision associated with the device.
rsmi_status_t rsmi_dev_subsystem_vendor_id_get(uint32_t dv_ind, uint16_t *id)
Get the device subsystem vendor id associated with the device with provided device index.
rsmi_status_t rsmi_dev_vendor_id_get(uint32_t dv_ind, uint16_t *id)
Get the device vendor id associated with the device with provided device index.
rsmi_status_t rsmi_dev_memory_total_get(uint32_t dv_ind, rsmi_memory_type_t mem_type, uint64_t *total)
Get the total amount of memory that exists.
rsmi_status_t rsmi_dev_memory_usage_get(uint32_t dv_ind, rsmi_memory_type_t mem_type, uint64_t *used)
Get the current memory usage.
rsmi_status_t rsmi_dev_memory_reserved_pages_get(uint32_t dv_ind, uint32_t *num_pages, rsmi_retired_page_record_t *records)
Get information about reserved ("retired") memory pages.
rsmi_status_t rsmi_dev_memory_busy_percent_get(uint32_t dv_ind, uint32_t *busy_percent)
Get percentage of time any device memory is being used.
rsmi_status_t rsmi_dev_pci_bandwidth_set(uint32_t dv_ind, uint64_t bw_bitmask)
Control the set of allowed PCIe bandwidths that can be used.
rsmi_status_t rsmi_dev_pci_throughput_get(uint32_t dv_ind, uint64_t *sent, uint64_t *received, uint64_t *max_pkt_sz)
Get PCIe traffic information.
rsmi_status_t rsmi_dev_pci_bandwidth_get(uint32_t dv_ind, rsmi_pcie_bandwidth_t *bandwidth)
Get the list of possible PCIe bandwidths that are available.
rsmi_status_t rsmi_topo_numa_affinity_get(uint32_t dv_ind, int32_t *numa_node)
Get the NUMA node associated with a device.
rsmi_status_t rsmi_dev_pci_replay_counter_get(uint32_t dv_ind, uint64_t *counter)
Get PCIe replay counter.
rsmi_status_t rsmi_dev_pci_id_get(uint32_t dv_ind, uint64_t *bdfid)
Get the unique PCI device identifier associated for a device.
rsmi_status_t rsmi_counter_control(rsmi_event_handle_t evt_handle, rsmi_counter_command_t cmd, void *cmd_args)
Issue performance counter control commands.
rsmi_status_t rsmi_counter_read(rsmi_event_handle_t evt_handle, rsmi_counter_value_t *value)
Read the current value of a performance counter.
rsmi_status_t rsmi_counter_available_counters_get(uint32_t dv_ind, rsmi_event_group_t grp, uint32_t *available)
Get the number of currently available counters.
rsmi_status_t rsmi_dev_counter_destroy(rsmi_event_handle_t evnt_handle)
Deallocate a performance counter object.
rsmi_status_t rsmi_dev_counter_create(uint32_t dv_ind, rsmi_event_type_t type, rsmi_event_handle_t *evnt_handle)
Create a performance counter object.
rsmi_status_t rsmi_dev_counter_group_supported(uint32_t dv_ind, rsmi_event_group_t group)
Tell if an event group is supported by a given device.
rsmi_status_t rsmi_dev_overdrive_level_set_v1(uint32_t dv_ind, uint32_t od)
Set the overdrive percent associated with the device with provided device index with the provided val...
rsmi_status_t rsmi_dev_perf_level_set(uint32_t dv_ind, rsmi_dev_perf_level_t perf_lvl)
Set the PowerPlay performance level associated with the device with provided device index with the pr...
rsmi_status_t rsmi_dev_overdrive_level_set(uint32_t dv_ind, uint32_t od)
Set the overdrive percent associated with the device with provided device index with the provided val...
rsmi_status_t rsmi_dev_gpu_clk_freq_set(uint32_t dv_ind, rsmi_clk_type_t clk_type, uint64_t freq_bitmask)
Control the set of allowed frequencies that can be used for the specified clock.
rsmi_status_t rsmi_dev_perf_level_set_v1(uint32_t dv_ind, rsmi_dev_perf_level_t perf_lvl)
Set the PowerPlay performance level associated with the device with provided device index with the pr...
rsmi_status_t rsmi_dev_clk_range_set(uint32_t dv_ind, uint64_t minclkvalue, uint64_t maxclkvalue, rsmi_clk_type_t clkType)
This function sets the clock range information.
rsmi_status_t rsmi_dev_od_volt_curve_regions_get(uint32_t dv_ind, uint32_t *num_regions, rsmi_freq_volt_region_t *buffer)
This function will retrieve the current valid regions in the frequency/voltage space.
rsmi_status_t rsmi_dev_power_profile_presets_get(uint32_t dv_ind, uint32_t sensor_ind, rsmi_power_profile_status_t *status)
Get the list of available preset power profiles and an indication of which profile is currently activ...
rsmi_status_t rsmi_dev_od_clk_info_set(uint32_t dv_ind, rsmi_freq_ind_t level, uint64_t clkvalue, rsmi_clk_type_t clkType)
This function sets the clock frequency information.
rsmi_status_t rsmi_dev_perf_level_get(uint32_t dv_ind, rsmi_dev_perf_level_t *perf)
Get the performance level of the device with provided device index.
rsmi_status_t rsmi_dev_gpu_reset(uint32_t dv_ind)
Reset the gpu associated with the device with provided device index.
rsmi_status_t rsmi_dev_activity_metric_get(uint32_t dv_ind, rsmi_activity_metric_t activity_metric_type, rsmi_activity_metric_counter_t *activity_metric_counter)
Get activity metric average utilization counter of the specified device.
rsmi_status_t rsmi_dev_od_volt_info_get(uint32_t dv_ind, rsmi_od_volt_freq_data_t *odv)
This function retrieves the voltage/frequency curve information.
rsmi_status_t rsmi_dev_gpu_metrics_info_get(uint32_t dv_ind, rsmi_gpu_metrics_t *pgpu_metrics)
This function retrieves the gpu metrics information.
rsmi_status_t rsmi_perf_determinism_mode_set(uint32_t dv_ind, uint64_t clkvalue)
Enter performance determinism mode with provided device index.
rsmi_status_t rsmi_utilization_count_get(uint32_t dv_ind, rsmi_utilization_counter_t utilization_counters[], uint32_t count, uint64_t *timestamp)
Get coarse grain utilization counter of the specified device.
rsmi_status_t rsmi_dev_clk_extremum_set(uint32_t dv_ind, rsmi_freq_ind_t level, uint64_t clkvalue, rsmi_clk_type_t clkType)
This function sets the clock min/max level.
rsmi_status_t rsmi_dev_od_volt_info_set(uint32_t dv_ind, uint32_t vpoint, uint64_t clkvalue, uint64_t voltvalue)
This function sets 1 of the 3 voltage curve points.
rsmi_status_t rsmi_dev_overdrive_level_get(uint32_t dv_ind, uint32_t *od)
Get the overdrive percent associated with the device with provided device index.
rsmi_status_t rsmi_dev_gpu_clk_freq_get(uint32_t dv_ind, rsmi_clk_type_t clk_type, rsmi_frequencies_t *f)
Get the list of possible system clock speeds of device for a specified clock type.
rsmi_status_t rsmi_dev_activity_avg_mm_get(uint32_t dv_ind, uint16_t *avg_activity)
Get activity metric bandwidth average utilization counter of the specified device.
rsmi_status_t rsmi_dev_mem_overdrive_level_get(uint32_t dv_ind, uint32_t *od)
Get the memory clock overdrive percent associated with the device with provided device index.
rsmi_status_t rsmi_dev_busy_percent_get(uint32_t dv_ind, uint32_t *busy_percent)
Get percentage of time device is busy doing any processing.
rsmi_status_t rsmi_dev_fan_speed_set(uint32_t dv_ind, uint32_t sensor_ind, uint64_t speed)
Set the fan speed for the specified device with the provided speed, in RPMs.
rsmi_status_t rsmi_dev_fan_reset(uint32_t dv_ind, uint32_t sensor_ind)
Reset the fan to automatic driver control.
rsmi_status_t rsmi_dev_volt_metric_get(uint32_t dv_ind, rsmi_voltage_type_t sensor_type, rsmi_voltage_metric_t metric, int64_t *voltage)
Get the voltage metric value for the specified metric, from the specified voltage sensor on the speci...
rsmi_status_t rsmi_dev_temp_metric_get(uint32_t dv_ind, uint32_t sensor_type, rsmi_temperature_metric_t metric, int64_t *temperature)
Get the temperature metric value for the specified metric, from the specified temperature sensor on t...
rsmi_status_t rsmi_dev_fan_speed_max_get(uint32_t dv_ind, uint32_t sensor_ind, uint64_t *max_speed)
Get the max. fan speed of the device with provided device index.
rsmi_status_t rsmi_dev_fan_rpms_get(uint32_t dv_ind, uint32_t sensor_ind, int64_t *speed)
Get the fan speed in RPMs of the device with the specified device index and 0-based sensor index.
rsmi_status_t rsmi_dev_fan_speed_get(uint32_t dv_ind, uint32_t sensor_ind, int64_t *speed)
Get the fan speed for the specified device as a value relative to RSMI_MAX_FAN_SPEED.
rsmi_status_t rsmi_dev_power_cap_set(uint32_t dv_ind, uint32_t sensor_ind, uint64_t cap)
Set the power cap value.
rsmi_status_t rsmi_dev_power_profile_set(uint32_t dv_ind, uint32_t reserved, rsmi_power_profile_preset_masks_t profile)
Set the power profile.
rsmi_status_t rsmi_dev_energy_count_get(uint32_t dv_ind, uint64_t *power, float *counter_resolution, uint64_t *timestamp)
Get the energy accumulator counter of the device with provided device index.
rsmi_status_t rsmi_dev_power_cap_default_get(uint32_t dv_ind, uint64_t *default_cap)
Get the default power cap for the device specified by dv_ind.
rsmi_status_t rsmi_dev_power_ave_get(uint32_t dv_ind, uint32_t sensor_ind, uint64_t *power)
Get the average power consumption of the device with provided device index.
rsmi_status_t rsmi_dev_power_get(uint32_t dv_ind, uint64_t *power, RSMI_POWER_TYPE *type)
A generic get which attempts to retieve current socket power (also known as instant power) of the dev...
rsmi_status_t rsmi_dev_power_cap_get(uint32_t dv_ind, uint32_t sensor_ind, uint64_t *cap)
Get the cap on power which, when reached, causes the system to take action to reduce power.
rsmi_status_t rsmi_dev_power_cap_range_get(uint32_t dv_ind, uint32_t sensor_ind, uint64_t *max, uint64_t *min)
Get the range of valid values for the power cap.
rsmi_status_t rsmi_dev_current_socket_power_get(uint32_t dv_ind, uint64_t *socket_power)
Get the current socket power (also known as instant power) of the device index provided.
rsmi_status_t rsmi_compute_process_info_by_device_get(uint32_t pid, uint32_t dv_ind, rsmi_process_info_t *proc)
Get the info of a process on a specific device.
rsmi_status_t rsmi_compute_process_gpus_get(uint32_t pid, uint32_t *dv_indices, uint32_t *num_devices)
Get the device indices currently being used by a process.
rsmi_status_t rsmi_compute_process_info_by_pid_get(uint32_t pid, rsmi_process_info_t *proc)
Get process information about a specific process.
rsmi_status_t rsmi_compute_process_info_get(rsmi_process_info_t *procs, uint32_t *num_items)
Get process information about processes currently using GPU.
rsmi_status_t rsmi_version_get(rsmi_version_t *version)
Get the build version information for the currently running build of RSMI.
rsmi_status_t rsmi_dev_vbios_version_get(uint32_t dv_ind, char *vbios, uint32_t len)
Get the VBIOS identifer string.
rsmi_status_t rsmi_dev_firmware_version_get(uint32_t dv_ind, rsmi_fw_block_t block, uint64_t *fw_version)
Get the firmware versions for a device.
rsmi_status_t rsmi_version_str_get(rsmi_sw_component_t component, char *ver_str, uint32_t len)
Get the driver version string for the current system.
rsmi_status_t rsmi_dev_target_graphics_version_get(uint32_t dv_ind, uint64_t *gfx_version)
Get the graphics version for a GPU device.
rsmi_status_t rsmi_dev_xgmi_error_status(uint32_t dv_ind, rsmi_xgmi_status_t *status)
Retrieve the XGMI error status for a device.
rsmi_status_t rsmi_dev_xgmi_error_reset(uint32_t dv_ind)
Reset the XGMI error status for a device.
rsmi_status_t rsmi_dev_xgmi_hive_id_get(uint32_t dv_ind, uint64_t *hive_id)
Retrieve the XGMI hive id for a device.
rsmi_status_t rsmi_dev_memory_partition_get(uint32_t dv_ind, char *memory_partition, uint32_t len)
Retrieves the current memory partition for a desired device.
rsmi_status_t rsmi_dev_memory_partition_set(uint32_t dv_ind, rsmi_memory_partition_type_t memory_partition)
Modifies a selected device's current memory partition setting.
rsmi_status_t rsmi_dev_memory_partition_reset(uint32_t dv_ind)
Reverts a selected device's memory partition setting back to its boot state.
rsmi_activity_metric_t
Activity (Utilization) Metrics. This enum is used to identify various activity metrics.
Definition: rocm_smi.h:476
struct rsmi_func_id_iter_handle * rsmi_func_id_iter_handle_t
Opaque handle to function-support object.
Definition: rocm_smi.h:1141
rsmi_memory_page_status_t
Reserved Memory Page States.
Definition: rocm_smi.h:670
@ RSMI_MEM_PAGE_STATUS_UNRESERVABLE
Unable to reserve this page.
Definition: rocm_smi.h:676
@ RSMI_STATUS_UNKNOWN_ERROR
An unknown error occurred.
Definition: rocm_smi.h:136
@ RSMI_STATUS_INVALID_ARGS
Passed in arguments are not valid.
Definition: rocm_smi.h:89
@ RSMI_STATUS_INTERNAL_EXCEPTION
An internal exception was caught.
Definition: rocm_smi.h:103
RSMI_UTILIZATION_COUNTER_TYPE
The utilization counter type.
Definition: rocm_smi.h:697
@ RSMI_COARSE_GRAIN_MEM_ACTIVITY
Memory Activity.
Definition: rocm_smi.h:701
@ RSMI_UTILIZATION_COUNTER_FIRST
GFX Activity.
Definition: rocm_smi.h:698
@ RSMI_IOLINK_TYPE_NUMIOLINKTYPES
Number of IO Link types.
Definition: rocm_smi.h:686
rsmi_event_group_t
Enum denoting an event group. The value of the enum is the base value for all the event enums in the ...
Definition: rocm_smi.h:214
@ RSMI_EVNT_GRP_XGMI_DATA_OUT
XGMI Outbound data.
Definition: rocm_smi.h:216
#define MAX_EVENT_NOTIFICATION_MSG_SIZE
Maximum number of characters an event notification message will be.
Definition: rocm_smi.h:328
#define RSMI_MAX_NUM_CLKS
This should match kRSMI_MAX_NUM_CLKS.
Definition: rocm_smi.h:952
#define RSMI_MAX_NUM_JPEG_ENGS
This should match kRSMI_MAX_JPEG_ENGINES.
Definition: rocm_smi.h:947
@ RSMI_DEV_PERF_LEVEL_UNKNOWN
Unknown performance level.
Definition: rocm_smi.h:179
@ RSMI_DEV_PERF_LEVEL_DETERMINISM
Performance determinism state.
Definition: rocm_smi.h:175
@ RSMI_DEV_PERF_LEVEL_STABLE_PEAK
Stable power state with peak clocks.
Definition: rocm_smi.h:170
@ RSMI_DEV_PERF_LEVEL_AUTO
Performance level is "auto".
Definition: rocm_smi.h:159
rsmi_voltage_metric_t
Voltage Metrics. This enum is used to identify various Volatge metrics. Corresponding values will be ...
Definition: rocm_smi.h:489
#define RSMI_NUM_VOLTAGE_CURVE_POINTS
The number of points that make up a voltage-frequency curve definition.
Definition: rocm_smi.h:81
#define RSMI_MAX_NUM_GFX_CLKS
This should match kRSMI_MAX_NUM_GFX_CLKS.
Definition: rocm_smi.h:962
rsmi_compute_partition_type_t
Compute Partition. This enum is used to identify various compute partitioning settings.
Definition: rocm_smi.h:365
rsmi_voltage_type_t
This ennumeration is used to indicate which type of voltage reading should be obtained.
Definition: rocm_smi.h:508
rsmi_temperature_metric_t
Temperature Metrics. This enum is used to identify various temperature metrics. Corresponding values ...
Definition: rocm_smi.h:411
@ RSMI_RAS_ERR_STATE_MULT_UC
Multiple uncorrectable errors.
Definition: rocm_smi.h:581
@ RSMI_RAS_ERR_STATE_PARITY
ECC errors present, but type unknown.
Definition: rocm_smi.h:579
@ RSMI_RAS_ERR_STATE_SING_C
Single correctable error.
Definition: rocm_smi.h:580
#define RSMI_NUM_HBM_INSTANCES
This should match kRSMI_MAX_NUM_HBM_INSTANCES.
Definition: rocm_smi.h:937
rsmi_event_type_t
Event type enum. Events belonging to a particular event group rsmi_event_group_t should begin enumera...
Definition: rocm_smi.h:226
@ RSMI_EVNT_XGMI_DATA_OUT_5
Outbound beats to neighbor 5.
Definition: rocm_smi.h:283
@ RSMI_EVNT_XGMI_DATA_OUT_3
Outbound beats to neighbor 3.
Definition: rocm_smi.h:281
@ RSMI_EVNT_XGMI_DATA_OUT_4
Outbound beats to neighbor 4.
Definition: rocm_smi.h:282
@ RSMI_EVNT_XGMI_DATA_OUT_2
Outbound beats to neighbor 2.
Definition: rocm_smi.h:280
@ RSMI_EVNT_XGMI_DATA_OUT_1
Outbound beats to neighbor 1.
Definition: rocm_smi.h:279
@ RSMI_EVNT_XGMI_0_BEATS_TX
Data beats sent to neighbor 0; Each beat represents 32 bytes.
Definition: rocm_smi.h:249
rsmi_freq_ind_t
The values of this enum are used as frequency identifiers.
Definition: rocm_smi.h:606
@ RSMI_FREQ_IND_MAX
Index used for the maximum frequency value.
Definition: rocm_smi.h:608
@ RSMI_FREQ_IND_MIN
Index used for the minimum frequency value.
Definition: rocm_smi.h:607
@ RSMI_MEM_TYPE_VIS_VRAM
VRAM memory that is visible.
Definition: rocm_smi.h:597
rsmi_power_profile_preset_masks_t
Pre-set Profile Selections. These bitmasks can be AND'd with the rsmi_power_profile_status_t....
Definition: rocm_smi.h:523
@ RSMI_PWR_PROF_PRST_VIDEO_MASK
Video Power Profile.
Definition: rocm_smi.h:525
@ RSMI_PWR_PROF_PRST_CUSTOM_MASK
Custom Power Profile.
Definition: rocm_smi.h:524
@ RSMI_PWR_PROF_PRST_POWER_SAVING_MASK
Power Saving Profile.
Definition: rocm_smi.h:526
@ RSMI_PWR_PROF_PRST_COMPUTE_MASK
Compute Saving Profile.
Definition: rocm_smi.h:527
@ RSMI_PWR_PROF_PRST_BOOTUP_DEFAULT
Default Boot Up Profile.
Definition: rocm_smi.h:532
rsmi_gpu_block_t
This enum is used to identify different GPU blocks.
Definition: rocm_smi.h:545
#define RSMI_MAX_NUM_VCNS
This should match kRSMI_MAX_NUM_VCNS.
Definition: rocm_smi.h:942
rsmi_fw_block_t
The values of this enum are used to identify the various firmware blocks.
Definition: rocm_smi.h:620
#define RSMI_MAX_NUM_XGMI_LINKS
This should match kRSMI_MAX_NUM_XGMI_LINKS.
Definition: rocm_smi.h:957
uintptr_t rsmi_event_handle_t
Handle to performance event counter.
Definition: rocm_smi.h:206
uint64_t rsmi_bit_field_t
Bitfield used in various RSMI calls.
Definition: rocm_smi.h:662
rsmi_memory_partition_type_t
Memory Partitions. This enum is used to identify various memory partition types.
Definition: rocm_smi.h:386
union id rsmi_func_id_value_t
This union holds the value of an rsmi_func_id_iter_handle_t. The value may be a function name,...
rsmi_temperature_type_t
This enumeration is used to indicate from which part of the device a temperature reading should be ob...
Definition: rocm_smi.h:456
The following structures hold the gpu metrics values for a device.
Definition: rocm_smi.h:912
This structure holds information about the possible activity averages. Specifically,...
Definition: rocm_smi.h:816
uint16_t average_mm_activity
UVD or VCN.
Definition: rocm_smi.h:820
uint16_t average_gfx_activity
Average graphics activity.
Definition: rocm_smi.h:818
uint16_t average_umc_activity
memory controller
Definition: rocm_smi.h:819
Definition: rocm_smi.h:301
uint64_t correctable_err
Accumulated correctable errors.
Definition: rocm_smi.h:1122
uint64_t uncorrectable_err
Accumulated uncorrectable errors.
Definition: rocm_smi.h:1123
Definition: rocm_smi.h:333
rsmi_evt_notification_type_t event
Event type.
Definition: rocm_smi.h:335
uint32_t dv_ind
Index of device that corresponds to the event.
Definition: rocm_smi.h:334
This structure holds 2 rsmi_range_t's, one for frequency and one for voltage. These 2 ranges indicate...
Definition: rocm_smi.h:862
rsmi_range_t volt_range
The voltage range for this VDDC Curve point.
Definition: rocm_smi.h:864
rsmi_range_t freq_range
The frequency range for this VDDC Curve point.
Definition: rocm_smi.h:863
This structure holds information about clock frequencies.
Definition: rocm_smi.h:764
Definition: rocm_smi.h:965
This structure represents a point on the frequency-voltage plane.
Definition: rocm_smi.h:849
uint64_t frequency
Frequency coordinate (in Hz)
Definition: rocm_smi.h:850
Definition: rocm_smi.h:873
This structure holds the frequency-voltage values for a device.
Definition: rocm_smi.h:887
rsmi_range_t mclk_freq_limits
The range possible of MCLK values.
Definition: rocm_smi.h:892
uint32_t num_regions
The number of voltage curve regions.
Definition: rocm_smi.h:898
rsmi_range_t sclk_freq_limits
The range possible of SCLK values.
Definition: rocm_smi.h:891
rsmi_range_t curr_sclk_range
The current SCLK frequency range.
Definition: rocm_smi.h:888
rsmi_od_volt_curve_t curve
The current voltage curve.
Definition: rocm_smi.h:897
This structure holds information about the possible PCIe bandwidths. Specifically,...
Definition: rocm_smi.h:795
This structure contains information about which power profiles are supported by the system for a give...
Definition: rocm_smi.h:741
rsmi_bit_field_t available_profiles
Definition: rocm_smi.h:745
rsmi_power_profile_preset_masks_t current
Definition: rocm_smi.h:750
This structure contains information specific to a process.
Definition: rocm_smi.h:1129
uint32_t cu_occupancy
Compute Unit usage in percent.
Definition: rocm_smi.h:1134
uint64_t sdma_usage
SDMA usage in microseconds.
Definition: rocm_smi.h:1133
This structure represents a range (e.g., frequencies or voltages).
Definition: rocm_smi.h:838
rsmi_memory_page_status_t status
Page "reserved" status.
Definition: rocm_smi.h:728
uint64_t page_address
Start address of page.
Definition: rocm_smi.h:726
RSMI_UTILIZATION_COUNTER_TYPE type
Utilization counter type.
Definition: rocm_smi.h:718
This union holds the value of an rsmi_func_id_iter_handle_t. The value may be a function name,...
Definition: rocm_smi.h:1152
rsmi_temperature_metric_t temp_metric
Used for rsmi_event_type_t variants.
Definition: rocm_smi.h:1159
rsmi_memory_type_t memory_type
< Used for rsmi_memory_type_t variants
Definition: rocm_smi.h:1157
rsmi_event_group_t evnt_group
Used for rsmi_clk_type_t variants.
Definition: rocm_smi.h:1163
rsmi_event_type_t evnt_type
Used for rsmi_event_group_t variants.
Definition: rocm_smi.h:1161