Skip to content

Commit

Permalink
Add MoveEltwiseUpThroughDataMovScalar changes to match mobilebert MHA…
Browse files Browse the repository at this point in the history
… pattern
  • Loading branch information
liubo-intel committed Dec 3, 2024
1 parent 08636b5 commit 7f90952
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -819,9 +819,11 @@ void Transformations::PostLpt() {
ov::pass::UnrollTensorIterator);
CPU_REGISTER_PASS_COMMON(postLPTPassManager, ov::pass::MoveEltwiseUpThroughDataMov);
CPU_DISABLE_PASS_COMMON(postLPTPassManager, ov::pass::MoveEltwiseUpThroughDataMovPerChannel);
CPU_SET_CALLBACK_COMMON(postLPTPassManager,
CPU_SET_CALLBACK_COMMON(
postLPTPassManager,
[](const std::shared_ptr<const ov::Node>& node) -> bool {
if (!ov::is_type<const ov::op::v0::FakeQuantize>(node) && node->get_output_element_type(0) != node->get_input_element_type(0))
if (!ov::is_type<const ov::op::v0::FakeQuantize>(node) &&
node->get_output_element_type(0).size() > node->get_input_element_type(0).size())
return true;
if (node->get_input_size() >= 2) {
return node->get_input_element_type(1) == ov::element::i8 ||
Expand Down

0 comments on commit 7f90952

Please sign in to comment.