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.
This commit is contained in:
swittk 2023-05-07 10:03:23 +07:00 committed by GitHub
parent 3924088512
commit 1b0fd45465
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)