Use AVX2 as default even on AVX512 systems 21/18221/2
authorDamjan Marion <damarion@cisco.com>
Tue, 12 Mar 2019 18:59:22 +0000 (19:59 +0100)
committerFlorin Coras <florin.coras@gmail.com>
Tue, 12 Mar 2019 19:57:26 +0000 (19:57 +0000)
Use of scalar AVX512 instructions impacts the maximum CPU frequency
as they require CPU to request level 1 power license.

So sparse use of AVX512 like we do, typically causes more harm than
improvement.

This patch makes AVX2 higher priority than AVX512, but still there
is option to change it on per-node basis:

vpp# set node function ethernet-input avx512

Change-Id: I42e03510a6efc1756e22fbb70e8c76d7f74f59d7
Signed-off-by: Damjan Marion <damarion@cisco.com>
src/vppinfra/cpu.h

index ee199e2..d523e88 100644 (file)
@@ -248,7 +248,7 @@ static inline int
 clib_cpu_march_priority_avx2 ()
 {
   if (clib_cpu_supports_avx2 ())
-    return 10;
+    return 50;
   return -1;
 }