diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 12b3fb4cd8..44fa5e77c9 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -312,12 +312,12 @@ class AMDSMICommands(): temp_edge_limit = 'N/A' try: - temp_junction_limit_error = False - temp_junction_limit = amdsmi_interface.amdsmi_get_temp_metric(args.gpu, - amdsmi_interface.AmdSmiTemperatureType.JUNCTION, amdsmi_interface.AmdSmiTemperatureMetric.CRITICAL) + temp_hotspot_limit_error = False + temp_hotspot_limit = amdsmi_interface.amdsmi_get_temp_metric(args.gpu, + amdsmi_interface.AmdSmiTemperatureType.HOTSPOT, amdsmi_interface.AmdSmiTemperatureMetric.CRITICAL) except amdsmi_exception.AmdSmiLibraryException as e: - temp_junction_limit_error = True - temp_junction_limit = e.get_error_info() + temp_hotspot_limit_error = True + temp_hotspot_limit = e.get_error_info() if not self.all_arguments: raise e @@ -339,16 +339,16 @@ class AMDSMICommands(): unit = '\N{DEGREE SIGN}C' if not temp_edge_limit_error: temp_edge_limit = f"{temp_edge_limit} {unit}" - if not temp_junction_limit_error: - temp_junction_limit = f"{temp_junction_limit} {unit}" + if not temp_hotspot_limit_error: + temp_hotspot_limit = f"{temp_hotspot_limit} {unit}" if not temp_vram_limit_error: temp_vram_limit = f"{temp_vram_limit} {unit}" limit_info = {} limit_info['power'] = power_limit - limit_info['temperature_edge'] = temp_edge_limit - limit_info['temperature_junction'] = temp_junction_limit - limit_info['temperature_vram'] = temp_vram_limit + limit_info['edge_temperature'] = temp_edge_limit + limit_info['hotspot_temperature'] = temp_hotspot_limit + limit_info['vram_temperature'] = temp_vram_limit static_dict['limit'] = limit_info if args.driver: @@ -879,8 +879,8 @@ class AMDSMICommands(): args.gpu, amdsmi_interface.AmdSmiTemperatureType.EDGE, amdsmi_interface.AmdSmiTemperatureMetric.CURRENT) temperature_edge_limit = amdsmi_interface.amdsmi_get_temp_metric( args.gpu, amdsmi_interface.AmdSmiTemperatureType.EDGE, amdsmi_interface.AmdSmiTemperatureMetric.CRITICAL) - temperature_junction_current = amdsmi_interface.amdsmi_get_temp_metric( - args.gpu, amdsmi_interface.AmdSmiTemperatureType.JUNCTION, amdsmi_interface.AmdSmiTemperatureMetric.CURRENT) + temperature_hotspot_current = amdsmi_interface.amdsmi_get_temp_metric( + args.gpu, amdsmi_interface.AmdSmiTemperatureType.HOTSPOT, amdsmi_interface.AmdSmiTemperatureMetric.CURRENT) temperature_vram_current = amdsmi_interface.amdsmi_get_temp_metric( args.gpu, amdsmi_interface.AmdSmiTemperatureType.VRAM, amdsmi_interface.AmdSmiTemperatureMetric.CURRENT) @@ -889,12 +889,12 @@ class AMDSMICommands(): temperature_edge_current = 'N/A' temperatures = {'edge': temperature_edge_current, - 'junction': temperature_junction_current, + 'hotspot': temperature_hotspot_current, 'mem': temperature_vram_current} if self.logger.is_gpuvsmi_compatibility(): temperatures = {'edge_temperature': temperature_edge_current, - 'junction_temperature': temperature_junction_current, + 'hotspot_temperature': temperature_hotspot_current, 'mem_temperature': temperature_vram_current} if self.logger.is_human_readable_format(): diff --git a/projects/amdsmi/example/amd_smi_drm_example.cc b/projects/amdsmi/example/amd_smi_drm_example.cc index 09e4b72eb3..09ae1144ee 100644 --- a/projects/amdsmi/example/amd_smi_drm_example.cc +++ b/projects/amdsmi/example/amd_smi_drm_example.cc @@ -409,11 +409,11 @@ int main() { printf("\tGPU GFX temp limit: %ld\n\n", temperature); // Get temperature measurements - // amdsmi_temperature_t edge_temp, junction_temp, vram_temp, + // amdsmi_temperature_t edge_temp, hotspot_temp, vram_temp, // plx_temp; int64_t temp_measurements[TEMPERATURE_TYPE__MAX + 1]; amdsmi_temperature_type_t temp_types[4] = { - TEMPERATURE_TYPE_EDGE, TEMPERATURE_TYPE_JUNCTION, + TEMPERATURE_TYPE_EDGE, TEMPERATURE_TYPE_HOTSPOT, TEMPERATURE_TYPE_VRAM, TEMPERATURE_TYPE_PLX}; for (const auto &temp_type : temp_types) { ret = amdsmi_get_temp_metric( @@ -425,8 +425,8 @@ int main() { printf(" Output of amdsmi_get_temp_metric:\n"); printf("\tGPU Edge temp measurement: %ld\n", temp_measurements[TEMPERATURE_TYPE_EDGE]); - printf("\tGPU Junction temp measurement: %ld\n", - temp_measurements[TEMPERATURE_TYPE_JUNCTION]); + printf("\tGPU Hotspot temp measurement: %ld\n", + temp_measurements[TEMPERATURE_TYPE_HOTSPOT]); printf("\tGPU VRAM temp measurement: %ld\n", temp_measurements[TEMPERATURE_TYPE_VRAM]); printf("\tGPU PLX temp measurement: %ld\n\n", diff --git a/projects/amdsmi/example/amd_smi_nodrm_example.cc b/projects/amdsmi/example/amd_smi_nodrm_example.cc index 2650beed8f..eaf1b688dc 100644 --- a/projects/amdsmi/example/amd_smi_nodrm_example.cc +++ b/projects/amdsmi/example/amd_smi_nodrm_example.cc @@ -227,7 +227,7 @@ int main() { // Get temperature measurements int64_t temp_measurements[TEMPERATURE_TYPE__MAX + 1]; amdsmi_temperature_type_t temp_types[4] = { - TEMPERATURE_TYPE_EDGE, TEMPERATURE_TYPE_JUNCTION, + TEMPERATURE_TYPE_EDGE, TEMPERATURE_TYPE_HOTSPOT, TEMPERATURE_TYPE_VRAM, TEMPERATURE_TYPE_PLX}; for (const auto &temp_type : temp_types) { ret = amdsmi_get_temp_metric( @@ -239,8 +239,8 @@ int main() { printf(" Output of amdsmi_get_temp_metric:\n"); printf("\tGPU Edge temp measurement: %ld\n", temp_measurements[TEMPERATURE_TYPE_EDGE]); - printf("\tGPU Junction temp measurement: %ld\n", - temp_measurements[TEMPERATURE_TYPE_JUNCTION]); + printf("\tGPU Hotspot temp measurement: %ld\n", + temp_measurements[TEMPERATURE_TYPE_HOTSPOT]); printf("\tGPU VRAM temp measurement: %ld\n", temp_measurements[TEMPERATURE_TYPE_VRAM]); printf("\tGPU PLX temp measurement: %ld\n\n", diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index 86251a4b6f..7732454495 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -226,7 +226,8 @@ typedef enum { typedef enum { TEMPERATURE_TYPE_EDGE, TEMPERATURE_TYPE_FIRST = TEMPERATURE_TYPE_EDGE, - TEMPERATURE_TYPE_JUNCTION, + TEMPERATURE_TYPE_HOTSPOT, + TEMPERATURE_TYPE_JUNCTION = TEMPERATURE_TYPE_HOTSPOT, TEMPERATURE_TYPE_VRAM, TEMPERATURE_TYPE_HBM_0, TEMPERATURE_TYPE_HBM_1, diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index c0e10a3404..46b3307f4a 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -153,6 +153,7 @@ class AmdSmiClkType(IntEnum): class AmdSmiTemperatureType(IntEnum): EDGE = amdsmi_wrapper.TEMPERATURE_TYPE_EDGE + HOTSPOT = amdsmi_wrapper.TEMPERATURE_TYPE_HOTSPOT JUNCTION = amdsmi_wrapper.TEMPERATURE_TYPE_JUNCTION VRAM = amdsmi_wrapper.TEMPERATURE_TYPE_VRAM HBM_0 = amdsmi_wrapper.TEMPERATURE_TYPE_HBM_0 diff --git a/projects/amdsmi/py-interface/amdsmi_wrapper.py b/projects/amdsmi/py-interface/amdsmi_wrapper.py index d2f9eefa92..bfb3c395bd 100644 --- a/projects/amdsmi/py-interface/amdsmi_wrapper.py +++ b/projects/amdsmi/py-interface/amdsmi_wrapper.py @@ -370,6 +370,7 @@ amdsmi_clk_type_t = ctypes.c_uint32 # enum amdsmi_temperature_type_t__enumvalues = { 0: 'TEMPERATURE_TYPE_EDGE', 0: 'TEMPERATURE_TYPE_FIRST', + 1: 'TEMPERATURE_TYPE_HOTSPOT', 1: 'TEMPERATURE_TYPE_JUNCTION', 2: 'TEMPERATURE_TYPE_VRAM', 3: 'TEMPERATURE_TYPE_HBM_0', @@ -381,6 +382,7 @@ amdsmi_temperature_type_t__enumvalues = { } TEMPERATURE_TYPE_EDGE = 0 TEMPERATURE_TYPE_FIRST = 0 +TEMPERATURE_TYPE_HOTSPOT = 1 TEMPERATURE_TYPE_JUNCTION = 1 TEMPERATURE_TYPE_VRAM = 2 TEMPERATURE_TYPE_HBM_0 = 3 @@ -1781,6 +1783,7 @@ __all__ = \ 'TEMPERATURE_TYPE_EDGE', 'TEMPERATURE_TYPE_FIRST', 'TEMPERATURE_TYPE_HBM_0', 'TEMPERATURE_TYPE_HBM_1', 'TEMPERATURE_TYPE_HBM_2', 'TEMPERATURE_TYPE_HBM_3', + 'TEMPERATURE_TYPE_HOTSPOT', 'TEMPERATURE_TYPE_JUNCTION', 'TEMPERATURE_TYPE_PLX', 'TEMPERATURE_TYPE_VRAM', 'TEMPERATURE_TYPE__MAX', 'UNKNOWN', 'amd_metrics_table_header_t', 'amdsmi_asic_info_t', diff --git a/projects/amdsmi/tests/amd_smi_test/functional/temp_read.cc b/projects/amdsmi/tests/amd_smi_test/functional/temp_read.cc index e9c337ac1b..e6aa1d88ca 100755 --- a/projects/amdsmi/tests/amd_smi_test/functional/temp_read.cc +++ b/projects/amdsmi/tests/amd_smi_test/functional/temp_read.cc @@ -58,6 +58,7 @@ static const std::map kTempSensorNameMap = { {TEMPERATURE_TYPE_VRAM, "Memory"}, + {TEMPERATURE_TYPE_HOTSPOT, "Hotspot"}, {TEMPERATURE_TYPE_JUNCTION, "Junction"}, {TEMPERATURE_TYPE_EDGE, "Edge"}, {TEMPERATURE_TYPE_HBM_0, "HBM_0"},