From 1fa3128d2ad4314395421469139c80f0e7b3ce0d Mon Sep 17 00:00:00 2001 From: swittk Date: Sat, 6 May 2023 08:24:48 +0700 Subject: [PATCH] Allow usage of CLBlast alongside Accelerate.framework 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)