Skip to content

Commit 1b0fd45

Browse files
authored
ggml : Allow usage of CLBlast alongside Accelerate.framework (LostRuins#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.
1 parent 3924088 commit 1b0fd45

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ggml.c

+3
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ inline static void* ggml_aligned_malloc(size_t size) {
137137

138138
#if defined(GGML_USE_ACCELERATE)
139139
#include <Accelerate/Accelerate.h>
140+
#if defined(GGML_USE_CLBLAST) // allow usage of CLBlast alongside Accelerate functions
141+
#include "ggml-opencl.h"
142+
#endif
140143
#elif defined(GGML_USE_OPENBLAS)
141144
#include <cblas.h>
142145
#elif defined(GGML_USE_CUBLAS)

0 commit comments

Comments
 (0)