diff options
author | Kenneth Heafield <github@kheafield.com> | 2020-11-18 00:10:45 +0300 |
---|---|---|
committer | Kenneth Heafield <github@kheafield.com> | 2020-11-18 00:10:45 +0300 |
commit | d85e98ddceb02989551170b993b0f27fc5a109eb (patch) | |
tree | cd120c92bf17a279886baa01bc35cb61ab061577 /benchmarks/benchmark.cc | |
parent | 8f28282c3bd854922da638024d2659be52e892e9 (diff) |
Make AVX2 optional if compiler doesn't support it
Mostly for emscripten
Diffstat (limited to 'benchmarks/benchmark.cc')
-rw-r--r-- | benchmarks/benchmark.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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<sse2::Kernels16>(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<avx2::Kernels16>(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) { |