-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2024-04-02 nightly release (c731673)
- Loading branch information
pytorchbot
committed
Apr 2, 2024
1 parent
5fb326d
commit efe6568
Showing
203 changed files
with
13,245 additions
and
1,210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under the BSD-style license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
set -exu | ||
|
||
# shellcheck source=/dev/null | ||
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh" | ||
|
||
install_executorch_and_backend_lib() { | ||
echo "Installing executorch and xnnpack backend" | ||
rm -rf cmake-android-out && mkdir cmake-android-out | ||
ANDROID_NDK=/opt/ndk | ||
BUCK2=buck2 | ||
ANDROID_ABI=arm64-v8a | ||
cmake -DBUCK2="${BUCK2}" \ | ||
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK}/build/cmake/android.toolchain.cmake" \ | ||
-DANDROID_ABI="${ANDROID_ABI}" \ | ||
-DANDROID_PLATFORM=android-23 \ | ||
-DCMAKE_INSTALL_PREFIX=cmake-android-out \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \ | ||
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \ | ||
-DEXECUTORCH_BUILD_XNNPACK=ON \ | ||
-DEXECUTORCH_BUILD_OPTIMIZED=ON \ | ||
-DXNNPACK_ENABLE_ARM_BF16=OFF \ | ||
-Bcmake-android-out . | ||
|
||
cmake --build cmake-android-out -j4 --target install --config Release | ||
} | ||
|
||
build_llama_runner() { | ||
echo "Building llama runner for Android..." | ||
ANDROID_ABI=arm64-v8a | ||
cmake -DBUCK2="${BUCK2}" \ | ||
-DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK"/build/cmake/android.toolchain.cmake \ | ||
-DANDROID_ABI="${ANDROID_ABI}" \ | ||
-DANDROID_PLATFORM=android-23 \ | ||
-DCMAKE_INSTALL_PREFIX=cmake-android-out \ | ||
-DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=python \ | ||
-DEXECUTORCH_BUILD_OPTIMIZED=ON \ | ||
-Bcmake-android-out/examples/models/llama2 examples/models/llama2 | ||
|
||
cmake --build cmake-android-out/examples/models/llama2 -j4 --config Release | ||
} | ||
install_flatc_from_source | ||
install_executorch_and_backend_lib | ||
build_llama_runner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build ExecuTorch Android demo apps | ||
name: Android | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.