Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/intgemm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2020-11-18 21:16:07 +0300
committerKenneth Heafield <github@kheafield.com>2020-11-18 21:16:07 +0300
commitb7a513372bf9d81bad5b00568aa1daec13054d34 (patch)
tree11066c030b06dbc0a59eabf0dd9feacd88085410
parentd19e9135de4b8aa98ae50a129ceae25fff0cf45e (diff)
Guard cpuid.h for emscripten
-rw-r--r--intgemm/intgemm.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/intgemm/intgemm.h b/intgemm/intgemm.h
index e89f9ff..a354b60 100644
--- a/intgemm/intgemm.h
+++ b/intgemm/intgemm.h
@@ -49,11 +49,14 @@
#include "avx512_gemm.h"
#include "avx512vnni_gemm.h"
-#if defined(__INTEL_COMPILER)
+#if defined(__EMSCRIPTEN__)
+// No header for CPUID since it's hard-coded.
+#elif defined(__INTEL_COMPILER)
#include <immintrin.h>
#elif defined(_MSC_VER)
#include <intrin.h>
-#elif defined(__GNUC__) || defined(__clang__)
+#else
+// Assume GCC and clang style.
#include <cpuid.h>
#endif
@@ -177,7 +180,7 @@ template <class T> T ChooseCPU(T
#endif
) {
#if defined(__EMSCRIPTEN__)
- // emscripten is always ssse3.
+ // emscripten does SSE4.1 but we only use up to SSSE3.
return ssse3;
#elif defined(__INTEL_COMPILER)
# ifdef INTGEMM_COMPILER_SUPPORTS_AVX512VNNI