Skip to content

Arm backend: Add test_arm_baremetal.sh checks #10057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions backends/arm/test/test_arm_baremetal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,19 @@ script_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
et_root_dir=$(cd ${script_dir}/../../.. && pwd)
cd "${et_root_dir}"
pwd
setup_path_script=${et_root_dir}/examples/arm/ethos-u-scratch/setup_path.sh
_setup_msg="please refer to ${et_root_dir}/examples/arm/setup.sh to properly install necessary tools."


TEST_SUITE=$1

# Source the tools
# This should be prepared by the setup.sh
[[ -f ${setup_path_script} ]] \
|| { echo "Missing ${setup_path_script}. ${_setup_msg}"; exit 1; }

source ${setup_path_script}

help() {
echo "Usage:"
echo " $0 <TESTNAME>"
Expand Down Expand Up @@ -66,7 +75,6 @@ test_pytest() { # Test ops and other things
./examples/models/llama3_2_vision/install_requirements.sh

cd "${et_root_dir}"
source examples/arm/ethos-u-scratch/setup_path.sh
backends/arm/scripts/build_quantized_ops_aot_lib.sh

# Run arm baremetal pytest tests without FVP
Expand All @@ -78,7 +86,6 @@ test_pytest_ethosu_fvp() { # Same as test_pytest but also sometime verify using
echo "${TEST_SUITE_NAME}: Run pytest with fvp"

./examples/models/llama3_2_vision/install_requirements.sh
source examples/arm/ethos-u-scratch/setup_path.sh

# Prepare Corstone-3x0 FVP for pytest
examples/arm/run.sh --model_name=add --build_only
Expand All @@ -92,8 +99,6 @@ test_pytest_ethosu_fvp() { # Same as test_pytest but also sometime verify using
test_run_ethosu_fvp() { # End to End model tests using run.sh
echo "${TEST_SUITE_NAME}: Test ethos-u delegate examples with run.sh"

source examples/arm/ethos-u-scratch/setup_path.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
Expand All @@ -114,8 +119,6 @@ test_run_ethosu_fvp() { # End to End model tests using run.sh
test_models_ethosu_fvp() { # End to End model tests using model_test.py
echo "${TEST_SUITE_NAME}: Test ethos-u delegate models with test_model.py"

source examples/arm/ethos-u-scratch/setup_path.sh

# Build common libs once
python3 backends/arm/test/test_model.py --test_output=arm_test/test_model --build_libs

Expand Down
Loading