Skip to content

Commit 8c860d1

Browse files
authored
Merge pull request #2369 from annietllnd/updates
Update ExecuTorch LPs for Android and RPi 5
2 parents 8a2bab1 + 8636871 commit 8c860d1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

content/learning-paths/embedded-and-microcontrollers/rpi-llama3/llama3.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ cmake -DPYTHON_EXECUTABLE=python \
9090
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=ON \
9191
-DEXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR=ON \
9292
-DEXECUTORCH_BUILD_EXTENSION_LLM_RUNNER=ON \
93+
-DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
9394
-DEXECUTORCH_BUILD_EXTENSION_LLM=ON \
95+
-DEXECUTORCH_BUILD_KERNELS_LLM=ON \
9496
-Bcmake-out .
9597
cmake --build cmake-out -j16 --target install --config Release
9698
```
@@ -101,10 +103,7 @@ Next, compile and build `llama_runner` and `llama_main`:
101103
cmake -DPYTHON_EXECUTABLE=python \
102104
-DCMAKE_INSTALL_PREFIX=cmake-out \
103105
-DCMAKE_BUILD_TYPE=Release \
104-
-DEXECUTORCH_BUILD_KERNELS_CUSTOM=ON \
105106
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
106-
-DEXECUTORCH_BUILD_XNNPACK=ON \
107-
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
108107
-Bcmake-out/examples/models/llama \
109108
examples/models/llama
110109
cmake --build cmake-out/examples/models/llama -j16 --config Release

content/learning-paths/mobile-graphics-and-gaming/build-llama3-chat-android-app-using-executorch-and-xnnpack/5-run-benchmark-on-android.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export ANDROID_NDK=$ANDROID_HOME/ndk/28.0.12433566/
2222
Make sure you can confirm $ANDROID_NDK/build/cmake/android.toolchain.cmake is available for CMake to cross-compile.
2323
{{% /notice %}}
2424

25-
### 2. Build ExecuTorch and associated libraries for Android with KleidiAI
25+
### 2. Build ExecuTorch and associated libraries for Android with KleidiAI
2626

27-
You are now ready to build ExecuTorch for Android by taking advantage of the performance optimization provided by the [KleidiAI](https://gitlab.arm.com/kleidi/kleidiai) kernels.
27+
You are now ready to build ExecuTorch for Android by taking advantage of the performance optimization provided by the [KleidiAI](https://gitlab.arm.com/kleidi/kleidiai) kernels.
2828

2929
Use `cmake` to cross-compile ExecuTorch:
3030

@@ -119,7 +119,7 @@ adb push cmake-out-android/examples/models/llama/llama_main /data/local/tmp/llam
119119
Use the Llama runner to execute the model on the phone with the `adb` command:
120120

121121
``` bash
122-
adb shell "cd /data/local/tmp/llama && ./llama_main --model_path llama3_1B_kv_sdpa_xnn_qe_4_64_1024_embedding_4bit.pte --tokenizer_path tokenizer.model --prompt "<|start_header_id|>system<|end_header_id|>\nYour name is Cookie. you are helpful, polite, precise, concise, honest, good at writing. You always give precise and brief answers up to 32 words<|eot_id|><|start_header_id|>user<|end_header_id|>\nHey Cookie! how are you today?<|eot_id|><|start_header_id|>assistant<|end_header_id|>" --warmup=1 --cpu_threads=5"
122+
adb shell "cd /data/local/tmp/llama && ./llama_main --model_path llama3_1B_kv_sdpa_xnn_qe_4_64_1024_embedding_4bit.pte --tokenizer_path tokenizer.model --prompt '<|start_header_id|>system<|end_header_id|>\nYour name is Cookie. you are helpful, polite, precise, concise, honest, good at writing. You always give precise and brief answers up to 32 words<|eot_id|><|start_header_id|>user<|end_header_id|>\nHey Cookie! how are you today?<|eot_id|><|start_header_id|>assistant<|end_header_id|>' --warmup=1 --cpu_threads=5"
123123
```
124124

125125
The output should look something like this.

0 commit comments

Comments
 (0)