Skip to content

Link QNN backend to pybinding lib when built #13467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 284 commits into from
Aug 20, 2025
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
284 commits
Select commit Hold shift + click to select a range
4d50265
Update
GregoryComer Jul 23, 2025
5f66043
Update
GregoryComer Jul 23, 2025
24e919d
Update
GregoryComer Jul 23, 2025
523cc20
Update
GregoryComer Jul 23, 2025
74c95fe
Update
GregoryComer Jul 23, 2025
5d437b1
Update
GregoryComer Jul 23, 2025
89757ce
Update
GregoryComer Jul 23, 2025
423f79a
Update
GregoryComer Jul 23, 2025
69f7f9c
Update
GregoryComer Jul 23, 2025
c0f6224
Update
GregoryComer Jul 23, 2025
e2ea2a3
Update
GregoryComer Jul 23, 2025
7a2fab5
Update
GregoryComer Jul 23, 2025
033c231
Update
GregoryComer Jul 23, 2025
a9ed762
Update
GregoryComer Jul 23, 2025
64b174a
Update
GregoryComer Jul 23, 2025
3976629
Update
GregoryComer Jul 23, 2025
27cd171
Update
GregoryComer Jul 23, 2025
7bdd3e5
Update
GregoryComer Jul 23, 2025
b1254cd
Update
GregoryComer Jul 23, 2025
f2e2289
Update
GregoryComer Jul 23, 2025
cdd15c1
Update
GregoryComer Jul 23, 2025
e2df06e
Update
GregoryComer Jul 23, 2025
4461bd8
Update
GregoryComer Jul 23, 2025
7e97fd0
Update
GregoryComer Jul 23, 2025
bcb697c
Update
GregoryComer Jul 23, 2025
11a5a02
Update
GregoryComer Jul 24, 2025
244b146
Update
GregoryComer Jul 24, 2025
de21ac2
Update
GregoryComer Jul 24, 2025
fd26fc7
Update
GregoryComer Jul 24, 2025
4ae840d
Update
GregoryComer Jul 24, 2025
710ea49
Update
GregoryComer Jul 24, 2025
32f54b0
Update
GregoryComer Jul 24, 2025
a27d18c
Update
GregoryComer Jul 24, 2025
2eb59fc
Update
GregoryComer Jul 24, 2025
5cc4941
Update
GregoryComer Jul 24, 2025
ef7af5c
Update
GregoryComer Jul 24, 2025
18e89c1
Update
GregoryComer Jul 24, 2025
4719c90
Update
GregoryComer Jul 25, 2025
dd09555
Update
GregoryComer Aug 8, 2025
f1db3a0
Update
GregoryComer Aug 8, 2025
e0700b2
Update
GregoryComer Aug 8, 2025
f260b50
Update
GregoryComer Aug 8, 2025
d62ee60
Update
GregoryComer Aug 8, 2025
b2ab3a5
Update
GregoryComer Aug 8, 2025
c23c3e9
Update
GregoryComer Aug 8, 2025
c99c41a
Update
GregoryComer Aug 9, 2025
bf57d6c
Update
GregoryComer Aug 9, 2025
f261355
Update
GregoryComer Aug 11, 2025
c3a24f9
Update
GregoryComer Aug 11, 2025
1697cbc
Update
GregoryComer Aug 11, 2025
b94b45e
Update
GregoryComer Aug 11, 2025
5740f0a
Update
GregoryComer Aug 11, 2025
ed6840d
Update
GregoryComer Aug 11, 2025
f2a7e1f
Update
GregoryComer Aug 11, 2025
0e162ab
Update
GregoryComer Aug 11, 2025
c6bd56b
Update
GregoryComer Aug 11, 2025
144a8ae
Update
GregoryComer Aug 12, 2025
6f85fc1
Update
GregoryComer Aug 12, 2025
2439022
Update
GregoryComer Aug 12, 2025
bd79ef2
Update
GregoryComer Aug 12, 2025
8932c29
Update
GregoryComer Aug 12, 2025
ea2549c
Update
GregoryComer Aug 12, 2025
ffaa1c3
Update
GregoryComer Aug 12, 2025
bba2fa9
Update
GregoryComer Aug 12, 2025
3a3e026
Update
GregoryComer Aug 12, 2025
2c4488f
Update
GregoryComer Aug 12, 2025
491ec2b
Update
GregoryComer Aug 12, 2025
375b076
Update
GregoryComer Aug 12, 2025
fc1c2a7
Update
GregoryComer Aug 12, 2025
78086b4
Update
GregoryComer Aug 12, 2025
285e058
Update
GregoryComer Aug 12, 2025
cfbc408
Update
GregoryComer Aug 12, 2025
f4b0dc2
Update
GregoryComer Aug 12, 2025
5e92884
Update
GregoryComer Aug 12, 2025
605a0ad
Update
GregoryComer Aug 12, 2025
aa27776
Update
GregoryComer Aug 12, 2025
90ce443
Update
GregoryComer Aug 12, 2025
67f60e4
Update
GregoryComer Aug 12, 2025
1b9315e
Update
GregoryComer Aug 12, 2025
54563ee
Update
GregoryComer Aug 12, 2025
94d89c4
Update
GregoryComer Aug 12, 2025
d79d1a8
Update
GregoryComer Aug 12, 2025
733d4f9
Update
GregoryComer Aug 12, 2025
1e3e79c
Update
GregoryComer Aug 12, 2025
6043952
Update
GregoryComer Aug 12, 2025
8f476ea
Update
GregoryComer Aug 12, 2025
1c136d7
Update
GregoryComer Aug 12, 2025
780519f
Update
GregoryComer Aug 12, 2025
a62c6d0
Update
GregoryComer Aug 12, 2025
7e1a002
Update
GregoryComer Aug 12, 2025
a628d29
Update
GregoryComer Aug 12, 2025
3615d89
Update
GregoryComer Aug 12, 2025
e994bc1
Update
GregoryComer Aug 12, 2025
0aba8e1
Update
GregoryComer Aug 12, 2025
4329bf6
Update
GregoryComer Aug 12, 2025
105aabc
Update
GregoryComer Aug 12, 2025
c1a51ee
Update
GregoryComer Aug 12, 2025
dd30127
Update
GregoryComer Aug 12, 2025
4216805
Update
GregoryComer Aug 12, 2025
092b8d1
Update
GregoryComer Aug 12, 2025
bd786cd
Update
GregoryComer Aug 12, 2025
1d34f49
Update
GregoryComer Aug 12, 2025
933fba2
Update
GregoryComer Aug 12, 2025
d468ae4
Update
GregoryComer Aug 12, 2025
acbd480
Update
GregoryComer Aug 12, 2025
e515bf1
Update
GregoryComer Aug 12, 2025
803db00
Update
GregoryComer Aug 12, 2025
ab18089
Update
GregoryComer Aug 12, 2025
49944fa
Update
GregoryComer Aug 12, 2025
60f3932
Update
GregoryComer Aug 12, 2025
fe201b8
Update
GregoryComer Aug 12, 2025
a807a90
Update
GregoryComer Aug 12, 2025
1897d4e
Update
GregoryComer Aug 12, 2025
f65d80f
Update
GregoryComer Aug 12, 2025
0d1f097
Update
GregoryComer Aug 12, 2025
f0c2490
Update
GregoryComer Aug 12, 2025
0046b02
Update
GregoryComer Aug 12, 2025
32e1029
Update
GregoryComer Aug 12, 2025
f4df9c9
Update
GregoryComer Aug 12, 2025
832cea5
Update
GregoryComer Aug 12, 2025
40819b9
Update
GregoryComer Aug 12, 2025
692f0fa
Update
GregoryComer Aug 12, 2025
871312a
Update
GregoryComer Aug 12, 2025
53990fe
Update
GregoryComer Aug 12, 2025
567d055
Update
GregoryComer Aug 12, 2025
cd998cf
Update
GregoryComer Aug 12, 2025
2a837ab
Update
GregoryComer Aug 12, 2025
51c392a
Update
GregoryComer Aug 12, 2025
f066d46
Update
GregoryComer Aug 12, 2025
ab5415f
Update
GregoryComer Aug 12, 2025
e96c2ef
Update
GregoryComer Aug 12, 2025
31bc137
Update
GregoryComer Aug 12, 2025
dae5d43
Update
GregoryComer Aug 12, 2025
06b5532
Update
GregoryComer Aug 12, 2025
a343abc
Update
GregoryComer Aug 12, 2025
778f7cd
Update
GregoryComer Aug 12, 2025
c19a8ea
Update
GregoryComer Aug 12, 2025
b4a8428
Update
GregoryComer Aug 12, 2025
8aa25c7
Update
GregoryComer Aug 12, 2025
637b8a2
Update
GregoryComer Aug 12, 2025
7141f6c
Update
GregoryComer Aug 12, 2025
4b43363
Update
GregoryComer Aug 12, 2025
88d1dd3
Update
GregoryComer Aug 12, 2025
c583fa1
Update
GregoryComer Aug 12, 2025
7ba2a7f
Update
GregoryComer Aug 12, 2025
e7b7975
Update
GregoryComer Aug 13, 2025
29c1061
Update
GregoryComer Aug 13, 2025
995c4b5
Update
GregoryComer Aug 13, 2025
0fc4475
Update
GregoryComer Aug 13, 2025
1fec71c
Update
GregoryComer Aug 13, 2025
ad8ab13
Update
GregoryComer Aug 13, 2025
f955b94
Update
GregoryComer Aug 13, 2025
765e960
Update
GregoryComer Aug 13, 2025
a3c2dbe
Update
GregoryComer Aug 13, 2025
1008ad4
Update
GregoryComer Aug 13, 2025
e94e9ae
Update
GregoryComer Aug 13, 2025
0225d15
Update
GregoryComer Aug 13, 2025
724e992
Update
GregoryComer Aug 13, 2025
98eee4d
Update
GregoryComer Aug 13, 2025
ad04155
Update
GregoryComer Aug 13, 2025
20574c3
Update
GregoryComer Aug 13, 2025
4fd031e
Update
GregoryComer Aug 13, 2025
a5f702f
Update
GregoryComer Aug 13, 2025
569916c
Update
GregoryComer Aug 13, 2025
8303207
Update
GregoryComer Aug 13, 2025
0a017d0
Update
GregoryComer Aug 13, 2025
b299659
Update
GregoryComer Aug 13, 2025
b7d4b4e
Update
GregoryComer Aug 13, 2025
5a717d5
Update
GregoryComer Aug 13, 2025
5fc71bd
Update
GregoryComer Aug 13, 2025
55cb818
Update
GregoryComer Aug 13, 2025
d19e0db
Update
GregoryComer Aug 13, 2025
b1c89f6
Update
GregoryComer Aug 13, 2025
264fc53
Update
GregoryComer Aug 13, 2025
60b39ed
Update
GregoryComer Aug 13, 2025
8b814bc
Update
GregoryComer Aug 13, 2025
ceb875b
Update
GregoryComer Aug 13, 2025
600cf8a
Update
GregoryComer Aug 13, 2025
6880e0b
Update
GregoryComer Aug 13, 2025
f27ffc1
Update
GregoryComer Aug 14, 2025
6c41bd5
Update
GregoryComer Aug 14, 2025
6ed39c5
Update
GregoryComer Aug 14, 2025
82b83ef
Update
GregoryComer Aug 14, 2025
3b737f6
Update
GregoryComer Aug 14, 2025
871ea46
Update
GregoryComer Aug 14, 2025
f7cfc18
Update
GregoryComer Aug 14, 2025
1a3844c
Update
GregoryComer Aug 14, 2025
d951c8a
Update
GregoryComer Aug 14, 2025
fe7e387
Update
GregoryComer Aug 14, 2025
0dfca3b
Update
GregoryComer Aug 14, 2025
de1ef9a
Update
GregoryComer Aug 14, 2025
70fd984
Update
GregoryComer Aug 14, 2025
482c469
Update
GregoryComer Aug 14, 2025
4d42d47
Update
GregoryComer Aug 15, 2025
8ff7471
Update
GregoryComer Aug 15, 2025
ee716bc
Update
GregoryComer Aug 15, 2025
ac56137
Update
GregoryComer Aug 15, 2025
ad1ddaa
Update
GregoryComer Aug 15, 2025
d3553e1
Update
GregoryComer Aug 15, 2025
85ceee6
Update
GregoryComer Aug 15, 2025
2965ad6
Update
GregoryComer Aug 15, 2025
02c2e14
Update
GregoryComer Aug 15, 2025
5e34ef2
Update
GregoryComer Aug 15, 2025
32a34e3
Update
GregoryComer Aug 15, 2025
5038454
Update
GregoryComer Aug 15, 2025
46152fb
Update
GregoryComer Aug 15, 2025
d76bc1a
Update
GregoryComer Aug 15, 2025
bd5573a
Update
GregoryComer Aug 15, 2025
3f8bc4e
Update
GregoryComer Aug 15, 2025
5abef0c
Update
GregoryComer Aug 15, 2025
f070aa4
Update
GregoryComer Aug 15, 2025
1de7e98
Update
GregoryComer Aug 15, 2025
db6dc2b
Update
GregoryComer Aug 15, 2025
f944c0a
Update
GregoryComer Aug 15, 2025
4d5f1d0
Update
GregoryComer Aug 15, 2025
c986013
Update
GregoryComer Aug 15, 2025
c46aa24
Update
GregoryComer Aug 15, 2025
93a58c6
Update
GregoryComer Aug 15, 2025
e269157
Update
GregoryComer Aug 15, 2025
e1464a8
Update
GregoryComer Aug 15, 2025
d974e4a
Update
GregoryComer Aug 15, 2025
16ec464
Update
GregoryComer Aug 15, 2025
0498ae2
Update
GregoryComer Aug 15, 2025
69eff72
Update
GregoryComer Aug 15, 2025
a9875c5
Update
GregoryComer Aug 15, 2025
e9cb12c
Update
GregoryComer Aug 15, 2025
c519708
Update
GregoryComer Aug 15, 2025
8b8ac05
Update
GregoryComer Aug 15, 2025
33c7e16
Update
GregoryComer Aug 16, 2025
bcb823c
Update
GregoryComer Aug 16, 2025
89d18a2
Update
GregoryComer Aug 16, 2025
a64ed51
Update
GregoryComer Aug 16, 2025
f4785a5
Update
GregoryComer Aug 16, 2025
77d5d14
Update
GregoryComer Aug 16, 2025
8c36fd6
Update
GregoryComer Aug 16, 2025
412f963
Update
GregoryComer Aug 16, 2025
970a530
Update
GregoryComer Aug 17, 2025
5c820ba
Update
GregoryComer Aug 19, 2025
7b04d3b
Update
GregoryComer Aug 19, 2025
5cc215e
Update
GregoryComer Aug 19, 2025
ee7bfb3
Update
GregoryComer Aug 19, 2025
014130c
Update
GregoryComer Aug 19, 2025
2b95d42
Update
GregoryComer Aug 19, 2025
b7f676e
Update
GregoryComer Aug 19, 2025
4457748
Update
GregoryComer Aug 19, 2025
35c56cc
Update
GregoryComer Aug 19, 2025
6b95ce7
Update
GregoryComer Aug 19, 2025
c89a4d9
[Backend Tester] Add QNN test flow to nightly CI (#13468)
GregoryComer Aug 19, 2025
1925b9a
Update
GregoryComer Aug 20, 2025
3558f8d
Update
GregoryComer Aug 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ci/scripts/setup-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set -exu
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"

read -r BUILD_TOOL BUILD_MODE EDITABLE < <(parse_args "$@")
echo "Build tool: $BUILD_TOOL, Mode: $BUILD_MODE"

# As Linux job is running inside a Docker container, all of its dependencies
# have already been installed, so we use PyTorch build from source here instead
Expand Down
30 changes: 30 additions & 0 deletions .ci/scripts/test_backend_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
set -eux

SUITE=$1
FLOW=$2
ARTIFACT_DIR=$3

echo "Running backend test job for suite $SUITE, flow $FLOW."
echo "Saving job artifacts to $ARTIFACT_DIR."

# The generic Linux job chooses to use base env, not the one setup by the image
eval "$(conda shell.bash hook)"
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
conda activate "${CONDA_ENV}"

# Setup swiftshader and Vulkan SDK which are required to build the Vulkan delegate
source .ci/scripts/setup-vulkan-linux-deps.sh

# CMake options to use, in addition to the defaults.
EXTRA_BUILD_ARGS="-DEXECUTORCH_BUILD_VULKAN=ON"

# We need the runner to test the built library.
PYTHON_EXECUTABLE=python CMAKE_ARGS="$EXTRA_BUILD_ARGS" .ci/scripts/setup-linux.sh --build-tool cmake --build-mode Release

python -m executorch.backends.test.suite.runner $SUITE --flow $FLOW --report "$ARTIFACT_DIR/test_results.csv"
24 changes: 24 additions & 0 deletions .ci/scripts/test_backend_macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
set -eux

SUITE=$1
FLOW=$2
ARTIFACT_DIR=$3

echo "Running backend test job for suite $SUITE, flow $FLOW."
echo "Saving job artifacts to $ARTIFACT_DIR."

${CONDA_RUN} --no-capture-output pip install awscli==1.37.21

bash .ci/scripts/setup-conda.sh
eval "$(conda shell.bash hook)"

PYTHON_EXECUTABLE=python
${CONDA_RUN} --no-capture-output .ci/scripts/setup-macos.sh --build-tool cmake --build-mode Release

${CONDA_RUN} --no-capture-output python -m executorch.backends.test.suite.runner $SUITE --flow $FLOW --report "$ARTIFACT_DIR/test_results.csv"
49 changes: 49 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,52 @@ jobs:
uses: ./.github/workflows/_link_check.yml
with:
ref: ${{ github.sha }}

backend-test-linux:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
strategy:
fail-fast: false
matrix:
flow: [vulkan, xnnpack, xnnpack_static_int8_per_channel]
suite: [models, operators]
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
runner: linux.4xlarge.memory
docker-image: ci-image:executorch-ubuntu-22.04-clang12
submodules: recursive
timeout: 120
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}
script: |
set -eux
# Intentionally suppressing exit code for now.
# TODO (gjcomer) Remove this when jobs are stable.
EXIT_CODE=0
.ci/scripts/test_backend_linux.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" || EXIT_CODE=$?
echo "Test run complete with exit code $EXIT_CODE."

backend-test-macos:
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
matrix:
flow: [coreml, coreml_static_int8]
suite: [models, operators]
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
runner: macos-m1-stable
python-version: 3.12
submodules: recursive
timeout: 120
upload-artifact: test-report-${{ matrix.flow }}-${{ matrix.suite }}
script: |
set -eux

# This is needed to get the prebuilt PyTorch wheel from S3
${CONDA_RUN} --no-capture-output pip install awscli==1.37.21

EXIT_CODE=0
.ci/scripts/test_backend_macos.sh "${{ matrix.suite }}" "${{ matrix.flow }}" "${RUNNER_ARTIFACT_DIR}" || EXIT_CODE=$?
echo "Test run complete with exit code $EXIT_CODE."
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,10 @@ if(EXECUTORCH_BUILD_PYBIND)
list(APPEND _dep_libs openvino_backend)
endif()

if(EXECUTORCH_BUILD_QNN)
list(APPEND _dep_libs qnn_executorch_backend)
endif()

if(EXECUTORCH_BUILD_XNNPACK)
# need to explicitly specify XNNPACK and xnnpack-microkernels-prod here
# otherwise uses XNNPACK and microkernel-prod symbols from libtorch_cpu
Expand Down
1 change: 1 addition & 0 deletions backends/test/suite/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# Set of unsupported ops that should cause tests to be skipped
UNSUPPORTED_PORTABLE_OPS = {
"aten::_embedding_bag",
"aten::_adaptive_avg_pool2d",
"aten::median",
"aten::median.dim",
"aten::round.decimals",
Expand Down
Loading