From 3238290df5ecb9e0eb0c4254d20bf668c3bc1408 Mon Sep 17 00:00:00 2001 From: Maksim Kutakov Date: Wed, 14 Feb 2024 11:06:41 +0100 Subject: [PATCH] [CPU] Use JIT conv primitves for avx2 (#22788) ### Details: Bring back JIT convolution oneDNN primitives for avx2 platforms. --- src/plugins/intel_cpu/src/nodes/conv.cpp | 8 ++++---- .../custom/single_layer_tests/classes/convolution.cpp | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/plugins/intel_cpu/src/nodes/conv.cpp b/src/plugins/intel_cpu/src/nodes/conv.cpp index a70d2525f68a93..59721c5df76c4d 100644 --- a/src/plugins/intel_cpu/src/nodes/conv.cpp +++ b/src/plugins/intel_cpu/src/nodes/conv.cpp @@ -346,14 +346,14 @@ const std::vector& Convolution::getDefaultImplPriority() { impl_desc_type::jit_avx512_amx, impl_desc_type::brgconv_avx512_1x1, impl_desc_type::brgconv_avx512, + impl_desc_type::jit_uni_dw, + impl_desc_type::jit_uni_1x1, + impl_desc_type::jit_uni, impl_desc_type::jit_avx512_dw, impl_desc_type::jit_avx512_1x1, impl_desc_type::jit_avx512, impl_desc_type::brgconv_avx2_1x1, impl_desc_type::brgconv_avx2, - impl_desc_type::jit_uni_dw, - impl_desc_type::jit_uni_1x1, - impl_desc_type::jit_uni, impl_desc_type::jit_avx2_dw, impl_desc_type::jit_avx2_1x1, impl_desc_type::jit_avx2, @@ -390,7 +390,7 @@ const std::vector& Convolution::getDefaultImplPriority() { const bool Convolution::isBrgConvAvailable() { static const bool isBrgConvAvailable = dnnl::impl::cpu::x64::mayiuse(dnnl::impl::cpu::x64::avx512_core) || - dnnl::impl::cpu::x64::mayiuse(dnnl::impl::cpu::x64::avx2); + dnnl::impl::cpu::x64::mayiuse(dnnl::impl::cpu::x64::avx2_vnni_2); return isBrgConvAvailable; } diff --git a/src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/convolution.cpp b/src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/convolution.cpp index 688a585ed39cad..71d8f0b3e2fa14 100644 --- a/src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/convolution.cpp +++ b/src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/convolution.cpp @@ -196,6 +196,11 @@ TEST_P(ConvolutionLayerCPUTest, CompareWithRefs) { } if (!priority.empty()) { + // Skip all the brgconv avx2 tests for now. Current brgconv_avx2 is disabled due to perf regression[CVS-105756]. + // This convolution test code has already covered brgconv avx2 primitive. + // @todo: Remove this once brgconv_avx2 is enabled for convolution node. + if (priority[0].find("brgconv_avx2") != std::string::npos) + GTEST_SKIP() << "Disabled test due to the brgconv_avx2 is not enabled." << std::endl; // Skip tests for brgconv convolution where kernel size = 1x1 if (one_of(priority[0], "brgconv_avx512", "brgconv_avx512_amx", "brgconv_avx2")) { bool is_1x1 = true;