-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Fix OpenBLAS detection under Arch Linux #1173
Conversation
@ggerganov ping |
CMakeLists.txt
Outdated
set(BLA_STATIC 1) | ||
set(BLA_VENDOR ${WHISPER_BLAS_VENDOR}) | ||
set(BLAS_STATIC 1) | ||
set(BLAS_VENDOR ${WHISPER_BLAS_VENDOR}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not look right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that, reverted the offending lines.
Actually, I need to remove |
___________________
Stephen D. Scotti, M.D.
Some Idiots Are Savants
***@***.***
Mobile: +1 651 313 0209
Address: 2508 Delaware St SE, Unit 163, Minneapolis, MN 55414
https://http://www.linkedin.com/in/stephen-d-scotti
https://github.com/sscotti
https://idiots-are-savants.com (for fun). https://www.sias.dev (for business)
…___________________
The content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to share any part of this message with any third party, without a written consent of the sender. If you received this message by mistake, please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future.
---- On Mon, 21 Aug 2023 02:17:44 +0200 Marcin Mielniczuk ***@***.***> wrote ---
Actually, I need to remove BLA_STATIC and BLA_INTEGER_SIZE 8 to have OpenBLAS found under Arch Linux. The library is shipping only as an .so library. For some reason, CMake doesn't detect /usr/lib/libopenblas_64.so, only /usr/lib/libopenblas.so,
—
Reply to this email directly, #1173 (comment), or https://github.com/notifications/unsubscribe-auth/AABZ3BPXN5M33NMX3MDORG3XWKSKRANCNFSM6AAAAAA3NCGG5E.
You are receiving this because you are subscribed to this thread.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 156 to 165 in b551dd3
if(BLAS_FOUND) | |
message(STATUS "BLAS compatible library found") | |
message(STATUS "Libraries ${BLAS_LIBRARIES}") | |
find_path(BLAS_INCLUDE_DIRS cblas.h /usr/include/openblas /usr/local/include/openblas $ENV{BLAS_HOME}/include) | |
set(WHISPER_EXTRA_FLAGS ${WHISPER_EXTRA_FLAGS} -DGGML_USE_OPENBLAS) | |
include_directories(${BLAS_INCLUDE_DIRS}) | |
set(WHISPER_EXTRA_LIBS ${WHISPER_EXTRA_LIBS} ${BLAS_LIBRARIES}) | |
else() | |
message(WARNING "BLAS library was not found") | |
endif() |
I'm a bit puzzled by L159
. If CMake can already detect BLAS and set the BLAS_FOUND
variable to true
, then why do we need find_path()
?
Result Variables
^^^^^^^^^^^^^^^^
This module defines the following variables:
``BLAS_FOUND``
library implementing the BLAS interface is found
``BLAS_LINKER_FLAGS``
uncached list of required linker flags (excluding ``-l`` and ``-L``).
``BLAS_LIBRARIES``
uncached list of libraries (using full path name) to link against
to use BLAS (may be empty if compiler implicitly links BLAS)
``BLAS95_LIBRARIES``
uncached list of libraries (using full path name) to link against
to use BLAS95 interface
``BLAS95_FOUND``
library implementing the BLAS95 interface is found
Line 153 in b551dd3
set(BLA_SIZEOF_INTEGER 8) |
This line raises a concern for me. Using 8
implies we're only searching for the 64-bit package. We can't just assume that every user has installed the 64-bit version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FindBLAS
doesn't detect the include dirs, L159 was adapted from https://stackoverflow.com/questions/39748767/find-blas-include-directory-with-cmake. Also, see https://gitlab.kitware.com/cmake/cmake/-/issues/20268
/usr/include/openblas is used under ARch Linux