Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Disabling SDL with MKL threading on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
akarbown committed Jul 30, 2021
1 parent d147df0 commit b3c66c6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/initialize.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,17 @@ LibraryInitializer::LibraryInitializer()
cpu_worker_nthreads_(dmlc::GetEnv("MXNET_CPU_WORKER_NTHREADS", 1)),
mp_cv_num_threads_(dmlc::GetEnv("MXNET_MP_OPENCV_NUM_THREADS", 0)) {
dmlc::InitLogging("mxnet");

#if !(defined(_WIN32) || defined(_WIN64) || defined(__WINDOWS__))
#if MKL_USE_SINGLE_DYNAMIC_LIBRARY
#if defined( __INTEL_LLVM_COMPILER)
mkl_set_threading_layer(MKL_THREADING_INTEL);
#else
mkl_set_threading_layer(MKL_THREADING_GNU);
#endif
#if defined( __INTEL_LLVM_COMPILER)
mkl_set_threading_layer(MKL_THREADING_INTEL);
#else
mkl_set_threading_layer(MKL_THREADING_GNU);
#endif
#endif
#endif

engine::OpenMP::Get(); // force OpenMP initialization
install_pthread_atfork_handlers();
}
Expand Down

0 comments on commit b3c66c6

Please sign in to comment.