summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-05-20 17:56:37 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2021-05-20 14:56:04 -0700
commit4c4a584a9c3792b8195d6bf1e6e6797e7bad205a (patch)
tree615e6b2ab3b4bbebcb0b6d1a0af025cfe1f03635
parentfcb8942c884add2c837e8e4d324d767c8d8049bb (diff)
downloadspack-4c4a584a9c3792b8195d6bf1e6e6797e7bad205a.tar.gz
spack-4c4a584a9c3792b8195d6bf1e6e6797e7bad205a.tar.bz2
spack-4c4a584a9c3792b8195d6bf1e6e6797e7bad205a.tar.xz
spack-4c4a584a9c3792b8195d6bf1e6e6797e7bad205a.zip
spack: update archspec
This fixes the detection of Apple M1 and adds virtual levels for x86_64 architectures
-rw-r--r--lib/spack/external/__init__.py2
-rw-r--r--lib/spack/external/archspec/cpu/detect.py5
-rw-r--r--lib/spack/external/archspec/json/cpu/microarchitectures.json172
3 files changed, 172 insertions, 7 deletions
diff --git a/lib/spack/external/__init__.py b/lib/spack/external/__init__.py
index ac144c5b4f..1d707a6d9a 100644
--- a/lib/spack/external/__init__.py
+++ b/lib/spack/external/__init__.py
@@ -11,7 +11,7 @@ archspec
* Homepage: https://pypi.python.org/pypi/archspec
* Usage: Labeling, comparison and detection of microarchitectures
-* Version: 0.1.2 (commit a15485ab632478c15fadc65a00cd88b75ef7528a)
+* Version: 0.1.2 (commit 130607c373fd88cd3c43da94c0d3afd3a44084b0)
argparse
--------
diff --git a/lib/spack/external/archspec/cpu/detect.py b/lib/spack/external/archspec/cpu/detect.py
index 4fe343de8c..eb75cdfb0e 100644
--- a/lib/spack/external/archspec/cpu/detect.py
+++ b/lib/spack/external/archspec/cpu/detect.py
@@ -185,6 +185,11 @@ def compatible_microarchitectures(info):
info (dict): dictionary containing information on the host cpu
"""
architecture_family = platform.machine()
+ # On Apple M1 platform.machine() returns "arm64" instead of "aarch64"
+ # so we should normalize the name here
+ if architecture_family == "arm64":
+ architecture_family = "aarch64"
+
# If a tester is not registered, be conservative and assume no known
# target is compatible with the host
tester = COMPATIBILITY_CHECKS.get(architecture_family, lambda x, y: False)
diff --git a/lib/spack/external/archspec/json/cpu/microarchitectures.json b/lib/spack/external/archspec/json/cpu/microarchitectures.json
index dc3bab6109..0eacadfbaa 100644
--- a/lib/spack/external/archspec/json/cpu/microarchitectures.json
+++ b/lib/spack/external/archspec/json/cpu/microarchitectures.json
@@ -91,6 +91,166 @@
]
}
},
+ "x86_64_v2": {
+ "from": ["x86_64"],
+ "vendor": "generic",
+ "features": [
+ "cx16",
+ "lahf_lm",
+ "mmx",
+ "sse",
+ "sse2",
+ "ssse3",
+ "sse4_1",
+ "sse4_2",
+ "popcnt"
+ ],
+ "compilers": {
+ "gcc": [
+ {
+ "versions": "11.1:",
+ "name": "x86-64-v2",
+ "flags": "-march={name} -mtune=generic"
+ },
+ {
+ "versions": "4.6:11.0",
+ "name": "x86-64",
+ "flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3"
+ }
+ ],
+ "clang": [
+ {
+ "versions": "12.0:",
+ "name": "x86-64-v2",
+ "flags": "-march={name} -mtune=generic"
+ },
+ {
+ "versions": "3.9:11.1",
+ "name": "x86-64",
+ "flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3"
+ }
+ ]
+ }
+ },
+ "x86_64_v3": {
+ "from": ["x86_64_v2"],
+ "vendor": "generic",
+ "features": [
+ "cx16",
+ "lahf_lm",
+ "mmx",
+ "sse",
+ "sse2",
+ "ssse3",
+ "sse4_1",
+ "sse4_2",
+ "popcnt",
+ "avx",
+ "avx2",
+ "bmi1",
+ "bmi2",
+ "f16c",
+ "fma",
+ "abm",
+ "movbe",
+ "xsave"
+ ],
+ "compilers": {
+ "gcc": [
+ {
+ "versions": "11.1:",
+ "name": "x86-64-v3",
+ "flags": "-march={name} -mtune=generic"
+ },
+ {
+ "versions": "4.8:11.0",
+ "name": "x86-64",
+ "flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave"
+ }
+ ],
+ "clang": [
+ {
+ "versions": "12.0:",
+ "name": "x86-64-v3",
+ "flags": "-march={name} -mtune=generic"
+ },
+ {
+ "versions": "3.9:11.1",
+ "name": "x86-64",
+ "flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave"
+ }
+ ],
+ "apple-clang": [
+ {
+ "versions": "8.0:",
+ "name": "x86-64",
+ "flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave"
+ }
+ ]
+ }
+ },
+ "x86_64_v4": {
+ "from": ["x86_64_v3"],
+ "vendor": "generic",
+ "features": [
+ "cx16",
+ "lahf_lm",
+ "mmx",
+ "sse",
+ "sse2",
+ "ssse3",
+ "sse4_1",
+ "sse4_2",
+ "popcnt",
+ "avx",
+ "avx2",
+ "bmi1",
+ "bmi2",
+ "f16c",
+ "fma",
+ "abm",
+ "movbe",
+ "xsave",
+ "avx512f",
+ "avx512bw",
+ "avx512cd",
+ "avx512dq",
+ "avx512vl"
+ ],
+ "compilers": {
+ "gcc": [
+ {
+ "versions": "11.1:",
+ "name": "x86-64-v4",
+ "flags": "-march={name} -mtune=generic"
+ },
+ {
+ "versions": "6.0:11.0",
+ "name": "x86-64",
+ "flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave -mavx512f -mavx512bw -mavx512cd -mavx512dq -mavx512vl"
+ }
+ ],
+ "clang": [
+ {
+ "versions": "12.0:",
+ "name": "x86-64-v4",
+ "flags": "-march={name} -mtune=generic"
+ },
+ {
+ "versions": "3.9:11.1",
+ "name": "x86-64",
+ "flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave -mavx512f -mavx512bw -mavx512cd -mavx512dq -mavx512vl"
+ }
+ ],
+ "apple-clang": [
+ {
+ "versions": "8.0:",
+ "name": "x86-64",
+ "flags": "-march={name} -mtune=generic -mcx16 -msahf -mpopcnt -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -mavx2 -mbmi -mbmi2 -mf16c -mfma -mlzcnt -mmovbe -mxsave -mavx512f -mavx512bw -mavx512cd -mavx512dq -mavx512vl"
+ }
+ ]
+ }
+ },
"nocona": {
"from": ["x86_64"],
"vendor": "GenuineIntel",
@@ -177,7 +337,7 @@
}
},
"nehalem": {
- "from": ["core2"],
+ "from": ["core2", "x86_64_v2"],
"vendor": "GenuineIntel",
"features": [
"mmx",
@@ -394,7 +554,7 @@
}
},
"haswell": {
- "from": ["ivybridge"],
+ "from": ["ivybridge", "x86_64_v3"],
"vendor": "GenuineIntel",
"features": [
"mmx",
@@ -642,7 +802,7 @@
}
},
"skylake_avx512": {
- "from": ["skylake"],
+ "from": ["skylake", "x86_64_v4"],
"vendor": "GenuineIntel",
"features": [
"mmx",
@@ -986,7 +1146,7 @@
}
},
"bulldozer": {
- "from": ["x86_64"],
+ "from": ["x86_64_v2"],
"vendor": "AuthenticAMD",
"features": [
"mmx",
@@ -1145,7 +1305,7 @@
}
},
"excavator": {
- "from": ["steamroller"],
+ "from": ["steamroller", "x86_64_v3"],
"vendor": "AuthenticAMD",
"features": [
"mmx",
@@ -1204,7 +1364,7 @@
}
},
"zen": {
- "from": ["x86_64"],
+ "from": ["x86_64_v3"],
"vendor": "AuthenticAMD",
"features": [
"bmi1",