I want to package SVT-AV1:
It is specifically designed for 5th Generation Intel® Core™ processor, (Intel® Xeon® CPUs, E5-v4 or newer). To use this, it passes the -mavx flags to gcc. Can I have an exception to use this flag? It doesn't make sense to package it without it as the encoder is specifically designed to exploit that feature.
So this would render the package unusable on any CPU dating from the earlier half of 2011, which I do think is kind of problematic given that we still sort of try to support things far older. It's basically really bad to have something which will install but then crashes when run because of an unsupported CPU type.
But I'm not really sure what this package does; I see they even have avx2-specific assembly so either they're already handling CPUs without full support or the package won't work even if built without -mavx.
In the modern era, gcc and glibc provides for alternate functions which automatically get used on the relevant CPU types. For example, see https://lwn.net/Articles/691932/. That is what I would expect an upstream to do. It may be possible to just patch in a few __attribute__((target_clones("avx", "default"))) lines in front of the critical functions. Maybe upstream is doing something like that and I'm just not seeing it. (Maybe you'd get even more performance by adding "avx2" to that list as well, .)
I'm not sure we would be the ones to grant an exception for this, but I would be against doing so without a better investigation of exactly what the code does and does not support.
The package has SSE assembly too, so I'm not sure it must use -mavx for all compiles. This may have been the simplest solution for them to implement, but if they have runtime dispatch already, it's likely that they could isolate the -mavx to only the files that truly need it.
Metadata Update from @ignatenkobrain:
- Issue tagged with: meeting
We talked about this at this weeks meeting:
After discussing with upstream, they have removed -mavx in GIT master. They have moved to -march=native under a special flag, that I won't use.
Metadata Update from @eclipseo:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)
to comment on this ticket.