From dd8d05b9187b08aa40201732d6f3060e61f35563 Mon Sep 17 00:00:00 2001 From: Przemyslaw Pawelczyk Date: Sun, 27 Aug 2023 02:25:13 +0200 Subject: [PATCH 1/2] ggml : add ggml_cpu_has_ssse3 --- ggml.c | 8 ++++++++ ggml.h | 1 + 2 files changed, 9 insertions(+) diff --git a/ggml.c b/ggml.c index 8cb5c404f285d..394fb459fdbe4 100644 --- a/ggml.c +++ b/ggml.c @@ -20516,6 +20516,14 @@ int ggml_cpu_has_sse3(void) { #endif } +int ggml_cpu_has_ssse3(void) { +#if defined(__SSSE3__) + return 1; +#else + return 0; +#endif +} + int ggml_cpu_has_vsx(void) { #if defined(__POWER9_VECTOR__) return 1; diff --git a/ggml.h b/ggml.h index 421c0df60c579..b418153ba28ff 100644 --- a/ggml.h +++ b/ggml.h @@ -1944,6 +1944,7 @@ extern "C" { GGML_API int ggml_cpu_has_clblast (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); GGML_API int ggml_cpu_has_vsx (void); // From eed5d0e3863ab7b1b08e7a4c3f23e800a84b4a17 Mon Sep 17 00:00:00 2001 From: Przemyslaw Pawelczyk Date: Sun, 27 Aug 2023 02:26:32 +0200 Subject: [PATCH 2/2] llama : show SSSE3 in system info --- llama.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/llama.cpp b/llama.cpp index 05c54c2135aa0..e956c0163901d 100644 --- a/llama.cpp +++ b/llama.cpp @@ -6194,6 +6194,7 @@ const char * llama_print_system_info(void) { s += "WASM_SIMD = " + std::to_string(ggml_cpu_has_wasm_simd()) + " | "; s += "BLAS = " + std::to_string(ggml_cpu_has_blas()) + " | "; s += "SSE3 = " + std::to_string(ggml_cpu_has_sse3()) + " | "; + s += "SSSE3 = " + std::to_string(ggml_cpu_has_ssse3()) + " | "; s += "VSX = " + std::to_string(ggml_cpu_has_vsx()) + " | "; return s.c_str();