From 5766452d637d01a8a008c00135b882a2a0297f15 Mon Sep 17 00:00:00 2001 From: Saoirse Stewart Date: Tue, 20 May 2025 11:22:54 +0100 Subject: [PATCH] Arm backend: Add TOSA 1.0 to TOSA targets in aot_arm_compiler * Updates test_arm_baremetal.sh to allow for TOSA 1.0 --- backends/arm/test/test_arm_baremetal.sh | 27 +++++++++++++------------ examples/arm/aot_arm_compiler.py | 3 ++- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/backends/arm/test/test_arm_baremetal.sh b/backends/arm/test/test_arm_baremetal.sh index 12a37315109..73271b11331 100755 --- a/backends/arm/test/test_arm_baremetal.sh +++ b/backends/arm/test/test_arm_baremetal.sh @@ -17,6 +17,7 @@ _setup_msg="please refer to ${et_root_dir}/examples/arm/setup.sh to properly ins TEST_SUITE=$1 +TOSA_VERSION="${2:-TOSA-1.0+INT}" # Source the tools # This should be prepared by the setup.sh @@ -138,8 +139,8 @@ test_run_ethosu_fvp() { # End to End model tests using run.sh # TOSA quantized echo "${TEST_SUITE_NAME}: Test ethos-u target TOSA" - examples/arm/run.sh --et_build_root=arm_test/test_run --target=TOSA --model_name=add - examples/arm/run.sh --et_build_root=arm_test/test_run --target=TOSA --model_name=mul + examples/arm/run.sh --et_build_root=arm_test/test_run --target=${TOSA_VERSION} --model_name=add + examples/arm/run.sh --et_build_root=arm_test/test_run --target=${TOSA_VERSION} --model_name=mul # Ethos-U55 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 # TOSA quantized echo "${TEST_SUITE_NAME}: Test ethos-u target TOSA" - python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=mv2 - python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=mv3 - python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=lstm - python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=edsr - # python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=emformer_transcribe # Takes long time to run - # python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=emformer_join # Takes long time to run - python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=w2l - python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=ic3 - python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=ic4 - python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=resnet18 - python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=TOSA --model=resnet50 + python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=mv2 + python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=mv3 + python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=lstm + python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=edsr + # python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=emformer_transcribe # Takes long time to run + # python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=emformer_join # Takes long time to run + python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=w2l + python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=ic3 + python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=ic4 + python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=resnet18 + python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --target=${TOSA_VERSION} --model=resnet50 echo "${TEST_SUITE_NAME}: PASS" } diff --git a/examples/arm/aot_arm_compiler.py b/examples/arm/aot_arm_compiler.py index 25f2a26ccf7..c663b150fd8 100644 --- a/examples/arm/aot_arm_compiler.py +++ b/examples/arm/aot_arm_compiler.py @@ -342,7 +342,8 @@ def forward(self, x: torch.Tensor, y: torch.Tensor): "ethos-u85-1024", "ethos-u85-2048", "vgf", - "TOSA", + "TOSA-0.80+BI", + "TOSA-1.0+INT", ]