From: Bruce Richardson <bruce.richardson@intel.com> To: "Rong, Leyi" <leyi.rong@intel.com> Cc: Ali Alnubani <alialnu@nvidia.com>, "Yigit, Ferruh" <ferruh.yigit@intel.com>, "Zhang, Qi Z" <qi.z.zhang@intel.com>, "Lu, Wenzhuo" <wenzhuo.lu@intel.com>, Andrew Rybchenko <arybchenko@solarflare.com>, David Marchand <david.marchand@redhat.com>, Raslan Darawsheh <rasland@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org> Subject: Re: [dpdk-dev] [PATCH] net/ice: add AVX512BW flag check both in build and runtime Date: Tue, 27 Oct 2020 15:57:11 +0000 Message-ID: <20201027155711.GB956@bricha3-MOBL.ger.corp.intel.com> (raw) In-Reply-To: <SN6PR11MB2621678AEC2091F3B9A55A6DEC160@SN6PR11MB2621.namprd11.prod.outlook.com> On Tue, Oct 27, 2020 at 03:36:58PM +0000, Rong, Leyi wrote: > > > -----Original Message----- > > From: Bruce Richardson <bruce.richardson@intel.com> > > Sent: Tuesday, October 27, 2020 9:28 PM > > To: Ali Alnubani <alialnu@nvidia.com> > > Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Rong, Leyi <leyi.rong@intel.com>; > > Zhang, Qi Z <qi.z.zhang@intel.com>; Lu, Wenzhuo <wenzhuo.lu@intel.com>; > > Andrew Rybchenko <arybchenko@solarflare.com>; David Marchand > > <david.marchand@redhat.com>; Raslan Darawsheh <rasland@nvidia.com>; > > dev@dpdk.org > > Subject: Re: [PATCH] net/ice: add AVX512BW flag check both in build and > > runtime > > > > On Tue, Oct 27, 2020 at 01:12:20PM +0000, Ali Alnubani wrote: > > > Hi, > > > > > > > -----Original Message----- > > > > From: Ferruh Yigit <ferruh.yigit@intel.com> > > > > Sent: Tuesday, October 27, 2020 1:57 PM > > > > To: Leyi Rong <leyi.rong@intel.com>; qi.z.zhang@intel.com; > > > > bruce.richardson@intel.com; wenzhuo.lu@intel.com; Ali Alnubani > > > > <alialnu@nvidia.com>; Andrew Rybchenko > > <arybchenko@solarflare.com>; > > > > David Marchand <david.marchand@redhat.com> > > > > Cc: dev@dpdk.org > > > > Subject: Re: [PATCH] net/ice: add AVX512BW flag check both in build > > > > and runtime > > > > > > > > On 10/27/2020 10:19 AM, Leyi Rong wrote: > > > > > Intrinsic function __mm512_bsrli_epi128 should be used in the > > > > > environment which supports AVX512BW, so adds check for this flag. > > > > > > > > > > Fixes: 5dd3b8f3af34 ("net/ice: add AVX512 vector path") > > > > > > > > > > Signed-off-by: Leyi Rong <leyi.rong@intel.com> > > > > > > > > Squashed into relevant commit in next-net, thanks. > > > > > > > > > > > > Andrew, Ali, David, > > > > > > > > Can you please confirm the issue is solved in the next-net/main? > > > > > > > > > > The build failures in CentOS 7, Ubuntu 18.04 and in OpenSUSE Leap 15.2 no > > longer reproduce. But we just noticed that Ubuntu 16.04.7 (gcc 5.4.0) is also > > failing with a different error: > > > > > > """ > > > drivers/net/ice/ice_rxtx_vec_avx512.c:1:0: error: bad value > > > (skylake-avx512) for -march= switch > > > /* SPDX-License-Identifier: BSD-3-Clause """ > > > Which is also caused by "net/ice: add AVX512 vector path". > > > > > > > I think we can drop the -march=skylake-avx512 flag in the build command for > > the avx512 file, since specifying the -mavx512f and -mavx512bw should be > > enough. Testing in an ubuntu 16.04 VM (which has 5.5 rather than 5.4 > > compiler, but should be ok), shows that the avx512 instruction set flags are > > recognised and enable the isntructions, which the -march one is not. > > > > /Bruce > > > > bruce@ubuntu-1604-vm:~$ gcc -mavx512f -mavx512bw -dM -E - < /dev/null > > | grep AVX #define __AVX512F__ 1 #define __AVX512BW__ 1 #define > > __AVX__ 1 #define __AVX2__ 1 bruce@ubuntu-1604-vm:~$ gcc - > > march=skylake-avx512 -dM -E - < /dev/null | grep AVX > > cc1: error: bad value (skylake-avx512) for -march= switch > > Hi Bruce, > > Drop -march=skylake-avx512 really impact the throughput performance in my test, although -avx512f and -avx512bw are set meanwhile. We need to find out why this is, since it really should not matter? We should be used the instruction set flags to turn on features rather than relying on a particular CPU architecture. Can you try turning on the other features present in "skylake-avx512" and see if that makes a difference. For reference, they are avx512vl, avx512cd and avx512dq. gcc -march=skylake-avx512 -dM -E - < /dev/null | grep AVX5 #define __AVX512F__ 1 #define __AVX512BW__ 1 #define __AVX512VL__ 1 #define __AVX512CD__ 1 #define __AVX512DQ__ 1 > Could we add a judgement before setting -march=skylake-avx512, the judgement can just like > if (toolchain == 'gcc' and cc.version().version_compare('>=7.0.0')) > We should never check for a specific compiler. Instead check for the compiler flag directly. /Bruce
next prev parent reply other threads:[~2020-10-27 15:57 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-27 10:19 Leyi Rong 2020-10-27 11:57 ` Ferruh Yigit 2020-10-27 12:47 ` Andrew Rybchenko 2020-10-27 13:12 ` Ali Alnubani 2020-10-27 13:27 ` Bruce Richardson 2020-10-27 15:36 ` Rong, Leyi 2020-10-27 15:57 ` Bruce Richardson [this message] 2020-10-27 13:17 ` David Marchand 2020-11-02 8:22 ` Ali Alnubani
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201027155711.GB956@bricha3-MOBL.ger.corp.intel.com \ --to=bruce.richardson@intel.com \ --cc=alialnu@nvidia.com \ --cc=arybchenko@solarflare.com \ --cc=david.marchand@redhat.com \ --cc=dev@dpdk.org \ --cc=ferruh.yigit@intel.com \ --cc=leyi.rong@intel.com \ --cc=qi.z.zhang@intel.com \ --cc=rasland@nvidia.com \ --cc=wenzhuo.lu@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git