File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ extern "C" {
7575 //
7676
7777 // x86
78+ GGML_BACKEND_API int ggml_cpu_has_sse2 (void );
7879 GGML_BACKEND_API int ggml_cpu_has_sse3 (void );
7980 GGML_BACKEND_API int ggml_cpu_has_ssse3 (void );
8081 GGML_BACKEND_API int ggml_cpu_has_avx (void );
Original file line number Diff line number Diff line change @@ -3442,6 +3442,14 @@ int ggml_cpu_has_llamafile(void) {
34423442#endif
34433443}
34443444
3445+ int ggml_cpu_has_sse2 (void ) {
3446+ #if defined(__SSE2__ )
3447+ return 1 ;
3448+ #else
3449+ return 0 ;
3450+ #endif
3451+ }
3452+
34453453int ggml_cpu_has_sse3 (void ) {
34463454#if defined(__SSE3__ )
34473455 return 1 ;
Original file line number Diff line number Diff line change @@ -516,6 +516,9 @@ static ggml_backend_feature * ggml_backend_cpu_get_features(ggml_backend_reg_t r
516516 ggml_cpu_init ();
517517
518518 std::vector<ggml_backend_feature> features;
519+ if (ggml_cpu_has_sse2 ()) {
520+ features.push_back ({ " SSE2" , " 1" });
521+ }
519522 if (ggml_cpu_has_sse3 ()) {
520523 features.push_back ({ " SSE3" , " 1" });
521524 }
You can’t perform that action at this time.
0 commit comments