From a0022e7027e126d30e0994c5ef390b5cde878ab5 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Fri, 7 Feb 2025 16:20:20 +0100 Subject: [PATCH] [Snippets][CPU] Fix int8 handling and disable snippets for unhandled 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 --- .../intel_cpu/src/transformations/transformation_pipeline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/intel_cpu/src/transformations/transformation_pipeline.cpp b/src/plugins/intel_cpu/src/transformations/transformation_pipeline.cpp index cb683e27490e24..62fae16c29f917 100644 --- a/src/plugins/intel_cpu/src/transformations/transformation_pipeline.cpp +++ b/src/plugins/intel_cpu/src/transformations/transformation_pipeline.cpp @@ -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; } @@ -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& n, const ov::PartialShape& shape) {