]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
kompute : llama-bench support and ggml_cpu_has_kompute() (llama/5226)
authorJared Van Bortel <redacted>
Wed, 31 Jan 2024 00:04:37 +0000 (19:04 -0500)
committerGeorgi Gerganov <redacted>
Sat, 10 Feb 2024 07:55:46 +0000 (09:55 +0200)
ggml.c
ggml.h

diff --git a/ggml.c b/ggml.c
index 3499b737dd06f114ecd4bcab2327fb4552ea307f..f6e797d78f244c16dfc4df268f08c0f4f3d62af5 100644 (file)
--- a/ggml.c
+++ b/ggml.c
@@ -20473,6 +20473,14 @@ int ggml_cpu_has_vulkan(void) {
 #endif
 }
 
+int ggml_cpu_has_kompute(void) {
+#if defined(GGML_USE_KOMPUTE)
+    return 1;
+#else
+    return 0;
+#endif
+}
+
 int ggml_cpu_has_sycl(void) {
 #if defined(GGML_USE_SYCL)
     return 1;
@@ -20482,7 +20490,8 @@ int ggml_cpu_has_sycl(void) {
 }
 
 int ggml_cpu_has_gpublas(void) {
-    return ggml_cpu_has_cublas() || ggml_cpu_has_clblast() || ggml_cpu_has_vulkan() || ggml_cpu_has_sycl();
+    return ggml_cpu_has_cublas() || ggml_cpu_has_clblast() || ggml_cpu_has_vulkan() || ggml_cpu_has_kompute() ||
+           ggml_cpu_has_sycl();
 }
 
 int ggml_cpu_has_sse3(void) {
diff --git a/ggml.h b/ggml.h
index e20b14faa08c81c6823d558e97801fe2a11ee15d..3b264bfd8db42b18c14d503b683b8d80f8861b68 100644 (file)
--- a/ggml.h
+++ b/ggml.h
@@ -2271,6 +2271,7 @@ extern "C" {
     GGML_API int ggml_cpu_has_cublas     (void);
     GGML_API int ggml_cpu_has_clblast    (void);
     GGML_API int ggml_cpu_has_vulkan     (void);
+    GGML_API int ggml_cpu_has_kompute    (void);
     GGML_API int ggml_cpu_has_gpublas    (void);
     GGML_API int ggml_cpu_has_sse3       (void);
     GGML_API int ggml_cpu_has_ssse3      (void);