Skip to content

Commit 9ba35a9

Browse files
committed
Reneabled QNN flow
1 parent f59bee5 commit 9ba35a9

File tree

4 files changed

+52
-25
lines changed

4 files changed

+52
-25
lines changed

.ci/scripts/setup-openvino.sh

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,40 @@ set -ex
1010
# shellcheck source=/dev/null
1111
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1212

13+
# Parse arguments
14+
USE_NIGHTLY=false
15+
for arg in "$@"; do
16+
case $arg in
17+
--nightly) USE_NIGHTLY=true ;;
18+
esac
19+
done
20+
1321
# Download and install OpenVINO from release packages
1422
OPENVINO_VERSION="2026.0"
1523
OPENVINO_BUILD="2026.0.0.20965.c6d6a13a886"
16-
OPENVINO_URL="https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_VERSION}/linux/openvino_toolkit_ubuntu22_${OPENVINO_BUILD}_x86_64.tgz"
24+
OPENVINO_STABLE_URL="https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_VERSION}/linux/openvino_toolkit_ubuntu22_${OPENVINO_BUILD}_x86_64.tgz"
25+
26+
OPENVINO_NIGHTLY_BUILD_ID="2026.1.0-21296-4589d335731"
27+
OPENVINO_NIGHTLY_BUILD="2026.1.0.dev20260311"
28+
OPENVINO_NIGHTLY_URL="https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/${OPENVINO_NIGHTLY_BUILD_ID}/openvino_toolkit_ubuntu22_${OPENVINO_NIGHTLY_BUILD}_x86_64.tgz"
29+
30+
if [ "${USE_NIGHTLY}" = true ]; then
31+
OPENVINO_URL="${OPENVINO_NIGHTLY_URL}"
32+
OPENVINO_EXTRACTED_DIR="openvino_toolkit_ubuntu22_${OPENVINO_NIGHTLY_BUILD}_x86_64"
33+
echo "Using OpenVINO nightly build: ${OPENVINO_NIGHTLY_BUILD_ID}"
34+
else
35+
OPENVINO_URL="${OPENVINO_STABLE_URL}"
36+
OPENVINO_EXTRACTED_DIR="openvino_toolkit_ubuntu22_${OPENVINO_BUILD}_x86_64"
37+
echo "Using OpenVINO stable release: ${OPENVINO_BUILD}"
38+
fi
1739

1840
curl -Lo /tmp/openvino_toolkit.tgz --retry 3 --fail ${OPENVINO_URL}
1941
tar -xzf /tmp/openvino_toolkit.tgz
20-
mv openvino_toolkit_ubuntu22_${OPENVINO_BUILD}_x86_64 openvino
42+
mv "${OPENVINO_EXTRACTED_DIR}" openvino
2143

44+
python_version=${python_version:-}
2245
source openvino/setupvars.sh
2346
cd backends/openvino
2447
pip install -r requirements.txt
2548
cd scripts
26-
./openvino_build.sh --enable_python
49+
./openvino_build.sh --enable_python

.ci/scripts/test_backend.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fi
8080

8181
if [[ "$FLOW" == *openvino* ]]; then
8282
# Setup OpenVINO environment
83-
source .ci/scripts/setup-openvino.sh
83+
source .ci/scripts/setup-openvino.sh --nightly
8484
EXTRA_BUILD_ARGS+=" -DEXECUTORCH_BUILD_OPENVINO=ON"
8585
fi
8686

backends/openvino/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nncf==3.0.0
1+
git+https://github.com/openvinotoolkit/nncf@b101e7e#egg=nncf

backends/test/suite/flow.py

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# LICENSE file in the root directory of this source tree.
55

66
import logging
7+
import os
78

89
from dataclasses import dataclass, field
910
from typing import Callable
@@ -118,26 +119,29 @@ def all_flows() -> dict[str, TestFlow]:
118119
except Exception as e:
119120
logger.info(f"Skipping OpenVINO flow registration: {e}")
120121

121-
# try:
122-
# from executorch.backends.test.suite.flows.qualcomm import (
123-
# QNN_16A16W_TEST_FLOW,
124-
# QNN_16A4W_BLOCK_TEST_FLOW,
125-
# QNN_16A4W_TEST_FLOW,
126-
# QNN_16A8W_TEST_FLOW,
127-
# QNN_8A8W_TEST_FLOW,
128-
# QNN_TEST_FLOW,
129-
# )
130-
131-
# flows += [
132-
# QNN_TEST_FLOW,
133-
# QNN_16A16W_TEST_FLOW,
134-
# QNN_16A8W_TEST_FLOW,
135-
# QNN_16A4W_TEST_FLOW,
136-
# QNN_16A4W_BLOCK_TEST_FLOW,
137-
# QNN_8A8W_TEST_FLOW,
138-
# ]
139-
# except Exception as e:
140-
# logger.info(f"Skipping QNN flow registration: {e}")
122+
if os.environ.get("QNN_SDK_ROOT"):
123+
try:
124+
from executorch.backends.test.suite.flows.qualcomm import (
125+
QNN_16A16W_TEST_FLOW,
126+
QNN_16A4W_BLOCK_TEST_FLOW,
127+
QNN_16A4W_TEST_FLOW,
128+
QNN_16A8W_TEST_FLOW,
129+
QNN_8A8W_TEST_FLOW,
130+
QNN_TEST_FLOW,
131+
)
132+
133+
flows += [
134+
QNN_TEST_FLOW,
135+
QNN_16A16W_TEST_FLOW,
136+
QNN_16A8W_TEST_FLOW,
137+
QNN_16A4W_TEST_FLOW,
138+
QNN_16A4W_BLOCK_TEST_FLOW,
139+
QNN_8A8W_TEST_FLOW,
140+
]
141+
except Exception as e:
142+
logger.info(f"Skipping QNN flow registration: {e}")
143+
else:
144+
logger.info("Skipping QNN flow registration: QNN_SDK_ROOT not set")
141145

142146
try:
143147
from executorch.backends.test.suite.flows.arm import (

0 commit comments

Comments
 (0)