File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -184,13 +184,17 @@ inline int dnnl_get_current_num_threads() {
184
184
#define OMP_GET_NUM_THREADS () 1
185
185
#endif
186
186
187
- // MSVC still supports omp 2.0 only
188
- #if defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER)
187
+ // Disabling OMP SIMD feature in the following scenarios:
188
+ // * For MSVC as it only supports OpenMP 2.0
189
+ // * In debug mode on Windows to avoid incorrect code generation by Intel C++/DPC++ Compiler
190
+ #if defined(_MSC_VER) \
191
+ && ((!defined(__clang__) && !defined(__INTEL_COMPILER)) \
192
+ || defined(_DEBUG))
189
193
#define collapse (x )
190
194
#define PRAGMA_OMP_SIMD (...)
191
195
#else
192
196
#define PRAGMA_OMP_SIMD (...) PRAGMA_MACRO(CHAIN2(omp, simd __VA_ARGS__))
193
- #endif // defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER)
197
+ #endif // defined(_MSC_VER) && (( !defined(__clang__) && !defined(__INTEL_COMPILER)) || defined(_DEBUG) )
194
198
195
199
namespace dnnl {
196
200
namespace impl {
You can’t perform that action at this time.
0 commit comments