Skip to content
Draft
Show file tree
Hide file tree
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
24 changes: 23 additions & 1 deletion init/eessi_archdetect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
exit 1
fi

VERSION="1.2.0"
VERSION="1.3.0"

# default log level: only emit warnings or errors
LOG_LEVEL="WARN"
Expand Down Expand Up @@ -172,6 +172,28 @@ cpupath(){
fi
done

# Some Intel microarchitectures are flag-indistinguishable from an older one because their
# new features are not exposed in /proc/cpuinfo. Granite Rapids (Xeon 6) shows the exact same
# visible flags as Sapphire/Emerald Rapids (its extras like amx_fp16 are hidden by the kernel),
# so the flag match above lands on 'sapphirerapids'. Refine using the CPU model number - the
# only reliable discriminator on Linux. If no dedicated graniterapids subdir is shipped yet,
# downstream subdir resolution falls back to the next entry in the chain, so prepending is safe.
if [ "${best_arch_match}" == "x86_64/intel/sapphirerapids" ]; then
local cpu_family=$(get_cpuinfo "cpu[ _]family")
local cpu_model=$(get_cpuinfo "model")
log "DEBUG" "cpupath: refining Sapphire Rapids match (family='$cpu_family', model='$cpu_model')"
# Intel family 6 model numbers below come from the kernel's authoritative table
# arch/x86/include/asm/intel-family.h (what the kernel itself uses for model dispatch):
# INTEL_GRANITERAPIDS_X = IFM(6, 0xAD) -> family 6, model 173 (Granite Rapids-SP/AP)
# INTEL_GRANITERAPIDS_D = IFM(6, 0xAE) -> family 6, model 174 (Granite Rapids-D)
# (cf. INTEL_SAPPHIRERAPIDS_X = 0x8F/143, INTEL_EMERALDRAPIDS_X = 0xCF/207)
if [ "${cpu_family}" == "6" ] && { [ "${cpu_model}" == "173" ] || [ "${cpu_model}" == "174" ]; }; then
best_arch_match="x86_64/intel/graniterapids"
all_arch_matches="$best_arch_match:$all_arch_matches"
log "DEBUG" "cpupath: model $cpu_model identifies Granite Rapids; best match upgraded to $best_arch_match"
fi
fi

if [ "allx" == "${CPUPATH_RESULT}x" ]; then
log "INFO" "cpupath: all matches for host CPU: $all_arch_matches"
echo "$all_arch_matches"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x86_64/intel/graniterapids:x86_64/intel/sapphirerapids:x86_64/intel/icelake:x86_64/intel/cascadelake:x86_64/intel/skylake_avx512:x86_64/intel/haswell:x86_64/generic
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 173
model name : Intel(R) Xeon(R) 6973P-C
stepping : 1
microcode : 0xffffffff
cpu MHz : 4200.428
cache size : 491520 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 36
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch tpr_shadow ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves user_shstk avx_vnni avx512_bf16 vnmi avx512vbmi umip waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid cldemote movdiri movdir64b fsrm serialize tsxldtrk ibt amx_bf16 avx512_fp16 amx_tile amx_int8 arch_capabilities
vmx flags : vnmi invvpid ept_x_only ept_ad ept_1gb ept_5level tsc_offset vtpr ept vpid unrestricted_guest ept_mode_based_exec tsc_scaling usr_wait_pause
bugs : spectre_v1 spectre_v2 spec_store_bypass swapgs retbleed bhi spectre_v2_user its
bogomips : 5199.99
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 57 bits virtual
power management:
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x86_64/intel/graniterapids