From f02ea667c17912946868650cf5234b1e30e2e3f7 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Tue, 16 Apr 2024 22:41:03 +0300 Subject: [PATCH] ggml : temporary disable llamafile sgemm until fixed ggml-ci --- CMakeLists.txt | 7 +++++++ Makefile | 4 ++++ ggml.c | 6 +----- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 158174c20..675f6327a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,6 +88,7 @@ endif() # 3rd party libs option(LLAMA_ACCELERATE "llama: enable Accelerate framework" ON) option(LLAMA_BLAS "llama: use BLAS" OFF) +option(LLAMA_LLAMAFILE "llama: use llamafile SGEMM" ON) set(LLAMA_BLAS_VENDOR "Generic" CACHE STRING "llama: BLAS library vendor") option(LLAMA_CUDA "llama: use CUDA" OFF) option(LLAMA_CUBLAS "llama: use CUDA (deprecated, use LLAMA_CUDA)" OFF) @@ -286,6 +287,7 @@ if (LLAMA_METAL) ${METALKIT_FRAMEWORK} ) endif() + if (LLAMA_BLAS) if (LLAMA_STATIC) set(BLA_STATIC ON) @@ -368,6 +370,11 @@ if (LLAMA_BLAS) endif() endif() +if (LLAMA_LLAMAFILE) + # TODO: temporary disabled until test-backend-ops becomes green + #add_compile_definitions(GGML_USE_LLAMAFILE) +endif() + if (LLAMA_QKK_64) add_compile_definitions(GGML_QKK_64) endif() diff --git a/Makefile b/Makefile index 928fb14ca..d9c806b6d 100644 --- a/Makefile +++ b/Makefile @@ -222,6 +222,10 @@ endif # LLAMA_DISABLE_LOGS # disable ggml.c's use of sgemm.cpp ifdef LLAMA_NO_LLAMAFILE MK_CPPFLAGS += -DGGML_USE_LLAMAFILE=0 +else + # TODO: temporary disabled until test-backend-ops becomes green + #MK_CPPFLAGS += -DGGML_USE_LLAMAFILE=1 + MK_CPPFLAGS += -DGGML_USE_LLAMAFILE=0 endif # warnings diff --git a/ggml.c b/ggml.c index 119686be6..3ce8c65d9 100644 --- a/ggml.c +++ b/ggml.c @@ -33,12 +33,8 @@ #include #endif -#ifndef GGML_USE_LLAMAFILE #ifdef __ARM_FEATURE_MATMUL_INT8 -#define GGML_USE_LLAMAFILE 0 -#else -#define GGML_USE_LLAMAFILE 1 -#endif +#undef GGML_USE_LLAMAFILE #endif #if defined(_MSC_VER)