archspec: updated external dependency (#23311)

Added support for Apple M1, extended support
for zen3 with more compiler flags.
This commit is contained in:
Massimiliano Culpo 2021-05-04 07:27:37 +02:00 committed by GitHub
parent 10389b2b51
commit 8a65bcb7c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 71 additions and 13 deletions

View File

@ -11,7 +11,7 @@
* Homepage: https://pypi.python.org/pypi/archspec * Homepage: https://pypi.python.org/pypi/archspec
* Usage: Labeling, comparison and detection of microarchitectures * Usage: Labeling, comparison and detection of microarchitectures
* Version: 0.1.2 (commit 0389e83e87d3dc5043a7ac08172bd970706524d6) * Version: 0.1.2 (commit a15485ab632478c15fadc65a00cd88b75ef7528a)
argparse argparse
-------- --------

View File

@ -99,17 +99,29 @@ def sysctl_info_dict():
def sysctl(*args): def sysctl(*args):
return _check_output(["sysctl"] + list(args), env=child_environment).strip() return _check_output(["sysctl"] + list(args), env=child_environment).strip()
flags = ( if platform.machine() == "x86_64":
sysctl("-n", "machdep.cpu.features").lower() flags = (
+ " " sysctl("-n", "machdep.cpu.features").lower()
+ sysctl("-n", "machdep.cpu.leaf7_features").lower() + " "
) + sysctl("-n", "machdep.cpu.leaf7_features").lower()
info = { )
"vendor_id": sysctl("-n", "machdep.cpu.vendor"), info = {
"flags": flags, "vendor_id": sysctl("-n", "machdep.cpu.vendor"),
"model": sysctl("-n", "machdep.cpu.model"), "flags": flags,
"model name": sysctl("-n", "machdep.cpu.brand_string"), "model": sysctl("-n", "machdep.cpu.model"),
} "model name": sysctl("-n", "machdep.cpu.brand_string"),
}
else:
model = (
"m1" if "Apple" in sysctl("-n", "machdep.cpu.brand_string") else "unknown"
)
info = {
"vendor_id": "Apple",
"flags": [],
"model": model,
"CPU implementer": "Apple",
"model name": sysctl("-n", "machdep.cpu.brand_string"),
}
return info return info

View File

@ -1359,9 +1359,24 @@
"popcnt", "popcnt",
"clwb", "clwb",
"vaes", "vaes",
"vpclmulqdq" "vpclmulqdq",
"pku"
], ],
"compilers": { "compilers": {
"gcc": [
{
"versions": "10.3:",
"name": "znver3",
"flags": "-march={name} -mtune={name}"
}
],
"clang": [
{
"versions": "12.0:",
"name": "znver3",
"flags": "-march={name} -mtune={name}"
}
],
"aocc": [ "aocc": [
{ {
"versions": "3.0:", "versions": "3.0:",
@ -1544,6 +1559,12 @@
"versions": ":", "versions": ":",
"flags": "-march=armv8-a -mtune=generic" "flags": "-march=armv8-a -mtune=generic"
} }
],
"apple-clang": [
{
"versions": ":",
"flags": "-march=armv8-a -mtune=generic"
}
] ]
} }
}, },
@ -1752,6 +1773,31 @@
] ]
} }
}, },
"m1": {
"from": ["aarch64"],
"vendor": "Apple",
"features": [],
"compilers": {
"gcc": [
{
"versions": "8.0:",
"flags" : "-march=armv8.4-a -mtune=generic"
}
],
"clang" : [
{
"versions": "9.0:",
"flags" : "-march=armv8.4-a"
}
],
"apple-clang": [
{
"versions": "11.0:",
"flags" : "-march=armv8.4-a"
}
]
}
},
"arm": { "arm": {
"from": [], "from": [],
"vendor": "generic", "vendor": "generic",