Spaces:
Running
Running
ggml : add ggml_cpu_has_avx_vnni() (llama/4589)
Browse files* 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 <[email protected]>
---------
Co-authored-by: Georgi Gerganov <[email protected]>
ggml.c
CHANGED
|
@@ -19796,6 +19796,14 @@ int ggml_cpu_has_avx(void) {
|
|
| 19796 |
#endif
|
| 19797 |
}
|
| 19798 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19799 |
int ggml_cpu_has_avx2(void) {
|
| 19800 |
#if defined(__AVX2__)
|
| 19801 |
return 1;
|
|
|
|
| 19796 |
#endif
|
| 19797 |
}
|
| 19798 |
|
| 19799 |
+
int ggml_cpu_has_avx_vnni(void) {
|
| 19800 |
+
#if defined(__AVXVNNI__)
|
| 19801 |
+
return 1;
|
| 19802 |
+
#else
|
| 19803 |
+
return 0;
|
| 19804 |
+
#endif
|
| 19805 |
+
}
|
| 19806 |
+
|
| 19807 |
int ggml_cpu_has_avx2(void) {
|
| 19808 |
#if defined(__AVX2__)
|
| 19809 |
return 1;
|
ggml.h
CHANGED
|
@@ -2198,6 +2198,7 @@ extern "C" {
|
|
| 2198 |
//
|
| 2199 |
|
| 2200 |
GGML_API int ggml_cpu_has_avx (void);
|
|
|
|
| 2201 |
GGML_API int ggml_cpu_has_avx2 (void);
|
| 2202 |
GGML_API int ggml_cpu_has_avx512 (void);
|
| 2203 |
GGML_API int ggml_cpu_has_avx512_vbmi(void);
|
|
|
|
| 2198 |
//
|
| 2199 |
|
| 2200 |
GGML_API int ggml_cpu_has_avx (void);
|
| 2201 |
+
GGML_API int ggml_cpu_has_avx_vnni (void);
|
| 2202 |
GGML_API int ggml_cpu_has_avx2 (void);
|
| 2203 |
GGML_API int ggml_cpu_has_avx512 (void);
|
| 2204 |
GGML_API int ggml_cpu_has_avx512_vbmi(void);
|