Adjusted CU % logic to be more robust
This commit is contained in:
committed by
Arif, Maisam
parent
fd751ba918
commit
9729aba695
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user