From d7d7d1e7ea3d3ae8f4e0323a14b1464da8ac698e Mon Sep 17 00:00:00 2001 From: Divya Shikre Date: Tue, 20 Oct 2020 14:59:04 -0400 Subject: [PATCH] Fix for weight/hops not being updated Signed-off-by: Divya Shikre Change-Id: I333d49fa011b85d41eca63c082c0615febe2f7e9 [ROCm/rocm_smi_lib commit: 94291bf88203411233c1bb7c38d41275b1ebe383] --- projects/rocm-smi-lib/python_smi_tools/rocm_smi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py index 4522160e77..b84953e4e5 100755 --- a/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py +++ b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py @@ -1914,7 +1914,6 @@ def showWeightTopology(deviceList): """ global PRINT_JSON devices_ind = range(len(deviceList)) - weight = c_uint64() gpu_links_weight = [[0 for x in devices_ind] for y in devices_ind] printLogSpacer(' Weight between two GPUs ') for srcdevice in deviceList: @@ -1922,6 +1921,7 @@ def showWeightTopology(deviceList): if (srcdevice == destdevice): gpu_links_weight[srcdevice][destdevice] = 0 continue + weight = c_uint64() ret = rocmsmi.rsmi_topo_get_link_weight(srcdevice, destdevice, byref(weight)) if rsmi_ret_ok(ret): gpu_links_weight[srcdevice][destdevice] = weight @@ -1955,7 +1955,6 @@ def showHopsTopology(deviceList): @param deviceList: List of DRM devices (can be a single-item list) """ - hops = c_uint64() linktype = c_char_p() devices_ind = range(len(deviceList)) gpu_links_hops = [[0 for x in devices_ind] for y in devices_ind] @@ -1965,6 +1964,7 @@ def showHopsTopology(deviceList): if (srcdevice == destdevice): gpu_links_hops[srcdevice][destdevice] = '0' continue + hops = c_uint64() ret = rocmsmi.rsmi_topo_get_link_type(srcdevice, destdevice, byref(hops), byref(linktype)) if rsmi_ret_ok(ret): gpu_links_hops[srcdevice][destdevice] = hops