Skip to content

Commit 2584e72

Browse files
kirklandsignfacebook-github-bot
authored andcommitted
Specify NDK version 26 (#5855)
Summary: Pull Request resolved: #5855 Reviewed By: larryliu0820 Differential Revision: D63861692 Pulled By: kirklandsign fbshipit-source-id: 94ba5ccab0f619bc905788ba60affd67a136a489
1 parent abae470 commit 2584e72

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

backends/mediatek/scripts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Before you begin, ensure you have the following prerequisites installed and conf
1616

1717
### 2. Android NDK
1818

19-
- **Download Android NDK**: Acquire the Android NDK from the [Android developer site](https://developer.android.com/ndk/downloads).
19+
- **Download Android NDK**: Acquire the Android NDK version 26.3.11579264 from the [Android developer site](https://developer.android.com/ndk/downloads).
2020
- **Set NDK Path**: Ensure that the `$ANDROID_NDK` environment variable is set to the path where the NDK is located.
2121
```bash
2222
export ANDROID_NDK=<path_to_android_ndk>

examples/demo-apps/android/LlamaDemo/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ First it’s important to note that currently ExecuTorch provides support across
3434
| QNN (Qualcomm AI Accelerators) | [link](https://github.com/pytorch/executorch/blob/main/examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md) |
3535
| MediaTek (MediaTek AI Accelerators) | [link](https://github.com/pytorch/executorch/blob/main/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md) |
3636

37+
**WARNING** NDK r27 will cause issues like:
38+
```
39+
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZTVNSt6__ndk114basic_ifstreamIcNS_11char_traitsIcEEEE" referenced by "/data/app/~~F5IwquaXUZPdLpSEYA-JGA==/com.example.executorchllamademo-FSyx80gEhsQCsxz7hvS2Ew==/lib/arm64/libexecutorch.so"...
40+
```
41+
Please use NDK version 26.3.11579264.
42+
3743
## How to Use the App
3844

3945
This section will provide the main steps to use the app, along with a code snippet of the ExecuTorch API.

examples/demo-apps/android/LlamaDemo/docs/delegates/qualcomm_README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ More specifically, it covers:
66
2. Building and linking libraries that are required to inference on-device for Android platform using Qualcomm AI accelerators.
77
3. Building the Android demo app itself.
88

9-
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 r27 and r26b.
9+
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.
1010

1111
Phone verified: OnePlus 12, Samsung 24+, Samsung 23
1212

1313
## Prerequisites
1414
* Download and unzip QNN SDK [v2.26](https://softwarecenter.qualcomm.com/api/download/software/qualcomm_neural_processing_sdk/v2.26.0.240828.zip)
15-
* Download and unzip Android SDK [r27](https://developer.android.com/ndk/downloads)
15+
* Download and unzip Android SDK [r26](https://developer.android.com/ndk/downloads)
1616
* Android phone with Snapdragon8 Gen3 (SM8650) or Gen2 (SM8550). Gen 1 and lower SoC might be supported but not fully validated.
1717
* Desired Llama model weights in .PTH format. You can download them on HuggingFace ([Example](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)).
1818

@@ -40,7 +40,7 @@ Install dependencies
4040
## Setup QNN
4141
```
4242
# Set these variables correctly for your environment
43-
export ANDROID_NDK_ROOT=$HOME/android-ndk-r27 # Download android SDK and unzip to home directory
43+
export ANDROID_NDK_ROOT=$HOME/android-ndk-r26 # Download android SDK and unzip to home directory
4444
export QNN_SDK_ROOT=$HOME/Your-SDK-Root #Folder contains lib
4545
export EXECUTORCH_ROOT=$HOME/repos/executorch
4646
export LD_LIBRARY_PATH=$QNN_SDK_ROOT/lib/x86_64-linux-clang/:$LD_LIBRARY_PATH

0 commit comments

Comments
 (0)