-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
How to enable OpenCL with llama.cpp in Android App? #3694
Comments
In case you haven't figure it out. The
|
You can try to do cmake with
The libOpenCL.so has been taken from device, the CL headers folder has been taken from https://github.com/KhronosGroup/OpenCL-Headers/tree/main |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
@gpokat cmake finds the library after setting the include, root and libraries flag. But while running
|
@v-prgmr I just repeated steps, so there is how-to to reproduce:
do cmake as below
CMake Deprecation Warning...
do make
Getting libclblast.so |
@gpokat Hope you have a great day there! Thank you for the fix, I can now successfully compile CLBlast for arm64-v8a |
Pointing another thread discussing this topic: #7016 |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
I have run llama.cpp in an Android APP successfully. Now I want to enable OpenCL in Android APP to speed up the inference of LLM.
Current Behavior
Cross-compile OpenCL-SDK
install_android
Cross-compile CLBlast
Could NOT find OpenCL library
. Okay, I think maybe I should set the path of OpenCL somewhere. The detailed logging is as followsin script and add cmake option like
However, they both failed, and it still failed to find OpenCL. I wonder what's the problem and how can I cross-compile CLBlas for android?
Environment and Context
The text was updated successfully, but these errors were encountered: