[PATCH v1 1/1] Set Prefer_No_AVX512 flag for hygon platform

Jiamei Xie xiejiamei@hygon.cn
Tue Oct 14 08:20:49 GMT 2025


Hi Florida,

Thanks for your reply.

> -----Original Message-----
> From: Florian Weimer <fweimer@redhat.com>
> Sent: 2025年10月14日 15:56
> To: Jiamei Xie <xiejiamei@hygon.cn>
> Cc: libc-alpha@sourceware.org; Jing Li <lijing@hygon.cn>
> Subject: Re: [PATCH v1 1/1] Set Prefer_No_AVX512 flag for hygon platform
> 
> * Jiamei Xie:
> 
> > Benchmarks indicate evex can be more profitable on Hygon hardware than
> > AVX512. So add Prefer_No_AVX512 to make it run with evex.
> >
> > Signed-off-by: Li jing <lijing@hygon.cn>
> > Signed-off-by: Xie jiamei <xiejiamei@hygon.cn>
> > ---
> >  sysdeps/x86/cpu-features.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
> > index b67ef541dd..d0d6d9305a 100644
> > --- a/sysdeps/x86/cpu-features.c
> > +++ b/sysdeps/x86/cpu-features.c
> > @@ -1131,6 +1131,10 @@ disable_tsx:
> >        update_active (cpu_features);
> >      }
> >
> > +   /* Benchmarks indicate evex can be more profitable on Hygon
> > + hardware than AVX512 */  if (model == 0x7)
> > +    cpu_features->preferred[index_arch_Prefer_No_AVX512] |=
> > + bit_arch_Prefer_No_AVX512;
> > +
> >    /* Support i586 if CX8 is available.  */
> >    if (CPU_FEATURES_CPU_P (cpu_features, CX8))
> >      cpu_features->preferred[index_arch_I586] |= bit_arch_I586;
> 
> Please wrap these lines so that they are not longer than 79 characters.

Sure ― I’ll wrap those lines to ≤ 79 characters and resend.

> And surely this must be under the HygonGenuine condition?
> 

Yes. This patch is for the Hygon Platform, whose model is 0x7. 

> Thanks,
> Florian
> 



More information about the Libc-alpha mailing list