From b17eba8d9015ca1b7a70aecc32ebba9477418846 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9D=B4=EC=B6=98=EC=84=9D/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Mon, 4 Jun 2018 17:42:53 +0900 Subject: [PATCH] Run framework/verification test from file list (#1537) * Run framework/verification test from file list 1. Add --frameworktest_list_file option to test_driver.sh 2. Add pureacl_frameworktest_list.txt which contains models for pureacl runtime test. Signed-off-by: Chunseok Lee --- tools/test_driver/pureacl_frameworktest_list.txt | 11 +++++++++++ tools/test_driver/run_frameworktest.sh | 8 ++++++++ tools/test_driver/test_driver.sh | 15 +++++++++++++-- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 tools/test_driver/pureacl_frameworktest_list.txt diff --git a/tools/test_driver/pureacl_frameworktest_list.txt b/tools/test_driver/pureacl_frameworktest_list.txt new file mode 100644 index 0000000..3672bac --- /dev/null +++ b/tools/test_driver/pureacl_frameworktest_list.txt @@ -0,0 +1,11 @@ +add/4D +avgpool1 +avgpool2 +concat1 +convolution1 +convolution2 +div/broadcast +maxpool1 +maxpool2 +resize_bilinear +softmax diff --git a/tools/test_driver/run_frameworktest.sh b/tools/test_driver/run_frameworktest.sh index 8cf0cda..3d0c0b5 100755 --- a/tools/test_driver/run_frameworktest.sh +++ b/tools/test_driver/run_frameworktest.sh @@ -52,6 +52,9 @@ do --testname=*) FWTEST_TEST_NAME=${i#*=} ;; + --frameworktest_list_file=*) + FRAMEWORKTEST_LIST_FILE=${i#*=} + ;; esac shift done @@ -66,9 +69,14 @@ echo "" echo "============================================" echo "$FWTEST_TEST_NAME with $(basename $FWTEST_DRIVER_BIN) ..." +if [ ! -z "$FRAMEWORKTEST_LIST_FILE" ]; then + MODELLIST=$(cat "${FRAMEWORKTEST_LIST_FILE}") +fi + $FWTEST_RUN_TEST_SH --driverbin=$FWTEST_DRIVER_BIN \ --reportdir=$FWTEST_REPORT_DIR \ --tapname=$FWTEST_TAP_NAME \ + ${MODELLIST:-} \ > $FWTEST_REPORT_DIR/$FWTEST_LOG_NAME 2>&1 FWTEST_RESULT=$? if [[ $FWTEST_RESULT -ne 0 ]]; then diff --git a/tools/test_driver/test_driver.sh b/tools/test_driver/test_driver.sh index bac009c..976e709 100755 --- a/tools/test_driver/test_driver.sh +++ b/tools/test_driver/test_driver.sh @@ -30,6 +30,7 @@ function Usage() echo "--unittest - (default=on) run unit test" echo "--frameworktest - (default=off)run framework test" echo "--verification - (default=on) run verification" + echo "--frameworktest_list_file - filepath of model list for test" echo "" echo "Following option is only needed when you want to test benchmark." echo "--benchmark - (default=off) run benchmark" @@ -112,6 +113,14 @@ do ALLTEST_ON="false" FRAMEWORKTEST_ON="true" ;; + --frameworktest_list_file=*) + ALLTEST_ON="false" + FRAMEWORKTEST_LIST_FILE=$PWD/${i#*=} + if [ ! -e "$FRAMEWORKTEST_LIST_FILE" ]; then + echo "Pass on with proper frameworktest_list_file" + exit 1 + fi + ;; --verification) ALLTEST_ON="false" VERIFICATION_ON="true" @@ -195,7 +204,8 @@ if [ "$FRAMEWORKTEST_ON" == "true" ]; then --reportdir=$ARTIFACT_PATH/report \ --tapname=framework_test.tap \ --logname=framework_test.log \ - --testname="Frameworktest" + --testname="Frameworktest" \ + --frameworktest_list_file=${FRAMEWORKTEST_LIST_FILE:-} fi # Run nnapi_test with various tflite models @@ -211,7 +221,8 @@ if [ "$ALLTEST_ON" == "true" ] || [ "$VERIFICATION_ON" == "true" ]; then --reportdir=$ARTIFACT_PATH/report \ --tapname=verification_test.tap \ --logname=verification_test.log \ - --testname="Verification" + --testname="Verification" \ + --frameworktest_list_file=${FRAMEWORKTEST_LIST_FILE:-} fi # Run tflite_benchmark with tflite models -- 2.7.4