summaryrefslogtreecommitdiff
path: root/infra/scripts/test_arm_neurun_mixed.sh
blob: de141c5a0a67ed11363c13ef8b2daf099624653a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

set -eo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"

CheckTestPrepared

pushd ${ROOT_PATH}

# NOTE Fixed backend assignment by type of operation
# TODO Enhance this with randomized test
BACKENDS=(cpu acl_neon acl_cl)

# Get the intersect of framework test list files
TESTLIST_PREFIX="tests/scripts/list/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
popd > /dev/null

# Run the test
export OP_BACKEND_Conv2D="cpu"
export OP_BACKEND_MaxPool2D="acl_cl"
export OP_BACKEND_AvgPool2D="acl_neon"
export ACL_LAYOUT="NCHW"
export NCNN_LAYOUT="NCHW"
Unittests "acl_cl;acl_neon;cpu" "Product/out/unittest/nnapi_gtest.skip.armv7l-linux" "report/mixed"
TFLiteModelVerification "acl_cl;acl_neon;cpu" "${TESTLIST_PREFIX}.intersect.txt" "report/mixed"