From: swittk Date: Sun, 7 May 2023 03:03:23 +0000 (+0700) Subject: ggml : Allow usage of CLBlast alongside Accelerate.framework (#1336) X-Git-Tag: gguf-v0.4.0~790 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=1b0fd454650ef4d68a980e3225488b79e6e9af25;p=pkg%2Fggml%2Fsources%2Fllama.cpp ggml : Allow usage of CLBlast alongside Accelerate.framework (#1336) Minor edit in ggml.c which originally would prevent OpenCL from loading completely if GGML_USE_ACCELERATE was defined. Minor speedup in prompt eval time. --- diff --git a/ggml.c b/ggml.c index 4d49242a..1b89bdd8 100644 --- a/ggml.c +++ b/ggml.c @@ -137,6 +137,9 @@ inline static void* ggml_aligned_malloc(size_t size) { #if defined(GGML_USE_ACCELERATE) #include +#if defined(GGML_USE_CLBLAST) // allow usage of CLBlast alongside Accelerate functions +#include "ggml-opencl.h" +#endif #elif defined(GGML_USE_OPENBLAS) #include #elif defined(GGML_USE_CUBLAS)