Skip to content

Commit e7eea58

Browse files
authored
Arm backend: Enable VGF backend testing in github (#15847)
Reapply "Arm backend: Enable pytest VKML op unit testing in ciflow/trunk" (#15841) This reverts commit 0c0cee5. Reason why the first commit was reverted was because the all op test timed out. Therefore on top of the "reapply" test_pytest_ops_vkml is split out into its own job, test-arm-backend-vkml. This means the original all ops test will run like before. cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai
1 parent 65a9044 commit e7eea58

File tree

6 files changed

+62
-3
lines changed

6 files changed

+62
-3
lines changed

.ci/scripts/test_backend.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,25 @@ if [[ "$FLOW" == *vulkan* ]]; then
5757
fi
5858

5959
if [[ "$FLOW" == *arm* ]]; then
60+
6061
# Setup ARM deps.
61-
.ci/scripts/setup-arm-baremetal-tools.sh
62+
if [[ "$FLOW" == *vgf* ]]; then
63+
.ci/scripts/setup-arm-baremetal-tools.sh --enable-mlsdk-deps --install-mlsdk-deps-with-pip
64+
else
65+
.ci/scripts/setup-arm-baremetal-tools.sh
66+
fi
6267
source examples/arm/ethos-u-scratch/setup_path.sh
6368

6469
if [[ "$FLOW" == *ethos_u* ]]; then
6570
# Prepare a test runner binary that can run on the Corstone-3x0 FVPs
6671
backends/arm/scripts/build_executorch.sh
6772
backends/arm/test/setup_testing.sh
6873
fi
74+
75+
if [[ "$FLOW" == *vgf* ]]; then
76+
# Prepare a test runner binary for VKML runtime
77+
backends/arm/test/setup_testing_vkml.sh
78+
fi
6979
fi
7080

7181
if [[ $IS_MACOS -eq 1 ]]; then

.github/workflows/test-backend-arm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: ./.github/workflows/_test_backend.yml
2727
with:
2828
backend: arm
29-
flows: '["arm_tosa_fp", "arm_tosa_int", "arm_ethos_u55", "arm_ethos_u85"]'
29+
flows: '["arm_tosa_fp", "arm_tosa_int", "arm_ethos_u55", "arm_ethos_u85", "arm_vgf_fp", "arm_vgf_int"]'
3030
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
3131
timeout: 120
3232
run-linux: true

.github/workflows/trunk.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,40 @@ jobs:
317317
# Test test_arm_baremetal.sh with test
318318
backends/arm/test/test_arm_baremetal.sh "${ARM_TEST}"
319319
320+
test-arm-backend-vkml:
321+
name: test-arm-backend-vkml
322+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
323+
permissions:
324+
id-token: write
325+
contents: read
326+
strategy:
327+
matrix:
328+
include:
329+
- test_arm_baremetal: test_pytest_ops_vkml
330+
fail-fast: false
331+
with:
332+
runner: linux.2xlarge.memory
333+
docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk
334+
submodules: 'recursive'
335+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
336+
timeout: 120
337+
script: |
338+
# The generic Linux job chooses to use base env, not the one setup by the image
339+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
340+
conda activate "${CONDA_ENV}"
341+
source .ci/scripts/utils.sh
342+
install_executorch "--use-pt-pinned-commit"
343+
344+
.ci/scripts/setup-arm-baremetal-tools.sh --disable-ethos-u-deps --enable-mlsdk-deps --install-mlsdk-deps-with-pip
345+
346+
# Increase number of files user can monitor to bypass buck failures.
347+
# Hopefully this is high enough for this setup.
348+
sudo sysctl fs.inotify.max_user_watches=1048576 # 1024 * 1024
349+
350+
ARM_TEST=${{ matrix.test_arm_baremetal }}
351+
352+
backends/arm/test/test_arm_baremetal.sh "${ARM_TEST}"
353+
320354
test-arm-cortex-m-size-test:
321355
name: test-arm-cortex-m-size-test
322356
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main

backends/arm/test/test_arm_baremetal.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ test_pytest_ethosu_fvp() { # Same as test_pytest but also sometime verify using
157157
test_pytest_ops_vkml() { # Same as test_pytest but also sometime verify using VKML runtime
158158
echo "${TEST_SUITE_NAME}: Run pytest operator tests with VKML runtime"
159159

160-
backends/arm/scripts/build_executorch.sh
161160
backends/arm/test/setup_testing_vkml.sh
162161

163162
pytest --verbose --color=yes --numprocesses=auto --durations=10 backends/arm/test/ \

backends/test/suite/flow.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,17 @@ def all_flows() -> dict[str, TestFlow]:
132132
ARM_ETHOS_U85_FLOW,
133133
ARM_TOSA_FP_FLOW,
134134
ARM_TOSA_INT_FLOW,
135+
ARM_VGF_FP_FLOW,
136+
ARM_VGF_INT_FLOW,
135137
)
136138

137139
flows += [
138140
ARM_TOSA_FP_FLOW,
139141
ARM_TOSA_INT_FLOW,
140142
ARM_ETHOS_U55_FLOW,
141143
ARM_ETHOS_U85_FLOW,
144+
ARM_VGF_FP_FLOW,
145+
ARM_VGF_INT_FLOW,
142146
]
143147
except Exception as e:
144148
logger.info(f"Skipping ARM flow registration: {e}")

backends/test/suite/flows/arm.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,15 @@ def create_quantize_stage() -> Quantize:
7878
lambda: common.get_u85_compile_spec(),
7979
quantize=True,
8080
)
81+
ARM_VGF_FP_FLOW = _create_arm_flow(
82+
"arm_vgf_fp",
83+
lambda: common.get_vgf_compile_spec(tosa_spec="TOSA-1.0+FP"),
84+
quantize=False,
85+
use_portable_ops=False,
86+
)
87+
ARM_VGF_INT_FLOW = _create_arm_flow(
88+
"arm_vgf_int",
89+
lambda: common.get_vgf_compile_spec(tosa_spec="TOSA-1.0+INT"),
90+
quantize=True,
91+
use_portable_ops=False,
92+
)

0 commit comments

Comments
 (0)