diff --git a/.github/workflows/android-release-artifacts.yml b/.github/workflows/android-release-artifacts.yml index fcad251dac0..53ce063ffd7 100644 --- a/.github/workflows/android-release-artifacts.yml +++ b/.github/workflows/android-release-artifacts.yml @@ -168,7 +168,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.50.0" + GRADLE_ARGS+=" -DqnnVersion=${QNN_VERSION%.*}" fi # Build AAR Package diff --git a/.wiki/backends/qnn/known-issues.md b/.wiki/backends/qnn/known-issues.md index 8c188231faa..2b84e39e865 100644 --- a/.wiki/backends/qnn/known-issues.md +++ b/.wiki/backends/qnn/known-issues.md @@ -152,6 +152,16 @@ CQ8750S (soc_id=705) is not in ExecuTorch's SoC table, causing "No Snapdragon SO **Workaround**: Wait for SDK v2.43 release or manually add the SoC ID mapping. +### Benign "unexpected GraphHtpSettings option 66" on QNN SDK 2.51 + +**Symptom**: Host-side (x86) AOT lowering logs this once per graph create: +``` +[ERROR] [Qnn ExecuTorch]: unexpected GraphHtpSettings option 66 +``` +Only on QNN SDK 2.51 (2.51.0.260929); versions earlier are clean. + +**Status**: **no action needed**. The graph finalizes, inference runs, numerics are unaffected. + ## Resolved Issues (Instructive) ### Conv1dToConv2d Pass IndexError @@ -205,6 +215,7 @@ Early versions hardcoded SM8650 in the partitioner, causing failures on other So - **v2.42+**: SA8797 (V81) support - **v2.43+**: CQ8750S support - **v2.44+**: Latest features +- **v2.50 / v2.51**: bumped in-tree for SM8750; 2.51 logs a benign `GraphHtpSettings option 66` error at AOT (see Active Issues above) Context binaries are not forward-compatible across SDK versions. [Source: #1430, #4155] diff --git a/backends/qualcomm/scripts/download_qnn_sdk.py b/backends/qualcomm/scripts/download_qnn_sdk.py index 95c1d1942dd..e194a08687c 100644 --- a/backends/qualcomm/scripts/download_qnn_sdk.py +++ b/backends/qualcomm/scripts/download_qnn_sdk.py @@ -72,7 +72,7 @@ def _read_qnn_config() -> Dict[str, str]: _QNN_CONFIG = _read_qnn_config() -QNN_VERSION = _QNN_CONFIG.get("QNN_VERSION", "2.50.0.260828") +QNN_VERSION = _QNN_CONFIG.get("QNN_VERSION", "2.51.0.260929") QNN_ZIP_URL = _QNN_CONFIG.get( "QNN_ZIP_URL", f"https://softwarecenter.qualcomm.com/api/download/software/sdks/" # @lint-ignore only half of a URL, the rest is on the next line @@ -81,7 +81,7 @@ def _read_qnn_config() -> Dict[str, str]: def _get_sdk_dir() -> pathlib.Path: - """Get the versioned SDK cache directory (e.g. ~/.cache/executorch/qnn/sdk-2.50.0.260828/).""" + """Get the versioned SDK cache directory (e.g. ~/.cache/executorch/qnn/sdk-2.51.0.260929/).""" try: return _get_staging_dir(f"sdk-{QNN_VERSION}") except ValueError: diff --git a/backends/qualcomm/scripts/qnn_config.sh b/backends/qualcomm/scripts/qnn_config.sh index 4f83944b6a0..fb1ef05d710 100644 --- a/backends/qualcomm/scripts/qnn_config.sh +++ b/backends/qualcomm/scripts/qnn_config.sh @@ -6,7 +6,7 @@ # LICENSE file in the root directory of this source tree. # QNN SDK Configuration -QNN_VERSION="2.50.0.260828" +QNN_VERSION="2.51.0.260929" QNN_ZIP_URL="https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/${QNN_VERSION}/v${QNN_VERSION}.zip" # Hexagon SDK Configuration (used only by direct-mode CI build). diff --git a/docs/source/backends-qualcomm.md b/docs/source/backends-qualcomm.md index 2e413f5f67f..2fe65dd3347 100644 --- a/docs/source/backends-qualcomm.md +++ b/docs/source/backends-qualcomm.md @@ -79,8 +79,8 @@ The target SoC must be one of those listed in the `QcomChipset` enum; see [qc_sc [Qualcomm AI Engine Direct SDK](https://developer.qualcomm.com/software/qualcomm-ai-engine-direct-sdk) - Click the "Get Software" button to download the latest version of the QNN SDK. - - Although newer versions are available, we have verified and recommend using QNN 2.50.0 for stability. - - You can download it directly from the following link: [QNN 2.50.0](https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/2.50.0.260828/v2.50.0.260828.zip) + - Although newer versions are available, we have verified and recommend using QNN 2.51.0 for stability. + - You can download it directly from the following link: [QNN 2.51.0](https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/2.51.0.260929/v2.51.0.260929.zip) The directory with installed Qualcomm AI Engine Direct SDK looks like: ``` @@ -617,7 +617,9 @@ cd $DEMO_APP unzip -l app/build/outputs/apk/debug/app-debug.apk | grep "libQnnHtp.so" ``` -Expected size for QNN 2.50.0: ~2,601,473,189 bytes +This prints the single `arm64-v8a/libQnnHtp.so` entry bundled from the +`com.qualcomm.qti:qnn-runtime` artifact. Expected size for QNN 2.51.0: +~4,158,496 bytes. ***Step 3***. Monitor Logs During Model Loading diff --git a/docs/source/using-executorch-android.md b/docs/source/using-executorch-android.md index 1876a1bcda2..47b29c9a8de 100644 --- a/docs/source/using-executorch-android.md +++ b/docs/source/using-executorch-android.md @@ -160,7 +160,7 @@ QNN runtime version used by the ```kotlin dependencies { - implementation("com.qualcomm.qti:qnn-runtime:2.50.0") + implementation("com.qualcomm.qti:qnn-runtime:2.51.0") } ``` diff --git a/examples/qualcomm/README.md b/examples/qualcomm/README.md index 32a710eaef5..29145ee6c84 100644 --- a/examples/qualcomm/README.md +++ b/examples/qualcomm/README.md @@ -132,7 +132,7 @@ pip install scikit-learn pandas graphviz ## Limitation -1. QNN 2.50 is used for all examples. Newer or older QNN might work, but the performance and accuracy number can differ. +1. QNN 2.51 is used for all examples. Newer or older QNN might work, but the performance and accuracy number can differ. 2. The mobilebert example is on QNN HTP fp16, which is only supported by a limited set of SoCs. Please check QNN documents for details. diff --git a/examples/qualcomm/custom_op/README.md b/examples/qualcomm/custom_op/README.md index d37de137a09..5b845a8013d 100644 --- a/examples/qualcomm/custom_op/README.md +++ b/examples/qualcomm/custom_op/README.md @@ -10,13 +10,13 @@ This folder contains examples demonstrating the end-to-end flow for adding a cus - Please finish tutorial [Setting up executorch](https://pytorch.org/executorch/stable/getting-started-setup). -- Please finish [setup QNN backend](../../../docs/source/backends-qualcomm.md). This example is verified with QNN SDK 2.50.0. +- Please finish [setup QNN backend](../../../docs/source/backends-qualcomm.md). This example is verified with QNN SDK 2.51.0. - Please follow [the instructions to install proper version of Hexagon SDK and Hexagon Tools.](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-10/linux_setup.html#htp-and-dsp) The required Hexagon SDK and tools versions depend on your QNN SDK version. Check the `Makefile` in the op package directory for the exact combination — `HEXAGON_SDK_ROOT_V` and `HEXAGON_TOOLS_VERSION_V` specify the SDK and tools version per target. - For the examples in this folder (verified with QNN SDK 2.50.0, for SM8650): + For the examples in this folder (verified with QNN SDK 2.51.0, for SM8650): | Target | Hexagon SDK | Tools version | |--------|-------------|---------------| diff --git a/shim_et/xplat/executorch/backends/qualcomm/qnn_version.bzl b/shim_et/xplat/executorch/backends/qualcomm/qnn_version.bzl index 31940e009b6..d37815ae88b 100644 --- a/shim_et/xplat/executorch/backends/qualcomm/qnn_version.bzl +++ b/shim_et/xplat/executorch/backends/qualcomm/qnn_version.bzl @@ -1,2 +1,2 @@ def get_qnn_library_version(): - return "2.50" + return "2.51"