Skip to content
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

Clarify instructions for CLBlast on Android #706

Merged
merged 9 commits into from
Jan 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Tabs to spaces
  • Loading branch information
luciferous committed Jan 24, 2024
commit e9145ec89573dd2ec53e7c9b897a56d9a0bab167
26 changes: 13 additions & 13 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,25 +178,25 @@ if (GGML_OPENBLAS)
endif()

if (GGML_CLBLAST)
set(CLBLAST_INCLUDE_SEARCH_PATHS
set(CLBLAST_INCLUDE_SEARCH_PATHS
/usr/include
/usr/local/include
$ENV{CLBLAST_HOME}
$ENV{CLBLAST_HOME}/include
$ENV{CLBLAST_HOME}
$ENV{CLBLAST_HOME}/include
)
find_path(CLBLAST_INC NAMES clblast.h PATHS ${CLBLAST_INCLUDE_SEARCH_PATHS})
find_library(CLBLAST_LIB NAMES clblast)
find_library(OPENCL_LIB NAMES OpenCL)
if (CLBLAST_LIB AND OPENCL_LIB AND CLBLAST_INC)
message(STATUS "clBLAST found")
find_path(CLBLAST_INC NAMES clblast.h PATHS ${CLBLAST_INCLUDE_SEARCH_PATHS})
find_library(CLBLAST_LIB NAMES clblast)
find_library(OPENCL_LIB NAMES OpenCL)
if (CLBLAST_LIB AND OPENCL_LIB AND CLBLAST_INC)
message(STATUS "clBLAST found")

set(GGML_EXTRA_INCS ${GGML_EXTRA_INCS} ${CLBLAST_INC})
set(GGML_EXTRA_LIBS ${GGML_EXTRA_LIBS} ${CLBLAST_LIB} ${OPENCL_LIB})
set(GGML_EXTRA_FLAGS ${GGML_EXTRA_FLAGS} -DGGML_USE_CLBLAST)
set(GGML_EXTRA_INCS ${GGML_EXTRA_INCS} ${CLBLAST_INC})
set(GGML_EXTRA_LIBS ${GGML_EXTRA_LIBS} ${CLBLAST_LIB} ${OPENCL_LIB})
set(GGML_EXTRA_FLAGS ${GGML_EXTRA_FLAGS} -DGGML_USE_CLBLAST)

set(GGML_OPENCL_SOURCES ggml-opencl.cpp ggml-opencl.h)
set(GGML_OPENCL_SOURCES ggml-opencl.cpp ggml-opencl.h)

link_libraries("-Wl,--copy-dt-needed-entries")
link_libraries("-Wl,--copy-dt-needed-entries")
else()
message(WARNING "clBLAST not found")
endif()
Expand Down