Skip to content

Commit 2e3aaec

Browse files
committed
[Backend Tester] Add QNN test flow to nightly CI
ghstack-source-id: 227b3a0 ghstack-comment-id: 3194008771 Pull-Request: #13468
1 parent 296f38b commit 2e3aaec

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

.ci/scripts/test_backend_linux.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,26 @@ eval "$(conda shell.bash hook)"
1818
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
1919
conda activate "${CONDA_ENV}"
2020

21-
# Setup swiftshader and Vulkan SDK which are required to build the Vulkan delegate
22-
source .ci/scripts/setup-vulkan-linux-deps.sh
21+
export PYTHON_EXECUTABLE=python
2322

2423
# CMake options to use, in addition to the defaults.
25-
EXTRA_BUILD_ARGS="-DEXECUTORCH_BUILD_VULKAN=ON"
24+
EXTRA_BUILD_ARGS=""
25+
26+
if [[ "$FLOW" == *qualcomm* ]]; then
27+
# Setup QNN sdk and deps
28+
./install_requirements.sh --use-pt-pinned-commit
29+
source .ci/scripts/setup-qnn-deps.sh
30+
source .ci/scripts/build-qnn-sdk.sh
31+
32+
EXTRA_BUILD_ARGS+=" -DEXECUTORCH_BUILD_QNN=ON -DQNN_SDK_ROOT=$QNN_SDK_ROOT"
33+
fi
34+
35+
if [[ "$FLOW" =~ *vulkan* ]]; then
36+
# Setup swiftshader and Vulkan SDK which are required to build the Vulkan delegate
37+
source .ci/scripts/setup-vulkan-linux-deps.sh
38+
39+
EXTRA_BUILD_ARGS+=" -DEXECUTORCH_BUILD_VULKAN=ON"
40+
fi
2641

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

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
strategy:
4343
fail-fast: false
4444
matrix:
45-
flow: [vulkan, xnnpack, xnnpack_static_int8_per_channel]
45+
flow: [qualcomm, vulkan, xnnpack, xnnpack_static_int8_per_channel]
4646
suite: [models, operators]
4747
with:
4848
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

backends/qualcomm/scripts/install_qnn_sdk.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ setup_libcpp() {
141141
popd >/dev/null
142142

143143
# Set environment variables
144-
export CPLUS_INCLUDE_PATH="${INSTALL_DIR}/include:$CPLUS_INCLUDE_PATH"
145-
export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:$LD_LIBRARY_PATH"
146-
export LIBRARY_PATH="${INSTALL_DIR}/lib:$LIBRARY_PATH"
144+
export CPLUS_INCLUDE_PATH="${INSTALL_DIR}/include:${CPLUS_INCLUDE_PATH:-}"
145+
export LD_LIBRARY_PATH="${INSTALL_DIR}/lib:${LD_LIBRARY_PATH:-}"
146+
export LIBRARY_PATH="${INSTALL_DIR}/lib:${LIBRARY_PATH:-}"
147147

148148
echo "libc++ installed to ${INSTALL_DIR}"
149149
}

0 commit comments

Comments
 (0)