On 23/07/2019 10:40, Peter Robinson wrote:
>> After preliminary discussions with CPU vendors, we propose
AVX2 as the
>> new baseline. AVX2 support was introduced into CPUs from 2013 to
>> 2015. See
[
https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#CPUs_with_AVX2
>> CPUs with AVX2].
>
> This is not what I'd call a good idea. I've had to shoot it down
> several times on internal mailing lists for RHEL, I think it's even
> less a good idea for Fedora.
>
> Skylake Pentium and Celeron models - dating from 2015 - don't have AVX
> at all. Why do we want to break them? Has Intel promised they're not
> going to pull a trick like that again?
>
> If we really want to chase after Clear Linux benchmarks then fix ld.so
> to know that avx2 is a capability (like we could for i686 + sse2).
> Moving the baseline like this is far, far too aggressive.
IBM did something to run optimised Power9 binaries on Power8, if I
remember correctly it was IFUNC in glibc, so they could have optimised
paths so I don't see why the same sort of thing couldn't be used for
the AVX2.
It absolutely can, as discussed extensively on IRC last night...
There's a pretty good summary here
https://lwn.net/Articles/691932/ but
broadly speaking you can either use the target_clones attribute on a
function to have gcc compile multiple versions for different targets
along with an ifunc to choose one at run time, or if you have your own
hand rolled implementations then mark them with the target attribute
and let gcc create the ifunc.
Tom
--
Tom Hughes (tom(a)compton.nu)
http://compton.nu/