[CPU] Fix for MoveEltwiseUpThroughDataMov with dynamic shapes (#9036)
This commit is contained in:
@@ -85,7 +85,7 @@ MKLDNNPlugin::MoveEltwiseUpThroughDataMov::MoveEltwiseUpThroughDataMov() {
|
||||
}
|
||||
|
||||
// eltwise constant shape should match new input shape
|
||||
if (is_binary_op && current->get_output_shape(0).size() != eltwise->get_input_shape(1).size()) {
|
||||
if (is_binary_op && current->get_output_partial_shape(0).rank().get_length() != eltwise->get_input_partial_shape(1).rank().get_length()) {
|
||||
auto old_eltwise_const = std::dynamic_pointer_cast<ngraph::opset8::Constant>(eltwise->get_input_node_shared_ptr(1));
|
||||
auto new_constant = std::make_shared<ngraph::opset8::Constant>(*old_eltwise_const.get(), ngraph::Shape{});
|
||||
ngraph::replace_node(old_eltwise_const, new_constant);
|
||||
|
||||
Reference in New Issue
Block a user