Used local copy of CLBlast instead of installed one

This commit is contained in:
l3utterfly 2023-06-14 15:09:05 +08:00
parent 2d247e3c11
commit 9d2f4a8000

View file

@ -233,18 +233,14 @@ if (LLAMA_K_QUANTS)
endif() endif()
if (LLAMA_CLBLAST) if (LLAMA_CLBLAST)
find_package(CLBlast) # build CLBlast from source
if (CLBlast_FOUND) add_subdirectory(../CLBlast ${CMAKE_CURRENT_BINARY_DIR}/clblast)
message(STATUS "CLBlast found")
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) set(LLAMA_EXTRA_LIBS ${LLAMA_EXTRA_LIBS} clblast)
else()
message(WARNING "CLBlast not found")
endif()
endif() endif()
if (LLAMA_ALL_WARNINGS) if (LLAMA_ALL_WARNINGS)