File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -184,13 +184,18 @@ 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
190
+ // by Intel(R) oneAPI DPC++/C++ Compiler
191
+ #if defined(_MSC_VER) \
192
+ && ((!defined(__clang__) && !defined(__INTEL_COMPILER)) \
193
+ || defined(_DEBUG))
189
194
#define collapse (x )
190
195
#define PRAGMA_OMP_SIMD (...)
191
196
#else
192
197
#define PRAGMA_OMP_SIMD (...) PRAGMA_MACRO(CHAIN2(omp, simd __VA_ARGS__))
193
- #endif // defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER)
198
+ #endif // defined(_MSC_VER) && (( !defined(__clang__) && !defined(__INTEL_COMPILER)) || defined(_DEBUG) )
194
199
195
200
namespace dnnl {
196
201
namespace impl {
You can’t perform that action at this time.
0 commit comments