summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemysław Pawełczyk <przemoc@gmail.com>2024-05-08 17:33:43 +0200
committerGeorgi Gerganov <ggerganov@gmail.com>2024-05-14 19:08:09 +0300
commit182adefcf36fc5f4263082ff032c0796fda65578 (patch)
tree89af08aab7632ab197c168c5c9505c2326047f4c
parent0d26d8ccd8caebab75af697c0275f599075fdacf (diff)
ggml : expose SSE3 and SSSE3 for MSVC when AVX is available (whisper/2128)
-rw-r--r--ggml-impl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ggml-impl.h b/ggml-impl.h
index d85b152b..59684fa8 100644
--- a/ggml-impl.h
+++ b/ggml-impl.h
@@ -120,9 +120,16 @@ extern "C" {
#ifndef __F16C__
#define __F16C__
#endif
+#endif
+
+// __SSE3__ and __SSSE3__ are not defined in MSVC, but SSE3/SSSE3 are present when AVX/AVX2/AVX512 are available
+#if defined(_MSC_VER) && (defined(__AVX__) || defined(__AVX2__) || defined(__AVX512F__))
#ifndef __SSE3__
#define __SSE3__
#endif
+#ifndef __SSSE3__
+#define __SSSE3__
+#endif
#endif
// 16-bit float