Commit d2cc30e2 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #16687 from dkurt:dnn_ngraph_hetero

parents 85c97f77 5bbe116f
...@@ -442,13 +442,14 @@ void InfEngineNgraphNet::initPlugin(InferenceEngine::CNNNetwork& net) ...@@ -442,13 +442,14 @@ void InfEngineNgraphNet::initPlugin(InferenceEngine::CNNNetwork& net)
config.emplace("VPU_DETECT_NETWORK_BATCH", CONFIG_VALUE(NO)); config.emplace("VPU_DETECT_NETWORK_BATCH", CONFIG_VALUE(NO));
} }
bool isHetero = false; bool isHetero = device_name == "FPGA";
if (device_name != "CPU") // It is actual only for non-CPU targets and networks built in runtime using nGraph.
// We do not check IR models because they can be with version less than IRv10
if (!isHetero && device_name != "CPU" && !hasNetOwner)
{ {
isHetero = device_name == "FPGA"; for (auto& node : net.getFunction()->get_ops())
for (auto& layer : net)
{ {
if (layer->type == kOpenCVLayersType) if (node->description() == kOpenCVLayersType)
{ {
isHetero = true; isHetero = true;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment