> -----Original Message----- > From: dev <ovs-dev-boun...@openvswitch.org> On Behalf Of William Tu > Sent: Thursday 27 January 2022 03:45 > To: d...@openvswitch.org > Subject: [ovs-dev] [PATCH] acinclude: Detect avx512 vpopcntdq compiler > support. > > Ubuntu Xenial 16.04 is using GCC 5.4 and it does not support > target "-mavx512vpopcntdq" and cuases error > lib/dpif-netdev-lookup-avx512-gather.c:356:47: > error: attribute(target("avx512vpopcntdq")) is unknown > GCC 7+ supports vpopcntdq: > https://gcc.gnu.org/gcc-7/changes.html > The patch detects vpopcntdq and disables AVX512 when not found. > > Reported-by: Greg Rose <gvrose8...@gmail.com> > Signed-off-by: William Tu <u9012...@gmail.com> > --- > acinclude.m4 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/acinclude.m4 b/acinclude.m4 > index 5c971e98ce91..0c360fd1ef73 100644 > --- a/acinclude.m4 > +++ b/acinclude.m4 > @@ -77,7 +77,7 @@ dnl Checks if compiler and binutils supports AVX512. > AC_DEFUN([OVS_CHECK_AVX512], [ > OVS_CHECK_BINUTILS_AVX512 > OVS_CHECK_CC_OPTION( > - [-mavx512f], [ovs_have_cc_mavx512f=yes], [ovs_have_cc_mavx512f=no]) > + [-mavx512f -mavx512vpopcntdq], [ovs_have_cc_mavx512f=yes], > [ovs_have_cc_mavx512f=no]) > AM_CONDITIONAL([HAVE_AVX512F], [test $ovs_have_cc_mavx512f = yes]) > if test "$ovs_have_cc_mavx512f" = yes; then > AC_DEFINE([HAVE_AVX512F], [1], > --
Hi William, Thanks for this fix, I can verify that this fixes the below error for GCC 5 (it will work for GCC 4.9 - GCC 6): make[3]: Entering directory '/root/cian/ovs/datapath' lib/dpif-netdev-lookup-avx512-gather.c:90:1: error: attribute(target("avx512vpopcntdq")) is unknown We would like to re-spin a new version of this patch that fixes the compile error for the relevant GCC versions (GCC 4.9 - GCC 6) but allows some AVX512 code to be build. For setups with GCC 6 for example, we still have support for most of the AVX512 ISA used in OVS, so we can still enable building of this ISA, while still correctly avoiding the avx512vpopcntdq error that your patch does. Please allow us a few days to test and re-spin a new version of this patch. Thanks, Cian _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev