Skip to content

Commit 775584a

Browse files
authored
Add OSS CI for the CPU backend test suite flow (#24252)
Summary: Run the backend test suite's `cpu_fp32` flow in OSS CI the way XNNPACK, Vulkan and WebGPU run theirs, now that `EXECUTORCH_BUILD_CPU` builds `CpuBackend` into the pybindings. Reviewed By: shoumikhin Differential Revision: D127905371 Pull Request resolved: #24252
1 parent 1d11325 commit 775584a

3 files changed

Lines changed: 36 additions & 1 deletion

File tree

‎.ci/scripts/test_backend.sh‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ if [[ "$FLOW" == *qnn* ]]; then
5353
EXTRA_BUILD_ARGS+=" -DEXECUTORCH_BUILD_QNN=ON -DQNN_SDK_ROOT=$QNN_SDK_ROOT -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON"
5454
fi
5555

56+
if [[ "$FLOW" == *cpu* ]]; then
57+
EXTRA_BUILD_ARGS+=" -DEXECUTORCH_BUILD_CPU=ON -DEXECUTORCH_BUILD_XNNPACK=ON -DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON"
58+
fi
59+
5660
if [[ "$FLOW" == *vulkan* ]]; then
5761
# CPU runners can have Mesa ICDs installed without a usable hardware GPU.
5862
source .ci/scripts/setup-vulkan-linux-deps.sh "swiftshader"

‎.github/workflows/_test_backend.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55
inputs:
66
backend:
7-
description: 'Backend to test (xnnpack, coreml, vulkan, qnn, openvino)'
7+
description: 'Backend to test (xnnpack, coreml, vulkan, qnn, openvino, cpu)'
88
required: true
99
type: string
1010
flows:
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test CPU Backend
2+
3+
on:
4+
schedule:
5+
- cron: 0 2 * * *
6+
push:
7+
branches:
8+
- main
9+
- release/*
10+
tags:
11+
- ciflow/nightly/*
12+
pull_request:
13+
workflow_dispatch:
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
test-cpu:
21+
uses: ./.github/workflows/_test_backend.yml
22+
permissions:
23+
id-token: write
24+
contents: read
25+
with:
26+
backend: cpu
27+
flows: '["cpu_fp32"]'
28+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
29+
timeout: 120
30+
run-linux: true
31+
docker-image: ci-image:executorch-ubuntu-22.04-gcc11

0 commit comments

Comments
 (0)