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)
# 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
-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' \
# 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
-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' \
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)
../include/ggml/ggml-alloc.h
../include/ggml/ggml-backend.h
${GGML_SOURCES_CUDA}
- ${GGML_SOURCES_OPENCL}
${GGML_SOURCES_METAL}
${GGML_SOURCES_RPC}
)