echo ""
echo "Following options are needed when you want to tests of specific types. If you don't pass any one, unittest and verification will be run"
echo "--unittest - (default=on) run unit test"
- echo "--unittestall - (default=off) run all unit test without skip, overrite --unittest option"
echo "--frameworktest - (default=off) run framework test"
echo "--verification - (default=on) run verification"
echo "--frameworktest_list_file - filepath of model list for test"
echo "Following option is only needed when you want to test benchmark."
echo "--benchmark_neurun_op - (default=off) run benchmark per operation on neurun"
echo ""
- echo "Following option is used for profiling."
- echo "--profile - (default=off) run operf"
- echo ""
echo "etc."
echo "--framework_driverbin - (default=../../Product/out/bin/tflite_run) runner for runnning framework tests"
echo "--verification_driverbin - (default=../../Product/out/bin/nnapi_test) runner for runnning verification tests"
UNIT_TEST_DIR=""
ALLTEST_ON="true"
UNITTEST_ON="false"
-UNITTESTALL_ON="false"
FRAMEWORKTEST_ON="false"
VERIFICATION_ON="false"
BENCHMARK_NEURUN_OP_ON="false"
-PROFILE_ON="false"
REPORT_DIR=""
for i in "$@"
ALLTEST_ON="false"
UNITTEST_ON="true"
;;
- --unittestall)
- ALLTEST_ON="false"
- UNITTEST_ON="true"
- UNITTESTALL_ON="true"
- ;;
--frameworktest)
ALLTEST_ON="false"
FRAMEWORKTEST_ON="true"
ALLTEST_ON="false"
BENCHMARK_NEURUN_OP_ON="true"
;;
- --profile)
- ALLTEST_ON="false"
- PROFILE_ON="true"
- ;;
--reportdir=*)
REPORT_DIR=${i#*=}
;;
# Run unittest in each part such as Runtime
if [ "$ALLTEST_ON" == "true" ] || [ "$UNITTEST_ON" == "true" ]; then
- if [ "$UNITTESTALL_ON" == "true" ]; then
- $TEST_DRIVER_DIR/run_unittest.sh \
- --reportdir=$REPORT_DIR \
- --unittestdir=$UNIT_TEST_DIR \
- --runall
- else
- $TEST_DRIVER_DIR/run_unittest.sh \
- --reportdir=$REPORT_DIR \
- --unittestdir=$UNIT_TEST_DIR
- fi
+ $TEST_DRIVER_DIR/run_unittest.sh \
+ --reportdir=$REPORT_DIR \
+ --unittestdir=$UNIT_TEST_DIR
fi
# Run tflite_run with various tflite models
print_to_json $REPORT_DIR/benchmark $REPORT_DIR "benchmark_result.json"
fi
fi
-
-# Run profiling
-if [ "$PROFILE_ON" == "true" ]; then
- # FIXME: These driver and tflite test are set temporarily. Fix these to support flexibility
- DRIVER_BIN=$ARTIFACT_PATH/Product/out/bin/tflite_run
- TFLITE_TEST=$ARTIFACT_PATH/tests/framework/cache/inceptionv3/inception_module/inception_test.tflite
-
- # TODO: Enable operf to set directory where sample data puts on
- rm -rf oprofile_data
-
- echo ""
- echo "============================================"
- operf -g $DRIVER_BIN $TFLITE_TEST
- echo "============================================"
- echo ""
-fi