Skip to content

Commit 294a3a5

Browse files
cccclaifacebook-github-bot
authored andcommitted
Unify the QNN version config (#13960)
Summary: Remove a few more hardcoded version Rollback Plan: Differential Revision: D81711173
1 parent 7a7e939 commit 294a3a5

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

.ci/scripts/test_backend_linux.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@ if [[ "$FLOW" == *qnn* ]]; then
3030
# Qualcomm build. TODO (gjcomer) Clean this up once the QNN pybinding integration is
3131
# cleaned up.
3232
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool cmake
33-
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-qnn-deps.sh
34-
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
33+
# Source QNN configuration
34+
source "$(dirname "${BASH_SOURCE[0]}")/../../backends/qualcomm/scripts/qnn_config.sh"
35+
# Download QNN_SDK. If already downloaded, export environment path
36+
source "$(dirname "${BASH_SOURCE[0]}")/../../backends/qualcomm/scripts/install_qnn_sdk.sh"
37+
install_qnn
38+
3539
QNN_X86_LIB_DIR=`realpath build-x86/lib/`
36-
QNN_SDK_ROOT="/tmp/qnn/2.28.0.241029"
40+
3741
export LD_LIBRARY_PATH"=$QNN_X86_LIB_DIR:$QNN_SDK_ROOT/lib/x86_64-linux-clang/:${LD_LIBRARY_PATH:-}"
3842

3943
# TODO Get SDK root from install scripts

.github/workflows/android-perf.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,9 @@ jobs:
432432
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
433433
434434
mkdir -p aar-out
435-
PYTHON_EXECUTABLE=python ANDROID_ABIS="arm64-v8a" BUILD_AAR_DIR=aar-out EXECUTORCH_BUILD_QNN=ON QNN_SDK_ROOT=/tmp/qnn/2.37.0.25072 EXECUTORCH_ANDROID_PROFILING=ON bash scripts/build_android_library.sh
435+
# To find the QNN version
436+
source backends/qualcomm/scripts/qnn_config.sh
437+
PYTHON_EXECUTABLE=python ANDROID_ABIS="arm64-v8a" BUILD_AAR_DIR=aar-out EXECUTORCH_BUILD_QNN=ON QNN_SDK_ROOT=/tmp/qnn/${QNN_VERSION} EXECUTORCH_ANDROID_PROFILING=ON bash scripts/build_android_library.sh
436438
mkdir -p extension/benchmark/android/benchmark/app/libs
437439
cp aar-out/executorch.aar extension/benchmark/android/benchmark/app/libs
438440
pushd extension/benchmark/android/benchmark

.github/workflows/android-release-artifacts.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ jobs:
104104
source backends/qualcomm/scripts/qnn_config.sh
105105
export QNN_SDK_ROOT="/tmp/qnn/${QNN_VERSION}"
106106
export ANDROID_ABIS=arm64-v8a
107-
GRADLE_ARGS+=" -DqnnVersion=2.37.0"
107+
# To find the QNN version
108+
source backends/qualcomm/scripts/qnn_config.sh
109+
GRADLE_ARGS+=" -DqnnVersion=${QNN_MAJOR_VERSION}"
108110
fi
109111
110112
# Build AAR Package

backends/qualcomm/scripts/qnn_config.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
# LICENSE file in the root directory of this source tree.
77

88
# QNN SDK Configuration
9-
QNN_VERSION="2.37.0.250724"
9+
QNN_MAJOR_VERSION="2.37.0"
10+
QNN_MINOR_VERSION="250724"
11+
QNN_VERSION="${QNN_MAJOR_VERSION}.${QNN_MINOR_VERSION}"
1012
QNN_ZIP_URL="https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/${QNN_VERSION}/v${QNN_VERSION}.zip"

0 commit comments

Comments
 (0)