-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Bug: OpenBLAS compile for Android doesn‘t work in Ubuntu 22.04 #9039
Comments
Per #8006, these options have changed names. Use |
oppps,it's my fault,not a issue. |
@jeroen-mostert I have updated this issue,can you help me? What is the right way to build OpenBLAS in Ubuntu 22? |
I don't have an Ubuntu install at the ready. Check where the package installs the headers and pass the |
On Ubuntu 22.04, I started having build issues this week with I'll build OpenBLAS on a clean 22.04 instance without CUDA installed if that helps you troubleshoot. First please let us know here if following Jeroen's comment and these updated build instructions works in your current clone or a new, clean one. e.g. use
instead of
and pass the |
yes,I am using I am using Ubuntu 22,and I used apt to install OpenBLAS:
while when I use
there are no headers nor libraries.
these libraries are coming from but I still can't find related headers:
Append: Although I found
and set env:
it doesn's work,same error here. |
I tested it. On a fresh install of Ubuntu 22.04, you need:
After this:
No further tweaks should be necessary. Note that using a separate build dir and completely removing it before invoking As an aside, the distro-supplied OpenBLAS will likely not be optimized for the architecture you're running on, so another option is to build OpenBLAS from source (this is easy since it has no dependencies other than what's already included in |
Thank u very much sir,I found that I can compile llama.cpp with OpenBLAS for Linux x86_64 in my Ubuntu,but When I execute cross-platform compile for Android arm64v8 it still report can't find OpenBLAS,details:
|
Ah, I see. You kinda sorta mentioned this in your first post through the commands, but it's easy to miss. This issue is misnamed; it's not about building with OpenBLAS on Ubuntu 22.04, your issue is specifically about building for Android using OpenBLAS. This is a completely different scenario since obviously we can't use the system's OpenBLAS installation, you need to build OpenBLAS for Android separately and make it available to CMake. This is not specific to llama.cpp, nor even specific to Ubuntu. I have zero experience building anything for Android and I won't be using this issue as an opportunity to learn. The linked instructions may be out of date and need some tweaking. Then, if you have a build, making things available to CMake is its own challenge. After that, of course, you also have to get OpenBLAS on the Android system, since it's not there by default. Static linking might help there, but last time I tried it (in a different context) CMake kind of insisted on a dynamic link to the BLAS libs even when building GGML statically, so that's yet another hurdle to clear. Consider if you really need BLAS; if not just building with CPU backend support should be sufficient to get things working on Android. Note that our Android build instructions do not mention using any BLAS implementation; I don't know how much, if any, acceleration is to be expected from using OpenBLAS instead, it may well be a regression. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
What happened?
I have followed the guide and install OpenBLAS first:
and I used the command to compile:
and I see these warnings:
I checked CMakeCache.txt and found that the OpenBLAS library didn't get the right path.
Name and Version
version:
commit 97bdd26 (HEAD, tag: b3400)
What operating system are you seeing the problem on?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: