[PATCH v1 1/1] Set Prefer_No_AVX512 flag for hygon platform
Florian Weimer
fweimer@redhat.com
Tue Oct 14 07:55:34 GMT 2025
* 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.
And surely this must be under the HygonGenuine condition?
Thanks,
Florian
More information about the Libc-alpha
mailing list