You are not logged in.

#1 2020-04-08 09:57:07

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Modern CPU requirements in packages

I was following the discussion recently initiated by Allan McRae on the arch dev mailing list recently where there was an exchange of ideas around including AVX2 FMA and SSE4.2 in the kernel builds.  Today I was running ffmpeg on my laptop with the command:

$ ffmpeg -i katusha-2020apr07.mp4 -filter:v "setpts=1.00035*PTS" katusha-2020apr07-delayed.mp4 

and noticed that in the console output there seemed to be an indication that the modern CPU requirements were being used when running this re-encoding of a video, presumably to optimise the processing.

Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x55b579212900] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55b579212900] profile High, level 3.0, 4:2:0, 8-bit
[libx264 @ 0x55b579212900] 264 - core 159 r2991 1771b55 - H.264/M

So I wondered if there are many other packages that are built now to include the newer cpu capabilities and it is just the kernel that doesn't have them at present in arch?  Is there a way to check easily whether CPU intentive packages are built with the AVX2 FMA and SSE4.2 flags and other similar capabilities?


Mike C

Offline

#2 2020-04-08 10:16:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,870

Re: Modern CPU requirements in packages

Almost every userland package that can actively benefit from these will either have runtime components to check and make use of the capabilities as present (like ffmpeg here) so they don't need to be purposely built for that compatibility or if they hard depend simply not work on insufficient hardware, or have in a few cases multiple packages for enabling specific compiler optimisations. An example of the latter would be the tensorflow-opt series of packages that explicitly enable compat with SSE4 and AVX

Online

Board footer

Powered by FluxBB