Skip to content

Commit bd9c319

Browse files
committed
ggml doesn't use sse42, specify only up to sse4.1
1 parent 2739a71 commit bd9c319

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ggml/src/ggml-cpu/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
211211
list(APPEND ARCH_FLAGS /arch:AVX)
212212
list(APPEND ARCH_DEFINITIONS GGML_AVX)
213213
else ()
214-
list(APPEND ARCH_FLAGS /arch:SSE4.2)
215-
list(APPEND ARCH_DEFINITIONS GGML_SSE42)
214+
list(APPEND ARCH_FLAGS /arch:SSE4.1)
215+
list(APPEND ARCH_DEFINITIONS GGML_SSE41)
216216
endif()
217217
if (GGML_AVX_VNNI)
218218
list(APPEND ARCH_DEFINITIONS __AVXVNNI__ GGML_AVX_VNNI)
@@ -221,8 +221,8 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
221221
if (GGML_NATIVE)
222222
list(APPEND ARCH_FLAGS -march=native)
223223
else ()
224-
list(APPEND ARCH_FLAGS -msse4.2)
225-
list(APPEND ARCH_DEFINITIONS GGML_SSE42)
224+
list(APPEND ARCH_FLAGS -msse2 -msse3 -mssse3 -msse4.1)
225+
list(APPEND ARCH_DEFINITIONS GGML_SSE41)
226226
if (GGML_F16C)
227227
list(APPEND ARCH_FLAGS -mf16c)
228228
list(APPEND ARCH_DEFINITIONS GGML_F16C)

ggml/src/ggml-cpu/cpu-feats-x86.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ static int ggml_backend_cpu_x86_score() {
274274
if (!is.F16C()) { return 0; }
275275
score += 1<<1;
276276
#endif
277-
#ifdef GGML_SSE42
278-
if (!is.SSE42()) { return 0; }
277+
#ifdef GGML_SSE41
278+
if (!is.SSE41()) { return 0; }
279279
score += 1<<2;
280280
#endif
281281
#ifdef GGML_AVX

0 commit comments

Comments
 (0)