]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
ggml : add ggml_cpu_has_avx_vnni() (llama/4589)
authorautomaticcat <redacted>
Sat, 30 Dec 2023 08:07:48 +0000 (15:07 +0700)
committerGeorgi Gerganov <redacted>
Wed, 3 Jan 2024 12:43:51 +0000 (14:43 +0200)
* feat: add avx_vnni based on intel documents

* ggml: add avx vnni based on intel document

* llama: add avx vnni information display

* docs: add more details about using oneMKL and oneAPI for intel processors

* docs: add more details about using oneMKL and oneAPI for intel processors

* docs: add more details about using oneMKL and oneAPI for intel processors

* docs: add more details about using oneMKL and oneAPI for intel processors

* docs: add more details about using oneMKL and oneAPI for intel processors

* Update ggml.c

Fix indentation upgate

Co-authored-by: Georgi Gerganov <redacted>
---------

Co-authored-by: Georgi Gerganov <redacted>
ggml.c
ggml.h

diff --git a/ggml.c b/ggml.c
index 4d8891c375aceb70ec93fde07874e3020931865d..b124f14cc15eee4feb1bb82700e5591729fd9023 100644 (file)
--- a/ggml.c
+++ b/ggml.c
@@ -19796,6 +19796,14 @@ int ggml_cpu_has_avx(void) {
 #endif
 }
 
+int ggml_cpu_has_avx_vnni(void) {
+#if defined(__AVXVNNI__)
+    return 1;
+#else
+    return 0;
+#endif
+}
+
 int ggml_cpu_has_avx2(void) {
 #if defined(__AVX2__)
     return 1;
diff --git a/ggml.h b/ggml.h
index 67d6bc4f1ef1b2bbfc2ba6bf5e377f8e2c52cb6b..64f4e45e880fae113dbc5b60479b0cdcaef9b429 100644 (file)
--- a/ggml.h
+++ b/ggml.h
@@ -2198,6 +2198,7 @@ extern "C" {
     //
 
     GGML_API int ggml_cpu_has_avx        (void);
+    GGML_API int ggml_cpu_has_avx_vnni   (void);
     GGML_API int ggml_cpu_has_avx2       (void);
     GGML_API int ggml_cpu_has_avx512     (void);
     GGML_API int ggml_cpu_has_avx512_vbmi(void);