Skip to content

Commit 0b671f3

Browse files
kirklandsignfacebook-github-bot
authored andcommitted
Clean up Android prebuilt artifact path and verification (#6181)
Summary: In main branch, use dated artifacts like https://ossci-android.s3.amazonaws.com/executorch/release/executorch-241002/executorch.aar In release branch, use something like release/0.4 Automate shasum check Pull Request resolved: #6181 Reviewed By: mergennachin Differential Revision: D64261746 Pulled By: kirklandsign fbshipit-source-id: 0c3e895eb44ed50cb009d8daff8b51b750a1dda5
1 parent 37e7d92 commit 0b671f3

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

docs/source/android-prebuilt-library.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@ We provide two prebuilt Android libraries (AAR), `executorch.aar` for generic us
44

55
## Contents of libraries
66
- `executorch.aar`
7-
- [Java library](https://github.com/pytorch/executorch/tree/release/0.3/extension/android/src/main/java/org/pytorch/executorch)
8-
- JNI contains the JNI binding for [NativePeer.java](https://github.com/pytorch/executorch/blob/release/0.3/extension/android/src/main/java/org/pytorch/executorch/NativePeer.java) and ExecuTorch native library, including core ExecuTorch runtime libraries, XNNPACK backend, Portable kernels, Optimized kernels, and Quantized kernels.
7+
- [Java library](https://github.com/pytorch/executorch/tree/main/extension/android/src/main/java/org/pytorch/executorch)
8+
- JNI contains the JNI binding for [NativePeer.java](https://github.com/pytorch/executorch/blob/main/extension/android/src/main/java/org/pytorch/executorch/NativePeer.java) and ExecuTorch native library, including core ExecuTorch runtime libraries, XNNPACK backend, Portable kernels, Optimized kernels, and Quantized kernels.
99
- Comes with two ABI variants, arm64-v8a and x86_64.
1010
- `executorch_llama.aar`
11-
- [Java library](https://github.com/pytorch/executorch/tree/release/0.3/extension/android/src/main/java/org/pytorch/executorch) (Note: it contains the same Java classes as the previous Java, but it does not contain the JNI binding for generic Module/NativePeer Java code).
12-
- JNI contains the JNI binding for [LlamaModule.java](https://github.com/pytorch/executorch/blob/release/0.3/extension/android/src/main/java/org/pytorch/executorch/LlamaModule.java) and ExecuTorch native library, including core ExecuTorch runtime libraries, XNNPACK backend, Portable kernels, Optimized kernels, Quantized kernels, and LLAMA-specific Custom ops library.
11+
- [Java library](https://github.com/pytorch/executorch/tree/main/extension/android/src/main/java/org/pytorch/executorch) (Note: it contains the same Java classes as the previous Java, but it does not contain the JNI binding for generic Module/NativePeer Java code).
12+
- JNI contains the JNI binding for [LlamaModule.java](https://github.com/pytorch/executorch/blob/main/extension/android/src/main/java/org/pytorch/executorch/LlamaModule.java) and ExecuTorch native library, including core ExecuTorch runtime libraries, XNNPACK backend, Portable kernels, Optimized kernels, Quantized kernels, and LLAMA-specific Custom ops library.
1313
- Comes with two ABI variants, arm64-v8a and x86_64.
1414

1515
## Downloading AAR
16-
[executorch.aar](https://ossci-android.s3.us-west-1.amazonaws.com/executorch/release/0.3/executorch.aar)
17-
[executorch_llama.aar](https://ossci-android.s3.us-west-1.amazonaws.com/executorch/release/0.3/executorch-llama.aar)
18-
[SHA1SUMS](https://ossci-android.s3.us-west-1.amazonaws.com/executorch/release/0.3/SHA1SUMS)
16+
[executorch.aar](https://ossci-android.s3.amazonaws.com/executorch/release/executorch-241002/executorch.aar)
17+
[executorch.aar.sha256sums](https://ossci-android.s3.amazonaws.com/executorch/release/executorch-241002/executorch.aar.sha256sums)
1918

2019
## Using prebuilt libraries
2120

@@ -24,7 +23,7 @@ To add the Java library to your app, simply download the AAR, and add it to your
2423
In your app working directory, such as example executorch/examples/demo-apps/android/LlamaDemo,
2524
```
2625
mkdir -p app/libs
27-
curl https://ossci-android.s3.us-west-1.amazonaws.com/executorch/release/0.3/executorch-llama.aar -o app/libs/executorch.aar
26+
curl https://ossci-android.s3.amazonaws.com/executorch/release/executorch-241002/executorch.aar -o app/libs/executorch-llama.aar
2827
```
2928

3029
And include it in gradle:

examples/demo-apps/android/LlamaDemo/download_prebuilt_lib.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
set -eu
99

10-
AAR_URL="https://ossci-android.s3.us-west-1.amazonaws.com/executorch/release/0.3/executorch-llama.aar"
11-
AAR_SHASUM="f06cc1606e5e05f00fd0ae721f5d37d56124fd28"
12-
10+
AAR_URL="https://ossci-android.s3.us-west-1.amazonaws.com/executorch/release/executorch-241002/executorch.aar"
11+
AAR_SHASUM_URL="https://ossci-android.s3.us-west-1.amazonaws.com/executorch/release/executorch-241002/executorch.aar.sha256sums"
1312
LIBS_PATH="$(dirname "$0")/app/libs"
14-
AAR_PATH="${LIBS_PATH}/executorch-llama.aar"
1513

1614
mkdir -p "$LIBS_PATH"
1715

18-
if [[ ! -f "${AAR_PATH}" || "${AAR_SHASUM}" != $(shasum "${AAR_PATH}" | awk '{print $1}') ]]; then
19-
curl "${AAR_URL}" -o "${AAR_PATH}"
20-
fi
16+
pushd "$LIBS_PATH"
17+
curl -O "${AAR_SHASUM_URL}"
18+
sed -i -e 's/executorch.aar/executorch-llama.aar/g' executorch.aar.sha256sums
19+
shasum --check --status executorch.aar.sha256sums || curl "${AAR_URL}" -o executorch-llama.aar
20+
popd

0 commit comments

Comments
 (0)