Skip to content

Commit

Permalink
Fix review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
smirnov-alexey committed Nov 14, 2024
1 parent b50ae42 commit 61cf9c7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@ ConvToMatmul::ConvToMatmul(Context::Ref ctx) {
auto matched_node_transpose_in = node_to_output.at(transpose_in).get_node_shared_ptr();
auto matched_node_transpose_out = node_to_output.at(transpose_out).get_node_shared_ptr();
auto matched_node_multiply = node_to_output.at(multiply).get_node_shared_ptr();
const auto& matched_node_param2_out = uat::_(node_to_output).at_or_at(convert2, multiply);
const auto& cvt2_or_multiply = uat::_(node_to_output).at_or_at(convert2, multiply);

const auto& shape = matched_node_param->get_shape();
const auto& shape2 = matched_node_param2->get_shape();
Expand Down Expand Up @@ -1537,10 +1537,10 @@ ConvToMatmul::ConvToMatmul(Context::Ref ctx) {
auto new_reshape2 = std::make_shared<ov::op::v1::Reshape>(matched_node_param2, new_const2, false);

// Connect to Reshape
if (matched_node_param2_out == matched_node_multiply) {
if (cvt2_or_multiply == matched_node_multiply) { // param -> multiply
matched_node_multiply->input(1).replace_source_output(new_reshape2);
matched_node_multiply->validate_and_infer_types();
} else {
} else { // constant -> (convert) -> multiply
node_to_output.at(convert2).get_node_shared_ptr()->input(0).replace_source_output(new_reshape2);
node_to_output.at(convert2).get_node_shared_ptr()->validate_and_infer_types();
matched_node_multiply->validate_and_infer_types();
Expand Down

0 comments on commit 61cf9c7

Please sign in to comment.