From cfb3aa6091d0dd9f74c22d15a347712c9daff92c Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Wed, 9 Oct 2024 23:44:08 -0700 Subject: [PATCH 1/2] Android NDK r27b --- .ci/docker/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/docker/build.sh b/.ci/docker/build.sh index ad2f713466c..fabb60b5fd1 100755 --- a/.ci/docker/build.sh +++ b/.ci/docker/build.sh @@ -41,7 +41,7 @@ case "${IMAGE_NAME}" in LINTRUNNER="" CLANG_VERSION=12 # From https://developer.android.com/ndk/downloads - ANDROID_NDK_VERSION=r26c + ANDROID_NDK_VERSION=r27b ;; *) echo "Invalid image name ${IMAGE_NAME}" From 086b7a9eb0491eac7a54a71d440fa0862582d713 Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Tue, 15 Oct 2024 15:27:01 -0700 Subject: [PATCH 2/2] Use r27b in all places --- .github/workflows/android.yml | 2 +- backends/vulkan/README.md | 2 +- .../android/LlamaDemo/docs/delegates/qualcomm_README.md | 6 +++--- examples/models/llama2/README.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 5b2cb542429..b3a723449e0 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -53,7 +53,7 @@ jobs: # NB: Use metal install for KVM support to run the emulator faster runs-on: linux.24xl.spr-metal env: - ANDROID_NDK_VERSION: r26c + ANDROID_NDK_VERSION: r27b API_LEVEL: 34 steps: - name: Setup SSH (Click me for login details) diff --git a/backends/vulkan/README.md b/backends/vulkan/README.md index f520e9891b1..b428333c913 100644 --- a/backends/vulkan/README.md +++ b/backends/vulkan/README.md @@ -150,7 +150,7 @@ when building with CMake. First, make sure that you have the Android NDK installed; any NDK version past NDK r19c should work. Note that the examples in this doc have been validated with -NDK r25. The Android SDK should also be installed so that you have access to `adb`. +NDK r27b. The Android SDK should also be installed so that you have access to `adb`. The instructions in this page assumes that the following environment variables are set. diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md index 5f850e31f30..54bf956176e 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md @@ -6,13 +6,13 @@ More specifically, it covers: 2. Building and linking libraries that are required to inference on-device for Android platform using Qualcomm AI accelerators. 3. Building the Android demo app itself. -Verified on Linux CentOS, QNN SDK [v2.26](https://softwarecenter.qualcomm.com/api/download/software/qualcomm_neural_processing_sdk/v2.26.0.240828.zip), python 3.10, Android SDK r26c. +Verified on Linux CentOS, QNN SDK [v2.26](https://softwarecenter.qualcomm.com/api/download/software/qualcomm_neural_processing_sdk/v2.26.0.240828.zip), python 3.10, Android SDK r27b. Phone verified: OnePlus 12, Samsung 24+, Samsung 23 ## Prerequisites * Download and unzip QNN SDK [v2.26](https://softwarecenter.qualcomm.com/api/download/software/qualcomm_neural_processing_sdk/v2.26.0.240828.zip) -* Download and unzip Android SDK [r26](https://developer.android.com/ndk/downloads) +* Download and unzip Android SDK [r27b](https://developer.android.com/ndk/downloads) * Android phone with Snapdragon8 Gen3 (SM8650) or Gen2 (SM8550). Gen 1 and lower SoC might be supported but not fully validated. * Desired Llama model weights in .PTH format. You can download them on HuggingFace ([Example](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)). @@ -40,7 +40,7 @@ Install dependencies ## Setup QNN ``` # Set these variables correctly for your environment -export ANDROID_NDK_ROOT=$HOME/android-ndk-r26 # Download android SDK and unzip to home directory +export ANDROID_NDK_ROOT=$HOME/android-ndk-r27b # Download android SDK and unzip to home directory export QNN_SDK_ROOT=$HOME/Your-SDK-Root #Folder contains lib export EXECUTORCH_ROOT=$HOME/repos/executorch export LD_LIBRARY_PATH=$QNN_SDK_ROOT/lib/x86_64-linux-clang/:$LD_LIBRARY_PATH diff --git a/examples/models/llama2/README.md b/examples/models/llama2/README.md index 1a6fe99fc41..2260c8f8253 100644 --- a/examples/models/llama2/README.md +++ b/examples/models/llama2/README.md @@ -356,7 +356,7 @@ To build for CoreML backend and validate on Mac, replace `-DEXECUTORCH_BUILD_XNN **1. Build llama runner binary for Android** -*Pre-requisite*: Android NDK (tested with r26c) which can be downloaded from [here](https://developer.android.com/ndk/downloads). Note that the mac binary can be unpackaged and you can locate NDK folder from it. +*Pre-requisite*: Android NDK (tested with r27b) which can be downloaded from [here](https://developer.android.com/ndk/downloads). Note that the mac binary can be unpackaged and you can locate NDK folder from it. **1.1 Set Android NDK** ```