6060 uses : pytorch/test-infra/.github/workflows/linux_job.yml@main
6161 strategy :
6262 matrix :
63- model : [add]
63+ model : [add, softmax, mv2 ]
6464 fail-fast : false
6565 with :
6666 runner : linux.2xlarge
@@ -72,31 +72,85 @@ jobs:
7272 MODEL_NAME=${{ matrix.model }}
7373 CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
7474 conda activate "${CONDA_ENV}"
75+ if [[ ${{ matrix.model}} == "add" ]]; then
76+ SIM_LIMIT_SEC=60
77+ elif [[ ${{ matrix.model}} == "softmax" ]]; then
78+ SIM_LIMIT_SEC=60
79+ elif [[ ${{ matrix.model}} == "mv2" ]]; then
80+ SIM_LIMIT_SEC=5000
81+ else
82+ echo "Failed unsupported model selection ${{ matrix.model }}"
83+ exit 1
84+ fi
7585
7686 source .ci/scripts/utils.sh
7787 source .ci/scripts/zephyr-utils.sh
7888 mkdir -p zephyr_scratch/
7989 cd zephyr_scratch
8090 export ZEPHYR_PROJ_ROOT=$(realpath $(pwd))
91+ export ARM_FVP_TUTORIALS_ROOT=$ZEPHYR_PROJ_ROOT/zephyr/samples/modules/executorch/arm-fvp-tutorials
8192
93+ # TODO @Bujji: Should see if this can be moved into the docker image itself
8294 download_arm_zephyr_sdk
8395 ./zephyr-sdk-0.16.0/setup.sh -c -t arm-zephyr-eabi
84-
8596 cd $ZEPHYR_PROJ_ROOT
8697 setup_zephyr_et_module
8798
99+ # Run setup scripts for Arm FVP and Arm AOT Compilation
88100 cd $ZEPHYR_PROJ_ROOT/modules/lib/executorch
89101 install_executorch "--use-pt-pinned-commit"
90102 .ci/scripts/setup-arm-baremetal-tools.sh --target-toolchain zephyr
91103 source examples/arm/ethos-u-scratch/setup_path.sh
92104 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
96105
97- grep -qF "Output[0][0]: (float) 2.000000" sim.out
106+ # Get the model as PTE
107+ python -m examples.arm.aot_arm_compiler \
108+ --model_name="${MODEL_NAME}" \
109+ --output="${MODEL_NAME}.pte"
110+
111+ # Generate the C-style header
112+ cd $ARM_FVP_TUTORIALS_ROOT
113+ python build_model.py \
114+ --executorch-root $ZEPHYR_PROJ_ROOT/modules/lib/executorch \
115+ --pte-file $ZEPHYR_PROJ_ROOT/modules/lib/executorch/${MODEL_NAME}.pte \
116+ --output-path $ARM_FVP_TUTORIALS_ROOT/models/${MODEL_NAME}/src/
117+
118+ cd $ARM_FVP_TUTORIALS_ROOT/models/${MODEL_NAME}/
119+
120+ # Build the zephyr elf
121+ west build -p always -b mps3/corstone300/fvp -- \
122+ -DET_PTE_FILE_PATH_FOR_SELECTIVE_BUILD=$ZEPHYR_PROJ_ROOT/modules/lib/executorch/${MODEL_NAME}.pte
123+
124+ # Run the simulation
125+ FVP_Corstone_SSE-300_Ethos-U55 -a build/zephyr/zephyr.elf \
126+ -C mps3_board.visualisation.disable-visualisation=1 \
127+ -C mps3_board.telnetterminal0.start_telnet=0 \
128+ -C mps3_board.uart0.out_file='sim.out' \
129+ -C cpu0.CFGITCMSZ=15 \
130+ -C cpu0.CFGDTCMSZ=15 \
131+ --simlimit ${SIM_LIMIT_SEC}
132+
133+ # Disable exit on error
134+ set +e
135+ # Report failure if any of the ouptut verification checks fail
136+ grep -qF "ERROR" sim.out
137+ exit_status=$? #store 0 if found (failure), 1 if not (success)
138+ if [[ "$exit_status" -eq "0" ]]; then
139+ cat sim.out
140+ set -e
141+ exit 1
142+ fi
143+
144+ # Report fail if simulation does not complete successfully
145+ grep -qF "SUCCESS: Program complete, exiting." sim.out
98146 exit_status=$? #store 0 if found (success), 1 if not (failure)
99- exit $exit_status
147+ if [[ "$exit_status" -eq "1" ]]; then
148+ cat sim.out
149+ set -e
150+ exit 1
151+ fi
152+ # Re-enable exit on error
153+ set -e
100154
101155 test-models-linux-aarch64 :
102156 name : test-models-linux-aarch64
@@ -285,12 +339,12 @@ jobs:
285339 setup_script_args=""
286340 if [[ ${{ matrix.os}} == "bare_metal" ]]; then
287341 toolchain_prefix=arm-none-eabi-
288- threshold="109000"
342+ threshold="110592" # 108 KiB
289343 toolchain_cmake=examples/arm/ethos-u-setup/arm-none-eabi-gcc.cmake
290344 elif [[ ${{ matrix.os}} == "zephyr-preset" ]]; then
291345 setup_script_args="--target-toolchain zephyr"
292346 toolchain_prefix=arm-zephyr-eabi-
293- threshold="135000"
347+ threshold="135168" # 132 KiB
294348 toolchain_cmake=examples/zephyr/x86_64-linux-arm-zephyr-eabi-gcc.cmake
295349 else
296350 echo "Fail unsupport OS selection ${{ matrix.os }}"
@@ -568,7 +622,7 @@ jobs:
568622 strategy :
569623 matrix :
570624 dtype : [fp32]
571- model : [dl3, mv3, mv2, ic4, ic3, vit, mb, w2l]
625+ model : [dl3, mv3, mv2, ic4, ic3, vit, mb, w2l, conv_former ]
572626 fail-fast : false
573627 with :
574628 runner : linux.2xlarge
@@ -815,6 +869,9 @@ jobs:
815869 smollm|coreml_fp32_gpu|--quantize,
816870 llama3|coreml_fp32_gpu|--quantize,
817871 olmo|coreml_fp32_gpu|--quantize,
872+ # roberta|coreml_fp32_gpu|--quantize, roberta requires special HF access
873+ bert|coreml_fp32_gpu|--quantize,
874+ distilbert|coreml_fp32_gpu|--quantize,
818875 ]
819876 fail-fast : false
820877 with :
0 commit comments