From 00e170c2f5780fe2f270ebd6412083d2efd23ab3 Mon Sep 17 00:00:00 2001 From: Maisam Arif Date: Thu, 8 Jun 2023 19:55:31 -0500 Subject: [PATCH 1/3] SWDEV-404157 - Fixed printLog delimiter parsing Signed-off-by: Maisam Arif Change-Id: I3d8e22d185790f4325aeacc18e4bfcfe8777d356 --- python_smi_tools/rocm_smi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_smi_tools/rocm_smi.py b/python_smi_tools/rocm_smi.py index 6a88df1cbd..dcfc47ebc7 100755 --- a/python_smi_tools/rocm_smi.py +++ b/python_smi_tools/rocm_smi.py @@ -559,7 +559,7 @@ def printLog(device, metricName, value=None, extraSpace=False): else: logstr = 'GPU[%s]\t\t: %s' % (device, metricName) if device is None: - logstr = logstr.split(':')[1][1:] + logstr = logstr.split(':', 1)[1][1:] # Force thread safe printing lock = multiprocessing.Lock() lock.acquire() From 713f85721bec063e04b1c17a0f04dc2794c1b38a Mon Sep 17 00:00:00 2001 From: "Galantsev, Dmitrii" Date: Mon, 12 Jun 2023 19:02:46 -0500 Subject: [PATCH 2/3] --showtempgraph - Show N/A when no temp found If temp in hwmon was missing - rocm-smi crashed. e.g. /sys/class/drm/card1/device/hwmon/hwmon5/temp1_input This change displays "N/A" for temp instead of crashing. Change-Id: I02f84a466bd3acfbd9b65e7e4ca0f18e76606c3b Signed-off-by: Galantsev, Dmitrii --- python_smi_tools/rocm_smi.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python_smi_tools/rocm_smi.py b/python_smi_tools/rocm_smi.py index dcfc47ebc7..b0f530cc41 100755 --- a/python_smi_tools/rocm_smi.py +++ b/python_smi_tools/rocm_smi.py @@ -2563,8 +2563,12 @@ def printTempGraph(deviceList, delay): if terminalWidth < originalTerminalWidth: print('Terminal size cannot be decreased.\n\r') return + if type(temp) == str: + tempString = temp + else: + tempString = str(int(temp)) # Two spare Spaces - tempString = (str(int(temp)) + '°C').ljust(5) + tempString = (tempString + '°C').ljust(5) printStrings.append('\033[2;30;47mGPU[%d] Temp %s|%s%s\x1b[0m%s' % (device, tempString, color, paddingSpace[1:], remainderSpace)) originalTerminalWidth = terminalWidth time.sleep((delay / 1000)) From ac94bf5ed5483a9045b0e874ec4ae00ec6d1dde6 Mon Sep 17 00:00:00 2001 From: "Galantsev, Dmitrii" Date: Mon, 12 Jun 2023 19:26:18 -0500 Subject: [PATCH 3/3] Temporarily ignore TestFrequencies See SWDEV-391039 and SWDEV-391040 for details Change-Id: I662ba43363d949465454ea4af4d4586b3d47a811 Signed-off-by: Galantsev, Dmitrii --- tests/rocm_smi_test/rsmitst.exclude | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/rocm_smi_test/rsmitst.exclude b/tests/rocm_smi_test/rsmitst.exclude index 4739f70b26..84a6b93afb 100644 --- a/tests/rocm_smi_test/rsmitst.exclude +++ b/tests/rocm_smi_test/rsmitst.exclude @@ -13,7 +13,9 @@ PERMANENT_BLACKLIST_ALL_ASICS= # This is the temporary blacklist for all ASICs. This is to be used when a test # is failing consistently TEMPORARY_BLACKLIST_ALL_ASICS=\ -"rsmitstReadOnly.TestVoltCurvRead" +"rsmitstReadOnly.TestVoltCurvRead:"\ +"rsmitstReadOnly.TestFrequenciesRead:"\ +"rsmitstReadWrite.TestFrequenciesReadWrite" if [ -z "$PERMANENT_BLACKLIST_ALL_ASICS" -a -z "$TEMPORARY_BLACKLIST_ALL_ASICS" ]; then @@ -21,7 +23,7 @@ if [ -z "$PERMANENT_BLACKLIST_ALL_ASICS" -a -z "$TEMPORARY_BLACKLIST_ALL_ASICS" else BLACKLIST_ALL_ASICS=\ "$PERMANENT_BLACKLIST_ALL_ASICS:"\ -"$TEMPORARY_BLACKLIST_ALL_ASICS" +"$TEMPORARY_BLACKLIST_ALL_ASICS:" fi # Device specific blacklists