Caffe2 - C++ API
A deep learning, cross platform ML framework
common_avx512.cc
1 // This file is here merely to check that the flags are not mixed up: for
2 // example, if your compiler did not specify -mavx512f, -mavx512dq, and
3 // -mavx512vl you should not provide the CAFFE2_PERF_WITH_AVX512 macro.
4 
5 #include "caffe2/core/common.h"
6 
7 #ifdef CAFFE2_PERF_WITH_AVX512
8 #if !defined(__AVX512F__) || !defined(__AVX512DQ__) || !defined(__AVX512VL__)
9 #error( \
10  "You found a build system error: CAFFE2_PERF_WITH_AVX512 is defined" \
11  "but __AVX512F__, __AVX512DQ__, or __AVX512VL is not defined" \
12  "(via e.g. -mavx512f, -mavx512dq, and -mavx512vl).");
13 #endif
14 #endif // CAFFE2_PERF_WITH_AVX512
15 
16 #if defined(__AVX512F__) && defined(__AVX512DQ__) && defined(__AVX512VL__)
17 #ifndef CAFFE2_PERF_WITH_AVX512
18 #error( \
19  "You found a build system error: __AVX512F__, __AVX512DQ__, __AVX512VL__ " \
20  "is defined (via e.g. -mavx512f, -mavx512dq, and -mavx512vl) " \
21  "but CAFFE2_PERF_WITH_AVX512 is not defined.");
22 #endif // CAFFE2_PERF_WITH_AVX512
23 #endif