MY_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-function switch_nnfw_pacl_kernel_env()
-{
- local switch=$1 # "ON" or "OFF"
- local mode=$2 # "acl" or "neon" or ""
-
- # TODO: Handle whether there is nnfw_kernel_env_list.txt or not
- local NNFW_KERNEL_ENV_FILE=$MY_PATH/nnfw_kernel_env_list.txt
-
- for ENV in $(cat $NNFW_KERNEL_ENV_FILE); do
- if [[ "$switch" == "ON" ]]; then
- export "$ENV=$mode"
- else
- unset "$ENV"
- fi
- done
-}
-
function get_result_of_benchmark_test()
{
local RUN_TEST_SH=$1
+++ /dev/null
-NNFW_KERNEL_convFloat32
-NNFW_KERNEL_averagePoolFloat32
-NNFW_KERNEL_maxPoolFloat32
-NNFW_KERNEL_softmaxFloat32
-NNFW_KERNEL_fullyConnectedFloat32
-NNFW_KERNEL_concatenationFloat32
-NNFW_KERNEL_reshapeGeneric
echo "--runtestsh - (default=\$ARTIFACT_PATH/tests/framework/run_test.sh) run_test.sh with path where it is for framework test and verification"
echo "--unittestdir - (default=\$ARTIFACT_PATH/Product/out/unittest) directory that has unittest binaries for unit test"
echo ""
- echo "--usennapi - (default=on) declare USE_NNAPI=1"
- echo "--nousennapi - (default=off) declare nothing about USE_NNAPI"
- echo "--acl_envon - (default=off) declare envs for ACL"
echo "--reportdir - (default=\$ARTIFACT_PATH/report) directory to save report"
echo ""
}
BENCHMARK_DRIVER_BIN=""
RUN_TEST_SH=""
UNIT_TEST_DIR=""
-USE_NNAPI="USE_NNAPI=1"
ALLTEST_ON="true"
UNITTEST_ON="false"
UNITTESTALL_ON="false"
FRAMEWORKTEST_ON="false"
VERIFICATION_ON="false"
BENCHMARK_NEURUN_OP_ON="false"
-ACL_ENV_ON="false"
PROFILE_ON="false"
REPORT_DIR=""
--unittestdir=*)
UNIT_TEST_DIR=${i#*=}
;;
- --usennapi)
- USE_NNAPI="USE_NNAPI=1"
- ;;
- --nousennapi)
- USE_NNAPI=""
- ;;
--unittest)
ALLTEST_ON="false"
UNITTEST_ON="true"
ALLTEST_ON="false"
BENCHMARK_NEURUN_OP_ON="true"
;;
- --acl_envon)
- ACL_ENV_ON="true"
- ;;
--profile)
ALLTEST_ON="false"
PROFILE_ON="true"
REPORT_DIR=$ARTIFACT_PATH/report
fi
-# Set env
-if [ -n "$USE_NNAPI" ]; then
- export "$USE_NNAPI"
-fi
-
source $TEST_DRIVER_DIR/common.sh
-if [ "$ACL_ENV_ON" == "true" ]; then
- switch_nnfw_pacl_kernel_env "ON" "acl"
-fi
-
# Run unittest in each part such as Runtime
if [ "$ALLTEST_ON" == "true" ] || [ "$UNITTEST_ON" == "true" ]; then
if [ "$UNITTESTALL_ON" == "true" ]; then