File tree 1 file changed +3
-2
lines changed
src/plugins/intel_npu/src/plugin/npuw/partitioning/patterns
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1501,6 +1501,7 @@ ConvToMatmul::ConvToMatmul(Context::Ref ctx) {
1501
1501
auto matched_node_transpose_in = node_to_output.at (transpose_in).get_node_shared_ptr ();
1502
1502
auto matched_node_transpose_out = node_to_output.at (transpose_out).get_node_shared_ptr ();
1503
1503
auto matched_node_multiply = node_to_output.at (multiply).get_node_shared_ptr ();
1504
+ const auto & cvt2_or_multiply = uat::_ (node_to_output).at_or_at (convert2, multiply);
1504
1505
1505
1506
const auto & shape = matched_node_param->get_shape ();
1506
1507
const auto & shape2 = matched_node_param2->get_shape ();
@@ -1536,10 +1537,10 @@ ConvToMatmul::ConvToMatmul(Context::Ref ctx) {
1536
1537
auto new_reshape2 = std::make_shared<ov::op::v1::Reshape>(matched_node_param2, new_const2, false );
1537
1538
1538
1539
// Connect to Reshape
1539
- if (ov::op::util::is_parameter (matched_node_param2)) {
1540
+ if (cvt2_or_multiply == matched_node_multiply) { // param -> multiply
1540
1541
matched_node_multiply->input (1 ).replace_source_output (new_reshape2);
1541
1542
matched_node_multiply->validate_and_infer_types ();
1542
- } else { // constant -> convert -> multiply
1543
+ } else { // constant -> ( convert) -> multiply
1543
1544
node_to_output.at (convert2).get_node_shared_ptr ()->input (0 ).replace_source_output (new_reshape2);
1544
1545
node_to_output.at (convert2).get_node_shared_ptr ()->validate_and_infer_types ();
1545
1546
matched_node_multiply->validate_and_infer_types ();
You can’t perform that action at this time.
0 commit comments