From beb5b291b96960c3cdab389d31bc76d50cd94fd8 Mon Sep 17 00:00:00 2001 From: Dmitry Kurtaev Date: Fri, 6 Dec 2019 19:34:54 +0300 Subject: [PATCH] Fix HETERO:FPGA,CPU plugin for IE backend --- modules/dnn/src/op_inf_engine.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/dnn/src/op_inf_engine.cpp b/modules/dnn/src/op_inf_engine.cpp index 0a35194995..c6f741f3c9 100644 --- a/modules/dnn/src/op_inf_engine.cpp +++ b/modules/dnn/src/op_inf_engine.cpp @@ -750,11 +750,16 @@ void InfEngineBackendNet::initPlugin(InferenceEngine::CNNNetwork& net) { if (layer->type == kOpenCVLayersType) { - layer->affinity = "CPU"; isHetero = true; +#if INF_ENGINE_VER_MAJOR_LT(INF_ENGINE_RELEASE_2019R3) + // Not sure about lower versions but in 2019R3 we do not need this + layer->affinity = "CPU"; } else + { layer->affinity = device_name; +#endif + } } } if (isHetero)