File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
examples/demo-apps/android/LlamaDemo Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ adb push model.pte /data/local/tmp/llama
14
14
adb push tokenizer.bin /data/local/tmp/llama
15
15
```
16
16
17
+ The demo app searches in ` /data/local/tmp/llama ` for .pte and .bin files as LLAMA model and tokenizer.
18
+
17
19
## Build JNI library
18
20
1 . Open a terminal window and navigate to the root directory of the ` executorch ` .
19
21
2 . Set the following environment variables:
@@ -48,23 +50,13 @@ cmake .. -DBUCK2="$BUCK" \
48
50
cmake --build . -j50
49
51
popd
50
52
```
51
- 6 .
52
- Copy the built library to your app:
53
+ 6 . Copy the built library to your app:
53
54
```
54
55
JNI_LIBS_PATH="examples/demo-apps/android/LlamaDemo/app/src/main/jniLibs"
55
56
mkdir -p "${JNI_LIBS_PATH}/${ANDROID_ABI}"
56
57
cp cmake-out/extension/android/libexecutorch_llama_jni.so "${JNI_LIBS_PATH}/${ANDROID_ABI}/"
57
58
```
58
59
59
- ## Build Java library
60
- The Java part of the ExecuTorch library can be built with gradlew:
61
- ```
62
- pushd extension/android
63
- ./gradlew build
64
- popd
65
- ```
66
- In the android app, we set up the relative path to the built aar, so no further action is needed.
67
-
68
60
## Build Java app
69
61
1 . Open Android Studio and select "Open an existing Android Studio project" to open examples/demo-apps/android/LlamaDemo.
70
62
2 . Run the app (^R).
You can’t perform that action at this time.
0 commit comments