From bdf4a5da2f5de27b162744015c5137e9e12e893f Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Fri, 5 Apr 2024 01:58:39 -0500 Subject: [PATCH] Removed fb_sharing fields from Linux BM Signed-off-by: Maisam Arif Change-Id: Ia2942b9d33699ced1683270454c479701bce1246 [ROCm/amdsmi commit: 9758a8bc3318f02d7aa2ef14165f4ace0fca6201] --- projects/amdsmi/CHANGELOG.md | 2 -- projects/amdsmi/amdsmi_cli/amdsmi_commands.py | 15 +++++---------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/projects/amdsmi/CHANGELOG.md b/projects/amdsmi/CHANGELOG.md index 6a5fcc9906..bea6fc8981 100644 --- a/projects/amdsmi/CHANGELOG.md +++ b/projects/amdsmi/CHANGELOG.md @@ -219,7 +219,6 @@ $ amd-smi topology --json "link_type": "SELF", "num_hops": 0, "bandwidth": "N/A", - "fb_sharing": "ENABLED" }, { "gpu": 1, @@ -229,7 +228,6 @@ $ amd-smi topology --json "link_type": "XGMI", "num_hops": 1, "bandwidth": "50000-100000", - "fb_sharing": "ENABLED" }, ... ] diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 431b23faf9..ee6159e5ed 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -2782,13 +2782,11 @@ class AMDSMICommands(): # "gpu": GPU # # "bdf": BDF identification # "weight": 0 - self (current node); weight >= 0 correlated with hops (GPU-CPU, GPU-GPU, GPU-CPU-CPU-GPU, etc..) - # "link_status": "ENABLED" - devices linked; "DISABLED" - devices not linked + # "link_status": "ENABLED" - devices linked; "DISABLED" - devices not linked; Correlated to access # "link_type": "SELF" - current node, "PCIE", "XGMI", "N/A" - no link,"UNKNOWN" - unidentified link type # "num_hops": num_hops - # of hops between devices # "bandwidth": numa_bw - The NUMA "minimum bandwidth-maximum bandwidth" beween src and dest nodes # "N/A" - self node or not connected devices - # "fb_sharing": "ENABLED/DISABLED" - same output as defined in link_status. Devices in a hive setup should - # all have sharing enabled. # } for dest_gpu_index, dest_gpu in enumerate(args.gpu): @@ -2818,7 +2816,7 @@ class AMDSMICommands(): weight = 0 num_hops = 0 - if src_gpu != dest_gpu: + if src_gpu != dest_gpu: weight = amdsmi_interface.amdsmi_topo_get_link_weight(src_gpu, dest_gpu) num_hops = amdsmi_interface.amdsmi_topo_get_link_type(src_gpu, dest_gpu)['hops'] link_status = amdsmi_interface.amdsmi_is_P2P_accessible(src_gpu, dest_gpu) @@ -2827,7 +2825,6 @@ class AMDSMICommands(): else: link_status = "DISABLED" - # fb_sharing in BM - in a hive configuration, this is # link_status = amdsmi_is_P2P_accessible(src,dest) dest_gpu_links = { "gpu": self.helpers.get_gpu_id_from_device_handle(dest_gpu), @@ -2837,11 +2834,9 @@ class AMDSMICommands(): "link_type": link_type, "num_hops": num_hops, "bandwidth": numa_bw, - "fb_sharing": link_status } - if not args.access: # currently includes fb_sharing + if not args.access: del dest_gpu_links['link_status'] - del dest_gpu_links['fb_sharing'] if not args.weight: del dest_gpu_links['weight'] if not args.link_type: @@ -2851,9 +2846,9 @@ class AMDSMICommands(): if not args.numa_bw: del dest_gpu_links['bandwidth'] links.append(dest_gpu_links) - isEndOfDest = dest_gpu_index+1 == len(args.gpu) + dest_end = dest_gpu_index+1 == len(args.gpu) isEndOfSrc = src_gpu_index+1 == len(args.gpu) - if isEndOfDest: + if dest_end: topo_values[src_gpu_index]['links'] = links continue if isEndOfSrc: