Adding logic to skip the loop if src and dest device are the same in HW Topology.
Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com>
Change-Id: Ib9cfbf5a7238ba75f6463e8fa6250bb9946b7979
[ROCm/amdsmi commit: 49734f8d34]
Этот коммит содержится в:
@@ -1718,6 +1718,7 @@ def showWeightTopology(deviceList):
|
||||
for destdevice in deviceList:
|
||||
if (srcdevice == destdevice):
|
||||
gpu_links_weight[srcdevice][destdevice] = 0
|
||||
continue
|
||||
ret = rocmsmi.rsmi_topo_get_link_weight(srcdevice, destdevice, byref(weight))
|
||||
if rsmi_ret_ok(ret):
|
||||
gpu_links_weight[srcdevice][destdevice] = weight
|
||||
@@ -1754,6 +1755,7 @@ def showHopsTopology(deviceList):
|
||||
for destdevice in deviceList:
|
||||
if (srcdevice == destdevice):
|
||||
gpu_links_hops[srcdevice][destdevice] = '0'
|
||||
continue
|
||||
ret = rocmsmi.rsmi_topo_get_link_type(srcdevice, destdevice, byref(hops), byref(linktype))
|
||||
if rsmi_ret_ok(ret):
|
||||
gpu_links_hops[srcdevice][destdevice] = hops
|
||||
@@ -1790,6 +1792,7 @@ def showTypeTopology(deviceList):
|
||||
for destdevice in deviceList:
|
||||
if (srcdevice == destdevice):
|
||||
gpu_links_type[srcdevice][destdevice] = '0'
|
||||
continue
|
||||
ret = rocmsmi.rsmi_topo_get_link_type(srcdevice, destdevice, byref(hops), byref(linktype))
|
||||
if rsmi_ret_ok(ret):
|
||||
if (linktype.value == 1):
|
||||
|
||||
Ссылка в новой задаче
Block a user