From 803b18fe951bfc3eb9b69c9c2541574f404ead02 Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Wed, 22 Jan 2025 19:02:26 -0600 Subject: [PATCH] Dropped count from amdsmi_get_link_topology_nearest() python API The count field was not pythonic nor needed Signed-off-by: Maisam Arif Change-Id: I212f43dc11f2f2c7eddd39900e6e3aaec03f3f8f --- docs/reference/amdsmi-py-api.md | 3 +-- py-interface/amdsmi_interface.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/reference/amdsmi-py-api.md b/docs/reference/amdsmi-py-api.md index 5c9812e123..fcd387c370 100644 --- a/docs/reference/amdsmi-py-api.md +++ b/docs/reference/amdsmi-py-api.md @@ -3917,7 +3917,6 @@ Input parameters: * `link_type` The AmdSmiLinkType level to search for nearest devices Output: Dictionary holding the following fields. -* `count` number of nearest devices found based on given topology level * `processor_list` list of all nearest device handlers found @@ -3939,7 +3938,7 @@ try: print(amdsmi_get_gpu_device_uuid(devices[0])) nearest_gpus = amdsmi_get_link_topology_nearest(devices[0], AmdSmiLinkType.AMDSMI_LINK_TYPE_PCIE) - if (nearest_gpus['count']) == 0: + if (len(nearest_gpus['processor_list'])) == 0: print("No nearest GPUs found on machine") else: print("Nearest GPUs") diff --git a/py-interface/amdsmi_interface.py b/py-interface/amdsmi_interface.py index a727329362..4d04d26912 100644 --- a/py-interface/amdsmi_interface.py +++ b/py-interface/amdsmi_interface.py @@ -4431,6 +4431,5 @@ def amdsmi_get_link_topology_nearest( device_list.append(topology_nearest_list.processor_list[index]) return { - 'count': topology_nearest_list.count, 'processor_list': device_list }