Skip to content
20 changes: 14 additions & 6 deletions .github/workflows/trunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
strategy:
matrix:
model: [add]
model: [add, softmax, mv2]
fail-fast: false
with:
runner: linux.2xlarge
Expand All @@ -72,6 +72,16 @@ jobs:
MODEL_NAME=${{ matrix.model }}
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
conda activate "${CONDA_ENV}"
if [[ ${{ matrix.model}} == "add" ]]; then
SIM_LIMIT_SEC=60
elif [[ ${{ matrix.model}} == "softmax" ]]; then
SIM_LIMIT_SEC=60
elif [[ ${{ matrix.model}} == "mv2" ]]; then
SIM_LIMIT_SEC=5000
else
echo "Failed unsupported model selection ${{ matrix.model }}"
exit 1
fi

source .ci/scripts/utils.sh
source .ci/scripts/zephyr-utils.sh
Expand Down Expand Up @@ -118,24 +128,22 @@ jobs:
-C mps3_board.uart0.out_file='sim.out' \
-C cpu0.CFGITCMSZ=15 \
-C cpu0.CFGDTCMSZ=15 \
--simlimit 120
--simlimit ${SIM_LIMIT_SEC}

# Disable exit on error
set +e
# Report failure if any of the ouptut verification checks fail
# store 0 if found (failure), 1 if not (success)
grep -qF "ERROR" sim.out
exit_status=$?
exit_status=$? #store 0 if found (failure), 1 if not (success)
if [[ "$exit_status" -eq "0" ]]; then
cat sim.out
set -e
exit 1
fi

# Report fail if simulation does not complete successfully
# store 0 if found (success), 1 if not (failure)
grep -qF "SUCCESS: Program complete, exiting." sim.out
exit_status=$?
exit_status=$? #store 0 if found (success), 1 if not (failure)
if [[ "$exit_status" -eq "1" ]]; then
cat sim.out
set -e
Expand Down
Loading