diff --git a/src/inference/dev_api/performance_heuristics.hpp b/src/inference/dev_api/performance_heuristics.hpp index 41a3da4489b..3fba3418808 100644 --- a/src/inference/dev_api/performance_heuristics.hpp +++ b/src/inference/dev_api/performance_heuristics.hpp @@ -67,9 +67,7 @@ static MemBandwidthPressure MemBandwidthPressureTolerance( output.get_partial_shape().is_static()) { const auto& shapeInput0 = input0.get_shape(); const auto& shapeInput1 = input1.get_shape(); - OPENVINO_SUPPRESS_DEPRECATED_START - const auto non_const = !get_constant_from_source(node->input_value(1)); - OPENVINO_SUPPRESS_DEPRECATED_END + const auto non_const = !ov::op::util::is_on_constant_path(node->input_value(1)); const auto& shapeOutput = output.get_shape(); const auto dataSizeInput0 = std::accumulate(shapeInput0.begin(), shapeInput0.end(), size_t(1), std::multiplies()); @@ -88,11 +86,14 @@ static MemBandwidthPressure MemBandwidthPressureTolerance( const auto input = node->input(0); const auto output = node->output(0); const auto kernels = node->input(1); - const auto& shape = kernels.get_shape(); + total_convs++; - if (shape.size() >= 4 /* conventional 2D/3D conv */ && shape[2] >= 3 && shape[3] >= 3) { - compute_convs++; - continue; + if (kernels.get_partial_shape().is_static()) { + const auto& shape = kernels.get_shape(); + if (shape.size() >= 4 /* conventional 2D/3D conv */ && shape[2] >= 3 && shape[3] >= 3) { + compute_convs++; + continue; + } } if (input.get_partial_shape().is_static() && output.get_partial_shape().is_static()) { const auto& shapeInput = input.get_shape(); diff --git a/src/plugins/intel_cpu/src/plugin.cpp b/src/plugins/intel_cpu/src/plugin.cpp index 1b6958b104c..24f13f5c003 100644 --- a/src/plugins/intel_cpu/src/plugin.cpp +++ b/src/plugins/intel_cpu/src/plugin.cpp @@ -491,7 +491,18 @@ Engine::LoadExeNetworkImpl(const InferenceEngine::CNNNetwork &network, const std DEBUG_LOG(PrintableModel(*nGraphFunc, "org_")); - Transformations transformations(nGraphFunc, enableLPT, inferencePrecision, isLegacyAPI(), snippetsMode, engConfig); + if (!is_cpu_map_available()) { + ApplyPerformanceHints(config, nGraphFunc); + } + + // update the props after the perf mode translated to configs + // TODO: Clarify the behavior of SetConfig method. Skip eng_config or not? + Config conf = engConfig; + + conf.readProperties(config); + CalculateStreams(conf, nGraphFunc); + + Transformations transformations(nGraphFunc, enableLPT, inferencePrecision, isLegacyAPI(), snippetsMode, conf); transformations.UpToCpuSpecificOpSet(); // need to check that all outputs have static shapes @@ -504,20 +515,10 @@ Engine::LoadExeNetworkImpl(const InferenceEngine::CNNNetwork &network, const std } } - if (!is_cpu_map_available()) { - ApplyPerformanceHints(config, nGraphFunc); - } transformations.CpuSpecificOpSet(); DEBUG_LOG(PrintableModel(*nGraphFunc, "cpu_")); - // update the props after the perf mode translated to configs - // TODO: Clarify the behavior of SetConfig method. Skip eng_config or not? - Config conf = engConfig; - - conf.readProperties(config); - CalculateStreams(conf, nGraphFunc); - // SSE runtime check is needed for some ATOM machine, which is x86-64 but w/o SSE static Xbyak::util::Cpu cpu; if (cpu.has(Xbyak::util::Cpu::tSSE)) {