diff options
author | Emma Finn <emma.finn@intel.com> | 2022-07-15 10:16:19 +0000 |
---|---|---|
committer | Ian Stokes <ian.stokes@intel.com> | 2022-07-15 11:40:20 +0100 |
commit | 529af67146a7695036a9fa8395616af4f28bbc7c (patch) | |
tree | 45fbd9a4e26546ae10f117edd843ee4d5acf2112 /m4 | |
parent | b52e0b396e59217ba7f291da5dd64f504683edaf (diff) | |
download | openvswitch-529af67146a7695036a9fa8395616af4f28bbc7c.tar.gz |
odp-execute: Add ISA implementation of actions.
This commit adds the AVX512 implementation of the action functionality.
Usage:
$ ovs-appctl odp-execute/action-impl-set avx512
Signed-off-by: Emma Finn <emma.finn@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Co-authored-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/openvswitch.m4 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 index 4c3bace6e..fe51455b4 100644 --- a/m4/openvswitch.m4 +++ b/m4/openvswitch.m4 @@ -421,6 +421,35 @@ AC_DEFUN([OVS_CHECK_SPHINX], AC_ARG_VAR([SPHINXBUILD]) AM_CONDITIONAL([HAVE_SPHINX], [test "$SPHINXBUILD" != none])]) + +dnl Checks for compiler correctly emitting AVX512-VL vpermd instruction. +dnl GCC5 says it exports AVX512-VL, but it doesn't implement "vpermd" instruction +dnl resulting in compilation failures. To workaround this "reported vs actual" +dnl mismatch, we compile a small snippet, and conditionally enable AVX512-VL. +AC_DEFUN([OVS_CHECK_GCC_AVX512VL], [ + AC_MSG_CHECKING([whether compiler correctly emits AVX512-VL]) + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([#include <immintrin.h> + static void __attribute__((__target__("avx512vl"))) + check_permutexvar(void) + { + __m256i v_swap32a = _mm256_setr_epi32(0x0, 0x4, 0xF, + 0xF, 0xF, 0xF, + 0xF, 0xF); + v_swap32a = _mm256_permutexvar_epi32(v_swap32a, + v_swap32a); + }],[])], + [AC_MSG_RESULT([yes]) + ovs_cv_gcc_avx512vl_good=yes], + [AC_MSG_RESULT([no]) + ovs_cv_gcc_avx512vl_good=no]) + if test "$ovs_cv_gcc_avx512vl_good" = yes; then + AC_DEFINE([HAVE_GCC_AVX512VL_GOOD], [1], + [Define to 1 if gcc implements the vpermd instruction.]) + fi + AM_CONDITIONAL([HAVE_GCC_AVX512VL_GOOD], + [test "$ovs_cv_gcc_avx512vl_good" = yes])]) + dnl Checks for binutils/assembler known issue with AVX512. dnl Due to backports, we probe assembling a reproducer instead of checking dnl binutils version string. More details, including ASM dumps and debug here: |