From 1b0fd454650ef4d68a980e3225488b79e6e9af25 Mon Sep 17 00:00:00 2001 From: swittk Date: Sun, 7 May 2023 10:03:23 +0700 Subject: [PATCH] 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. --- ggml.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ggml.c b/ggml.c index 4d49242a4..1b89bdd89 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)