[CPU] clone Constant node instead direct usage (#8719)
This commit is contained in:
parent
c4e49bb915
commit
7c525592e7
@ -1372,7 +1372,7 @@ void MKLDNNNode::createShapeInferSubgraph(const std::shared_ptr<ngraph::Node>& o
|
||||
ngraph::OutputVector inputsForShapeInfer;
|
||||
for (size_t i = 0; i < inputShapes.size(); i++) {
|
||||
if (dynamic_cast<ngraph::opset1::Constant *>(op->get_input_node_ptr(i))) {
|
||||
inputsForShapeInfer.push_back(op->get_input_node_shared_ptr(i));
|
||||
inputsForShapeInfer.push_back(op->get_input_node_ptr(i)->clone_with_new_inputs(ngraph::OutputVector{}));
|
||||
} else {
|
||||
inputsForShapeInfer.push_back(std::make_shared<ngraph::opset1::Parameter>(op->get_input_element_type(i),
|
||||
op->get_input_partial_shape(i)));
|
||||
|
Loading…
Reference in New Issue
Block a user