From c4df94d42d90a2bc3cd91d3d6844ba42f29bca7f Mon Sep 17 00:00:00 2001 From: myshevts Date: Tue, 6 Apr 2021 16:07:43 +0300 Subject: [PATCH] brushed thresholds (to cover rnn_ cases when there are convs) --- .../src/mkldnn_plugin/mkldnn_plugin.cpp | 43 +++++++------------ 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp index b8f2a0409c0..9d48ba41a93 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp @@ -622,33 +622,22 @@ Engine::LoadExeNetworkImpl(const InferenceEngine::CNNNetwork &network, const std // Hybrid specific // etc int num_streams; - bool considerNonLimited = false; - if (NetworkToleranceForLowCache.maxMemTolerance > NetworkPerfStats::memThresholdNotLimited) { - std::cout << " case 1.0" < NetworkPerfStats::memThresholdAssumeLimitedAVX512 - && (NetworkToleranceForLowCache.ratio_mem_limited_convs <= NetworkPerfStats::memLimitedRatioThresholdAVX512)) { - std::cout << " case 1.2" < NetworkPerfStats::memComputeConvs) { -// config[PluginConfigParams::KEY_CPU_THREADS_NUM] = std::to_string( -// std::thread::hardware_concurrency()); -// std::cout << "ENABLING HT!!!" << std::endl; -// } - } else if (NetworkToleranceForLowCache.maxMemTolerance == NetworkPerfStats::memThresholdUnknown) { - num_streams = default_num_streams; - std::cout << "case 0" < NetworkPerfStats::memThresholdAssumeLimited) { + if (NetworkToleranceForLowCache.maxMemTolerance == NetworkPerfStats::memThresholdUnknown) { + if ((NetworkToleranceForLowCache.ratio_compute_convs == NetworkPerfStats::ALL) + || (NetworkToleranceForLowCache.ratio_compute_deconvs == NetworkPerfStats::ALL)) { + std::cout << " case 1.1" < NetworkPerfStats::memThresholdNotLimited) + || (hasAVX512() + && NetworkToleranceForLowCache.maxMemTolerance > NetworkPerfStats::memThresholdAssumeLimitedAVX512 + && NetworkToleranceForLowCache.ratio_mem_limited_convs <= NetworkPerfStats::memLimitedRatioThresholdAVX512)) { + std::cout << " case 1.0 or 1.2" < NetworkPerfStats::memThresholdAssumeLimited) { num_streams = std::max(default_num_streams, num_streams_default_not_ht); std::cout << "case 2" <