summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author이춘석/On-Device Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>2019-09-17 05:39:05 (GMT)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>2019-09-17 05:39:05 (GMT)
commitfc2452a94d1d160507cf0c2f27bed3ece43352a6 (patch)
treecb2fd957e3f07bf27ed1c9ae971a46f13735b1f1
parent6a23fe4ee873681f38e6039339f41da89217d791 (diff)
downloadnnfw-fc2452a94d1d160507cf0c2f27bed3ece43352a6.zip
nnfw-fc2452a94d1d160507cf0c2f27bed3ece43352a6.tar.gz
nnfw-fc2452a94d1d160507cf0c2f27bed3ece43352a6.tar.bz2
Add neurun test scripts for tizen (#7504)
- neurun test script for acl_cl and mixed Signed-off-by: Chunseok Lee <chunseok.lee@samsung.com>
-rwxr-xr-xinfra/scripts/test_tizen_neurun_acl_cl.sh30
-rwxr-xr-xinfra/scripts/test_tizen_neurun_mixed.sh38
2 files changed, 68 insertions, 0 deletions
diff --git a/infra/scripts/test_tizen_neurun_acl_cl.sh b/infra/scripts/test_tizen_neurun_acl_cl.sh
new file mode 100755
index 0000000..d098954
--- /dev/null
+++ b/infra/scripts/test_tizen_neurun_acl_cl.sh
@@ -0,0 +1,30 @@
+#!/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 OP_BACKEND_ALLOPS=acl_cl
+
+cp -v ./Product/out/unittest/nnapi_gtest.skip.armv7l-tizen ./Product/out/unittest/nnapi_gtest.skip
+export EXECUTOR=Linear
+source ./tests/scripts/test_driver.sh \
+ --ldlibrarypath="$ROOT_PATH/Product/out/lib" \
+ --reportdir="$ROOT_PATH/report/acl_cl" .
+
+export EXECUTOR=Dataflow
+source ./tests/scripts/test_driver.sh \
+ --ldlibrarypath="$ROOT_PATH/Product/out/lib" \
+ --reportdir="$ROOT_PATH/report/acl_cl" .
+
+export EXECUTOR=Parallel
+source ./tests/scripts/test_driver.sh \
+ --ldlibrarypath="$ROOT_PATH/Product/out/lib" \
+ --reportdir="$ROOT_PATH/report/acl_cl" .
+
+popd > /dev/null
diff --git a/infra/scripts/test_tizen_neurun_mixed.sh b/infra/scripts/test_tizen_neurun_mixed.sh
new file mode 100755
index 0000000..ef17814
--- /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