mbox series

[ovs-dev,v5,0/5] Build some AVX512 code on older compilers.

Message ID 20220517100818.15639-1-cian.ferriter@intel.com
Headers show
Series Build some AVX512 code on older compilers. | expand

Message

Ferriter, Cian May 17, 2022, 10:08 a.m. UTC
Support for more AVX512 ISA was added in various compiler releases. For
example in GCC, increasing AVX512 ISA support was added in GCC 4.9, 5
and then 7. Depending on the GCC version, none, some or all of the
AVX512 code in OVS can be built. This patchset adds support for the
"some" case, where currently, we build all or none of the AVX512 code.

For my testing on Ubuntu 20.04, the below steps were very helpful for
installing and switching between different GCC versions.
https://askubuntu.com/a/1313032

v5:
* Add Sunil's Acked-by tags to patches 3 and 4.
* Remove an 'avx512bw' target attribute as per Sunil's suggestion.
* Create a selector function for the permutexvar implementations based on
  Sunil's feedback on the v4. This hides the complexity of compile time and run
  time selection of permutexvar implementations.

v4:
* Added Sunil's Fixes and Acked-by tags where appropriate.
* Remove the 'avx512f' target in commit 3 since it's also unnecessary. I didn't
  carry Sunil's Acked-by tag over because of the change.
* Added the "automake.mk: Remove -mavx512dq CFLAG from AVX512 library." commit
  to the series at commit 4/5.
* Combine the 3 commits which added checks for AVX512 ISA into this
  single commit since the first 2 commits were only useful and active
  when the 3rd commit was applied. This also takes care of Sunil's
  comment about explaining that the first 2 commits are precursors.

v3:
* Add a patch which fixes a warning in the AVX512 code when building with GCC
  5.
* Preserve the order of the mfex impl list. v2 changed this order. We want the
  order to be preserved because VBMI functions should be chosen by the mfex
  study impl where possible.

v2:
* Add a commit to fix a typo present on OVS master code VMBI -> VBMI.
* Don't register vbmi specialized mfex impls unless VBMI is actually
  available.
  * This required some re-ordering of the mfex impl lists.


Cian Ferriter (5):
  dpif-netdev-private-extract: Fix typo VMBI -> VBMI.
  dpif-netdev-lookup: Fix GCC 5 warning.
  dpif-netdev-extract: Remove unnecessary compiler targets.
  automake.mk: Remove -mavx512dq CFLAG from AVX512 library.
  acinclude: Add seperate checks for AVX512 ISA.

 acinclude.m4                           | 26 +++++++---
 lib/automake.mk                        | 15 +++---
 lib/dpif-netdev-extract-avx512.c       | 69 +++++++++++++++++---------
 lib/dpif-netdev-lookup-avx512-gather.c | 35 +++++++++----
 lib/dpif-netdev-lookup.c               |  3 +-
 lib/dpif-netdev-private-extract.c      | 26 +++++-----
 lib/dpif-netdev-private-extract.h      | 29 ++++++++---
 7 files changed, 137 insertions(+), 66 deletions(-)