diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index 3d06afedba..06a927730d 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -4416,1056 +4416,6 @@ amdsmi_get_gpu_total_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_ /** @} End eccinfo */ -/*****************************************************************************/ -/** @defgroup metricfunctions GPU Metric Functions - * These functions are used to get granular information about all counters - * available in GPU Metrics. - * @{ - */ - -/** - * Metric multi-valued counter types - */ -typedef uint16_t gpu_metric_temp_hbm_t[AMDSMI_NUM_HBM_INSTANCES]; -typedef uint16_t gpu_metric_vcn_activity_t[AMDSMI_MAX_NUM_VCN]; -typedef uint64_t gpu_metric_xgmi_read_data_acc_t[AMDSMI_MAX_NUM_XGMI_LINKS]; -typedef uint64_t gpu_metric_xgmi_write_data_acc_t[AMDSMI_MAX_NUM_XGMI_LINKS]; -typedef uint16_t gpu_metric_curr_gfxclk_t[AMDSMI_MAX_NUM_GFX_CLKS]; -typedef uint16_t gpu_metric_curr_socclk_t[AMDSMI_MAX_NUM_CLKS]; -typedef uint16_t gpu_metric_curr_vclk0_t[AMDSMI_MAX_NUM_CLKS]; -typedef uint16_t gpu_metric_curr_dclk0_t[AMDSMI_MAX_NUM_CLKS]; - - -/****** - * Metric single-valued counter types - */ - -/** - * @brief Get the 'temp_hotspot' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'temp_hotspot' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] hotspot_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_hotspot(amdsmi_processor_handle processor_handle, uint16_t* hotspot_value); - -/** - * @brief Get the 'temp_mem' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'temp_mem' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] mem_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_mem(amdsmi_processor_handle processor_handle, uint16_t* mem_value); - -/** - * @brief Get the 'temp_vrsoc' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'temp_vrsoc' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] vrsoc_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_vrsoc(amdsmi_processor_handle processor_handle, uint16_t* vrsoc_value); - -/** - * @brief Get the 'curr_socket_power' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'socket_power' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] socket_power_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_socket_power(amdsmi_processor_handle processor_handle, uint16_t* socket_power_value); - -/** - * @brief Get the 'avg_gfx_activity' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'gfx_activity' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] gfx_activity_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_gfx_activity(amdsmi_processor_handle processor_handle, uint16_t* gfx_activity_value); - -/** - * @brief Get the 'avg_umc_activity' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'umc_activity' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] umc_activity_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_umc_activity(amdsmi_processor_handle processor_handle, uint16_t* umc_activity_value); - -/** - * @brief Get the 'energy_acc' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint64_t in which - * the 'energy_acc' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] energy_acc_value a pointer to uint64_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_energy_acc(amdsmi_processor_handle processor_handle, uint64_t* energy_acc_value); - -/** - * @brief Get the 'system_clock_counter' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint64_t in which - * the 'system_clock_counter' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] system_clock_counter_value a pointer to uint64_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_system_clock_counter(amdsmi_processor_handle processor_handle, uint64_t* system_clock_counter_value); - -/** - * @brief Get the 'firmware_timestamp' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint64_t in which - * the 'firmware_timestamp' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] firmware_timestamp_value a pointer to uint64_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_firmware_timestamp(amdsmi_processor_handle processor_handle, uint64_t* firmware_timestamp_value); - -/** - * @brief Get the 'throttle_status' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint32_t in which - * the 'throttle_status' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] throttle_status_value a pointer to uint32_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_throttle_status(amdsmi_processor_handle processor_handle, uint32_t* throttle_status_value); - -/** - * @brief Get the 'pcie_link_width' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'pcie_link_width' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] pcie_link_width_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_link_width(amdsmi_processor_handle processor_handle, uint16_t* pcie_link_width_value); - -/** - * @brief Get the 'pcie_link_speed' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'pcie_link_speed' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] pcie_link_speed_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_link_speed(amdsmi_processor_handle processor_handle, uint16_t* pcie_link_speed_value); - -/** - * @brief Get the 'xgmi_link_width' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'xgmi_link_width' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] xgmi_link_width_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_xgmi_link_width(amdsmi_processor_handle processor_handle, uint16_t* xgmi_link_width_value); - -/** - * @brief Get the 'xgmi_link_speed' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'xgmi_link_speed' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] xgmi_link_speed_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_xgmi_link_speed(amdsmi_processor_handle processor_handle, uint16_t* xgmi_link_speed_value); - -/** - * @brief Get the 'gfxclk_lock_status' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint32_t in which - * the 'gfxclk_lock_status' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] gfxclk_lock_status_value a pointer to uint32_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_gfxclk_lock_status(amdsmi_processor_handle processor_handle, uint32_t* gfxclk_lock_status_value); - -/** - * @brief Get the 'gfx_activity_acc' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint32_t in which - * the 'gfx_activity_acc' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] gfx_activity_acc_value a pointer to uint32_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_gfx_activity_acc(amdsmi_processor_handle processor_handle, uint32_t* gfx_activity_acc_value); - -/** - * @brief Get the 'mem_activity_acc' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint32_t in which - * the 'mem_activity_acc' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] mem_activity_acc_value a pointer to uint32_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_mem_activity_acc(amdsmi_processor_handle processor_handle, uint32_t* mem_activity_acc_value); - -/** - * @brief Get the 'pcie_bandwidth_acc' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint64_t in which - * the 'pcie_bandwidth_acc' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] pcie_bandwidth_acc_value a pointer to uint64_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_bandwidth_acc(amdsmi_processor_handle processor_handle, uint64_t* pcie_bandwidth_acc_value); - -/** - * @brief Get the 'pcie_bandwidth_inst' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint64_t in which - * the 'pcie_bandwidth_inst' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] pcie_bandwidth_inst_value a pointer to uint64_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_bandwidth_inst(amdsmi_processor_handle processor_handle, uint64_t* pcie_bandwidth_inst_value); - -/** - * @brief Get the 'pcie_l0_recov_count_acc' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint64_t in which - * the 'pcie_l0_recov_count_acc' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] pcie_count_acc_value a pointer to uint64_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_l0_recov_count_acc(amdsmi_processor_handle processor_handle, uint64_t* pcie_count_acc_value); - -/** - * @brief Get the 'pcie_replay_count_acc' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint64_t in which - * the 'pcie_replay_count_acc' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] pcie_count_acc_value a pointer to uint64_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_replay_count_acc(amdsmi_processor_handle processor_handle, uint64_t* pcie_count_acc_value); - -/** - * @brief Get the 'pcie_replay_rover_count_acc' (Rollover count) from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint64_t in which - * the 'pcie_replay_rover_count_acc' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] pcie_count_acc_value a pointer to uint64_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_replay_rover_count_acc(amdsmi_processor_handle processor_handle, uint64_t* pcie_count_acc_value); - -/** - * @brief Get the 'curr_uclk' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'curr_uclk' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] uclk_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_uclk(amdsmi_processor_handle processor_handle, uint16_t* uclk_value); - - -/****** - * Metric multi-valued counter types - */ - -/** - * @brief Get the 'temp_hbm' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'temp_hbm' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] temp_hbm_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - This is a multi-valued counter holding a 4 (AMDSMI_NUM_HBM_INSTANCES) - * element array (gpu_metric_temp_hbm_t) - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_hbm(amdsmi_processor_handle processor_handle, gpu_metric_temp_hbm_t* temp_hbm_value); - -/** - * @brief Get the 'vcn_activity' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'vcn_activity' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] vcn_activity_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - This is a multi-valued counter holding a 4 (AMDSMI_MAX_NUM_VCN) - * element array (gpu_metric_vcn_activity_t) - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_vcn_activity(amdsmi_processor_handle processor_handle, gpu_metric_vcn_activity_t* vcn_activity_value); - -/** - * @brief Get the 'xgmi_read_data' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint64_t in which - * the 'xgmi_read_data' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] xgmi_read_data_acc_value a pointer to uint64_t to which the device gpu - * metric unit will be stored - * - This is a multi-valued counter holding an 8 (AMDSMI_MAX_NUM_XGMI_LINKS) - * element array (gpu_metric_xgmi_read_data_acc_t) - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_xgmi_read_data(amdsmi_processor_handle processor_handle, gpu_metric_xgmi_read_data_acc_t* xgmi_read_data_acc_value); - -/** - * @brief Get the 'xgmi_write_data' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint64_t in which - * the 'xgmi_write_data' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] xgmi_write_data_acc_value a pointer to uint64_t to which the device gpu - * metric unit will be stored - * - This is a multi-valued counter holding an 8 (AMDSMI_MAX_NUM_XGMI_LINKS) - * element array (gpu_metric_xgmi_write_data_acc_t) - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_xgmi_write_data(amdsmi_processor_handle processor_handle, gpu_metric_xgmi_write_data_acc_t* xgmi_write_data_acc_value); - -/** - * @brief Get the 'curr_gfxclk' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint64_t in which - * the 'curr_gfxclk' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] current_gfxclk_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - This is a multi-valued counter holding an 8 (AMDSMI_MAX_NUM_GFX_CLKS) - * element array (gpu_metric_curr_gfxclk_t) - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_gfxclk(amdsmi_processor_handle processor_handle, gpu_metric_curr_gfxclk_t* current_gfxclk_value); - -/** - * @brief Get the 'curr_socclk' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'curr_socclk' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] current_socclk_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - This is a multi-valued counter holding a 4 (AMDSMI_MAX_NUM_CLKS) - * element array (gpu_metric_curr_socclk_t) - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_socclk(amdsmi_processor_handle processor_handle, gpu_metric_curr_socclk_t* current_socclk_value); - -/** - * @brief Get the 'curr_vclk0' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'curr_vclk0' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] current_vclk_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - This is a multi-valued counter holding a 4 (AMDSMI_MAX_NUM_CLKS) - * element array (gpu_metric_curr_vclk0_t) - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_vclk0(amdsmi_processor_handle processor_handle, gpu_metric_curr_vclk0_t* current_vclk_value); - -/** - * @brief Get the 'curr_dclk0' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'curr_dclk0' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] current_dclk_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - This is a multi-valued counter holding a 4 (AMDSMI_MAX_NUM_CLKS) - * element array (gpu_metric_curr_dclk0_t) - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_dclk0(amdsmi_processor_handle processor_handle, gpu_metric_curr_dclk0_t* current_dclk_value); - -/** - * @brief Get the 'temp_edge' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'temp_edge' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] edge_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_edge(amdsmi_processor_handle processor_handle, uint16_t* edge_value); - -/** - * @brief Get the 'temp_vrgfx' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'temp_vrgfx' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] vrgfx_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_vrgfx(amdsmi_processor_handle processor_handle, uint16_t* vrgfx_value); - -/** - * @brief Get the 'temp_vrmem' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'temp_vrmem' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] vrmem_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_vrmem(amdsmi_processor_handle processor_handle, uint16_t* vrmem_value); - -/** - * @brief Get the 'avg_mm_activity' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'avg_mm_activity' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] mm_activity_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_mm_activity(amdsmi_processor_handle processor_handle, uint16_t* mm_activity_value); - -/** - * @brief Get the 'curr_vclk1' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'curr_vclk1' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] current_vclk_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_vclk1(amdsmi_processor_handle processor_handle, uint16_t* current_vclk_value); - -/** - * @brief Get the 'curr_dclk1' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'curr_dclk1' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] current_dclk_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_dclk1(amdsmi_processor_handle processor_handle, uint16_t* current_dclk_value); - -/** - * @brief Get the 'indep_throttle_status' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint64_t in which - * the 'indep_throttle_status' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] throttle_status_value a pointer to uint64_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_indep_throttle_status(amdsmi_processor_handle processor_handle, uint64_t* throttle_status_value); - -/** - * @brief Get the 'avg_socket_power' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'avg_socket_power' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] socket_power_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_socket_power(amdsmi_processor_handle processor_handle, uint16_t* socket_power_value); - -/** - * @brief Get the 'curr_fan_speed' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'curr_fan_speed' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] fan_speed_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_fan_speed(amdsmi_processor_handle processor_handle, uint16_t* fan_speed_value); - -/** - * @brief Get the 'avg_gfx_clock_frequency' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'avg_gfx_clock_frequency' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] clock_frequency_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_gfx_clock_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value); - -/** - * @brief Get the 'avg_soc_clock_frequency' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'avg_soc_clock_frequency' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] clock_frequency_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_soc_clock_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value); - -/** - * @brief Get the 'avg_uclock_frequency' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'avg_uclock_frequency' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] clock_frequency_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_uclock_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value); - -/** - * @brief Get the 'avg_vclock0_frequency' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'avg_vclock0_frequency' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] clock_frequency_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_vclock0_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value); - -/** - * @brief Get the 'avg_dclock0_frequency' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'avg_dclock0_frequency' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] clock_frequency_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_dclock0_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value); - -/** - * @brief Get the 'avg_vclock1_frequency' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'avg_vclock1_frequency' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] clock_frequency_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_vclock1_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value); - -/** - * @brief Get the 'avg_dclock1_frequency' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'avg_dclock1_frequency' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] clock_frequency_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_dclock1_frequency(amdsmi_processor_handle processor_handle, uint16_t* clock_frequency_value); - -/** - * @brief Get the 'volt_soc' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'volt_soc' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] voltage_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_volt_soc(amdsmi_processor_handle processor_handle, uint16_t* voltage_value); - -/** - * @brief Get the 'volt_gfx' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'volt_gfx' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] voltage_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_volt_gfx(amdsmi_processor_handle processor_handle, uint16_t* voltage_value); - -/** - * @brief Get the 'volt_mem' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'volt_mem' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] voltage_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_volt_mem(amdsmi_processor_handle processor_handle, uint16_t* voltage_value); - -/** - * @brief Get the 'metrics_header_info' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a amd_metrics_table_header_t in which - * the 'metrics_header_info' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] header_value a pointer to amd_metrics_table_header_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_header_info(amdsmi_processor_handle processor_handle, amd_metrics_table_header_t* header_value); - -/** - * @brief Get the 'xcd_counter' from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle and a pointer to a uint16_t in which - * the 'xcd_counter' will stored - * - * @param[in] processor_handle Device which to query - * - * @param[inout] xcd_counter_value a pointer to uint16_t to which the device gpu - * metric unit will be stored - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit - * does not exist for the given device - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_xcd_counter(amdsmi_processor_handle processor_handle, uint16_t* xcd_counter_value); - -/** - * @brief Get the log from the GPU metrics associated with the device - * - * @details Given a processor handle @p processor_handle it will log all the gpu metric info - * related to the device. The 'logging' feature must be on. - * - * @param[in] processor_handle Device which to query - * - * @retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. - * - */ -amdsmi_status_t -amdsmi_get_gpu_metrics_log(amdsmi_processor_handle processor_handle); - -/** @} End metricfunctions */ - - #ifdef ENABLE_ESMI_LIB /*---------------------------------------------------------------------------*/ /** @defgroup energyinfo Energy information (RAPL MSR) */ diff --git a/projects/amdsmi/src/amd_smi/amd_smi.cc b/projects/amdsmi/src/amd_smi/amd_smi.cc index bb01bfeafe..532e485da8 100644 --- a/projects/amdsmi/src/amd_smi/amd_smi.cc +++ b/projects/amdsmi/src/amd_smi/amd_smi.cc @@ -2119,588 +2119,6 @@ amdsmi_status_t amdsmi_get_processor_handle_from_bdf(amdsmi_bdf_t bdf, return AMDSMI_STATUS_API_FAILED; } -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_hotspot(amdsmi_processor_handle processor_handle, - uint16_t *hotspot_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_temp_hotspot_get, processor_handle, - hotspot_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_mem(amdsmi_processor_handle processor_handle, - uint16_t *mem_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_temp_mem_get, processor_handle, - mem_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_vrsoc(amdsmi_processor_handle processor_handle, - uint16_t *vrsoc_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_temp_vrsoc_get, processor_handle, - vrsoc_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_socket_power(amdsmi_processor_handle processor_handle, - uint16_t *socket_power_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_curr_socket_power_get, processor_handle, - socket_power_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_gfx_activity(amdsmi_processor_handle processor_handle, - uint16_t *gfx_activity_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_avg_gfx_activity_get, processor_handle, - gfx_activity_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_umc_activity(amdsmi_processor_handle processor_handle, - uint16_t *umc_activity_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_avg_umc_activity_get, processor_handle, - umc_activity_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_energy_acc(amdsmi_processor_handle processor_handle, - uint64_t *energy_acc_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_energy_acc_get, processor_handle, - energy_acc_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_system_clock_counter(amdsmi_processor_handle processor_handle, - uint64_t *system_clock_counter_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_system_clock_counter_get, processor_handle, - system_clock_counter_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_firmware_timestamp(amdsmi_processor_handle processor_handle, - uint64_t *firmware_timestamp_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_firmware_timestamp_get, processor_handle, - firmware_timestamp_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_throttle_status(amdsmi_processor_handle processor_handle, - uint32_t *throttle_status_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_throttle_status_get, processor_handle, - throttle_status_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_link_width(amdsmi_processor_handle processor_handle, - uint16_t *pcie_link_width_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_pcie_link_width_get, processor_handle, - pcie_link_width_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_link_speed(amdsmi_processor_handle processor_handle, - uint16_t *pcie_link_speed_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_pcie_link_speed_get, processor_handle, - pcie_link_speed_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_xgmi_link_width(amdsmi_processor_handle processor_handle, - uint16_t *xgmi_link_width_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_xgmi_link_width_get, processor_handle, - xgmi_link_width_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_xgmi_link_speed(amdsmi_processor_handle processor_handle, - uint16_t *xgmi_link_speed_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_xgmi_link_speed_get, processor_handle, - xgmi_link_speed_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_gfxclk_lock_status(amdsmi_processor_handle processor_handle, - uint32_t *gfxclk_lock_status_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_gfxclk_lock_status_get, processor_handle, - gfxclk_lock_status_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_gfx_activity_acc(amdsmi_processor_handle processor_handle, - uint32_t *gfx_activity_acc_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_gfx_activity_acc_get, processor_handle, - gfx_activity_acc_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_mem_activity_acc(amdsmi_processor_handle processor_handle, - uint32_t *mem_activity_acc_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_mem_activity_acc_get, processor_handle, - mem_activity_acc_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_bandwidth_acc(amdsmi_processor_handle processor_handle, - uint64_t *pcie_bandwidth_acc_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_pcie_bandwidth_acc_get, processor_handle, - pcie_bandwidth_acc_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_bandwidth_inst(amdsmi_processor_handle processor_handle, - uint64_t *pcie_bandwidth_inst_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_pcie_bandwidth_inst_get, processor_handle, - pcie_bandwidth_inst_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_l0_recov_count_acc(amdsmi_processor_handle processor_handle, - uint64_t *pcie_count_acc_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_pcie_l0_recov_count_acc_get, processor_handle, - pcie_count_acc_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_replay_count_acc(amdsmi_processor_handle processor_handle, - uint64_t *pcie_count_acc_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_pcie_replay_count_acc_get, processor_handle, - pcie_count_acc_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_pcie_replay_rover_count_acc(amdsmi_processor_handle processor_handle, - uint64_t *pcie_count_acc_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_pcie_replay_rover_count_acc_get, processor_handle, - pcie_count_acc_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_uclk(amdsmi_processor_handle processor_handle, - uint16_t *uclk_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_curr_uclk_get, processor_handle, - uclk_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_hbm(amdsmi_processor_handle processor_handle, - gpu_metric_temp_hbm_t *temp_hbm_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_temp_hbm_get, processor_handle, - reinterpret_cast(temp_hbm_value)); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_vcn_activity(amdsmi_processor_handle processor_handle, - gpu_metric_vcn_activity_t *vcn_activity_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_vcn_activity_get, processor_handle, - reinterpret_cast(vcn_activity_value)); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_xgmi_read_data(amdsmi_processor_handle processor_handle, - gpu_metric_xgmi_read_data_acc_t *xgmi_read_data_acc_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_xgmi_read_data_get, processor_handle, - reinterpret_cast(xgmi_read_data_acc_value)); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_xgmi_write_data(amdsmi_processor_handle processor_handle, - gpu_metric_xgmi_write_data_acc_t *xgmi_write_data_acc_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_xgmi_write_data_get, processor_handle, - reinterpret_cast(xgmi_write_data_acc_value)); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_gfxclk(amdsmi_processor_handle processor_handle, - gpu_metric_curr_gfxclk_t *curr_gfxclk_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_curr_gfxclk_get, processor_handle, - reinterpret_cast(curr_gfxclk_value)); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_socclk(amdsmi_processor_handle processor_handle, - gpu_metric_curr_socclk_t *current_socclk_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_curr_socclk_get, processor_handle, - reinterpret_cast(current_socclk_value)); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_vclk0(amdsmi_processor_handle processor_handle, - gpu_metric_curr_vclk0_t *current_vclk_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_curr_vclk0_get, processor_handle, - reinterpret_cast(current_vclk_value)); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_dclk0(amdsmi_processor_handle processor_handle, - gpu_metric_curr_dclk0_t *current_dclk_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_curr_dclk0_get, processor_handle, - reinterpret_cast(current_dclk_value)); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_edge(amdsmi_processor_handle processor_handle, - uint16_t *edge_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_temp_edge_get, processor_handle, - edge_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_vrgfx(amdsmi_processor_handle processor_handle, - uint16_t *vrgfx_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_temp_vrgfx_get, processor_handle, - vrgfx_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_temp_vrmem(amdsmi_processor_handle processor_handle, - uint16_t *vrmem_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_temp_vrmem_get, processor_handle, - vrmem_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_mm_activity(amdsmi_processor_handle processor_handle, - uint16_t *mm_activity_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_avg_mm_activity_get, processor_handle, - mm_activity_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_vclk1(amdsmi_processor_handle processor_handle, - uint16_t *current_vclk_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_curr_vclk1_get, processor_handle, - current_vclk_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_dclk1(amdsmi_processor_handle processor_handle, - uint16_t *current_dclk_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_curr_dclk1_get, processor_handle, - current_dclk_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_indep_throttle_status(amdsmi_processor_handle processor_handle, - uint64_t *throttle_status_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_indep_throttle_status_get, processor_handle, - throttle_status_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_socket_power(amdsmi_processor_handle processor_handle, - uint16_t *socket_power_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_avg_socket_power_get, processor_handle, - socket_power_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_curr_fan_speed(amdsmi_processor_handle processor_handle, - uint16_t *fan_speed_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_curr_fan_speed_get, processor_handle, - fan_speed_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_gfx_clock_frequency(amdsmi_processor_handle processor_handle, - uint16_t *clock_frequency_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_avg_gfx_clock_frequency_get, processor_handle, - clock_frequency_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_soc_clock_frequency(amdsmi_processor_handle processor_handle, - uint16_t *clock_frequency_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_avg_soc_clock_frequency_get, processor_handle, - clock_frequency_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_uclock_frequency(amdsmi_processor_handle processor_handle, - uint16_t *clock_frequency_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_avg_uclock_frequency_get, processor_handle, - clock_frequency_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_vclock0_frequency(amdsmi_processor_handle processor_handle, - uint16_t *clock_frequency_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_avg_vclock0_frequency_get, processor_handle, - clock_frequency_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_dclock0_frequency(amdsmi_processor_handle processor_handle, - uint16_t *clock_frequency_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_avg_dclock0_frequency_get, processor_handle, - clock_frequency_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_vclock1_frequency(amdsmi_processor_handle processor_handle, - uint16_t *clock_frequency_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_avg_vclock1_frequency_get, processor_handle, - clock_frequency_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_avg_dclock1_frequency(amdsmi_processor_handle processor_handle, - uint16_t *clock_frequency_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_avg_dclock1_frequency_get, processor_handle, - clock_frequency_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_volt_soc(amdsmi_processor_handle processor_handle, - uint16_t *voltage_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_volt_soc_get, processor_handle, - voltage_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_volt_gfx(amdsmi_processor_handle processor_handle, - uint16_t *voltage_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_volt_gfx_get, processor_handle, - voltage_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_volt_mem(amdsmi_processor_handle processor_handle, - uint16_t *voltage_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_volt_mem_get, processor_handle, - voltage_value); -} - - -amdsmi_status_t -amdsmi_get_gpu_metrics_header_info(amdsmi_processor_handle processor_handle, - amd_metrics_table_header_t *header_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_header_info_get, processor_handle, - reinterpret_cast(header_value)); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_xcd_counter(amdsmi_processor_handle processor_handle, - uint16_t *xcd_counter_value) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_xcd_counter_get, processor_handle, - xcd_counter_value); -} - -amdsmi_status_t -amdsmi_get_gpu_metrics_log(amdsmi_processor_handle processor_handle) -{ - AMDSMI_CHECK_INIT(); - // nullptr api supported - - return rsmi_wrapper(rsmi_dev_metrics_log_get, processor_handle); -} - #ifdef ENABLE_ESMI_LIB static amdsmi_status_t amdsmi_errno_to_esmi_status(amdsmi_status_t status) diff --git a/projects/amdsmi/tests/amd_smi_test/functional/gpu_metrics_read.cc b/projects/amdsmi/tests/amd_smi_test/functional/gpu_metrics_read.cc index 7306581a85..031897da9f 100644 --- a/projects/amdsmi/tests/amd_smi_test/functional/gpu_metrics_read.cc +++ b/projects/amdsmi/tests/amd_smi_test/functional/gpu_metrics_read.cc @@ -361,698 +361,4 @@ void TestGpuMetricsRead::Run(void) { std::cout << "\t\t** amdsmi_get_gpu_metrics_info(nullptr check): " << status_string << "\n"; ASSERT_EQ(err, AMDSMI_STATUS_INVAL); } - -/** - * START OF INDIVIDUAL METRIC CALLS - */ - - auto val_ui16 = uint16_t(0); - auto val_ui32 = uint32_t(0); - auto val_ui64 = uint64_t(0); - auto status_code(amdsmi_status_t::AMDSMI_STATUS_SUCCESS); - for (uint32_t i = 0; i < num_monitor_devs(); ++i) { - PrintDeviceHeader(processor_handles_[i]); - std::cout << "Device #" << std::to_string(i) << "\n"; - - auto temp_edge_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_temp_edge(processor_handles_[i], &temp_edge_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_temp_edge(): " << status_string << "\n"; - } - - auto temp_hotspot_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_temp_hotspot(processor_handles_[i], &temp_hotspot_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_temp_hotspot(): " << status_string << "\n"; - } - - auto temp_mem_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_temp_mem(processor_handles_[i], &temp_mem_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_temp_mem(): " << status_string << "\n"; - } - - auto temp_vrgfx_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_temp_vrgfx(processor_handles_[i], &temp_vrgfx_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_temp_vrgfx(): " << status_string << "\n"; - } - - auto temp_vrsoc_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_temp_vrsoc(processor_handles_[i], &temp_vrsoc_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_temp_vrsoc(): " << status_string << "\n"; - } - - auto temp_vrmem_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_temp_vrmem(processor_handles_[i], &temp_vrmem_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_temp_vrmem(): " << status_string << "\n"; - } - - gpu_metric_temp_hbm_t temp_hbm_values; - status_code = amdsmi_get_gpu_metrics_temp_hbm(processor_handles_[i], &temp_hbm_values); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_temp_hbm(): " << status_string << "\n"; - } - - auto temp_curr_socket_power_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_curr_socket_power(processor_handles_[i], &temp_curr_socket_power_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_curr_socket_power(): " << status_string << "\n"; - } - - auto temp_energy_accum_value = val_ui64; - status_code = amdsmi_get_gpu_metrics_energy_acc(processor_handles_[i], &temp_energy_accum_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_energy_acc(): " << status_string << "\n"; - } - - auto temp_avg_socket_power_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_avg_socket_power(processor_handles_[i], &temp_avg_socket_power_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_temp_edge(): " << status_string << "\n"; - } - - auto temp_avg_gfx_activity_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_avg_gfx_activity(processor_handles_[i], &temp_avg_gfx_activity_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_avg_gfx_activity(): " << status_string << "\n"; - } - - auto temp_avg_umc_activity_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_avg_umc_activity(processor_handles_[i], &temp_avg_umc_activity_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_avg_umc_activity(): " << status_string << "\n"; - } - - auto temp_avg_mm_activity_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_avg_mm_activity(processor_handles_[i], &temp_avg_mm_activity_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_avg_mm_activity(): " << status_string << "\n"; - } - - gpu_metric_vcn_activity_t temp_vcn_values; - status_code = amdsmi_get_gpu_metrics_vcn_activity(processor_handles_[i], &temp_vcn_values); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_vcn_activity(): " << status_string << "\n"; - } - - auto temp_mem_activity_accum_value = val_ui32; - status_code = amdsmi_get_gpu_metrics_mem_activity_acc(processor_handles_[i], &temp_mem_activity_accum_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_mem_activity_acc(): " << status_string << "\n"; - } - - auto temp_gfx_activity_accum_value = val_ui32; - status_code = amdsmi_get_gpu_metrics_gfx_activity_acc(processor_handles_[i], &temp_gfx_activity_accum_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_gfx_activity_acc(): " << status_string << "\n"; - } - - auto temp_avg_gfx_clock_freq_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_avg_gfx_clock_frequency(processor_handles_[i], &temp_avg_gfx_clock_freq_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_avg_gfx_clock_frequency(): " << status_string << "\n"; - } - - auto temp_avg_soc_clock_freq_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_avg_soc_clock_frequency(processor_handles_[i], &temp_avg_soc_clock_freq_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_avg_soc_clock_frequency(): " << status_string << "\n"; - } - - auto temp_avg_uclock_freq_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_avg_uclock_frequency(processor_handles_[i], &temp_avg_uclock_freq_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_avg_uclock_frequency(): " << status_string << "\n"; - } - - auto temp_avg_vclock0_freq_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_avg_vclock0_frequency(processor_handles_[i], &temp_avg_vclock0_freq_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_avg_vclock0_frequency(): " << status_string << "\n"; - } - - auto temp_avg_dclock0_freq_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_avg_dclock0_frequency(processor_handles_[i], &temp_avg_dclock0_freq_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_avg_dclock0_frequency(): " << status_string << "\n"; - } - - auto temp_avg_vclock1_freq_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_avg_vclock1_frequency(processor_handles_[i], &temp_avg_vclock1_freq_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_avg_vclock1_frequency(): " << status_string << "\n"; - } - - auto temp_avg_dclock1_freq_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_avg_dclock1_frequency(processor_handles_[i], &temp_avg_dclock1_freq_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_avg_dclock1_frequency(): " << status_string << "\n"; - } - - auto temp_curr_vclk1_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_curr_vclk1(processor_handles_[i], &temp_curr_vclk1_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_curr_vclk1(): " << status_string << "\n"; - } - - auto temp_curr_dclk1_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_curr_dclk1(processor_handles_[i], &temp_curr_dclk1_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_curr_dclk1(): " << status_string << "\n"; - } - - auto temp_curr_uclk_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_curr_uclk(processor_handles_[i], &temp_curr_uclk_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_curr_uclk(): " << status_string << "\n"; - } - - gpu_metric_curr_dclk0_t temp_curr_dclk0_values; - status_code = amdsmi_get_gpu_metrics_curr_dclk0(processor_handles_[i], &temp_curr_dclk0_values); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_curr_dclk0(): " << status_string << "\n"; - } - - gpu_metric_curr_gfxclk_t temp_curr_gfxclk_values; - status_code = amdsmi_get_gpu_metrics_curr_gfxclk(processor_handles_[i], &temp_curr_gfxclk_values); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_curr_gfxclk(): " << status_string << "\n"; - } - - gpu_metric_curr_socclk_t temp_curr_socclk_values; - status_code = amdsmi_get_gpu_metrics_curr_socclk(processor_handles_[i], &temp_curr_socclk_values); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_curr_socclk(): " << status_string << "\n"; - } - - gpu_metric_curr_vclk0_t temp_curr_vclk0_values; - status_code = amdsmi_get_gpu_metrics_curr_vclk0(processor_handles_[i], &temp_curr_vclk0_values); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_curr_vclk0(): " << status_string << "\n"; - } - - auto temp_indep_throttle_status_value = val_ui64; - status_code = amdsmi_get_gpu_metrics_indep_throttle_status(processor_handles_[i], &temp_indep_throttle_status_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_indep_throttle_status(): " << status_string << "\n"; - } - - auto temp_throttle_status_value = val_ui32; - status_code = amdsmi_get_gpu_metrics_throttle_status(processor_handles_[i], &temp_throttle_status_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_throttle_status(): " << status_string << "\n"; - } - - auto temp_gfxclk_lock_status_value = val_ui32; - status_code = amdsmi_get_gpu_metrics_gfxclk_lock_status(processor_handles_[i], &temp_gfxclk_lock_status_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_gfxclk_lock_status(): " << status_string << "\n"; - } - - auto temp_curr_fan_speed_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_curr_fan_speed(processor_handles_[i], &temp_curr_fan_speed_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_curr_fan_speed(): " << status_string << "\n"; - } - - auto temp_pcie_link_width_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_pcie_link_width(processor_handles_[i], &temp_pcie_link_width_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_pcie_link_width(): " << status_string << "\n"; - } - - auto temp_pcie_link_speed_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_pcie_link_speed(processor_handles_[i], &temp_pcie_link_speed_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_pcie_link_speed(): " << status_string << "\n"; - } - - auto temp_pcie_bandwidth_accum_value = val_ui64; - status_code = amdsmi_get_gpu_metrics_pcie_bandwidth_acc(processor_handles_[i], &temp_pcie_bandwidth_accum_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_pcie_bandwidth_acc(): " << status_string << "\n"; - } - - auto temp_pcie_bandwidth_inst_value = val_ui64; - status_code = amdsmi_get_gpu_metrics_pcie_bandwidth_inst(processor_handles_[i], &temp_pcie_bandwidth_inst_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_pcie_bandwidth_inst(): " << status_string << "\n"; - } - - auto temp_pcie_l0_recov_count_accum_value = val_ui64; - status_code = amdsmi_get_gpu_metrics_pcie_l0_recov_count_acc(processor_handles_[i], &temp_pcie_l0_recov_count_accum_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_pcie_l0_recov_count_acc(): " << status_string << "\n"; - } - - auto temp_pcie_replay_count_accum_value = val_ui64; - status_code = amdsmi_get_gpu_metrics_pcie_replay_count_acc(processor_handles_[i], &temp_pcie_replay_count_accum_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_pcie_replay_count_acc(): " << status_string << "\n"; - } - - auto temp_pcie_replay_rover_count_accum_value = val_ui64; - status_code = amdsmi_get_gpu_metrics_pcie_replay_rover_count_acc(processor_handles_[i], &temp_pcie_replay_rover_count_accum_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_pcie_replay_rover_count_acc(): " << status_string << "\n"; - } - - auto temp_xgmi_link_width_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_xgmi_link_width(processor_handles_[i], &temp_xgmi_link_width_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_xgmi_link_width(): " << status_string << "\n"; - } - - auto temp_xgmi_link_speed_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_xgmi_link_speed(processor_handles_[i], &temp_xgmi_link_speed_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_xgmi_link_speed(): " << status_string << "\n"; - } - - gpu_metric_xgmi_read_data_acc_t temp_xgmi_read_values; - status_code = amdsmi_get_gpu_metrics_xgmi_read_data(processor_handles_[i], &temp_xgmi_read_values); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_xgmi_read_data(): " << status_string << "\n"; - } - - gpu_metric_xgmi_write_data_acc_t temp_xgmi_write_values; - status_code = amdsmi_get_gpu_metrics_xgmi_write_data(processor_handles_[i], &temp_xgmi_write_values); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_xgmi_write_data(): " << status_string << "\n"; - } - - auto temp_voltage_soc_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_volt_soc(processor_handles_[i], &temp_voltage_soc_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_volt_soc(): " << status_string << "\n"; - } - - auto temp_voltage_gfx_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_volt_gfx(processor_handles_[i], &temp_voltage_gfx_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_volt_gfx(): " << status_string << "\n"; - } - - auto temp_voltage_mem_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_volt_mem(processor_handles_[i], &temp_voltage_mem_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_volt_mem(): " << status_string << "\n"; - } - - auto temp_system_clock_counter_value = val_ui64; - status_code = amdsmi_get_gpu_metrics_system_clock_counter(processor_handles_[i], &temp_system_clock_counter_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_system_clock_counter(): " << status_string << "\n"; - } - - auto temp_firmware_timestamp_value = val_ui64; - status_code = amdsmi_get_gpu_metrics_firmware_timestamp(processor_handles_[i], &temp_firmware_timestamp_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_firmware_timestamp(): " << status_string << "\n"; - } - - auto temp_xcd_counter_value = val_ui16; - status_code = amdsmi_get_gpu_metrics_xcd_counter(processor_handles_[i], &temp_xcd_counter_value); - if (status_code != AMDSMI_STATUS_NOT_SUPPORTED) { - CHK_ERR_ASRT(status_code); - } else { - const char *status_string; - amdsmi_status_code_to_string(status_code, &status_string); - std::cout << "\t\t** amdsmi_get_gpu_metrics_xcd_counter(): " << status_string << "\n"; - } - - IF_VERB(STANDARD) { - std::cout << "\n"; - std::cout << "\t[Temperature]" << "\n"; - std::cout << "\t -> temp_edge(): " << std::dec << temp_edge_value << "\n"; - std::cout << "\t -> temp_hotspot(): " << std::dec << temp_hotspot_value << "\n"; - std::cout << "\t -> temp_mem(): " << std::dec << temp_mem_value << "\n"; - std::cout << "\t -> temp_vrgfx(): " << std::dec << temp_vrgfx_value << "\n"; - std::cout << "\t -> temp_vrsoc(): " << std::dec << temp_vrsoc_value << "\n"; - std::cout << "\t -> temp_vrmem(): " << std::dec << temp_vrmem_value << "\n"; - std::cout << "\t -> temp_hbm(temp_hbm_values): ["; - uint16_t size = static_cast( - sizeof(temp_hbm_values) / sizeof(temp_hbm_values[0])); - for (uint16_t i = 0; i < size; i++) { - if (i + 1 < size) { - std::cout << std::dec << temp_hbm_values[i] << ", "; - } else { - std::cout << std::dec << temp_hbm_values[i]; - } - } - std::cout << std::dec << "]\n"; - - std::cout << "\n"; - std::cout << "\t[Power/Energy]" << "\n"; - std::cout << "\t -> current_socket_power(): " << std::dec << temp_curr_socket_power_value << "\n"; - std::cout << "\t -> energy_accum(): " << std::dec << temp_energy_accum_value << "\n"; - std::cout << "\t -> average_socket_power(): " << std::dec << temp_avg_socket_power_value << "\n"; - - std::cout << "\n"; - std::cout << "\t[Utilization]" << "\n"; - std::cout << "\t -> average_gfx_activity(): " << std::dec << temp_avg_gfx_activity_value << "\n"; - std::cout << "\t -> average_umc_activity(): " << std::dec << temp_avg_umc_activity_value << "\n"; - std::cout << "\t -> average_mm_activity(): " << std::dec << temp_avg_mm_activity_value << "\n"; - std::cout << "\t -> vcn_activity(temp_vcn_values): ["; - size = static_cast( - sizeof(temp_vcn_values) / sizeof(temp_vcn_values[0])); - for (uint16_t i = 0; i < size; i++) { - if (i + 1 < size) { - std::cout << std::dec << temp_vcn_values[i] << ", "; - } else { - std::cout << std::dec << temp_vcn_values[i]; - } - } - std::cout << std::dec << "]\n"; - std::cout << "\t -> mem_activity_accum(): " << std::dec << temp_mem_activity_accum_value << "\n"; - std::cout << "\t -> gfx_activity_accum(): " << std::dec << temp_gfx_activity_accum_value << "\n"; - - std::cout << "\n"; - std::cout << "\t[Average Clock]" << "\n"; - std::cout << "\t -> average_gfx_clock_frequency(): " << std::dec << temp_avg_gfx_clock_freq_value << "\n"; - std::cout << "\t -> average_soc_clock_frequency(): " << std::dec << temp_avg_soc_clock_freq_value << "\n"; - std::cout << "\t -> average_uclock_frequency(): " << std::dec << temp_avg_uclock_freq_value << "\n"; - std::cout << "\t -> average_vclock0_frequency(): " << std::dec << std::dec << temp_avg_vclock0_freq_value << "\n"; - std::cout << "\t -> average_dclock0_frequency(): " << std::dec << temp_avg_dclock0_freq_value << "\n"; - std::cout << "\t -> average_vclock1_frequency(): " << std::dec << temp_avg_vclock1_freq_value << "\n"; - std::cout << "\t -> average_dclock1_frequency(): " << std::dec << temp_avg_dclock1_freq_value << "\n"; - - std::cout << "\n"; - std::cout << "\t[Current Clock]" << "\n"; - std::cout << "\t -> current_vclock1(): " << std::dec << temp_curr_vclk1_value << "\n"; - std::cout << "\t -> current_dclock1(): " << std::dec << temp_curr_dclk1_value << "\n"; - std::cout << "\t -> current_uclock(): " << std::dec << temp_curr_uclk_value << "\n"; - std::cout << "\t -> current_dclk0(temp_curr_dclk0_values): ["; - size = static_cast( - sizeof(temp_curr_dclk0_values) / sizeof(temp_curr_dclk0_values[0])); - for (uint16_t i = 0; i < size; i++) { - if (i + 1 < size) { - std::cout << std::dec << temp_curr_dclk0_values[i] << ", "; - } else { - std::cout << std::dec << temp_curr_dclk0_values[i]; - } - } - std::cout << std::dec << "]\n"; - std::cout << "\t -> current_gfxclk(temp_curr_gfxclk_values): ["; - size = static_cast( - sizeof(temp_curr_gfxclk_values) / sizeof(temp_curr_gfxclk_values[0])); - for (uint16_t i = 0; i < size; i++) { - if (i + 1 < size) { - std::cout << std::dec << temp_curr_gfxclk_values[i] << ", "; - } else { - std::cout << std::dec << temp_curr_gfxclk_values[i]; - } - } - std::cout << std::dec << "]\n"; - std::cout << "\t -> current_soc_clock(temp_curr_socclk_values): ["; - size = static_cast( - sizeof(temp_curr_socclk_values) / sizeof(temp_curr_socclk_values[0])); - for (uint16_t i = 0; i < size; i++) { - if (i + 1 < size) { - std::cout << std::dec << temp_curr_socclk_values[i] << ", "; - } else { - std::cout << std::dec << temp_curr_socclk_values[i]; - } - } - std::cout << std::dec << "]\n"; - std::cout << "\t -> current_vclk0(temp_curr_vclk0_values): ["; - size = static_cast( - sizeof(temp_curr_vclk0_values) / sizeof(temp_curr_vclk0_values[0])); - for (uint16_t i = 0; i < size; i++) { - if (i + 1 < size) { - std::cout << std::dec << temp_curr_vclk0_values[i] << ", "; - } else { - std::cout << std::dec << temp_curr_vclk0_values[i]; - } - } - std::cout << std::dec << "]\n"; - - std::cout << "\n"; - std::cout << "\t[Throttle]" << "\n"; - std::cout << "\t -> indep_throttle_status(): " << std::dec << temp_indep_throttle_status_value << "\n"; - std::cout << "\t -> throttle_status(): " << std::dec << temp_throttle_status_value << "\n"; - - std::cout << "\n"; - std::cout << "\t[Gfx Clock Lock]" << "\n"; - std::cout << "\t -> gfxclk_lock_status(): " << std::dec << temp_gfxclk_lock_status_value << "\n"; - - std::cout << "\n"; - std::cout << "\t[Current Fan Speed]" << "\n"; - std::cout << "\t -> current_fan_speed(): " << std::dec << temp_curr_fan_speed_value << "\n"; - - std::cout << "\n"; - std::cout << "\t[Link/Bandwidth/Speed]" << "\n"; - std::cout << "\t -> pcie_link_width(): " << std::dec << temp_pcie_link_width_value << "\n"; - std::cout << "\t -> pcie_link_speed(): " << std::dec << temp_pcie_link_speed_value << "\n"; - std::cout << "\t -> pcie_bandwidth_accum(): " << std::dec << std::dec << temp_pcie_bandwidth_accum_value << "\n"; - std::cout << "\t -> pcie_bandwidth_inst(): " << std::dec << temp_pcie_bandwidth_inst_value << "\n"; - std::cout << "\t -> pcie_l0_recov_count_accum(): " << std::dec << std::dec << temp_pcie_l0_recov_count_accum_value << "\n"; - std::cout << "\t -> pcie_replay_count_accum(): " << std::dec << temp_pcie_replay_count_accum_value << "\n"; - std::cout << "\t -> pcie_replay_rollover_count_accum(): " << std::dec << temp_pcie_replay_rover_count_accum_value << "\n"; - std::cout << "\t -> xgmi_link_width(): " << std::dec << temp_xgmi_link_width_value << "\n"; - std::cout << "\t -> xgmi_link_speed(): " << std::dec << std::dec << temp_xgmi_link_speed_value << "\n"; - std::cout << "\t -> xgmi_read_data(temp_xgmi_read_values): "; - size = static_cast( - sizeof(temp_xgmi_read_values) / sizeof(temp_xgmi_read_values[0])); - for (uint16_t i = 0; i < size; i++) { - if (i + 1 < size) { - std::cout << std::dec << temp_xgmi_read_values[i] << ", "; - } else { - std::cout << std::dec << temp_xgmi_read_values[i]; - } - } - std::cout << std::dec << "]\n"; - std::cout << "\t -> xgmi_write_data(temp_xgmi_write_values): ["; - size = static_cast( - sizeof(temp_xgmi_write_values) / sizeof(temp_xgmi_write_values[0])); - for (uint16_t i = 0; i < size; i++) { - if (i + 1 < size) { - std::cout << std::dec << temp_xgmi_write_values[i] << ", "; - } else { - std::cout << std::dec << temp_xgmi_write_values[i]; - } - } - std::cout << std::dec << "]\n"; - - std::cout << "\n"; - std::cout << "\t[Voltage]" << "\n"; - std::cout << "\t -> voltage_soc(): " << std::dec << temp_voltage_soc_value << "\n"; - std::cout << "\t -> voltage_gfx(): " << std::dec << temp_voltage_gfx_value << "\n"; - std::cout << "\t -> voltage_mem(): " << std::dec << temp_voltage_mem_value << "\n"; - - std::cout << "\n"; - std::cout << "\t[Timestamp]" << "\n"; - std::cout << "\t -> system_clock_counter(): " << std::dec << temp_system_clock_counter_value << "\n"; - std::cout << "\t -> firmware_timestamp(): " << std::dec << temp_firmware_timestamp_value << "\n"; - - std::cout << "\n"; - std::cout << "\t[XCD Counter]" << "\n"; - std::cout << "\t -> xcd_counter(): " << std::dec << temp_xcd_counter_value << "\n"; - std::cout << "\n\n"; - } - } - }