|
55 | 55 | # Build and test executorch |
56 | 56 | PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "${BACKEND}" |
57 | 57 |
|
| 58 | + test-models-arm-zephyr: |
| 59 | + name: test-models-arm-zephyr |
| 60 | + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main |
| 61 | + strategy: |
| 62 | + matrix: |
| 63 | + model: [add] |
| 64 | + fail-fast: false |
| 65 | + with: |
| 66 | + runner: linux.2xlarge |
| 67 | + docker-image: ci-image:executorch-ubuntu-22.04-zephyr-sdk |
| 68 | + submodules: 'recursive' |
| 69 | + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} |
| 70 | + timeout: 120 |
| 71 | + script: | |
| 72 | + MODEL_NAME=${{ matrix.model }} |
| 73 | + CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]") |
| 74 | + conda activate "${CONDA_ENV}" |
| 75 | +
|
| 76 | + source .ci/scripts/utils.sh |
| 77 | + source .ci/scripts/zephyr-utils.sh |
| 78 | + mkdir -p zephyr_scratch/ |
| 79 | + cd zephyr_scratch |
| 80 | + export ZEPHYR_PROJ_ROOT=$(realpath $(pwd)) |
| 81 | +
|
| 82 | + download_arm_zephyr_sdk |
| 83 | + ./zephyr-sdk-0.16.0/setup.sh -c -t arm-zephyr-eabi |
| 84 | +
|
| 85 | + cd $ZEPHYR_PROJ_ROOT |
| 86 | + setup_zephyr_et_module |
| 87 | +
|
| 88 | + cd $ZEPHYR_PROJ_ROOT/modules/lib/executorch |
| 89 | + install_executorch "--use-pt-pinned-commit" |
| 90 | + .ci/scripts/setup-arm-baremetal-tools.sh --target-toolchain zephyr |
| 91 | + source examples/arm/ethos-u-scratch/setup_path.sh |
| 92 | + source $ZEPHYR_PROJ_ROOT/zephyr/zephyr-env.sh |
| 93 | + cd $ZEPHYR_PROJ_ROOT/zephyr/samples/modules/executorch/arm/hello_world |
| 94 | + west build -p always -b mps3/corstone300/fvp |
| 95 | + FVP_Corstone_SSE-300_Ethos-U55 -a build/zephyr/zephyr.elf -C mps3_board.visualisation.disable-visualisation=1 -C mps3_board.telnetterminal0.start_telnet=0 -C mps3_board.uart0.out_file='sim.out' -C cpu0.CFGITCMSZ=15 -C cpu0.CFGDTCMSZ=15 --simlimit 120 |
| 96 | +
|
| 97 | + grep -qF "Output[0][0]: (float) 2.000000" sim.out |
| 98 | + exit_status=$? #store 0 if found (success), 1 if not (failure) |
| 99 | + exit $exit_status |
| 100 | +
|
58 | 101 | test-models-linux-aarch64: |
59 | 102 | name: test-models-linux-aarch64 |
60 | 103 | uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main |
|
0 commit comments