diff --git a/src/plugins/auto/plugin.cpp b/src/plugins/auto/plugin.cpp index c5472151fcc..28402109c8e 100644 --- a/src/plugins/auto/plugin.cpp +++ b/src/plugins/auto/plugin.cpp @@ -20,7 +20,7 @@ #include "plugin.hpp" #include #include - +#include #include "itt.hpp" // ------------------------------MultiDeviceInferencePlugin---------------------------- namespace MultiDevicePlugin { @@ -345,7 +345,10 @@ IExecutableNetworkInternal::Ptr MultiDeviceInferencePlugin::LoadNetworkImpl(cons strDevices += ((iter + 1) == supportDevices.end()) ? "" : ","; LOG_INFO("[AUTOPLUGIN]:device:%s, priority:%ld", iter->deviceName.c_str(), iter->devicePriority); } - return std::make_shared(modelPath, network, supportDevices, strDevices, this, context, context.needPerfCounters); + // clone the network, in case of reshape conflict + CNNNetwork clonedNetwork = InferenceEngine::details::cloneNetwork(network); + + return std::make_shared(modelPath, clonedNetwork, supportDevices, strDevices, this, context, context.needPerfCounters); } OV_ITT_SCOPED_TASK(itt::domains::MULTIPlugin, "MultiDeviceInferencePlugin::LoadNetworkImpl:MultiMode"); if (priorities == fullConfig.end()) {