summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemysław Pawełczyk <przemoc@gmail.com>2023-08-27 10:10:25 +0200
committerGitHub <noreply@github.com>2023-08-27 11:10:25 +0300
commit1591e2e590762011b43b10a9b6e04f13f98f2aa5 (patch)
tree94a67bb41a70f95a047f6e6f8df76960bcaa334f
parent789c8c945a2814e1487e18e68823d9926e3b1454 (diff)
ggml : detect SSSE3 (#2825)
* ggml : add ggml_cpu_has_ssse3 * llama : show SSSE3 in system info
-rw-r--r--ggml.c8
-rw-r--r--ggml.h1
-rw-r--r--llama.cpp1
3 files changed, 10 insertions, 0 deletions
diff --git a/ggml.c b/ggml.c
index 8cb5c404..394fb459 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 421c0df6..b418153b 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);
//
diff --git a/llama.cpp b/llama.cpp
index 05c54c21..e956c016 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();