]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
ggml : add and use ggml_cpu_has_llamafile() (llama/8664)
authorGeorgi Gerganov <redacted>
Thu, 25 Jul 2024 09:37:42 +0000 (12:37 +0300)
committerGeorgi Gerganov <redacted>
Thu, 8 Aug 2024 19:48:46 +0000 (22:48 +0300)
ggml/include/ggml.h
ggml/src/ggml.c

index 2fdb9fa40274bce1d74e2e2bda9a5f223f589441..548661b9bb6368f495cbedace3e9d0f48c1a6085 100644 (file)
@@ -2400,6 +2400,7 @@ extern "C" {
     GGML_API int ggml_cpu_has_vsx        (void);
     GGML_API int ggml_cpu_has_matmul_int8(void);
     GGML_API int ggml_cpu_has_cann       (void);
+    GGML_API int ggml_cpu_has_llamafile  (void);
 
     //
     // Internal types and functions exposed for tests and benchmarks
index aeb6c0099ee0702f0ee393f8cbb9e1f2e68d449d..c6117c37436ee55410f185f32643c5862fa97913 100644 (file)
@@ -22004,6 +22004,14 @@ int ggml_cpu_has_cann(void) {
 #endif
 }
 
+int ggml_cpu_has_llamafile(void) {
+#if defined(GGML_USE_LLAMAFILE)
+    return 1;
+#else
+    return 0;
+#endif
+}
+
 int ggml_cpu_has_gpublas(void) {
     return ggml_cpu_has_cuda() || ggml_cpu_has_vulkan() || ggml_cpu_has_kompute() || ggml_cpu_has_sycl();
 }