From e1d9cdc568d6a7d824cbdcf6ba9d1504b6d35fe5 Mon Sep 17 00:00:00 2001 From: Shoujiang Ma Date: Wed, 19 May 2021 19:11:09 +0800 Subject: [PATCH] Address reviewer comment: fix get network precision logic Signed-off-by: Shoujiang Ma --- inference-engine/src/auto_plugin/auto_plugin.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inference-engine/src/auto_plugin/auto_plugin.cpp b/inference-engine/src/auto_plugin/auto_plugin.cpp index da805928b3d4c4..3e65075b240c4e 100644 --- a/inference-engine/src/auto_plugin/auto_plugin.cpp +++ b/inference-engine/src/auto_plugin/auto_plugin.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "auto_plugin.hpp" @@ -22,10 +23,11 @@ namespace AutoPlugin { namespace { std::string GetNetworkPrecision(const InferenceEngine::CNNNetwork &network) { auto nGraphFunc = network.getFunction(); + bool isINTModel = ngraph::op::util::has_op_with_type(nGraphFunc); + if (isINTModel) { + return METRIC_VALUE(INT8); + } for (auto & node : nGraphFunc->get_ordered_ops()) { - if (std::dynamic_pointer_cast(node)) { - return METRIC_VALUE(INT8); - } if (std::dynamic_pointer_cast(node) || std::dynamic_pointer_cast(node) || std::dynamic_pointer_cast(node) ||