From 4057e408d8d958fba748c6522957ff8dc867f4d7 Mon Sep 17 00:00:00 2001 From: yanlan song Date: Fri, 1 Apr 2022 11:09:22 +0800 Subject: [PATCH] Bell/shape auto (#11284) * Fix batchability check of MAX_BATCH_SIZE * Applied review comment * clonenetwork in auto Signed-off-by: fishbell * clone in correct way Signed-off-by: fishbell Co-authored-by: Taylor Yeonbok Lee --- src/plugins/auto/plugin.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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()) {