From 9b24a3d3b7825f2736b0759333da9c6e8f516f4e Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Tue, 24 Sep 2024 15:54:06 -0700 Subject: [PATCH 1/2] Update NDK version to r26d in docs --- backends/vulkan/README.md | 4 ++-- backends/vulkan/docs/android_demo.md | 2 +- examples/demo-apps/android/LlamaDemo/SDK-quick-setup-guide.md | 4 ++-- .../android/LlamaDemo/docs/delegates/mediatek_README.md | 2 +- .../android/LlamaDemo/docs/delegates/xnnpack_README.md | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backends/vulkan/README.md b/backends/vulkan/README.md index bc5a674970f..31d2b63a5b6 100644 --- a/backends/vulkan/README.md +++ b/backends/vulkan/README.md @@ -137,12 +137,12 @@ compile the Vulkan Compute Library's GLSL compute shaders. The Vulkan Delegate libraries can be built by setting `-DEXECUTORCH_BUILD_VULKAN=ON` when building with CMake. -First, make sure that you have the Android NDK installed - Android NDK r25c is +First, make sure that you have the Android NDK installed - Android NDK r26d is recommended. The Android SDK should also be installed so that you have access to `adb`. ```shell -# Recommended version is Android NDK r25c. +# Recommended version is Android NDK r26d. export ANDROID_NDK= # Select an appropriate Android ABI export ANDROID_ABI=arm64-v8a diff --git a/backends/vulkan/docs/android_demo.md b/backends/vulkan/docs/android_demo.md index 8570859ed34..0471d102894 100644 --- a/backends/vulkan/docs/android_demo.md +++ b/backends/vulkan/docs/android_demo.md @@ -28,7 +28,7 @@ Tutorial in order to install the specified versions of the Android NDK and the Android SDK. ```shell -# Recommended version is Android NDK r25c. +# Recommended version is Android NDK r26d. export ANDROID_NDK= # Select an appropriate Android ABI export ANDROID_ABI=arm64-v8a diff --git a/examples/demo-apps/android/LlamaDemo/SDK-quick-setup-guide.md b/examples/demo-apps/android/LlamaDemo/SDK-quick-setup-guide.md index 85c70057318..9ae79e96763 100644 --- a/examples/demo-apps/android/LlamaDemo/SDK-quick-setup-guide.md +++ b/examples/demo-apps/android/LlamaDemo/SDK-quick-setup-guide.md @@ -70,9 +70,9 @@ export ANDROID_HOME="$(realpath $DEV_HOME/sdk)" # Install SDK 34 ./cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_HOME}" --install "platforms;android-34" # Install NDK -./cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_HOME}" --install "ndk;25.0.8775105" +./cmdline-tools/bin/sdkmanager --sdk_root="${ANDROID_HOME}" --install "ndk;26.3.11579264" # The NDK root is then under `ndk/`. -export ANDROID_NDK="$ANDROID_HOME/ndk/25.0.8775105" +export ANDROID_NDK="$ANDROID_HOME/ndk/26.3.11579264" ``` ### (Optional) Android Studio Setup diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md index e820055ecfd..87881bb8730 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md @@ -5,7 +5,7 @@ More specifically, it covers: 2. Building and linking libraries that are required to inference on-device for Android platform using MediaTek AI accelerators. 3. Loading the needed files on the device and running inference. -Verified on MacOS, Linux CentOS (model export), Python 3.10, Android NDK 25.0.8775105 +Verified on MacOS, Linux CentOS (model export), Python 3.10, Android NDK r26d Phone verified: MediaTek Dimensity 9300 (D9300) chip. ## Prerequisites diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md index cb6193942ae..cc48f12b400 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md @@ -14,7 +14,7 @@ Phone verified: OnePlus 12. Samsung S23 (Llama only), Samsung S24+ (Llama only), ## Prerequisites * Install [Java 17 JDK](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html). -* Install the [Android SDK API Level 34](https://developer.android.com/about/versions/14/setup-sdk) and [Android NDK 25.0.8775105](https://developer.android.com/studio/projects/install-ndk). +* Install the [Android SDK API Level 34](https://developer.android.com/about/versions/15/setup-sdk) and [Android NDK r26d](https://developer.android.com/studio/projects/install-ndk). * If you have Android Studio set up, you can install them with * Android Studio Settings -> Language & Frameworks -> Android SDK -> SDK Platforms -> Check the row with API Level 34. * Android Studio Settings -> Language & Frameworks -> Android SDK -> SDK Tools -> Check NDK (Side by side) row. @@ -22,7 +22,7 @@ Phone verified: OnePlus 12. Samsung S23 (Llama only), Samsung S24+ (Llama only), Supported Host OS: CentOS, macOS Sonoma on Apple Silicon. -Note: This demo app and tutorial has only been validated with arm64-v8a [ABI](https://developer.android.com/ndk/guides/abis), with NDK 25.0.8775105. +Note: This demo app and tutorial has only been validated with arm64-v8a [ABI](https://developer.android.com/ndk/guides/abis), with NDK r26d. From 9874230b5a75c2b9b2c12725c3b7785bb568a295 Mon Sep 17 00:00:00 2001 From: cmodi-meta <98582575+cmodi-meta@users.noreply.github.com> Date: Tue, 24 Sep 2024 16:21:05 -0700 Subject: [PATCH 2/2] Adding specific 26.3.11579264 Android NDK version --- backends/vulkan/README.md | 4 ++-- backends/vulkan/docs/android_demo.md | 2 +- .../android/LlamaDemo/docs/delegates/mediatek_README.md | 2 +- .../android/LlamaDemo/docs/delegates/xnnpack_README.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backends/vulkan/README.md b/backends/vulkan/README.md index 31d2b63a5b6..013833fc837 100644 --- a/backends/vulkan/README.md +++ b/backends/vulkan/README.md @@ -137,12 +137,12 @@ compile the Vulkan Compute Library's GLSL compute shaders. The Vulkan Delegate libraries can be built by setting `-DEXECUTORCH_BUILD_VULKAN=ON` when building with CMake. -First, make sure that you have the Android NDK installed - Android NDK r26d is +First, make sure that you have the Android NDK installed - Android NDK 26.3.11579264 is recommended. The Android SDK should also be installed so that you have access to `adb`. ```shell -# Recommended version is Android NDK r26d. +# Recommended version is Android NDK 26.3.11579264. export ANDROID_NDK= # Select an appropriate Android ABI export ANDROID_ABI=arm64-v8a diff --git a/backends/vulkan/docs/android_demo.md b/backends/vulkan/docs/android_demo.md index 0471d102894..0ddf885bb64 100644 --- a/backends/vulkan/docs/android_demo.md +++ b/backends/vulkan/docs/android_demo.md @@ -28,7 +28,7 @@ Tutorial in order to install the specified versions of the Android NDK and the Android SDK. ```shell -# Recommended version is Android NDK r26d. +# Recommended version is Android NDK 26.3.11579264. export ANDROID_NDK= # Select an appropriate Android ABI export ANDROID_ABI=arm64-v8a diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md index 87881bb8730..b0567d11fd1 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/mediatek_README.md @@ -5,7 +5,7 @@ More specifically, it covers: 2. Building and linking libraries that are required to inference on-device for Android platform using MediaTek AI accelerators. 3. Loading the needed files on the device and running inference. -Verified on MacOS, Linux CentOS (model export), Python 3.10, Android NDK r26d +Verified on MacOS, Linux CentOS (model export), Python 3.10, Android NDK 26.3.11579264 Phone verified: MediaTek Dimensity 9300 (D9300) chip. ## Prerequisites diff --git a/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md b/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md index cc48f12b400..fd1ad5b5372 100644 --- a/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md +++ b/examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md @@ -14,7 +14,7 @@ Phone verified: OnePlus 12. Samsung S23 (Llama only), Samsung S24+ (Llama only), ## Prerequisites * Install [Java 17 JDK](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html). -* Install the [Android SDK API Level 34](https://developer.android.com/about/versions/15/setup-sdk) and [Android NDK r26d](https://developer.android.com/studio/projects/install-ndk). +* Install the [Android SDK API Level 34](https://developer.android.com/about/versions/15/setup-sdk) and [Android NDK 26.3.11579264](https://developer.android.com/studio/projects/install-ndk). * If you have Android Studio set up, you can install them with * Android Studio Settings -> Language & Frameworks -> Android SDK -> SDK Platforms -> Check the row with API Level 34. * Android Studio Settings -> Language & Frameworks -> Android SDK -> SDK Tools -> Check NDK (Side by side) row. @@ -22,7 +22,7 @@ Phone verified: OnePlus 12. Samsung S23 (Llama only), Samsung S24+ (Llama only), Supported Host OS: CentOS, macOS Sonoma on Apple Silicon. -Note: This demo app and tutorial has only been validated with arm64-v8a [ABI](https://developer.android.com/ndk/guides/abis), with NDK r26d. +Note: This demo app and tutorial has only been validated with arm64-v8a [ABI](https://developer.android.com/ndk/guides/abis), with NDK 26.3.11579264.