Skip to content

Commit d8eb502

Browse files
fix match_acl_int8_conv_swish_fq_chain to check Conv input type
1 parent 6c323ed commit d8eb502

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

  • src/plugins/intel_cpu/src/transformations

src/plugins/intel_cpu/src/transformations/utils.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ bool match_acl_int8_conv_fq_chain(const std::shared_ptr<const ov::Node>& node) {
9292
}
9393

9494
bool match_acl_int8_conv_swish_fq_chain(const std::shared_ptr<const ov::Node>& node) {
95-
if (!node) {
96-
return false;
97-
}
98-
if (!ov::is_type<const ov::op::v0::FakeQuantize>(node) ||
99-
!any_of(node->get_output_element_type(0), ov::element::Type_t::u8, ov::element::Type_t::i8)) {
95+
if (!node || !ov::is_type<const ov::op::v0::FakeQuantize>(node)) {
10096
return false;
10197
}
10298

@@ -115,7 +111,10 @@ bool match_acl_int8_conv_swish_fq_chain(const std::shared_ptr<const ov::Node>& n
115111
const auto& pattern_map = matcher.get_pattern_value_map();
116112
const auto conv_node = pattern_map.at(conv).get_node_shared_ptr();
117113

118-
return conv_node->get_input_element_type(1) == ov::element::Type_t::i8;
114+
return any_of(conv_node->get_input_element_type(0),
115+
ov::element::Type_t::i8,
116+
ov::element::Type_t::u8) &&
117+
conv_node->get_input_element_type(1)== ov::element::Type_t::i8;
119118
}
120119

121120
bool match_conv_stride_oc_ic_limit(const std::shared_ptr<const ov::Node>& node,

0 commit comments

Comments
 (0)