Skip to content

Commit aaf0ecc

Browse files
authored
Arm backend: Add TOSA 1.0 to TOSA targets in aot_arm_compiler (#11132)
### Summary Adds TOSA 1.0 to aot_arm_compiler targets * Updates test_arm_baremetal.sh to allow for TOSA 1.0
1 parent ebb2966 commit aaf0ecc

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

backends/arm/test/test_arm_baremetal.sh

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ _setup_msg="please refer to ${et_root_dir}/examples/arm/setup.sh to properly ins
1717

1818

1919
TEST_SUITE=$1
20+
TOSA_VERSION="${2:-TOSA-1.0+INT}"
2021

2122
# Source the tools
2223
# This should be prepared by the setup.sh
@@ -138,8 +139,8 @@ test_run_ethosu_fvp() { # End to End model tests using run.sh
138139

139140
# TOSA quantized
140141
echo "${TEST_SUITE_NAME}: Test ethos-u target TOSA"
141-
examples/arm/run.sh --et_build_root=arm_test/test_run --target=TOSA --model_name=add
142-
examples/arm/run.sh --et_build_root=arm_test/test_run --target=TOSA --model_name=mul
142+
examples/arm/run.sh --et_build_root=arm_test/test_run --target=${TOSA_VERSION} --model_name=add
143+
examples/arm/run.sh --et_build_root=arm_test/test_run --target=${TOSA_VERSION} --model_name=mul
143144

144145
# Ethos-U55
145146
echo "${TEST_SUITE_NAME}: Test ethos-u target Ethos-U55"
@@ -168,17 +169,17 @@ test_models_tosa() { # End to End model tests using model_test.py
168169

169170
# TOSA quantized
170171
echo "${TEST_SUITE_NAME}: Test ethos-u target TOSA"
171-
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=mv2
172-
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=mv3
173-
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=lstm
174-
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=edsr
175-
# python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=emformer_transcribe # Takes long time to run
176-
# python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=emformer_join # Takes long time to run
177-
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=w2l
178-
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=ic3
179-
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=ic4
180-
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=resnet18
181-
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=resnet50
172+
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=mv2
173+
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=mv3
174+
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=lstm
175+
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=edsr
176+
# python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=emformer_transcribe # Takes long time to run
177+
# python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=emformer_join # Takes long time to run
178+
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=w2l
179+
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=ic3
180+
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=ic4
181+
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=resnet18
182+
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=resnet50
182183

183184
echo "${TEST_SUITE_NAME}: PASS"
184185
}

examples/arm/aot_arm_compiler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@ def forward(self, x: torch.Tensor, y: torch.Tensor):
342342
"ethos-u85-1024",
343343
"ethos-u85-2048",
344344
"vgf",
345-
"TOSA",
345+
"TOSA-0.80+BI",
346+
"TOSA-1.0+INT",
346347
]
347348

348349

0 commit comments

Comments
 (0)