Skip to content
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

Prefer pkg-config while looking for BLAS #1349

Merged
merged 1 commit into from Oct 7, 2023
Merged

Conversation

marmistrz
Copy link
Contributor

It turns out that BLAS is still not working on Arch Linux and FindBLAS.cmake fails to find libopenblas_64.so provided by openblas64 (note that Arch Linux does not have separate -dev packages).

This fixes it on Arch Linux. Even though the library libopenblas.so (32-bit) is detected, the performance difference is negligible on my system and it's better than nothing at all.

@bobqianic
Copy link
Collaborator

the performance difference is negligible on my system and it's better than nothing at all.

That's odd. I'd expect OpenBLAS to perform much better than ggml on a CPU. I'll review this PR soon. Can you provide more details about your hardware and system?

@marmistrz
Copy link
Contributor Author

the performance difference is negligible on my system and it's better than nothing at all.

That's odd. I'd expect OpenBLAS to perform much better than ggml on a CPU. I'll review this PR soon. Can you provide more details about your hardware and system?

I mean the difference between openblas and openblas64, not openblas and ggml

@bobqianic
Copy link
Collaborator

I mean the difference between openblas and openblas64, not openblas and ggml

Ah, I see.

@bobqianic bobqianic merged commit 80bf931 into ggerganov:master Oct 7, 2023
35 checks passed
@marmistrz
Copy link
Contributor Author

marmistrz commented Oct 7, 2023

Btw., the reason why we can't find openblas64 with CMake without pkgconfig are these lines:
https://github.com/Kitware/CMake/blob/bc82d62b1bb484aabb1fdbb563c44f6e7cffb55f/Modules/FindBLAS.cmake#L748-L750

If the lines are changed to

  if(_blas_sizeof_integer EQUAL 8)
    string(APPEND _blas_openblas_lib "_64")
  endif()

then /usr/lib/libopenblas_64.so is correctly detected without having to use pkgconfig.

jacobwu-b pushed a commit to jacobwu-b/Transcriptify-by-whisper.cpp that referenced this pull request Oct 24, 2023
jacobwu-b pushed a commit to jacobwu-b/Transcriptify-by-whisper.cpp that referenced this pull request Oct 24, 2023
vonstring pushed a commit to vonstring/whisper.cpp that referenced this pull request Nov 7, 2023
landtanin pushed a commit to landtanin/whisper.cpp that referenced this pull request Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants