File tree Expand file tree Collapse file tree 2 files changed +8
-22
lines changed Expand file tree Collapse file tree 2 files changed +8
-22
lines changed Original file line number Diff line number Diff line change @@ -48,23 +48,12 @@ jobs:
48
48
# Build Android demo app
49
49
bash build/test_android_ci.sh
50
50
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
-
55
51
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/
60
52
# Copy the app and its test suite to S3
61
53
cp examples/demo-apps/android/LlamaDemo/app/build/outputs/apk/debug/*.apk artifacts-to-be-uploaded/
62
54
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/
68
57
69
58
# Upload the app and its test suite to S3 so that they can be downloaded by the test job
70
59
upload-artifacts :
Original file line number Diff line number Diff line change 8
8
set -ex
9
9
10
10
# https://github.com/pytorch/executorch/tree/main/examples/demo-apps/android/ExecuTorchDemo
11
- export_model () {
11
+ build_executorch () {
12
12
MODEL_NAME=dl3
13
13
# Delegating DeepLab v3 to XNNPACK backend
14
14
python -m examples.xnnpack.aot_compiler --model_name=" ${MODEL_NAME} " --delegate
15
15
16
16
ASSETS_DIR=examples/demo-apps/android/ExecuTorchDemo/app/src/main/assets/
17
17
mkdir -p " ${ASSETS_DIR} "
18
18
cp " ${MODEL_NAME} _xnnpack_fp32.pte" " ${ASSETS_DIR} "
19
- }
20
19
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
25
23
}
26
24
27
25
build_android_demo_app () {
@@ -32,13 +30,12 @@ build_android_demo_app() {
32
30
33
31
build_android_llama_demo_app () {
34
32
pushd examples/demo-apps/android/LlamaDemo
33
+ ANDROID_NDK=/opt/ndk ANDROID_ABI=arm64-v8a ./gradlew setup
35
34
ANDROID_HOME=/opt/android/sdk ./gradlew build
36
35
ANDROID_HOME=/opt/android/sdk ./gradlew assembleAndroidTest
37
36
popd
38
37
}
39
38
40
- build_android_native_library arm64-v8a
41
- build_android_native_library x86_64
42
- export_model
39
+ build_executorch
43
40
build_android_demo_app
44
41
build_android_llama_demo_app
You can’t perform that action at this time.
0 commit comments