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.
This commit is contained in:
swittk 2023-05-06 08:24:48 +07:00 committed by GitHub
parent 173d0e6419
commit 1fa3128d2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
ggml.c
View File

@ -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)