Skip to content

Commit

Permalink
re-add avx2_vnni_2 configure as temp commit been dropped
Browse files Browse the repository at this point in the history
  • Loading branch information
liubo-intel committed Oct 16, 2023
1 parent 339d489 commit 441b972
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/inference/dev_api/ie_system_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ using ov::with_cpu_x86_avx2;
*/
using ov::with_cpu_x86_avx2_vnni;

/**
* @brief Checks whether CPU supports AVX2_VNNI_2 capability
* @ingroup ie_dev_api_system_conf
* @return `True` is AVX2_VNNI_2 instructions are available, `false` otherwise
*/
using ov::with_cpu_x86_avx2_vnni_2;

/**
* @brief Checks whether CPU supports AVX 512 capability
* @ingroup ie_dev_api_system_conf
Expand Down
7 changes: 7 additions & 0 deletions src/inference/dev_api/openvino/runtime/system_conf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ OPENVINO_RUNTIME_API bool with_cpu_x86_avx2();
*/
OPENVINO_RUNTIME_API bool with_cpu_x86_avx2_vnni();

/**
* @brief Checks whether CPU supports AVX2_VNNI_2 capability
* @ingroup ov_dev_api_system_conf
* @return `True` is AVX2_VNNI_2 instructions are available, `false` otherwise
*/
OPENVINO_RUNTIME_API bool with_cpu_x86_avx2_vnni_2();

/**
* @brief Checks whether CPU supports AVX 512 capability
* @ingroup ov_dev_api_system_conf
Expand Down
5 changes: 5 additions & 0 deletions src/inference/src/system_conf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ bool with_cpu_x86_avx2_vnni() {
return get_cpu_info().has(Xbyak::util::Cpu::tAVX2 | Xbyak::util::Cpu::tAVX_VNNI);
}

bool with_cpu_x86_avx2_vnni_2() {
return with_cpu_x86_avx2_vnni() &&
get_cpu_info().has(Xbyak::util::Cpu::tAVX_VNNI_INT8 | Xbyak::util::Cpu::tAVX_NE_CONVERT);
}

bool with_cpu_x86_avx512f() {
return get_cpu_info().has(Xbyak::util::Cpu::tAVX512F);
}
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/intel_cpu/src/nodes/conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ const std::vector<impl_desc_type>& Convolution::getDefaultImplPriority() {
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_avx2_dw,
impl_desc_type::jit_avx2_1x1,
impl_desc_type::jit_avx2,
Expand Down

0 comments on commit 441b972

Please sign in to comment.