aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorswittk <switt1995@gmail.com>2023-05-07 10:03:23 +0700
committerGitHub <noreply@github.com>2023-05-06 23:03:23 -0400
commit1b0fd454650ef4d68a980e3225488b79e6e9af25 (patch)
tree5f0c081e40291712d3cbcbf912e600af86bcafe1
parent3924088512d9e12e90ed6dbf28a6c5712481d33e (diff)
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.
-rw-r--r--ggml.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ggml.c b/ggml.c
index 4d49242..1b89bdd 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 <Accelerate/Accelerate.h>
+#if defined(GGML_USE_CLBLAST) // allow usage of CLBlast alongside Accelerate functions
+#include "ggml-opencl.h"
+#endif
#elif defined(GGML_USE_OPENBLAS)
#include <cblas.h>
#elif defined(GGML_USE_CUBLAS)