From: Georgi Gerganov Date: Sat, 6 Apr 2024 15:21:33 +0000 (+0300) Subject: ci : temporary build embeded metal library X-Git-Tag: upstream/0.0.1642~785 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=8e413034b42e4fbedc2873166f61193b75f2622a;p=pkg%2Fggml%2Fsources%2Fggml ci : temporary build embeded metal library ggml-ci --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c0af421..9aafabba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,15 +39,17 @@ option(GGML_BUILD_EXAMPLES "ggml: build examples" ${GGML_STANDALONE}) 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) -option(GGML_METAL "ggml: use Metal" OFF) -option(GGML_METAL_EMBED_LIBRARY "ggml: embed Metal library" 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) +option(GGML_METAL "ggml: use Metal" OFF) +option(GGML_METAL_NDEBUG "ggml: disable Metal debugging" OFF) +option(GGML_METAL_SHADER_DEBUG "ggml: compile Metal with -fno-fast-math" OFF) +option(GGML_METAL_EMBED_LIBRARY "ggml: embed Metal library" OFF) option(GGML_CUDA_FORCE_DMMV "ggml: use dmmv instead of mmvq CUDA kernels" OFF) option(GGML_CUDA_FORCE_MMQ "ggml: use mmq kernels instead of cuBLAS" OFF) diff --git a/ci/run.sh b/ci/run.sh index 30463bbd..7a106969 100644 --- a/ci/run.sh +++ b/ci/run.sh @@ -37,7 +37,10 @@ if [ ! -z ${GG_BUILD_CUDA} ]; then fi if [ ! -z ${GG_BUILD_METAL} ]; then - CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_METAL=ON" + # TODO: this should use -DGGML_METAL_SHADER_DEBUG=ON instead, but currently it fails because + # the binaries cannot locate default.metallib eventhough it is in bin/. cannot figure out + # why this is happening, so temporary workaround is to use -DGGML_METAL_EMBED_LIBRARY=ON + CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_METAL=ON -DGGML_METAL_EMBED_LIBRARY=ON" fi ## helpers