From 77af4684aa2986ae3860962d7007b790e0a97f50 Mon Sep 17 00:00:00 2001 From: Chris Green Date: Thu, 24 Oct 2019 17:48:54 -0500 Subject: Improvements to detection of AMD architectures. (#13407) New entry for K10 microarchitecture. Reorder Zen* microarchitectures to avoid triggering as k10. Remove some desktop-specific flags that were preventing Opteron Bulldozer/Piledriver/Steamroller/Excavator CPUs from being recognized as such. Remove one or two flags which weren't produced in /proc/cpuinfo on older OS (RHEL6 and friends). --- lib/spack/llnl/util/cpu/microarchitectures.json | 40 +++++++++++++++++++--- .../spack/test/data/targets/linux-scientific7-k10 | 26 ++++++++++++++ .../test/data/targets/linux-scientific7-piledriver | 26 ++++++++++++++ .../data/targets/linux-scientificfermi6-bulldozer | 25 ++++++++++++++ .../data/targets/linux-scientificfermi6-piledriver | 25 ++++++++++++++ lib/spack/spack/test/llnl/util/cpu.py | 4 +++ 6 files changed, 142 insertions(+), 4 deletions(-) create mode 100644 lib/spack/spack/test/data/targets/linux-scientific7-k10 create mode 100644 lib/spack/spack/test/data/targets/linux-scientific7-piledriver create mode 100644 lib/spack/spack/test/data/targets/linux-scientificfermi6-bulldozer create mode 100644 lib/spack/spack/test/data/targets/linux-scientificfermi6-piledriver diff --git a/lib/spack/llnl/util/cpu/microarchitectures.json b/lib/spack/llnl/util/cpu/microarchitectures.json index 6873fc9676..23cff4bf9a 100644 --- a/lib/spack/llnl/util/cpu/microarchitectures.json +++ b/lib/spack/llnl/util/cpu/microarchitectures.json @@ -694,6 +694,38 @@ } } }, + "k10": { + "from": "x86_64", + "vendor": "AuthenticAMD", + "features": [ + "mmx", + "sse", + "sse2", + "sse4a", + "abm", + "cx16", + "3dnow", + "3dnowext" + ], + "compilers": { + "gcc": { + "name": "amdfam10", + "versions": "4.3:", + "flags": "-march={name} -mtune={name}" + }, + "clang": { + "versions": "3.9:", + "name": "amdfam10", + "family": "x86-64", + "flags": "-march={family} -mcpu={name}" + }, + "intel": { + "versions": "16.0:", + "warnings": "Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors", + "flags": "-msse2" + } + } + }, "bulldozer": { "from": "x86_64", "vendor": "AuthenticAMD", @@ -705,7 +737,7 @@ "abm", "avx", "xop", - "lwp", + "fma4", "aes", "pclmulqdq", "cx16", @@ -743,7 +775,7 @@ "abm", "avx", "xop", - "lwp", + "fma4", "aes", "pclmulqdq", "cx16", @@ -785,7 +817,7 @@ "abm", "avx", "xop", - "lwp", + "fma4", "aes", "pclmulqdq", "cx16", @@ -828,7 +860,7 @@ "abm", "avx", "xop", - "lwp", + "fma4", "aes", "pclmulqdq", "cx16", diff --git a/lib/spack/spack/test/data/targets/linux-scientific7-k10 b/lib/spack/spack/test/data/targets/linux-scientific7-k10 new file mode 100644 index 0000000000..1522b17480 --- /dev/null +++ b/lib/spack/spack/test/data/targets/linux-scientific7-k10 @@ -0,0 +1,26 @@ +processor : 0 +vendor_id : AuthenticAMD +cpu family : 16 +model : 9 +model name : AMD Opteron(tm) Processor 6136 +stepping : 1 +microcode : 0x10000d9 +cpu MHz : 800.000 +cache size : 512 KB +physical id : 0 +siblings : 8 +core id : 0 +cpu cores : 8 +apicid : 16 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 5 +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 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc art rep_good nopl nonstop_tsc extd_apicid amd_dcm pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate retpoline_amd ibp_disable vmmcall npt lbrv svm_lock nrip_save pausefilter +bogomips : 4800.19 +TLB size : 1024 4K pages +clflush size : 64 +cache_alignment : 64 +address sizes : 48 bits physical, 48 bits virtual +power management: ts ttp tm stc 100mhzsteps hwpstate diff --git a/lib/spack/spack/test/data/targets/linux-scientific7-piledriver b/lib/spack/spack/test/data/targets/linux-scientific7-piledriver new file mode 100644 index 0000000000..4c823f6e46 --- /dev/null +++ b/lib/spack/spack/test/data/targets/linux-scientific7-piledriver @@ -0,0 +1,26 @@ +processor : 0 +vendor_id : AuthenticAMD +cpu family : 21 +model : 2 +model name : AMD Opteron(tm) Processor 6320 +stepping : 0 +microcode : 0x6000852 +cpu MHz : 1400.000 +cache size : 2048 KB +physical id : 0 +siblings : 8 +core id : 0 +cpu cores : 4 +apicid : 32 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 13 +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 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc art rep_good nopl nonstop_tsc extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb cpb hw_pstate retpoline_amd ssbd ibpb vmmcall bmi1 arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold +bogomips : 5600.11 +TLB size : 1536 4K pages +clflush size : 64 +cache_alignment : 64 +address sizes : 48 bits physical, 48 bits virtual +power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro diff --git a/lib/spack/spack/test/data/targets/linux-scientificfermi6-bulldozer b/lib/spack/spack/test/data/targets/linux-scientificfermi6-bulldozer new file mode 100644 index 0000000000..c240cfc6ce --- /dev/null +++ b/lib/spack/spack/test/data/targets/linux-scientificfermi6-bulldozer @@ -0,0 +1,25 @@ +processor : 0 +vendor_id : AuthenticAMD +cpu family : 21 +model : 1 +model name : AMD Opteron(TM) Processor 6212 +stepping : 2 +cpu MHz : 2600.188 +cache size : 2048 KB +physical id : 0 +siblings : 8 +core id : 0 +cpu cores : 4 +apicid : 32 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 13 +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 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nonstop_tsc extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 nodeid_msr topoext perfctr_core perfctr_nb cpb ssbd retpoline ibpb npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold +bogomips : 5200.37 +TLB size : 1536 4K pages +clflush size : 64 +cache_alignment : 64 +address sizes : 48 bits physical, 48 bits virtual +power management: ts ttp tm 100mhzsteps hwpstate cpb diff --git a/lib/spack/spack/test/data/targets/linux-scientificfermi6-piledriver b/lib/spack/spack/test/data/targets/linux-scientificfermi6-piledriver new file mode 100644 index 0000000000..a87afeee61 --- /dev/null +++ b/lib/spack/spack/test/data/targets/linux-scientificfermi6-piledriver @@ -0,0 +1,25 @@ +processor : 31 +vendor_id : AuthenticAMD +cpu family : 21 +model : 2 +model name : AMD Opteron(tm) Processor 6320 +stepping : 0 +cpu MHz : 2800.154 +cache size : 2048 KB +physical id : 3 +siblings : 8 +core id : 3 +cpu cores : 4 +apicid : 135 +initial apicid : 103 +fpu : yes +fpu_exception : yes +cpuid level : 13 +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 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nonstop_tsc extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb cpb ssbd retpoline ibpb npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold bmi1 +bogomips : 5599.22 +TLB size : 1536 4K pages +clflush size : 64 +cache_alignment : 64 +address sizes : 48 bits physical, 48 bits virtual +power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro diff --git a/lib/spack/spack/test/llnl/util/cpu.py b/lib/spack/spack/test/llnl/util/cpu.py index 7e32dda71a..f75c02f4b0 100644 --- a/lib/spack/spack/test/llnl/util/cpu.py +++ b/lib/spack/spack/test/llnl/util/cpu.py @@ -26,6 +26,10 @@ from llnl.util.cpu import Microarchitecture # noqa 'linux-rhel7-ivybridge', 'linux-rhel7-haswell', 'linux-rhel7-zen', + 'linux-scientific7-k10', + 'linux-scientificfermi6-bulldozer', + 'linux-scientificfermi6-piledriver', + 'linux-scientific7-piledriver', 'linux-rhel6-piledriver', 'linux-centos7-power8le', 'darwin-mojave-ivybridge', -- cgit v1.2.3-70-g09d2