Repository navigation
Conversation
|
You added this before in #992 and it was removed in #1536, but I'm not sure why. |
|
The way that I use BLAS_INCLUDE_DIRS here is to allow users to assign the path using A better way might be to provide a custom FindBlas cmake that appends the cflags from pkg-config directly, what do you think? |
|
@katsu560 does this patch works on your system? diff --git a/CMakeLists.txt b/CMakeLists.txt
index 19cd42d..b6c1fd3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,8 +158,27 @@ if (LLAMA_BLAS)
if ($(CMAKE_VERSION) VERSION_GREATER_EQUAL 3.22)
set(BLA_SIZEOF_INTEGER 8)
endif()
+ find_package(PkgConfig REQUIRED)
+ if (${LLAMA_BLAS_VENDOR} MATCHES "Generic")
+ pkg_check_modules(DepBLAS REQUIRED blas)
+ if (DepBLAS_FOUND)
+ set(BLAS_INCLUDE_DIRS ${DepBLAS_INCLUDE_DIRS})
+ endif()
+ elseif (${LLAMA_BLAS_VENDOR} MATCHES "OpenBLAS")
+ pkg_check_modules(DepBLAS REQUIRED openblas)
+ if (DepBLAS_FOUND)
+ set(BLAS_INCLUDE_DIRS ${DepBLAS_INCLUDE_DIRS})
+ endif()
+ elseif (${LLAMA_BLAS_VENDOR} MATCHES "FLAME")
+ pkg_check_modules(DepBLAS REQUIRED blis)
+ if (DepBLAS_FOUND)
+ set(BLAS_INCLUDE_DIRS ${DepBLAS_INCLUDE_DIRS})
+ endif()
+ endif()
+
set(BLA_VENDOR ${LLAMA_BLAS_VENDOR})
find_package(BLAS)
|
|
Decided to merge #1830 instead of this one. |
|
Hi grencez, zenixls2 and Gerganov. Yes, the zenixls2' s patch works good on my system. But, Gerganov's latest code #1830 doesn't works for me. So, I think that it is necessary zenixls2's patch. |
|
@zenixls2 |
|
Sure. Thanks for the confirmation. |
|
@ggerganov i think he answered in #1886 |
Hi, Gerganov. Thank you for sharing awesome thing.
Latest source meets following compile error on Linux environment.
Because BLAS cmake package can't find include header directory.
I added some code to CMakeLists.txt to resolve above issue.
Please confirm my pull-request.
Thanks.