@@ -12,10 +12,19 @@ script_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
12
12
et_root_dir=$( cd ${script_dir} /../../.. && pwd)
13
13
cd " ${et_root_dir} "
14
14
pwd
15
+ setup_path_script=${et_root_dir} /examples/arm/ethos-u-scratch/setup_path.sh
16
+ _setup_msg=" please refer to ${et_root_dir} /examples/arm/setup.sh to properly install necessary tools."
15
17
16
18
17
19
TEST_SUITE=$1
18
20
21
+ # Source the tools
22
+ # This should be prepared by the setup.sh
23
+ [[ -f ${setup_path_script} ]] \
24
+ || { echo " Missing ${setup_path_script} . ${_setup_msg} " ; exit 1; }
25
+
26
+ source ${setup_path_script}
27
+
19
28
help () {
20
29
echo " Usage:"
21
30
echo " $0 <TESTNAME>"
@@ -66,7 +75,6 @@ test_pytest() { # Test ops and other things
66
75
./examples/models/llama3_2_vision/install_requirements.sh
67
76
68
77
cd " ${et_root_dir} "
69
- source examples/arm/ethos-u-scratch/setup_path.sh
70
78
backends/arm/scripts/build_quantized_ops_aot_lib.sh
71
79
72
80
# Run arm baremetal pytest tests without FVP
@@ -78,7 +86,6 @@ test_pytest_ethosu_fvp() { # Same as test_pytest but also sometime verify using
78
86
echo " ${TEST_SUITE_NAME} : Run pytest with fvp"
79
87
80
88
./examples/models/llama3_2_vision/install_requirements.sh
81
- source examples/arm/ethos-u-scratch/setup_path.sh
82
89
83
90
# Prepare Corstone-3x0 FVP for pytest
84
91
examples/arm/run.sh --model_name=add --build_only
@@ -92,8 +99,6 @@ test_pytest_ethosu_fvp() { # Same as test_pytest but also sometime verify using
92
99
test_run_ethosu_fvp () { # End to End model tests using run.sh
93
100
echo " ${TEST_SUITE_NAME} : Test ethos-u delegate examples with run.sh"
94
101
95
- source examples/arm/ethos-u-scratch/setup_path.sh
96
-
97
102
# TOSA quantized
98
103
echo " ${TEST_SUITE_NAME} : Test ethos-u target TOSA"
99
104
examples/arm/run.sh --et_build_root=arm_test/test_run --target=TOSA --model_name=add
@@ -114,8 +119,6 @@ test_run_ethosu_fvp() { # End to End model tests using run.sh
114
119
test_models_ethosu_fvp () { # End to End model tests using model_test.py
115
120
echo " ${TEST_SUITE_NAME} : Test ethos-u delegate models with test_model.py"
116
121
117
- source examples/arm/ethos-u-scratch/setup_path.sh
118
-
119
122
# Build common libs once
120
123
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --build_libs
121
124
0 commit comments