From 1c584185a808767b0f6a366c6832c43fc53e7be3 Mon Sep 17 00:00:00 2001 From: Yury Gaydaychuk Date: Tue, 2 Feb 2021 19:29:54 +0300 Subject: [PATCH] scatter allows inplace for non const input --- .../src/mkldnn_plugin/nodes/mkldnn_scatter_update_node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_scatter_update_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_scatter_update_node.cpp index 0c9a79324ce862..df711ca58e8861 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_scatter_update_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_scatter_update_node.cpp @@ -167,7 +167,8 @@ void MKLDNNScatterUpdateNode::initSupportedPrimitiveDescriptors() { auto dataType = MKLDNNExtensionUtils::IEPrecisionToDataType(dataPrec); dataSize = MKLDNNExtensionUtils::sizeOfDataType(dataType); - bool canBeInplace = getParentEdgeAt(DATA_ID)->getParent()->getChildEdges().size() == 1; + bool canBeInplace = getParentEdgeAt(DATA_ID)->getParent()->getChildEdges().size() == 1 && + !getParentEdgeAt(DATA_ID)->getParent()->isConstant(); InferenceEngine::LayerConfig config; config.dynBatchSupport = false;