From 86f56f1c7c385295cc10e39f7c98978313260826 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sat, 15 Jun 2024 20:54:22 +0300 Subject: [PATCH] ggml : remove opencl (#0) ggml-ci --- CMakeLists.txt | 1 - scripts/sync-llama-am.sh | 4 ---- scripts/sync-whisper-am.sh | 4 ---- src/CMakeLists.txt | 29 ----------------------------- 4 files changed, 38 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 492e9468a..2af2122d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/scripts/sync-llama-am.sh b/scripts/sync-llama-am.sh index 6cdce21a3..b0170e562 100755 --- a/scripts/sync-llama-am.sh +++ b/scripts/sync-llama-am.sh @@ -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 @@ -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' \ diff --git a/scripts/sync-whisper-am.sh b/scripts/sync-whisper-am.sh index 09a0b93a1..e3ce104ee 100755 --- a/scripts/sync-whisper-am.sh +++ b/scripts/sync-whisper-am.sh @@ -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 @@ -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' \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7ca88ebba..fdd4d5867 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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) @@ -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} )