Features/expand microarch for aarch64 (#13780)
* Add process to determine aarch64 microarchitecture * add microarchitectures for thunderx2 and a64fx * Add optimize flags for gcc on aarch64 family processors thunderx2 and a64fx. * Add optimize flags for clang on aarch64 family processors thunderx2 and a64fx * Add testing for thunderx2 and a64fx microarchitectures
This commit is contained in:
parent
f25a4ab089
commit
513fe55fc3
@ -223,3 +223,15 @@ def compatibility_check_for_x86_64(info, target):
|
||||
return (target == arch_root or arch_root in target.ancestors) \
|
||||
and (target.vendor == vendor or target.vendor == 'generic') \
|
||||
and target.features.issubset(features)
|
||||
|
||||
|
||||
@compatibility_check(architecture_family='aarch64')
|
||||
def compatibility_check_for_aarch64(info, target):
|
||||
basename = 'aarch64'
|
||||
features = set(info.get('Features', '').split())
|
||||
vendor = info.get('CPU implementer', 'generic')
|
||||
|
||||
arch_root = targets[basename]
|
||||
return (target == arch_root or arch_root in target.ancestors) \
|
||||
and (target.vendor == vendor or target.vendor == 'generic') \
|
||||
and target.features.issubset(features)
|
||||
|
@ -1161,6 +1161,97 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"thunderx2": {
|
||||
"from": "aarch64",
|
||||
"vendor": "0x43",
|
||||
"features": [
|
||||
"fp",
|
||||
"asimd",
|
||||
"evtstrm",
|
||||
"aes",
|
||||
"pmull",
|
||||
"sha1",
|
||||
"sha2",
|
||||
"crc32",
|
||||
"atomics",
|
||||
"cpuid",
|
||||
"asimdrdm"
|
||||
],
|
||||
"compilers": {
|
||||
"gcc": [
|
||||
{
|
||||
"versions": "4.8:4.8.9",
|
||||
"flags": "-march=armv8-a"
|
||||
},
|
||||
{
|
||||
"versions": "4.9:5.9",
|
||||
"flags": "-march=armv8-a+crc+crypto"
|
||||
},
|
||||
{
|
||||
"versions": "6:6.9",
|
||||
"flags": "-march=armv8.1-a+crc+crypto"
|
||||
},
|
||||
{
|
||||
"versions": "7:",
|
||||
"flags": "-mcpu=thunderx2t99"
|
||||
}
|
||||
],
|
||||
"clang": {
|
||||
"versions": ":",
|
||||
"flags": "-march=armv8-a -mcpu=generic"
|
||||
}
|
||||
}
|
||||
},
|
||||
"a64fx": {
|
||||
"from": "aarch64",
|
||||
"vendor": "0x46",
|
||||
"features": [
|
||||
"fp",
|
||||
"asimd",
|
||||
"evtstrm",
|
||||
"aes",
|
||||
"pmull",
|
||||
"sha1",
|
||||
"sha2",
|
||||
"crc32",
|
||||
"atomics",
|
||||
"cpuid",
|
||||
"asimdrdm",
|
||||
"fphp",
|
||||
"asimdhp",
|
||||
"fcma",
|
||||
"dcpop",
|
||||
"sve"
|
||||
],
|
||||
"compilers": {
|
||||
"gcc": [
|
||||
{
|
||||
"versions": "4.8:4.8.9",
|
||||
"flags": "-march=armv8-a"
|
||||
},
|
||||
{
|
||||
"versions": "4.9:5.9",
|
||||
"flags": "-march=armv8-a+crc+crypto"
|
||||
},
|
||||
{
|
||||
"versions": "6:6.9",
|
||||
"flags": "-march=armv8.1-a+crc+crypto"
|
||||
},
|
||||
{
|
||||
"versions": "7:7.9",
|
||||
"flags": "-arch=armv8.2a+crc+crypt+fp16"
|
||||
},
|
||||
{
|
||||
"versions": "8:",
|
||||
"flags": "-arch=armv8.2a+crc+aes+sh2+fp16+sve -msve-vector-bits=512"
|
||||
}
|
||||
],
|
||||
"clang": {
|
||||
"versions": ":",
|
||||
"flags": "-march=armv8-a -mcpu=generic"
|
||||
}
|
||||
}
|
||||
},
|
||||
"arm": {
|
||||
"from": null,
|
||||
"vendor": "generic",
|
||||
|
@ -0,0 +1,8 @@
|
||||
processor : 0
|
||||
BogoMIPS : 400.00
|
||||
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics cpuid asimdrdm
|
||||
CPU implementer : 0x43
|
||||
CPU architecture: 8
|
||||
CPU variant : 0x1
|
||||
CPU part : 0x0af
|
||||
CPU revision : 1
|
@ -32,6 +32,7 @@
|
||||
'linux-scientific7-piledriver',
|
||||
'linux-rhel6-piledriver',
|
||||
'linux-centos7-power8le',
|
||||
'linux-centos7-thunderx2',
|
||||
'darwin-mojave-ivybridge',
|
||||
'darwin-mojave-haswell',
|
||||
'darwin-mojave-skylake',
|
||||
@ -121,6 +122,8 @@ def test_equality(supported_target):
|
||||
('piledriver <= steamroller', True),
|
||||
('zen2 >= zen', True),
|
||||
('zen >= zen', True),
|
||||
('aarch64 <= thunderx2', True),
|
||||
('aarch64 <= a64fx', True),
|
||||
# Test unrelated microarchitectures
|
||||
('power8 < skylake', False),
|
||||
('power8 <= skylake', False),
|
||||
@ -205,12 +208,15 @@ def test_target_json_schema():
|
||||
('nehalem', 'gcc', '4.9.3', '-march=nehalem -mtune=nehalem'),
|
||||
('nehalem', 'gcc', '4.8.5', '-march=corei7 -mtune=corei7'),
|
||||
('sandybridge', 'gcc', '4.8.5', '-march=corei7-avx -mtune=corei7-avx'),
|
||||
('thunderx2', 'gcc', '4.8.5', '-march=armv8-a'),
|
||||
('thunderx2', 'gcc', '4.9.3', '-march=armv8-a+crc+crypto'),
|
||||
# Test Clang / LLVM
|
||||
('sandybridge', 'clang', '3.9.0', '-march=x86-64 -mcpu=sandybridge'),
|
||||
('icelake', 'clang', '6.0.0', '-march=x86-64 -mcpu=icelake'),
|
||||
('icelake', 'clang', '8.0.0', '-march=x86-64 -mcpu=icelake-client'),
|
||||
('zen2', 'clang', '9.0.0', '-march=x86-64 -mcpu=znver2'),
|
||||
('power9le', 'clang', '8.0.0', '-march=ppc64le -mcpu=pwr9'),
|
||||
('thunderx2', 'clang', '6.0.0', '-march=armv8-a -mcpu=generic'),
|
||||
# Test Intel on Intel CPUs
|
||||
('sandybridge', 'intel', '17.0.2', '-march=corei7-avx -mtune=corei7-avx'),
|
||||
('sandybridge', 'intel', '18.0.5',
|
||||
|
Loading…
Reference in New Issue
Block a user