amdsmi interface updated for amdsmi_get_metrics_table units

Change-Id: If211292e894df9d832b879252bebf91c17112d14
Tá an tiomantas seo le fáil i:
Deepak Mewar
2024-01-02 07:47:01 -05:00
tiomanta ag Galantsev, Dmitrii
tuismitheoir 256907989b
tiomantas 898c4bc06f
+45 -45
Féach ar an gComhad
@@ -1400,57 +1400,57 @@ def amdsmi_get_metrics_table(
return {
"mtbl_accumulation_counter": mtbl.accumulation_counter,
"mtbl_max_socket_temperature": round(check_msb_32(mtbl.max_socket_temperature) * fraction_q10 ,3),
"mtbl_max_vr_temperature": round(check_msb_32(mtbl.max_vr_temperature) * fraction_q10 ,3),
"mtbl_max_hbm_temperature": round(check_msb_32(mtbl.max_hbm_temperature) * fraction_q10 ,3),
"mtbl_max_socket_temperature_acc": round(check_msb_64(mtbl.max_socket_temperature_acc) * fraction_q10 ,3) ,
"mtbl_max_vr_temperature_acc": round(check_msb_64(mtbl.max_vr_temperature_acc) * fraction_q10 ,3),
"mtbl_max_hbm_temperature_acc": round(check_msb_64(mtbl.max_hbm_temperature_acc) * fraction_q10 ,3),
"mtbl_socket_power_limit": round(mtbl.socket_power_limit * fraction_uq10 ,3),
"mtbl_max_socket_power_limit": round(mtbl.max_socket_power_limit * fraction_uq10 ,3),
"mtbl_socket_power": round(mtbl.socket_power * fraction_uq10 ,3),
"mtbl_timestamp": mtbl.timestamp,
"mtbl_socket_energy_acc": round((mtbl.socket_energy_acc * fraction_uq16)/KILO ,3),
"mtbl_ccd_energy_acc": round((mtbl.ccd_energy_acc * fraction_uq16)/KILO ,3),
"mtbl_xcd_energy_acc": round((mtbl.xcd_energy_acc * fraction_uq16)/KILO ,3),
"mtbl_aid_energy_acc": round((mtbl.aid_energy_acc * fraction_uq16)/KILO ,3),
"mtbl_hbm_energy_acc": round((mtbl.hbm_energy_acc * fraction_uq16)/KILO ,3),
"mtbl_cclk_frequency_limit": round(mtbl.cclk_frequency_limit * fraction_uq10 ,3),
"mtbl_gfxclk_frequency_limit": round(mtbl.gfxclk_frequency_limit * fraction_uq10 ,3),
"mtbl_fclk_frequency": round(mtbl.fclk_frequency * fraction_uq10 ,3),
"mtbl_uclk_frequency": round(mtbl.uclk_frequency * fraction_uq10 ,3),
"mtbl_socclk_frequency": [round(x*fraction_uq10 ,3) for x in list(mtbl.socclk_frequency)],
"mtbl_vclk_frequency": [round(x*fraction_uq10 ,3) for x in list(mtbl.vclk_frequency)],
"mtbl_dclk_frequency": [round(x*fraction_uq10 ,3) for x in list(mtbl.dclk_frequency)],
"mtbl_lclk_frequency": [round(x*fraction_uq10 ,3) for x in list(mtbl.lclk_frequency)],
"mtbl_fclk_frequency_table": [round(x*fraction_uq10 ,3) for x in list(mtbl.fclk_frequency_table)],
"mtbl_uclk_frequency_table": [round(x*fraction_uq10 ,3) for x in list(mtbl.uclk_frequency_table)],
"mtbl_socclk_frequency_table": [round(x*fraction_uq10 ,3) for x in list(mtbl.socclk_frequency_table)],
"mtbl_vclk_frequency_table": [round(x*fraction_uq10 ,3) for x in list(mtbl.vclk_frequency_table)],
"mtbl_dclk_frequency_table": [round(x*fraction_uq10 ,3) for x in list(mtbl.dclk_frequency_table)],
"mtbl_lclk_frequency_table": [round(x*fraction_uq10 ,3) for x in list(mtbl.lclk_frequency_table)],
"mtbl_cclk_frequency_acc": [round(x*fraction_uq10 ,3) for x in list(mtbl.cclk_frequency_acc)],
"mtbl_gfxclk_frequency_acc": [round(x*fraction_uq10 ,3) for x in list(mtbl.gfxclk_frequency_acc)],
"mtbl_gfxclk_frequency": [round(x*fraction_uq10 ,3) for x in list(mtbl.gfxclk_frequency)],
"mtbl_max_cclk_frequency": round(mtbl.max_cclk_frequency * fraction_uq10 ,3),
"mtbl_min_cclk_frequency": round(mtbl.min_cclk_frequency * fraction_uq10 ,3),
"mtbl_max_gfxclk_frequency": round(mtbl.max_gfxclk_frequency * fraction_uq10 ,3),
"mtbl_min_gfxclk_frequency": round(mtbl.min_gfxclk_frequency * fraction_uq10 ,3),
"mtbl_max_socket_temperature": f"{round(check_msb_32(mtbl.max_socket_temperature) * fraction_q10 ,3)} °C",
"mtbl_max_vr_temperature": f"{round(check_msb_32(mtbl.max_vr_temperature) * fraction_q10 ,3)} °C",
"mtbl_max_hbm_temperature": f"{round(check_msb_32(mtbl.max_hbm_temperature) * fraction_q10 ,3)} °C",
"mtbl_max_socket_temperature_acc": f"{round(check_msb_64(mtbl.max_socket_temperature_acc) * fraction_q10 ,3)} °C",
"mtbl_max_vr_temperature_acc": f"{round(check_msb_64(mtbl.max_vr_temperature_acc) * fraction_q10 ,3)} °C",
"mtbl_max_hbm_temperature_acc": f"{round(check_msb_64(mtbl.max_hbm_temperature_acc) * fraction_q10 ,3)} °C",
"mtbl_socket_power_limit": f"{round(mtbl.socket_power_limit * fraction_uq10 ,3)} W",
"mtbl_max_socket_power_limit": f"{round(mtbl.max_socket_power_limit * fraction_uq10 ,3)} W",
"mtbl_socket_power": f"{round(mtbl.socket_power * fraction_uq10 ,3)} W",
"mtbl_timestamp_raw": mtbl.timestamp,
"mtbl_socket_energy_acc": f"{round((mtbl.socket_energy_acc * fraction_uq16)/KILO ,3)} kJ",
"mtbl_ccd_energy_acc": f"{round((mtbl.ccd_energy_acc * fraction_uq16)/KILO ,3)} kJ",
"mtbl_xcd_energy_acc": f"{round((mtbl.xcd_energy_acc * fraction_uq16)/KILO ,3)} kJ",
"mtbl_aid_energy_acc": f"{round((mtbl.aid_energy_acc * fraction_uq16)/KILO ,3)} kJ",
"mtbl_hbm_energy_acc": f"{round((mtbl.hbm_energy_acc * fraction_uq16)/KILO ,3)} kJ",
"mtbl_cclk_frequency_limit": f"{round(mtbl.cclk_frequency_limit * fraction_uq10 ,3)} GHz",
"mtbl_gfxclk_frequency_limit": f"{round(mtbl.gfxclk_frequency_limit * fraction_uq10 ,3)} MHz",
"mtbl_fclk_frequency": f"{round(mtbl.fclk_frequency * fraction_uq10 ,3)} MHz",
"mtbl_uclk_frequency": f"{round(mtbl.uclk_frequency * fraction_uq10 ,3)} MHz",
"mtbl_socclk_frequency": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.socclk_frequency)]} MHz",
"mtbl_vclk_frequency": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.vclk_frequency)]} MHz",
"mtbl_dclk_frequency": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.dclk_frequency)]} MHz",
"mtbl_lclk_frequency": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.lclk_frequency)]} MHz",
"mtbl_fclk_frequency_table": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.fclk_frequency_table)]} MHz",
"mtbl_uclk_frequency_table": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.uclk_frequency_table)]} MHz",
"mtbl_socclk_frequency_table": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.socclk_frequency_table)]} MHz",
"mtbl_vclk_frequency_table": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.vclk_frequency_table)]} MHz",
"mtbl_dclk_frequency_table": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.dclk_frequency_table)]} MHz",
"mtbl_lclk_frequency_table": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.lclk_frequency_table)]} MHz",
"mtbl_cclk_frequency_acc": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.cclk_frequency_acc)]} GHz",
"mtbl_gfxclk_frequency_acc": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.gfxclk_frequency_acc)]} MHz",
"mtbl_gfxclk_frequency": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.gfxclk_frequency)]} MHz",
"mtbl_max_cclk_frequency": f"{round(mtbl.max_cclk_frequency * fraction_uq10 ,3)} GHz",
"mtbl_min_cclk_frequency": f"{round(mtbl.min_cclk_frequency * fraction_uq10 ,3)} GHz",
"mtbl_max_gfxclk_frequency": f"{round(mtbl.max_gfxclk_frequency * fraction_uq10 ,3)} MHz",
"mtbl_min_gfxclk_frequency": f"{round(mtbl.min_gfxclk_frequency * fraction_uq10 ,3)} MHz",
"mtbl_max_lclk_dpm_range": mtbl.max_lclk_dpm_range,
"mtbl_min_lclk_dpm_range": mtbl.min_lclk_dpm_range,
"mtbl_xgmi_width": round(mtbl.xgmi_width * fraction_uq10 ,3),
"mtbl_xgmi_bitrate": round(mtbl.xgmi_bitrate * fraction_uq10 ,3),
"mtbl_xgmi_read_bandwidth_acc": [round(x*fraction_uq10 ,3) for x in list(mtbl.xgmi_read_bandwidth_acc)],
"mtbl_xgmi_write_bandwidth_acc": [round(x*fraction_uq10 ,3) for x in list(mtbl.xgmi_write_bandwidth_acc)],
"mtbl_socket_c0_residency": round(mtbl.socket_c0_residency * fraction_uq10 ,3),
"mtbl_socket_gfx_busy": round(mtbl.socket_gfx_busy * fraction_uq10 ,3),
"mtbl_dram_bandwidth_utilization": round(mtbl.dram_bandwidth_utilization * fraction_uq10 ,3),
"mtbl_xgmi_bitrate": f"{round(mtbl.xgmi_bitrate * fraction_uq10 ,3)} Gbps",
"mtbl_xgmi_read_bandwidth_acc": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.xgmi_read_bandwidth_acc)]} Gbps",
"mtbl_xgmi_write_bandwidth_acc": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.xgmi_write_bandwidth_acc)]} Gbps",
"mtbl_socket_c0_residency": f"{round(mtbl.socket_c0_residency * fraction_uq10 ,3)} %",
"mtbl_socket_gfx_busy": f"{round(mtbl.socket_gfx_busy * fraction_uq10 ,3)} %",
"mtbl_dram_bandwidth_utilization": f"{round(mtbl.dram_bandwidth_utilization * fraction_uq10 ,3)} %",
"mtbl_socket_c0_residency_acc": round(mtbl.socket_c0_residency_acc * fraction_uq10 ,3),
"mtbl_socket_gfx_busy_acc": round(mtbl.socket_gfx_busy_acc * fraction_uq10 ,3),
"mtbl_dram_bandwidth_acc": round(mtbl.dram_bandwidth_acc * fraction_uq10 ,3),
"mtbl_max_dram_bandwidth": round(mtbl.max_dram_bandwidth * fraction_uq10 ,3),
"mtbl_dram_bandwidth_acc": f"{round(mtbl.dram_bandwidth_acc * fraction_uq10 ,3)} Gbps",
"mtbl_max_dram_bandwidth": f"{round(mtbl.max_dram_bandwidth * fraction_uq10 ,3)} Gbps",
"mtbl_dram_bandwidth_utilization_acc": round(mtbl.dram_bandwidth_utilization_acc * fraction_uq10 ,3),
"mtbl_pcie_bandwidth_acc": [round(x*fraction_uq10 ,3) for x in list(mtbl.pcie_bandwidth_acc)],
"mtbl_pcie_bandwidth_acc": f"{[round(x*fraction_uq10 ,3) for x in list(mtbl.pcie_bandwidth_acc)]} Gbps",
"mtbl_prochot_residency_acc": mtbl.prochot_residency_acc,
"mtbl_ppt_residency_acc": mtbl.ppt_residency_acc,
"mtbl_socket_thm_residency_acc": mtbl.socket_thm_residency_acc,