Skip to content

Commit

Permalink
[Snippets][CPU] Fix int8 handling and disable snippets for unhandled …
Browse files Browse the repository at this point in the history
…types in callbacks (#28596)

### Details:
- Fix default return value in snippets callback on unhandled type
(disable if the type is not explicitly supported)
- Fix check for 8 bit integer values (handle both signed and unsigned)

### Tickets:
 - 160487
  • Loading branch information
aobolensk authored Feb 7, 2025
1 parent f403368 commit a0022e7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ void Transformations::MainSnippets(void) {
const auto is_bf16 = (in_type0 == ov::element::bf16 && in_type1 == ov::element::bf16) ||
((in_type0 == element::f32 && in_type1 == ov::element::f32 &&
config.inferencePrecision == ov::element::bf16));
const auto is_int8 = in_type0 == ov::element::i8;
const auto is_int8 = (in_type0 == element::i8 || in_type0 == element::u8) && (in_type1 == element::i8);
if (matmul->get_transpose_a()) {
return false;
}
Expand All @@ -1096,7 +1096,7 @@ void Transformations::MainSnippets(void) {
if (is_fp16) {
return dnnl::impl::cpu::x64::mayiuse(dnnl::impl::cpu::x64::avx512_core_amx_fp16);
}
return true;
return false;
};
auto is_unsupported_parallel_work_amount = [&](const std::shared_ptr<const ov::Node>& n,
const ov::PartialShape& shape) {
Expand Down

0 comments on commit a0022e7

Please sign in to comment.