Skip to content

Commit abf4c05

Browse files
przemocakawrykow
authored andcommitted
ggml : detect SSSE3 (ggml-org#2825)
* ggml : add ggml_cpu_has_ssse3 * llama : show SSSE3 in system info
1 parent 48ea481 commit abf4c05

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

ggml.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20516,6 +20516,14 @@ int ggml_cpu_has_sse3(void) {
2051620516
#endif
2051720517
}
2051820518

20519+
int ggml_cpu_has_ssse3(void) {
20520+
#if defined(__SSSE3__)
20521+
return 1;
20522+
#else
20523+
return 0;
20524+
#endif
20525+
}
20526+
2051920527
int ggml_cpu_has_vsx(void) {
2052020528
#if defined(__POWER9_VECTOR__)
2052120529
return 1;

ggml.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,7 @@ extern "C" {
19441944
GGML_API int ggml_cpu_has_clblast (void);
19451945
GGML_API int ggml_cpu_has_gpublas (void);
19461946
GGML_API int ggml_cpu_has_sse3 (void);
1947+
GGML_API int ggml_cpu_has_ssse3 (void);
19471948
GGML_API int ggml_cpu_has_vsx (void);
19481949

19491950
//

llama.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6194,6 +6194,7 @@ const char * llama_print_system_info(void) {
61946194
s += "WASM_SIMD = " + std::to_string(ggml_cpu_has_wasm_simd()) + " | ";
61956195
s += "BLAS = " + std::to_string(ggml_cpu_has_blas()) + " | ";
61966196
s += "SSE3 = " + std::to_string(ggml_cpu_has_sse3()) + " | ";
6197+
s += "SSSE3 = " + std::to_string(ggml_cpu_has_ssse3()) + " | ";
61976198
s += "VSX = " + std::to_string(ggml_cpu_has_vsx()) + " | ";
61986199

61996200
return s.c_str();

0 commit comments

Comments
 (0)