Skip to content

Commit

Permalink
ggml : remove opencl (#0)
Browse files Browse the repository at this point in the history
ggml-ci
  • Loading branch information
ggerganov committed Jun 15, 2024
1 parent c7de875 commit 86f56f1
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 38 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ option(GGML_TEST_COVERAGE "ggml: enable test coverage" OFF)
option(GGML_PERF "ggml: enable perf timings" OFF)
option(GGML_NO_ACCELERATE "ggml: disable Accelerate framework" OFF)
option(GGML_OPENBLAS "ggml: use OpenBLAS" OFF)
option(GGML_CLBLAST "ggml: use clBLAST" OFF)
option(GGML_HIPBLAS "ggml: use hipBLAS" OFF)
option(GGML_CUDA "ggml: use CUDA" OFF)
option(GGML_CUBLAS "ggml: use CUDA (deprecated)" OFF)
Expand Down
4 changes: 0 additions & 4 deletions scripts/sync-llama-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ if [ -f $SRC_GGML/llama-src.patch ]; then
# ggml-metal.m -> src/ggml-metal.m
# ggml-mpi.h -> src/ggml-mpi.h
# ggml-mpi.c -> src/ggml-mpi.c
# ggml-opencl.cpp -> src/ggml-opencl.cpp
# ggml-opencl.h -> src/ggml-opencl.h
# ggml-quants.c -> src/ggml-quants.c
# ggml-quants.h -> src/ggml-quants.h
# ggml-rpc.cpp -> src/ggml-rpc.cpp
Expand Down Expand Up @@ -146,8 +144,6 @@ if [ -f $SRC_GGML/llama-src.patch ]; then
-e 's/\/ggml-metal\.m/\/src\/ggml-metal.m/g' \
-e 's/\/ggml-mpi\.h/\/src\/ggml-mpi.h/g' \
-e 's/\/ggml-mpi\.c/\/src\/ggml-mpi.c/g' \
-e 's/\/ggml-opencl\.cpp/\/src\/ggml-opencl.cpp/g' \
-e 's/\/ggml-opencl\.h/\/src\/ggml-opencl.h/g' \
-e 's/\/ggml-quants\.c/\/src\/ggml-quants.c/g' \
-e 's/\/ggml-quants\.h/\/src\/ggml-quants.h/g' \
-e 's/\/ggml-rpc\.cpp/\/src\/ggml-rpc.cpp/g' \
Expand Down
4 changes: 0 additions & 4 deletions scripts/sync-whisper-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ if [ -f $SRC_GGML/whisper-src.patch ]; then
# ggml-metal.m -> src/ggml-metal.m
# ggml-mpi.h -> src/ggml-mpi.h
# ggml-mpi.c -> src/ggml-mpi.c
# ggml-opencl.cpp -> src/ggml-opencl.cpp
# ggml-opencl.h -> src/ggml-opencl.h
# ggml-quants.c -> src/ggml-quants.c
# ggml-quants.h -> src/ggml-quants.h
# ggml-rpc.cpp -> src/ggml-rpc.cpp
Expand Down Expand Up @@ -157,8 +155,6 @@ if [ -f $SRC_GGML/whisper-src.patch ]; then
-e 's/\/ggml-metal\.m/\/src\/ggml-metal.m/g' \
-e 's/\/ggml-mpi\.h/\/src\/ggml-mpi.h/g' \
-e 's/\/ggml-mpi\.c/\/src\/ggml-mpi.c/g' \
-e 's/\/ggml-opencl\.cpp/\/src\/ggml-opencl.cpp/g' \
-e 's/\/ggml-opencl\.h/\/src\/ggml-opencl.h/g' \
-e 's/\/ggml-quants\.c/\/src\/ggml-quants.c/g' \
-e 's/\/ggml-quants\.h/\/src\/ggml-quants.h/g' \
-e 's/\/ggml-rpc\.cpp/\/src\/ggml-rpc.cpp/g' \
Expand Down
29 changes: 0 additions & 29 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,34 +177,6 @@ if (GGML_OPENBLAS)
endif()
endif()

if (GGML_CLBLAST)
if(NOT CLBLAST_HOME)
set(CLBLAST_HOME
/usr
/usr/local
$ENV{CLBLAST_HOME}
)
endif()

find_path(CLBLAST_INC NAMES clblast.h PATHS ${CLBLAST_HOME} PATH_SUFFIXES include)
find_library(CLBLAST_LIB NAMES clblast PATHS ${CLBLAST_HOME} PATH_SUFFIXES build)
find_path(OPENCL_INC NAMES CL/opencl.h PATHS ${OPENCL_ROOT})
find_library(OPENCL_LIB NAMES OpenCL)
if (CLBLAST_LIB AND OPENCL_LIB AND CLBLAST_INC AND OPENCL_INC)
message(STATUS "clBLAST found")

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

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

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

if (GGML_CUBLAS)
message(WARNING "GGML_CUBLAS is deprecated and will be removed in the future.\nUse GGML_CUDA instead")
set(GGML_CUDA ON)
Expand Down Expand Up @@ -542,7 +514,6 @@ add_library(${TARGET}
../include/ggml/ggml-alloc.h
../include/ggml/ggml-backend.h
${GGML_SOURCES_CUDA}
${GGML_SOURCES_OPENCL}
${GGML_SOURCES_METAL}
${GGML_SOURCES_RPC}
)
Expand Down

0 comments on commit 86f56f1

Please sign in to comment.