-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
illegal instruction and crash when run llama-bench (build on android device not cross platform compilation )on android #6995
Comments
We should consider removing Do you receive an illegal instruction on Android CPU inference? Ie. |
Yes, I receive an illegal instruction on Android CPU inference. this is what I have done:
then , I got an illegal instruction BTW, not sure if these instructions matter: |
No, it's not needed. I'm able to reproduce this issue:
Related: main Segfault using cmake & -march=armv8.4a flag Maybe try cmake without
|
It seems that passing Maybe try |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
I wonder if the author has solved the issue? Cuz I'm facing the same problem. Im running "./llama-cli -m ../model/qwen1.5-0.5b-chat-q4_k_m.gguf" on android, and it crashed with "Illegal instruction" after the line: llama_new_context_with_model: graph splits = 1 |
I follow the instruction
https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#building-the-project-using-android-ndk
to build llama.cpp on android device in order to use openblas
here is the steps :
download termux and install :
https://github.com/termux/termux-app/releases
v0.118.0: termux-app_v0.118.0+github-debug_arm64-v8a.apk
change termux repo to USTC use termux-change-repo (because default repo is not available)
pkg install clang wget git cmake
apt install libopenblas
apt install ocl-icd opencl-headers opencl-clhpp clinfo
git clone https://github.com/ggerganov/llama.cpp
git clone https://github.com/CNugteren/CLBlast and compile clblast:
cmake .
make
cp libclblast.so* $PREFIX/lib
cp ./include/clblast.h ../llama.cpp
cp /data/data/com.termux/files/usr/include/openblas/cblas.h .
cp /data/data/com.termux/files/usr/include/openblas/openblas_config.h .
compile llama.cpp
cmake -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23 -DCMAKE_C_FLAGS=-march=armv8.4a+dotprod ..
make LLAMA_CLBLAST=1
export GGML_OPENCL_PLATFORM=0
export GGML_OPENCL_DEVICE=0
export LD_LIBRARY_PATH=/vendor/lib64:$LD_LIBRARY_PATH
it will give me error info : illegal instruction and then it crash
I had tried two android devices , samsung Note 20 Ultra and HUAWEI Mate 40
both of them crash and throw illegal instruction info
The text was updated successfully, but these errors were encountered: