DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Question Of binutils-avx512-check
@ 2021-05-20 21:22 Liang Ma
  2021-05-21  7:04 ` Thomas Monjalon
  0 siblings, 1 reply; 9+ messages in thread
From: Liang Ma @ 2021-05-20 21:22 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, thomas

Hi All, 
   I try to build DPDK with debug  build-type but the building process is
   failed becuase of AVX512 code from librte-acl. The release build type
   is fine. Hence, I dig a bit into the avx512 enabling logic of meson.

   I found the main logic is implemented inside binutils-avx512-check.sh.

   It looks the script focus on checking the compatiblity of tools-chain
   instead of CPUID. My problem is current script will produce avx512
   code even I build dpdk on AMD platform. I understand the avx512 code
   may not be used in runtime. I just wonder why we can not check the
   cpuid as well ?

Regards
Liang

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] Question Of binutils-avx512-check
  2021-05-20 21:22 [dpdk-dev] Question Of binutils-avx512-check Liang Ma
@ 2021-05-21  7:04 ` Thomas Monjalon
  2021-05-21  7:56   ` Liang Ma
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2021-05-21  7:04 UTC (permalink / raw)
  To: Liang Ma; +Cc: dev, bruce.richardson

20/05/2021 23:22, Liang Ma:
> Hi All, 
>    I try to build DPDK with debug  build-type but the building process is
>    failed becuase of AVX512 code from librte-acl. The release build type
>    is fine. Hence, I dig a bit into the avx512 enabling logic of meson.
> 
>    I found the main logic is implemented inside binutils-avx512-check.sh.
> 
>    It looks the script focus on checking the compatiblity of tools-chain
>    instead of CPUID. My problem is current script will produce avx512
>    code even I build dpdk on AMD platform. I understand the avx512 code
>    may not be used in runtime. I just wonder why we can not check the
>    cpuid as well ?

The same binary can be run on multiple CPUs,
so it makes no sense to check the compilation CPUID in generic compilation.
For native build, why not.

Anyway, your problem is at compilation, not runtime, right?



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] Question Of binutils-avx512-check
  2021-05-21  7:04 ` Thomas Monjalon
@ 2021-05-21  7:56   ` Liang Ma
  2021-05-21  8:19     ` Bruce Richardson
  0 siblings, 1 reply; 9+ messages in thread
From: Liang Ma @ 2021-05-21  7:56 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, bruce.richardson

On Fri, May 21, 2021 at 09:04:06AM +0200, Thomas Monjalon wrote:
> 20/05/2021 23:22, Liang Ma:
> > Hi All, 
> >    I try to build DPDK with debug  build-type but the building process is
> >    failed becuase of AVX512 code from librte-acl. The release build type
> >    is fine. Hence, I dig a bit into the avx512 enabling logic of meson.
> > 
> >    I found the main logic is implemented inside binutils-avx512-check.sh.
> > 
> >    It looks the script focus on checking the compatiblity of tools-chain
> >    instead of CPUID. My problem is current script will produce avx512
> >    code even I build dpdk on AMD platform. I understand the avx512 code
> >    may not be used in runtime. I just wonder why we can not check the
> >    cpuid as well ?
> 
> The same binary can be run on multiple CPUs,
> so it makes no sense to check the compilation CPUID in generic compilation.
> For native build, why not.
> 
> Anyway, your problem is at compilation, not runtime, right?
Yes, the problem is at compilation. 
Given X86_64, gcc-6.30, Debug build always failed due
to librte_acl AVX512 code. I hope there is a graceful switch allow
developer disable avx512 in certain circumstance.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] Question Of binutils-avx512-check
  2021-05-21  7:56   ` Liang Ma
@ 2021-05-21  8:19     ` Bruce Richardson
  2021-05-21  8:55       ` Liang Ma
  0 siblings, 1 reply; 9+ messages in thread
From: Bruce Richardson @ 2021-05-21  8:19 UTC (permalink / raw)
  To: Liang Ma; +Cc: Thomas Monjalon, dev, Konstantin Ananyev

On Fri, May 21, 2021 at 08:56:50AM +0100, Liang Ma wrote:
> On Fri, May 21, 2021 at 09:04:06AM +0200, Thomas Monjalon wrote:
> > 20/05/2021 23:22, Liang Ma:
> > > Hi All, 
> > >    I try to build DPDK with debug  build-type but the building process is
> > >    failed becuase of AVX512 code from librte-acl. The release build type
> > >    is fine. Hence, I dig a bit into the avx512 enabling logic of meson.
> > > 
> > >    I found the main logic is implemented inside binutils-avx512-check.sh.
> > > 
> > >    It looks the script focus on checking the compatiblity of tools-chain
> > >    instead of CPUID. My problem is current script will produce avx512
> > >    code even I build dpdk on AMD platform. I understand the avx512 code
> > >    may not be used in runtime. I just wonder why we can not check the
> > >    cpuid as well ?
> > 
> > The same binary can be run on multiple CPUs,
> > so it makes no sense to check the compilation CPUID in generic compilation.
> > For native build, why not.
> > 
> > Anyway, your problem is at compilation, not runtime, right?
> Yes, the problem is at compilation. 
> Given X86_64, gcc-6.30, Debug build always failed due
> to librte_acl AVX512 code. I hope there is a graceful switch allow
> developer disable avx512 in certain circumstance.

Add ACL maintainer on CC. Sounds like there is a problem with the AVX512
support detection for acl library. Looking at the meson build code, other
drivers, such as i40e, do their avx512 detection differently from ACL.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] Question Of binutils-avx512-check
  2021-05-21  8:19     ` Bruce Richardson
@ 2021-05-21  8:55       ` Liang Ma
  2021-05-21  9:07         ` Bruce Richardson
  2021-05-21  9:52         ` Ananyev, Konstantin
  0 siblings, 2 replies; 9+ messages in thread
From: Liang Ma @ 2021-05-21  8:55 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Thomas Monjalon, dev, Konstantin Ananyev

On Fri, May 21, 2021 at 09:19:53AM +0100, Bruce Richardson wrote:
> On Fri, May 21, 2021 at 08:56:50AM +0100, Liang Ma wrote:
> > On Fri, May 21, 2021 at 09:04:06AM +0200, Thomas Monjalon wrote:
> > > 20/05/2021 23:22, Liang Ma:
> > > > Hi All, 
> > > >    I try to build DPDK with debug  build-type but the building process is
> > > >    failed becuase of AVX512 code from librte-acl. The release build type
> > > >    is fine. Hence, I dig a bit into the avx512 enabling logic of meson.
> > > > 
> > > >    I found the main logic is implemented inside binutils-avx512-check.sh.
> > > > 
> > > >    It looks the script focus on checking the compatiblity of tools-chain
> > > >    instead of CPUID. My problem is current script will produce avx512
> > > >    code even I build dpdk on AMD platform. I understand the avx512 code
> > > >    may not be used in runtime. I just wonder why we can not check the
> > > >    cpuid as well ?
> > > 
> > > The same binary can be run on multiple CPUs,
> > > so it makes no sense to check the compilation CPUID in generic compilation.
> > > For native build, why not.
> > > 
> > > Anyway, your problem is at compilation, not runtime, right?
> > Yes, the problem is at compilation. 
> > Given X86_64, gcc-6.30, Debug build always failed due
> > to librte_acl AVX512 code. I hope there is a graceful switch allow
> > developer disable avx512 in certain circumstance.
> 
> Add ACL maintainer on CC. Sounds like there is a problem with the AVX512
> support detection for acl library. Looking at the meson build code, other
> drivers, such as i40e, do their avx512 detection differently from ACL.
there are 2 concerns here: 
1. librte_acl specific issue cause the debug building failure with gcc 6.30.
2. More generic, if that's possible to have a graceful switch for avx512.(e.g. build option) 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] Question Of binutils-avx512-check
  2021-05-21  8:55       ` Liang Ma
@ 2021-05-21  9:07         ` Bruce Richardson
  2021-05-21  9:56           ` Liang Ma
  2021-05-21  9:52         ` Ananyev, Konstantin
  1 sibling, 1 reply; 9+ messages in thread
From: Bruce Richardson @ 2021-05-21  9:07 UTC (permalink / raw)
  To: Liang Ma; +Cc: Thomas Monjalon, dev, Konstantin Ananyev

On Fri, May 21, 2021 at 09:55:37AM +0100, Liang Ma wrote:
> On Fri, May 21, 2021 at 09:19:53AM +0100, Bruce Richardson wrote:
> > On Fri, May 21, 2021 at 08:56:50AM +0100, Liang Ma wrote:
> > > On Fri, May 21, 2021 at 09:04:06AM +0200, Thomas Monjalon wrote:
> > > > 20/05/2021 23:22, Liang Ma:
> > > > > Hi All, 
> > > > >    I try to build DPDK with debug  build-type but the building process is
> > > > >    failed becuase of AVX512 code from librte-acl. The release build type
> > > > >    is fine. Hence, I dig a bit into the avx512 enabling logic of meson.
> > > > > 
> > > > >    I found the main logic is implemented inside binutils-avx512-check.sh.
> > > > > 
> > > > >    It looks the script focus on checking the compatiblity of tools-chain
> > > > >    instead of CPUID. My problem is current script will produce avx512
> > > > >    code even I build dpdk on AMD platform. I understand the avx512 code
> > > > >    may not be used in runtime. I just wonder why we can not check the
> > > > >    cpuid as well ?
> > > > 
> > > > The same binary can be run on multiple CPUs,
> > > > so it makes no sense to check the compilation CPUID in generic compilation.
> > > > For native build, why not.
> > > > 
> > > > Anyway, your problem is at compilation, not runtime, right?
> > > Yes, the problem is at compilation. 
> > > Given X86_64, gcc-6.30, Debug build always failed due
> > > to librte_acl AVX512 code. I hope there is a graceful switch allow
> > > developer disable avx512 in certain circumstance.
> > 
> > Add ACL maintainer on CC. Sounds like there is a problem with the AVX512
> > support detection for acl library. Looking at the meson build code, other
> > drivers, such as i40e, do their avx512 detection differently from ACL.
> there are 2 concerns here: 
> 1. librte_acl specific issue cause the debug building failure with gcc 6.30.
+1. This needs to be investigated and fixed if it's causing problems.

> 2. More generic, if that's possible to have a graceful switch for avx512.(e.g. build option) 
Not sure why this is wanted because any AVX512 paths won't be used at
runtime unless suitable for use. In any case, this should be already doable
by passing -mno-avx512 flag in CFLAGS/c_args at config time.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] Question Of binutils-avx512-check
  2021-05-21  8:55       ` Liang Ma
  2021-05-21  9:07         ` Bruce Richardson
@ 2021-05-21  9:52         ` Ananyev, Konstantin
  2021-05-21 10:01           ` Liang Ma
  1 sibling, 1 reply; 9+ messages in thread
From: Ananyev, Konstantin @ 2021-05-21  9:52 UTC (permalink / raw)
  To: Liang Ma, Richardson, Bruce; +Cc: Thomas Monjalon, dev


 
> On Fri, May 21, 2021 at 09:19:53AM +0100, Bruce Richardson wrote:
> > On Fri, May 21, 2021 at 08:56:50AM +0100, Liang Ma wrote:
> > > On Fri, May 21, 2021 at 09:04:06AM +0200, Thomas Monjalon wrote:
> > > > 20/05/2021 23:22, Liang Ma:
> > > > > Hi All,
> > > > >    I try to build DPDK with debug  build-type but the building process is
> > > > >    failed becuase of AVX512 code from librte-acl. The release build type
> > > > >    is fine. Hence, I dig a bit into the avx512 enabling logic of meson.
> > > > >
> > > > >    I found the main logic is implemented inside binutils-avx512-check.sh.
> > > > >
> > > > >    It looks the script focus on checking the compatiblity of tools-chain
> > > > >    instead of CPUID. My problem is current script will produce avx512
> > > > >    code even I build dpdk on AMD platform. I understand the avx512 code
> > > > >    may not be used in runtime. I just wonder why we can not check the
> > > > >    cpuid as well ?
> > > >
> > > > The same binary can be run on multiple CPUs,
> > > > so it makes no sense to check the compilation CPUID in generic compilation.
> > > > For native build, why not.
> > > >
> > > > Anyway, your problem is at compilation, not runtime, right?
> > > Yes, the problem is at compilation.
> > > Given X86_64, gcc-6.30, Debug build always failed due
> > > to librte_acl AVX512 code. I hope there is a graceful switch allow
> > > developer disable avx512 in certain circumstance.
> >
> > Add ACL maintainer on CC. Sounds like there is a problem with the AVX512
> > support detection for acl library. Looking at the meson build code, other
> > drivers, such as i40e, do their avx512 detection differently from ACL.

If you feel something is wrong in particular, please let me know.

> there are 2 concerns here:
> 1. librte_acl specific issue cause the debug building failure with gcc 6.30.

gcc 6.3 is pretty rare these days, but I'll try to find one to reproduce the issue.
Meanwhile  can you follow the procedure - open a new ticket in bugzilla,
and provide more info: command to reproduce, particular error output, etc.   

> 2. More generic, if that's possible to have a graceful switch for avx512.(e.g. build option)

I don't see much point in that.
avx512 code-path wouldn't be used at run-time if your box doesn't support it.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] Question Of binutils-avx512-check
  2021-05-21  9:07         ` Bruce Richardson
@ 2021-05-21  9:56           ` Liang Ma
  0 siblings, 0 replies; 9+ messages in thread
From: Liang Ma @ 2021-05-21  9:56 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Thomas Monjalon, dev, Konstantin Ananyev

On Fri, May 21, 2021 at 10:07:07AM +0100, Bruce Richardson wrote:
> On Fri, May 21, 2021 at 09:55:37AM +0100, Liang Ma wrote:
> > On Fri, May 21, 2021 at 09:19:53AM +0100, Bruce Richardson wrote:
> > > On Fri, May 21, 2021 at 08:56:50AM +0100, Liang Ma wrote:
> > > > On Fri, May 21, 2021 at 09:04:06AM +0200, Thomas Monjalon wrote:
> > > > > 20/05/2021 23:22, Liang Ma:
> > > > > > Hi All, 
> > > > > >    I try to build DPDK with debug  build-type but the building process is
> > > > > >    failed becuase of AVX512 code from librte-acl. The release build type
> > > > > >    is fine. Hence, I dig a bit into the avx512 enabling logic of meson.
> > > > > > 
> > > > > >    I found the main logic is implemented inside binutils-avx512-check.sh.
> > > > > > 
> > > > > >    It looks the script focus on checking the compatiblity of tools-chain
> > > > > >    instead of CPUID. My problem is current script will produce avx512
> > > > > >    code even I build dpdk on AMD platform. I understand the avx512 code
> > > > > >    may not be used in runtime. I just wonder why we can not check the
> > > > > >    cpuid as well ?
> > > > > 
> > > > > The same binary can be run on multiple CPUs,
> > > > > so it makes no sense to check the compilation CPUID in generic compilation.
> > > > > For native build, why not.
> > > > > 
> > > > > Anyway, your problem is at compilation, not runtime, right?
> > > > Yes, the problem is at compilation. 
> > > > Given X86_64, gcc-6.30, Debug build always failed due
> > > > to librte_acl AVX512 code. I hope there is a graceful switch allow
> > > > developer disable avx512 in certain circumstance.
> > > 
> > > Add ACL maintainer on CC. Sounds like there is a problem with the AVX512
> > > support detection for acl library. Looking at the meson build code, other
> > > drivers, such as i40e, do their avx512 detection differently from ACL.
> > there are 2 concerns here: 
> > 1. librte_acl specific issue cause the debug building failure with gcc 6.30.
> +1. This needs to be investigated and fixed if it's causing problems.
> 
> > 2. More generic, if that's possible to have a graceful switch for avx512.(e.g. build option) 
> Not sure why this is wanted because any AVX512 paths won't be used at
> runtime unless suitable for use. In any case, this should be already doable
> by passing -mno-avx512 flag in CFLAGS/c_args at config time.
sure, that works, I use that method this moment. It's nice to have a
explicit way, because I use 30 mins  to figure out that way. ;-)  

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] Question Of binutils-avx512-check
  2021-05-21  9:52         ` Ananyev, Konstantin
@ 2021-05-21 10:01           ` Liang Ma
  0 siblings, 0 replies; 9+ messages in thread
From: Liang Ma @ 2021-05-21 10:01 UTC (permalink / raw)
  To: Ananyev, Konstantin; +Cc: Richardson, Bruce, Thomas Monjalon, dev

On Fri, May 21, 2021 at 09:52:30AM +0000, Ananyev, Konstantin wrote:
> 
>  
> > On Fri, May 21, 2021 at 09:19:53AM +0100, Bruce Richardson wrote:
> > > On Fri, May 21, 2021 at 08:56:50AM +0100, Liang Ma wrote:
> > > > On Fri, May 21, 2021 at 09:04:06AM +0200, Thomas Monjalon wrote:
> > > > > 20/05/2021 23:22, Liang Ma:
> > > > > > Hi All,
> > > > > >    I try to build DPDK with debug  build-type but the building process is
> > > > > >    failed becuase of AVX512 code from librte-acl. The release build type
> > > > > >    is fine. Hence, I dig a bit into the avx512 enabling logic of meson.
> > > > > >
> > > > > >    I found the main logic is implemented inside binutils-avx512-check.sh.
> > > > > >
> > > > > >    It looks the script focus on checking the compatiblity of tools-chain
> > > > > >    instead of CPUID. My problem is current script will produce avx512
> > > > > >    code even I build dpdk on AMD platform. I understand the avx512 code
> > > > > >    may not be used in runtime. I just wonder why we can not check the
> > > > > >    cpuid as well ?
> > > > >
> > > > > The same binary can be run on multiple CPUs,
> > > > > so it makes no sense to check the compilation CPUID in generic compilation.
> > > > > For native build, why not.
> > > > >
> > > > > Anyway, your problem is at compilation, not runtime, right?
> > > > Yes, the problem is at compilation.
> > > > Given X86_64, gcc-6.30, Debug build always failed due
> > > > to librte_acl AVX512 code. I hope there is a graceful switch allow
> > > > developer disable avx512 in certain circumstance.
> > >
> > > Add ACL maintainer on CC. Sounds like there is a problem with the AVX512
> > > support detection for acl library. Looking at the meson build code, other
> > > drivers, such as i40e, do their avx512 detection differently from ACL.
> 
> If you feel something is wrong in particular, please let me know.
> 
> > there are 2 concerns here:
> > 1. librte_acl specific issue cause the debug building failure with gcc 6.30.
> 
> gcc 6.3 is pretty rare these days, but I'll try to find one to reproduce the issue.
> Meanwhile  can you follow the procedure - open a new ticket in bugzilla,
> and provide more info: command to reproduce, particular error output, etc.   
Many thanks!  I will log it in bugzilla.
> 
> > 2. More generic, if that's possible to have a graceful switch for avx512.(e.g. build option)
> 
> I don't see much point in that.
> avx512 code-path wouldn't be used at run-time if your box doesn't support it.
sure, I understand the code path will not be touched at run-time. but
put it this way, what's the point to include this code in binary, if I
know the box not support it. It's nice to have a knob :-).   

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-21 10:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 21:22 [dpdk-dev] Question Of binutils-avx512-check Liang Ma
2021-05-21  7:04 ` Thomas Monjalon
2021-05-21  7:56   ` Liang Ma
2021-05-21  8:19     ` Bruce Richardson
2021-05-21  8:55       ` Liang Ma
2021-05-21  9:07         ` Bruce Richardson
2021-05-21  9:56           ` Liang Ma
2021-05-21  9:52         ` Ananyev, Konstantin
2021-05-21 10:01           ` Liang Ma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).