Skip to content

Commit

Permalink
Add L1 image decoder DALI test (#5601)
Browse files Browse the repository at this point in the history
* Add L1 image decoder DALI test

Signed-off-by: Janusz Lisiecki <[email protected]>
  • Loading branch information
JanuszL authored Aug 19, 2024
1 parent 2d67119 commit 594a218
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions qa/TL1_decoder_perf/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash -e
# used pip packages
pip_packages='numpy'
target_dir=./internal_tools

LOG="dali.log"
function CLEAN_AND_EXIT {
rm -rf ${LOG}
exit $1
}

test_body() {
# SPEC:DA-11356-002_v04
if [ "$(uname -p)" == "x86_64" ]; then
# Hopper
MIN_PERF=19000;
python hw_decoder_bench.py --width_hint 6000 --height_hint 6000 -b 408 -d 0 -g gpu -w 10 -t 10000 -i ${DALI_EXTRA_PATH}/db/single/jpeg -p rn50 -j 70 --hw_load 0.12 | tee ${LOG}
else
# GraceHopper
MIN_PERF=29000;
python hw_decoder_bench.py --width_hint 6000 --height_hint 6000 -b 408 -d 0 -g gpu -w 10 -t 10000 -i ${DALI_EXTRA_PATH}/db/single/jpeg -p rn50 -j 72 --hw_load 0.11 | tee ${LOG}
fi
PERF=$(grep "fps" ${LOG} | awk '{print $1}')

PERF_RESULT=$(echo "$PERF $MIN_PERF" | awk '{if ($1>=$2) {print "OK"} else { print "FAIL" }}')
if [[ "$PERF_RESULT" == "OK" ]]; then
CLEAN_AND_EXIT 0
fi

CLEAN_AND_EXIT 4
}
pushd ../..
source ./qa/test_template.sh
popd

0 comments on commit 594a218

Please sign in to comment.