From d85e98ddceb02989551170b993b0f27fc5a109eb Mon Sep 17 00:00:00 2001 From: Kenneth Heafield Date: Tue, 17 Nov 2020 21:10:45 +0000 Subject: Make AVX2 optional if compiler doesn't support it Mostly for emscripten --- benchmarks/benchmark.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'benchmarks/benchmark.cc') diff --git a/benchmarks/benchmark.cc b/benchmarks/benchmark.cc index c6133bf..2dbe483 100644 --- a/benchmarks/benchmark.cc +++ b/benchmarks/benchmark.cc @@ -154,6 +154,7 @@ int main(int, char ** argv) { RunAll(matrices, end, stats.sse2_16bit); } +#ifdef INTGEMM_COMPILER_SUPPORTS_AVX2 std::cerr << "AVX2 8bit, 100 samples..." << std::endl; for (int samples = 0; samples < kSamples; ++samples) { RandomMatrices *end = (samples < 4) ? matrices_end : full_sample; @@ -165,7 +166,7 @@ int main(int, char ** argv) { RandomMatrices *end = (samples < 4) ? matrices_end : full_sample; RunAll(matrices, end, stats.avx2_16bit); } - +#endif #ifdef INTGEMM_COMPILER_SUPPORTS_AVX512BW std::cerr << "AVX512 8bit, 100 samples..." << std::endl; for (int samples = 0; samples < kSamples; ++samples) { -- cgit v1.2.3