Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions .ci/scripts/build-qnn-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ set -o xtrace

build_qnn_backend() {
echo "Start building qnn backend."
export ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT:-/opt/ndk}
export QNN_SDK_ROOT=${QNN_SDK_ROOT:-/tmp/qnn/2.28.0.241029}
# Source QNN configuration
source "$(dirname "${BASH_SOURCE[0]}")/../../backends/qualcomm/scripts/install_qnn_sdk.sh"
setup_android_ndk
install_qnn
export EXECUTORCH_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)"

parallelism=$(( $(nproc) - 1 ))
Expand Down
1 change: 1 addition & 0 deletions .ci/scripts/setup-qnn-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ set -ex
source "$(dirname "${BASH_SOURCE[0]}")/../../backends/qualcomm/scripts/install_qnn_sdk.sh"

setup_libcpp 12
setup_android_ndk
install_qnn
6 changes: 5 additions & 1 deletion .ci/scripts/test_llama.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@ echo "COREML option ${COREML}"

if [[ "${MODE}" =~ .*qnn.* ]]; then
QNN=ON

# Download QNN_SDK. If already downloaded, export environment path
source "$(dirname "${BASH_SOURCE[0]}")/../../backends/qualcomm/scripts/install_qnn_sdk.sh"
install_qnn

export EXECUTORCH_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
export QNN_SDK_ROOT=/tmp/qnn/2.28.0.241029
export LD_LIBRARY_PATH="${QNN_SDK_ROOT}/lib/x86_64-linux-clang"
export PYTHONPATH=".."
cp schema/program.fbs exir/_serialize/program.fbs
Expand Down
7 changes: 6 additions & 1 deletion .ci/scripts/test_qnn_static_llama.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ set -euxo pipefail

source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"

# Source QNN configuration
source "$(dirname "${BASH_SOURCE[0]}")/../../backends/qualcomm/scripts/qnn_config.sh"
# Download QNN_SDK. If already downloaded, export environment path
source "$(dirname "${BASH_SOURCE[0]}")/../../backends/qualcomm/scripts/install_qnn_sdk.sh"
install_qnn

export EXECUTORCH_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
export QNN_SDK_ROOT=/tmp/qnn/2.28.0.241029
export LD_LIBRARY_PATH="${QNN_SDK_ROOT}/lib/x86_64-linux-clang"
export PYTHONPATH=".."
cp schema/program.fbs exir/_serialize/program.fbs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/android-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ jobs:
export.output_name="${OUT_ET_MODEL_NAME}.pte"
ls -lh "${OUT_ET_MODEL_NAME}.pte"
elif [[ ${{ matrix.config }} == "llama3_qnn_htp" ]]; then
export QNN_SDK_ROOT=/tmp/qnn/2.28.0.241029
export QNN_SDK_ROOT=/tmp/qnn/2.37.0.25072
export LD_LIBRARY_PATH=$QNN_SDK_ROOT/lib/x86_64-linux-clang/
export PYTHONPATH=$(pwd)/..

Expand Down Expand Up @@ -432,7 +432,7 @@ jobs:
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh

mkdir -p aar-out
PYTHON_EXECUTABLE=python ANDROID_ABIS="arm64-v8a" BUILD_AAR_DIR=aar-out EXECUTORCH_BUILD_QNN=ON QNN_SDK_ROOT=/tmp/qnn/2.28.0.241029 EXECUTORCH_ANDROID_PROFILING=ON bash scripts/build_android_library.sh
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
mkdir -p extension/benchmark/android/benchmark/app/libs
cp aar-out/executorch.aar extension/benchmark/android/benchmark/app/libs
pushd extension/benchmark/android/benchmark
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android-release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
source backends/qualcomm/scripts/qnn_config.sh
export QNN_SDK_ROOT="/tmp/qnn/${QNN_VERSION}"
export ANDROID_ABIS=arm64-v8a
GRADLE_ARGS+=" -DqnnVersion=2.28.0"
GRADLE_ARGS+=" -DqnnVersion=2.37.0"
fi

# Build AAR Package
Expand Down
12 changes: 7 additions & 5 deletions backends/qualcomm/scripts/install_qnn_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ install_qnn() {

echo "Start installing qnn v${QNN_VERSION}"
QNN_INSTALLATION_DIR="/tmp/qnn"

if [ -d "${QNN_INSTALLATION_DIR}/${QNN_VERSION}" ]; then
echo "QNN SDK already installed at ${QNN_INSTALLATION_DIR}/${QNN_VERSION}"
export QNN_SDK_ROOT="${QNN_INSTALLATION_DIR}/${QNN_VERSION}"
return
fi

# Clean up any previous installation
if [ -d "${QNN_INSTALLATION_DIR}" ]; then
Expand Down Expand Up @@ -79,7 +85,7 @@ install_qnn() {
ls -lah "${QNN_INSTALLATION_DIR}"

# Set QNN_SDK_ROOT environment variable
export QNN_SDK_ROOT="${QNN_INSTALLATION_DIR}"
export QNN_SDK_ROOT="${QNN_INSTALLATION_DIR}/${QNN_VERSION}"
echo "Set QNN_SDK_ROOT=${QNN_SDK_ROOT}"
}

Expand Down Expand Up @@ -147,7 +153,3 @@ setup_libcpp() {

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

setup_libcpp 12
setup_android_ndk
install_qnn
4 changes: 2 additions & 2 deletions backends/qualcomm/scripts/qnn_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# LICENSE file in the root directory of this source tree.

# QNN SDK Configuration
QNN_VERSION="2.28.0.241029"
QNN_ZIP_URL="https://softwarecenter.qualcomm.com/api/download/software/qualcomm_neural_processing_sdk/v${QNN_VERSION}.zip"
QNN_VERSION="2.37.0.250724"
QNN_ZIP_URL="https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/${QNN_VERSION}/v${QNN_VERSION}.zip"
2 changes: 1 addition & 1 deletion shim_et/xplat/executorch/backends/qualcomm/qnn_version.bzl
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
def get_qnn_library_version():
return "2.28"
return "2.37"
Loading