build: add support for intel alderlake and sapphirerapids
Disabled by default.. Type: improvement Change-Id: I36176c009e0873c048874ae38a7ea0a91449235c Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:

committed by
Dave Wallace

parent
8ade308e17
commit
1552228350
@ -126,6 +126,11 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
|
|||||||
OFF
|
OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_vpp_march_variant(adl
|
||||||
|
FLAGS -march=alderlake -mtune=alderlake -mprefer-vector-width=256
|
||||||
|
OFF
|
||||||
|
)
|
||||||
|
|
||||||
if (GNU_ASSEMBLER_AVX512_BUG)
|
if (GNU_ASSEMBLER_AVX512_BUG)
|
||||||
message(WARNING "AVX-512 multiarch variant(s) disabled due to GNU Assembler bug")
|
message(WARNING "AVX-512 multiarch variant(s) disabled due to GNU Assembler bug")
|
||||||
else()
|
else()
|
||||||
@ -136,6 +141,11 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
|
|||||||
add_vpp_march_variant(icl
|
add_vpp_march_variant(icl
|
||||||
FLAGS -march=icelake-client -mtune=icelake-client -mprefer-vector-width=512
|
FLAGS -march=icelake-client -mtune=icelake-client -mprefer-vector-width=512
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_vpp_march_variant(spr
|
||||||
|
FLAGS -march=sapphirerapids -mtune=sapphirerapids -mprefer-vector-width=512
|
||||||
|
OFF
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
|
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
|
||||||
set(VPP_DEFAULT_MARCH_FLAGS -march=armv8-a+crc)
|
set(VPP_DEFAULT_MARCH_FLAGS -march=armv8-a+crc)
|
||||||
|
@ -138,6 +138,7 @@ _CLIB_MARCH_FN_REGISTRATION(fn)
|
|||||||
_ (avx512_vpopcntdq, 7, ecx, 14) \
|
_ (avx512_vpopcntdq, 7, ecx, 14) \
|
||||||
_ (movdiri, 7, ecx, 27) \
|
_ (movdiri, 7, ecx, 27) \
|
||||||
_ (movdir64b, 7, ecx, 28) \
|
_ (movdir64b, 7, ecx, 28) \
|
||||||
|
_ (enqcmd, 7, ecx, 29) \
|
||||||
_ (avx512_fp16, 7, edx, 23) \
|
_ (avx512_fp16, 7, edx, 23) \
|
||||||
_ (invariant_tsc, 0x80000007, edx, 8)
|
_ (invariant_tsc, 0x80000007, edx, 8)
|
||||||
|
|
||||||
@ -238,6 +239,14 @@ clib_cpu_supports_aes ()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
clib_cpu_march_priority_spr ()
|
||||||
|
{
|
||||||
|
if (clib_cpu_supports_enqcmd ())
|
||||||
|
return 300;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
clib_cpu_march_priority_icl ()
|
clib_cpu_march_priority_icl ()
|
||||||
{
|
{
|
||||||
@ -246,6 +255,14 @@ clib_cpu_march_priority_icl ()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
clib_cpu_march_priority_adl ()
|
||||||
|
{
|
||||||
|
if (clib_cpu_supports_movdiri () && clib_cpu_supports_avx2 ())
|
||||||
|
return 150;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
clib_cpu_march_priority_skx ()
|
clib_cpu_march_priority_skx ()
|
||||||
{
|
{
|
||||||
@ -258,7 +275,7 @@ static inline int
|
|||||||
clib_cpu_march_priority_trm ()
|
clib_cpu_march_priority_trm ()
|
||||||
{
|
{
|
||||||
if (clib_cpu_supports_movdiri ())
|
if (clib_cpu_supports_movdiri ())
|
||||||
return 60;
|
return 40;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user