Skip to content

Commit 5cb8619

Browse files
committed
dnn(ie): enable KEY_CPU_THREADS_NUM for Windows
1 parent 5bc6b6f commit 5cb8619

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/dnn/src/op_inf_engine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,18 +831,18 @@ void InfEngineBackendNet::initPlugin(InferenceEngine::CNNNetwork& net)
831831
CV_LOG_INFO(NULL, "DNN-IE: Can't register OpenCV custom layers extension: " << e.what());
832832
}
833833
#endif
834-
#ifndef _WIN32
835834
// Limit the number of CPU threads.
836835
#if INF_ENGINE_VER_MAJOR_LE(INF_ENGINE_RELEASE_2019R1)
836+
#ifndef _WIN32
837837
enginePtr->SetConfig({{
838838
InferenceEngine::PluginConfigParams::KEY_CPU_THREADS_NUM, format("%d", getNumThreads()),
839839
}}, 0);
840+
#endif // _WIN32
840841
#else
841842
if (device_name == "CPU")
842843
ie.SetConfig({{
843844
InferenceEngine::PluginConfigParams::KEY_CPU_THREADS_NUM, format("%d", getNumThreads()),
844845
}}, device_name);
845-
#endif
846846
#endif
847847
}
848848
#if INF_ENGINE_VER_MAJOR_LE(INF_ENGINE_RELEASE_2019R1)

0 commit comments

Comments
 (0)