KFDTest: Use SMI for HIGH clocks, if possible

Some systems don't support coarse-grained DPM, so performance level will
fail. Remove the compute_utils.sh references, and just use the SMI if we
request clocks be high, without throwing errors if it fails.

Change-Id: Ic5beda9921128be36ac2d58cae3f0608618a8e21


[ROCm/ROCR-Runtime commit: 7ee9e01587]
Tento commit je obsažen v:
Kent Russell
2020-04-14 11:29:45 -04:00
rodič 08ae75cfca
revize b72f1720ef
+16 -3
Zobrazit soubor
@@ -243,12 +243,25 @@ while [ "$1" != "" ]; do
shift 1
done
# If compute_utils.sh doesn't exist, this will just silently do nothing
# If the SMI is missing, just report and continue
if [ "$FORCE_HIGH" == "true" ]; then
pushGpuDpmState high
pushTrap "popGpuDpmState" EXIT
if [ -e "/opt/rocm/bin/rocm-smi" ]; then
OLDPERF=$(/opt/rocm/bin/rocm-smi -p | awk '/Performance Level/ {print $NF; exit}')
$(/opt/rocm/bin/rocm-smi --setperflevel high &> /dev/null)
if [ $? != 0 ]; then
echo "SMI failed to set perf level"
OLDPERF=""
fi
else
echo "Unable to set clocks to high"
fi
fi
# Set HSA_DEBUG env to run KFDMemoryTest.PtraceAccessInvisibleVram
export HSA_DEBUG=1
runKfdTest
# OLDPERF is only set if FORCE_HIGH and SMI both exist
if [ -n "$OLDPERF" ]; then
/opt/rocm/bin/rocm-smi --setperflevel $OLDPERF &> /dev/null
fi