From 9d2f4a8000b7be85a5a19e78ccbf64cff16558c0 Mon Sep 17 00:00:00 2001 From: l3utterfly Date: Wed, 14 Jun 2023 15:09:05 +0800 Subject: [PATCH] Used local copy of CLBlast instead of installed one --- CMakeLists.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59140bb58..b5f25bf87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -233,18 +233,14 @@ if (LLAMA_K_QUANTS) endif() if (LLAMA_CLBLAST) - find_package(CLBlast) - if (CLBlast_FOUND) - message(STATUS "CLBlast found") + # build CLBlast from source + add_subdirectory(../CLBlast ${CMAKE_CURRENT_BINARY_DIR}/clblast) - set(GGML_SOURCES_OPENCL ggml-opencl.cpp ggml-opencl.h) + set(GGML_SOURCES_OPENCL ggml-opencl.cpp ggml-opencl.h) - add_compile_definitions(GGML_USE_CLBLAST) + add_compile_definitions(GGML_USE_CLBLAST) - set(LLAMA_EXTRA_LIBS ${LLAMA_EXTRA_LIBS} clblast) - else() - message(WARNING "CLBlast not found") - endif() + set(LLAMA_EXTRA_LIBS ${LLAMA_EXTRA_LIBS} clblast) endif() if (LLAMA_ALL_WARNINGS)