Dropped count from amdsmi_get_link_topology_nearest() python API
The count field was not pythonic nor needed Signed-off-by: Maisam Arif <Maisam.Arif@amd.com> Change-Id: I212f43dc11f2f2c7eddd39900e6e3aaec03f3f8f
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user