diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 218c30c9ad..cbf2a1fcf0 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -6602,11 +6602,11 @@ class AMDSMICommands(): market_name = asic_info['market_name'] oam_id = asic_info['oam_id'] # get num_cu now for use later - max_cu = float(asic_info['num_compute_units']) + total_num_cu = float(asic_info['num_compute_units']) except amdsmi_exception.AmdSmiLibraryException as e: market_name = "N/A" oam_id = "N/A" - max_cu = "N/A" + total_num_cu = "N/A" gpu_info_dict.update({"market_name": market_name}) gpu_info_dict.update({"oam_id": oam_id}) @@ -6705,7 +6705,7 @@ class AMDSMICommands(): proc_info_dict['vram'] = self.helpers.convert_bytes_to_readable(proc['memory_usage']['vram_mem']) proc_info_dict['mem_usage'] = self.helpers.convert_bytes_to_readable(proc['mem']) num_cu = float(proc['cu_occupancy']) - proc_info_dict['cu_occupancy'] = {"current_cu": num_cu, "max_cu": max_cu} + proc_info_dict['cu_occupancy'] = {"current_cu": num_cu, "total_num_cu": total_num_cu} all_process_list.append(proc_info_dict) except amdsmi_exception.AmdSmiLibraryException as e: logging.debug("Failed to get process list for gpu %s | %s", gpu_id, e.get_error_info()) diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_logger.py b/projects/amdsmi/amdsmi_cli/amdsmi_logger.py index d9b1622051..b8e634a5ad 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_logger.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_logger.py @@ -1082,8 +1082,8 @@ class AMDSMILogger(): gtt_mem = str(process['gtt']).rjust(8) vram_mem = str(process['vram']).rjust(8) mem_usage = str(process['mem_usage']).rjust(9) - if process['cu_occupancy']['max_cu'] != "N/A": - cu_occupancy = (str(round(process['cu_occupancy']['current_cu'] / process['cu_occupancy']['max_cu'] * 100, 1)) + " %").rjust(7) + if process['cu_occupancy']['total_num_cu'] != "N/A" and process['cu_occupancy']['current_cu'] != "N/A": + cu_occupancy = (str(round(process['cu_occupancy']['current_cu'] / process['cu_occupancy']['total_num_cu'] * 100, 1)) + " %").rjust(7) else: cu_occupancy = "N/A" print("| {0:4.4s} {1:9.9s} {2:19.19s} {3:8.8s} {4:8.8s} {5:9.9s} {6:7.7s} |".format(