Moved partition_id from static --asic-info to static --partition.
partition_id also removed from the `amdsmi_asic_info_t` struct and supporting API has been added for querying partition information. Signed-off-by: gabrpham <Gabriel.Pham@amd.com> Change-Id: Id5a6291a77d11bb97a1c7a200fc465898e86e081
This commit is contained in:
committad av
Maisam Arif
förälder
3b7f661e71
incheckning
c9a489d437
@@ -175,20 +175,29 @@ class AMDSMICommands():
|
||||
kfd_id = kfd_info['kfd_id']
|
||||
node_id = kfd_info['node_id']
|
||||
except amdsmi_exception.AmdSmiLibraryException as e:
|
||||
kfd_id = node_id = e.get_error_info()
|
||||
kfd_id = node_id = "N/A"
|
||||
logging.debug("Failed to get kfd info for gpu %s | %s", gpu_id, e.get_error_info())
|
||||
|
||||
try:
|
||||
partition_info = amdsmi_interface.amdsmi_get_gpu_accelerator_partition_profile(args.gpu)
|
||||
partition_id = partition_info['partition_id']
|
||||
except amdsmi_exception.AmdSmiLibraryException as e:
|
||||
partition_id = "N/A"
|
||||
logging.debug("Failed to get partition ID for gpu %s | %s", gpu_id, e.get_error_info())
|
||||
|
||||
# CSV format is intentionally aligned with Host
|
||||
if self.logger.is_csv_format():
|
||||
self.logger.store_output(args.gpu, 'gpu_bdf', bdf)
|
||||
self.logger.store_output(args.gpu, 'gpu_uuid', uuid)
|
||||
self.logger.store_output(args.gpu, 'kfd_id', kfd_id)
|
||||
self.logger.store_output(args.gpu, 'node_id', node_id)
|
||||
self.logger.store_output(args.gpu, 'partition_id', partition_id)
|
||||
else:
|
||||
self.logger.store_output(args.gpu, 'bdf', bdf)
|
||||
self.logger.store_output(args.gpu, 'uuid', uuid)
|
||||
self.logger.store_output(args.gpu, 'kfd_id', kfd_id)
|
||||
self.logger.store_output(args.gpu, 'node_id', node_id)
|
||||
self.logger.store_output(args.gpu, 'partition_id', partition_id)
|
||||
|
||||
if multiple_devices:
|
||||
self.logger.store_multiple_device_output()
|
||||
@@ -380,8 +389,7 @@ class AMDSMICommands():
|
||||
"asic_serial" : "N/A",
|
||||
"oam_id" : "N/A",
|
||||
"num_compute_units" : "N/A",
|
||||
"target_graphics_version" : "N/A",
|
||||
"partition_id" : "N/A"
|
||||
"target_graphics_version" : "N/A"
|
||||
}
|
||||
|
||||
try:
|
||||
@@ -679,8 +687,16 @@ class AMDSMICommands():
|
||||
memory_partition = "N/A"
|
||||
logging.debug("Failed to get memory partition info for gpu %s | %s", gpu_id, e.get_error_info())
|
||||
|
||||
try:
|
||||
partition_info = amdsmi_interface.amdsmi_get_gpu_accelerator_partition_profile(args.gpu)
|
||||
partition_id = partition_info['partition_id']
|
||||
except amdsmi_exception.AmdSmiLibraryException as e:
|
||||
partition_id = "N/A"
|
||||
logging.debug("Failed to get partition ID for gpu %s | %s", gpu_id, e.get_error_info())
|
||||
|
||||
static_dict['partition'] = {"compute_partition": compute_partition,
|
||||
"memory_partition": memory_partition}
|
||||
"memory_partition": memory_partition,
|
||||
"partition_id": partition_id}
|
||||
if 'soc_pstate' in current_platform_args:
|
||||
if args.soc_pstate:
|
||||
try:
|
||||
@@ -4996,4 +5012,4 @@ class AMDSMICommands():
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
listener.stop()
|
||||
listener.stop()
|
||||
|
||||
Referens i nytt ärende
Block a user