Skip to content

Commit bccc55c

Browse files
committed
COMP: default ISA level to x86-64 baseline
Pip wheels, Docker images, and hardware translation layers (Rosetta) only guarantee x86-64 baseline. Users building for local use may want to consider x86-64-v2, which is the minimum level targeted by current Linux distributions (Fedora, RHEL 9, SUSE).
1 parent fc9cf86 commit bccc55c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

CMake/ITKSetStandardCompilerFlags.cmake

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,20 @@ check_pie_supported()
5656
# -DITK_C_OPTIMIZATION_FLAGS="..." / -DITK_CXX_OPTIMIZATION_FLAGS="..." on
5757
# the cmake command line; that escape hatch bypasses this variable entirely.
5858
# ===========================================================================
59+
# Default to "default" (x86-64 baseline) — the safest redistributable
60+
# choice. Pip wheels, Docker images, and hardware translation layers
61+
# (e.g., Rosetta) only guarantee the x86-64 baseline ISA. Users
62+
# building for local use may want to consider x86-64-v2, which is the
63+
# minimum level targeted by current Linux distributions (Fedora, RHEL 9,
64+
# SUSE) and provides a consistent, well-tested ISA baseline.
5965
set(
6066
ITK_X86_64_ISA_LEVEL
61-
"x86-64-v2"
67+
"default"
6268
CACHE STRING
6369
"x86-64 instruction set architecture level for compiler optimization.\
64-
default = no flags (compiler toolchain default),\
70+
default = no flags (compiler toolchain default, ~x86-64 baseline),\
6571
x86-64 = SSE/SSE2 baseline (~2003),\
66-
x86-64-v2 = + SSE4.2/POPCNT (~2009) [DEFAULT],\
72+
x86-64-v2 = + SSE4.2/POPCNT (~2009),\
6773
x86-64-v3 = + AVX2/FMA (~2013),\
6874
x86-64-v4 = + AVX-512 (~2017, may throttle),\
6975
native = host CPU (not redistributable)"

0 commit comments

Comments
 (0)