Skip to content

Commit

Permalink
[CPU] Use JIT conv primitves for avx2 (openvinotoolkit#22788)
Browse files Browse the repository at this point in the history
### Details:
Bring back JIT convolution oneDNN primitives for avx2 platforms.
  • Loading branch information
maxnick committed Feb 14, 2024
1 parent f4877d6 commit 3238290
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/intel_cpu/src/nodes/conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,14 @@ const std::vector<impl_desc_type>& 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,
Expand Down Expand Up @@ -390,7 +390,7 @@ const std::vector<impl_desc_type>& 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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3238290

Please sign in to comment.