Skip to content

Commit 21ebcf7

Browse files
committed
Update base for Update on "[ET-VK][10/n] copy node, aten.repeat"
1. Introduce a `CopyNode` for generic copy-with-offset operations. 2. `aten.repeat` on all dimensions. 2.1 Use `CopyNode` where possible. 2.2. Specialized `repeat_channel` shader to handle packings 3. Update codegen to support `Methods` variant only operations. Need a new route to trigger the dispatch. Differential Revision: [D56499329](https://our.internmc.facebook.com/intern/diff/D56499329/) [ghstack-poisoned]
2 parents 7d11e62 + b669056 commit 21ebcf7

File tree

8 files changed

+160
-113
lines changed

8 files changed

+160
-113
lines changed

.github/workflows/android.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,12 @@ jobs:
4848
# Build Android demo app
4949
bash build/test_android_ci.sh
5050
51-
# Strip libraries for uploda
52-
strip cmake-out-android-arm64-v8a/lib/*.a cmake-out-android-arm64-v8a/extension/android/*.so
53-
strip cmake-out-android-x86_64/lib/*.a cmake-out-android-x86_64/extension/android/*.so
54-
5551
mkdir -p artifacts-to-be-uploaded
56-
mkdir -p artifacts-to-be-uploaded/arm64-v8a/
57-
mkdir -p artifacts-to-be-uploaded/x86_64/
58-
# Copy the jar to S3
59-
cp extension/android/build/libs/executorch.jar artifacts-to-be-uploaded/
6052
# Copy the app and its test suite to S3
6153
cp examples/demo-apps/android/LlamaDemo/app/build/outputs/apk/debug/*.apk artifacts-to-be-uploaded/
6254
cp examples/demo-apps/android/LlamaDemo/app/build/outputs/apk/androidTest/debug/*.apk artifacts-to-be-uploaded/
63-
# Also copy the libraries
64-
cp cmake-out-android-arm64-v8a/lib/*.a artifacts-to-be-uploaded/arm64-v8a/
65-
cp cmake-out-android-arm64-v8a/extension/android/*.so artifacts-to-be-uploaded/arm64-v8a/
66-
cp cmake-out-android-x86_64/lib/*.a artifacts-to-be-uploaded/x86_64/
67-
cp cmake-out-android-x86_64/extension/android/*.so artifacts-to-be-uploaded/x86_64/
55+
# Also copy the share libraries
56+
cp cmake-out-android/lib/*.a artifacts-to-be-uploaded/
6857
6958
# Upload the app and its test suite to S3 so that they can be downloaded by the test job
7059
upload-artifacts:

build/test_android_ci.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,18 @@
88
set -ex
99

1010
# https://github.com/pytorch/executorch/tree/main/examples/demo-apps/android/ExecuTorchDemo
11-
export_model() {
11+
build_executorch() {
1212
MODEL_NAME=dl3
1313
# Delegating DeepLab v3 to XNNPACK backend
1414
python -m examples.xnnpack.aot_compiler --model_name="${MODEL_NAME}" --delegate
1515

1616
ASSETS_DIR=examples/demo-apps/android/ExecuTorchDemo/app/src/main/assets/
1717
mkdir -p "${ASSETS_DIR}"
1818
cp "${MODEL_NAME}_xnnpack_fp32.pte" "${ASSETS_DIR}"
19-
}
2019

21-
build_android_native_library() {
22-
pushd examples/demo-apps/android/LlamaDemo
23-
CMAKE_OUT="cmake-out-android-$1" ANDROID_NDK=/opt/ndk ANDROID_ABI="$1" ./gradlew setup
24-
popd
20+
rm -rf cmake-out && mkdir cmake-out
21+
ANDROID_NDK=/opt/ndk BUCK2=$(which buck2) FLATC=$(which flatc) ANDROID_ABI=arm64-v8a \
22+
bash examples/demo-apps/android/ExecuTorchDemo/setup.sh
2523
}
2624

2725
build_android_demo_app() {
@@ -32,13 +30,12 @@ build_android_demo_app() {
3230

3331
build_android_llama_demo_app() {
3432
pushd examples/demo-apps/android/LlamaDemo
33+
ANDROID_NDK=/opt/ndk ANDROID_ABI=arm64-v8a ./gradlew setup
3534
ANDROID_HOME=/opt/android/sdk ./gradlew build
3635
ANDROID_HOME=/opt/android/sdk ./gradlew assembleAndroidTest
3736
popd
3837
}
3938

40-
build_android_native_library arm64-v8a
41-
build_android_native_library x86_64
42-
export_model
39+
build_executorch
4340
build_android_demo_app
4441
build_android_llama_demo_app

0 commit comments

Comments
 (0)