ggml-org/whisper.cpp

CMake: issues with changes to BLAS introduced in #927, wrong use of nonexistent BLAS_INCLUDE_DIRS

開放

#1,028 建立於 2023年6月17日

 (1 則留言) (0 個反應) (0 位負責人)C++ (6,078 個分叉)batch import
buildgood first issue

倉庫指標

星標
 (53,008 顆星)
PR 合併指標
 (平均合併 5天 20小時) (30 天內合併 36 個 PR)

描述

Hey,

PR #927 switched from openblas to supporting generic blas providers. This is done using CMakes official FindBLAS.cmake. However, this implementation comes with known limitations and does not actually provide BLAS_INCLUDE_DIRS.
The current implementation will therefore work only if the system or chosen blas uses the /usr/inlude folder, which is often not the case.

For example, on my system, which I have set to openblas, the include dir is /usr/include/openblas64:

File: /usr/lib/pkgconfig/blas64.pc
libdir=/usr/lib
libsuffix=_64
includedir=/usr/include/openblas64

openblas_config=USE_64BITINT=1 NO_CBLAS= NO_LAPACK= NO_LAPACKE= DYNAMIC_ARCH=ON DYNAMIC_OLDER=OFF NO_AFFINITY=ON USE_OPENMP=1 SKYLAKEX MAX_THREADS=64
Name: OpenBLAS
Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version
Version:
URL: https://github.com/xianyi/OpenBLAS
Libs: -fopenmp -L${libdir} -lopenblas${libsuffix}
Cflags: -I${includedir}

You might want to look at how other projects have implemented findBLAS:

貢獻者指南