aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmake
diff options
context:
space:
mode:
authorSivaprasad Tummala <sivaprasad.tummala@amd.com>2023-04-17 05:05:15 -0700
committerDamjan Marion <dmarion@0xa5.net>2023-04-18 12:12:05 +0000
commit206592bb731e6668d2b8f2e01479998cc1ec60d5 (patch)
tree934ace4c220c70b3ed942d51c218fffef74a71f8 /src/cmake
parentb1c5c3fc344a48eed79dc433ecbeb7bb26433986 (diff)
vppinfra: Multiarch support for AMD EPYC processors
Type: feature - Added multiarch support for AMD Zen architectures Change-Id: I65d3fe94b6cc622ebecbe1ac803efa674e87c87a Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala@amd.com>
Diffstat (limited to 'src/cmake')
-rw-r--r--src/cmake/cpu.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cmake/cpu.cmake b/src/cmake/cpu.cmake
index 031a9bcfe93..b54155d4bb3 100644
--- a/src/cmake/cpu.cmake
+++ b/src/cmake/cpu.cmake
@@ -136,6 +136,11 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
OFF
)
+ add_vpp_march_variant(znver3
+ FLAGS -march=znver3 -mtune=znver3 -mprefer-vector-width=256
+ OFF
+ )
+
if (GNU_ASSEMBLER_AVX512_BUG)
message(WARNING "AVX-512 multiarch variant(s) disabled due to GNU Assembler bug")
else()
@@ -151,6 +156,11 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
FLAGS -march=sapphirerapids -mtune=sapphirerapids -mprefer-vector-width=512
OFF
)
+
+ add_vpp_march_variant(znver4
+ FLAGS -march=znver4 -mtune=znver4 -mprefer-vector-width=512
+ OFF
+ )
endif()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
set(VPP_DEFAULT_MARCH_FLAGS -march=armv8-a+crc)