Skip to content

Commit

Permalink
[Snippets][CPU] Disabled Quantized MHA tokenization on AVX2_VNNI2
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sidorova committed Aug 26, 2024
1 parent 13650e9 commit 74547c5
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -963,9 +963,13 @@ void Transformations::MainSnippets(void) {
// The current solution with ExtractExplicitMatMulTranspose pass is slower for non-f32 cases than using of brgemm_copy_b kernel
if (matmul->get_transpose_a() || matmul->get_transpose_b())
return false;
if (in_type0 == ov::element::i8)
if (in_type0 == ov::element::i8) {
// [150531] AVX2_VNNI_2 is not fully supported yet
if (dnnl::impl::cpu::x64::mayiuse(dnnl::impl::cpu::x64::avx2_vnni_2))
return false;
return dnnl::impl::cpu::x64::mayiuse(dnnl::impl::cpu::x64::avx512_core_vnni) ||
dnnl::impl::cpu::x64::mayiuse(dnnl::impl::cpu::x64::avx2_vnni);
}
if ((in_type0 == ov::element::bf16 && in_type1 == ov::element::bf16) ||
((in_type0 == element::f32 && in_type1 == ov::element::f32 && inferencePrecision == ov::element::bf16))) {
// Implementation calls AMX BF16 brgemm only for tensors with K and N aligned on 2, otherwise fallbacks on vector impl
Expand Down

0 comments on commit 74547c5

Please sign in to comment.