Skip to content

Commit

Permalink
NPUW: Removing unnecessary std::moves from the decompression patterns (
Browse files Browse the repository at this point in the history
…#25925)

### Details:
 - Cleaning up unnecessary std::moves from the patterns.

### Tickets:
 - *ticket-id*
  • Loading branch information
ujjayant-kadian authored Aug 6, 2024
1 parent 345c872 commit d359110
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ bool DCOFFPassBase::matcher_callback(ov::pass::pattern::Matcher& m) {
LOG_DEBUG("Matched: " << matched_paramB << " - parameter to remove...");

// Record mapping from the Scale coeff paramter to the Real weight parameter
m_params_to.get().scales[matched_paramB] = std::move(matched_paramA);
m_params_to.get().scales[matched_paramB] = matched_paramA;

// Disconnect Multiply and Convert from their outputs
auto matched_mulply = node_to_output.at(mulply).get_node_shared_ptr();
Expand All @@ -220,8 +220,8 @@ bool DCOFFPassBase::matcher_callback(ov::pass::pattern::Matcher& m) {
}
};
LOG_DEBUG("Dropping the connections...");
drop_outputs(std::move(matched_mulply));
drop_outputs(std::move(matched_convrt));
drop_outputs(matched_mulply);
drop_outputs(matched_convrt);

LOG_DEBUG("Reconnecting the root...");
reconnect_root_to_convert(m);
Expand Down Expand Up @@ -352,8 +352,8 @@ bool DCOFFPassBase::matcher_callback(ov::pass::pattern::Matcher& m) {
// it can be probably eliminated as well)

// Record mapping from the Scale coeff paramter to the Real weight parameter
m_params_to.get().zerops[matched_paramA] = std::move(matched_valueB);
m_params_to.get().scales[matched_paramC] = std::move(matched_paramA);
m_params_to.get().zerops[matched_paramA] = matched_valueB;
m_params_to.get().scales[matched_paramC] = matched_paramA;

// Disconnect Multiply and Convert from their outputs
auto matched_mulply = node_to_output.at(mulply).get_node_shared_ptr();
Expand All @@ -366,8 +366,8 @@ bool DCOFFPassBase::matcher_callback(ov::pass::pattern::Matcher& m) {
}
};
LOG_DEBUG("Dropping the connections...");
drop_outputs(std::move(matched_mulply));
drop_outputs(std::move(matched_convrt));
drop_outputs(matched_mulply);
drop_outputs(matched_convrt);

LOG_DEBUG("Reconnecting the root...");
reconnect_root(m);
Expand Down Expand Up @@ -484,8 +484,8 @@ DCOFFPassReshape2::DCOFFPassReshape2(DCOffMode dcoff_mode, ov::element::Type dco
// Reshape will be reconnected to Convert directly

// Record mapping from the Scale coeff parameter to the Real weight parameter
pref.get().zerops[matched_paramA] = std::move(matched_valueB);
pref.get().scales[matched_paramC] = std::move(matched_paramA);
pref.get().zerops[matched_paramA] = matched_valueB;
pref.get().scales[matched_paramC] = matched_paramA;

// Disconnect Multiply and Convert from their outputs
auto matched_mulply = node_to_output.at(mulply).get_node_shared_ptr();
Expand All @@ -498,7 +498,7 @@ DCOFFPassReshape2::DCOFFPassReshape2(DCOffMode dcoff_mode, ov::element::Type dco
}
};
LOG_DEBUG("Dropping the connections...");
drop_outputs(std::move(matched_mulply));
drop_outputs(matched_mulply);
drop_outputs(matched_convrt);

LOG_DEBUG("Reconnecting the Root...");
Expand Down

0 comments on commit d359110

Please sign in to comment.