8000 Add Intel Comet Lake to the microarchitecture detection script by naushniki · Pull Request #14414 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Add Intel Comet Lake to the microarchitecture detection script #14414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 14 additions & 22 deletions cmake/OptimizeForArchitecture.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,18 @@ macro(AutodetectHostArchitecture)
# 4E | Skylake Client
# 3C | Broadwell (likely a bug in the SDE)
# 3C | Haswell
if(_cpu_model EQUAL 87) # 57
set(TARGET_ARCHITECTURE "knl") # Knights Landing
if(_cpu_model EQUAL 165) # Comet lake. Use skylake, the closest march supported by GCC.
set(TARGET_ARCHITECTURE "skylake")
elseif(_cpu_model EQUAL 142 OR _cpu_model EQUAL 158) # 8E, 9E
set(TARGET_ARCHITECTURE "kaby-lake")
elseif(_cpu_model EQUAL 102)
set(TARGET_ARCHITECTURE "cannonlake")
elseif(_cpu_model EQUAL 92)
set(TARGET_ARCHITECTURE "goldmont")
elseif(_cpu_model EQUAL 90 OR _cpu_model EQUAL 76)
set(TARGET_ARCHITECTURE "silvermont")
elseif(_cpu_model EQUAL 102)
set(TARGET_ARCHITECTURE "cannonlake")
elseif(_cpu_model EQUAL 142 OR _cpu_model EQUAL 158) # 8E, 9E
set(TARGET_ARCHITECTURE "kaby-lake")
elseif(_cpu_model EQUAL 87) # 57
set(TARGET_ARCHITECTURE "knl") # Knights Landing
elseif(_cpu_model EQUAL 85) # 55
set(TARGET_ARCHITECTURE "skylake-avx512")
elseif(_cpu_model EQUAL 78 OR _cpu_model EQUAL 94) # 4E, 5E
Expand All @@ -149,24 +151,14 @@ macro(AutodetectHostArchitecture)
set(TARGET_ARCHITECTURE "ivy-bridge")
elseif(_cpu_model EQUAL 42 OR _cpu_model EQUAL 45)
set(TARGET_ARCHITECTURE "sandy-bridge")
elseif(_cpu_model EQUAL 37 OR _cpu_model EQUAL 44 OR _cpu_model EQUAL 47)
set(TARGET_ARCHITECTURE "westmere")
elseif(_cpu_model EQUAL 26 OR _cpu_model EQUAL 30 OR _cpu_model EQUAL 31 OR _cpu_model EQUAL 46)
set(TARGET_ARCHITECTURE "nehalem")
elseif(_cpu_model EQUAL 23 OR _cpu_model EQUAL 29)
set(TARGET_ARCHITECTURE "penryn")
elseif(_cpu_model EQUAL 15)
set(TARGET_ARCHITECTURE "merom")
elseif(_cpu_model EQUAL 28)
set(TARGET_ARCHITECTURE "atom")
elseif(_cpu_model EQUAL 14)
set(TARGET_ARCHITECTURE "core")
elseif(_cpu_model LESS 14)
message(WARNING "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. Auto-detection of optimization flags failed and will use the generic CPU settings with SSE2.")
elseif(_cpu_model GREATER 42)
message(WARNING "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. Auto-detection of optimization flags failed and will use the minimum required microarchitecture(sandy-bridge).")
set(TARGET_ARCHITECTURE "sandy-bridge")
elseif(NOT ASM_OPTIMIZATIONS)
message(WARNING "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. This is not fatal because ASM_OPTIMIZATIONS are disabled. If you want to use ASM_OPTIMIZATIONS make sure you have a compliant CPU(sandy-bridge or newer) and review the \"cmake/OptimizeForArchitecture.cmake\" script.")
set(TARGET_ARCHITECTURE "generic")
else()
message(WARNING "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. Auto-detection of optimization flags failed and will use the 65nm Core 2 CPU settings.")
set(TARGET_ARCHITECTURE "merom")
message(FATAL_ERROR "Your CPU (family ${_cpu_family}, model ${_cpu_model}) is not known. This is fatal, because ASM_OPTIMIZATIONS are ON. If your CPU microarchitecture is sandy-bridge or newer, please review the \"cmake/OptimizeForArchitecture.cmake\" script. If you have an older CPU, use -DASM_OPTIMIZATIONS=Off.")
endif()
elseif(_cpu_family EQUAL 7) # Itanium (not supported)
message(WARNING "Your CPU (Itanium: family ${_cpu_family}, model ${_cpu_model}) is not supported by OptimizeForArchitecture.cmake.")
Expand Down
0