diff options
Diffstat (limited to 'infra/scripts/test_tizen_neurun_mixed.sh')
-rwxr-xr-x | infra/scripts/test_tizen_neurun_mixed.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/infra/scripts/test_tizen_neurun_mixed.sh b/infra/scripts/test_tizen_neurun_mixed.sh new file mode 100755 index 000000000..ef1781486 --- /dev/null +++ b/infra/scripts/test_tizen_neurun_mixed.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +[[ "${BASH_SOURCE[0]}" != "${0}" ]] && echo "Please don't source ${BASH_SOURCE[0]}, execute it" && return + +CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_PATH="$CURRENT_PATH/../../" + +set -e + +pushd $ROOT_PATH > /dev/null + +export EXECUTOR=Linear + +# NOTE Fixed backend assignment by type of operation +# TODO Enhance this with randomized test +BACKENDS=(cpu acl_cl acl_neon) +unset OP_BACKEND_ALLOPS +export OP_BACKEND_Conv2DNode=cpu +export OP_BACKEND_MaxPool2DNode=acl_cl +export OP_BACKEND_AvgPool2DNode=acl_neon +export ACL_LAYOUT=NCHW + +# Get the intersect of framework test list files(each backend has a lsit) +TESTLIST_PREFIX="tests/scripts/neurun_frameworktest_list.armv7l" +cat $TESTLIST_PREFIX.${BACKENDS[0]}.txt | sort > $TESTLIST_PREFIX.intersect.txt +for BACKEND in $BACKENDS; do + comm -12 <(sort $TESTLIST_PREFIX.intersect.txt) <(sort $TESTLIST_PREFIX.$BACKEND.txt) > $TESTLIST_PREFIX.intersect.next.txt + mv $TESTLIST_PREFIX.intersect.next.txt $TESTLIST_PREFIX.intersect.txt +done + +# Run the test +cp -v ./Product/out/unittest/nnapi_gtest.skip.armv7l-tizen ./Product/out/unittest/nnapi_gtest.skip +source ./tests/scripts/test_driver.sh \ + --frameworktest_list_file=$TESTLIST_PREFIX.intersect.txt \ + --ldlibrarypath="$ROOT_PATH/Product/out/lib/neurun:$ROOT_PATH/Product/out/lib" \ + --reportdir="$ROOT_PATH/report/mixed" . + +popd > /dev/null |