Skip to content

Commit

Permalink
Merge pull request #608 from boegel/2023.06-software.eessi.io_archdet…
Browse files Browse the repository at this point in the history
…ect-a64fx

add support in archdetect for detecting A64FX
  • Loading branch information
bedroge authored Jan 10, 2025
2 parents a2c8ffb + 562fd4d commit 3af9cf6
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests_archdetect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- x86_64/amd/zen3/Azure-CentOS7-7V73X
- x86_64/amd/zen4/Azure-Alma8-9V33X
- x86_64/amd/zen4/Shinx-RHEL8-9654
- aarch64/a64fx/Deucalion-Rocky85
- aarch64/neoverse_n1/Azure-Ubuntu20-Altra
- aarch64/neoverse_n1/AWS-awslinux-graviton2
- aarch64/neoverse_v1/AWS-awslinux-graviton3
Expand Down
9 changes: 6 additions & 3 deletions init/arch_specs/eessi_arch_arm.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# ARM CPU architecture specifications (see https://gpages.juszkiewicz.com.pl/arm-socs-table/arm-socs.html for guidance)
# Software path in EESSI | Vendor ID | List of defining CPU features
# CPU implementers: 0x41 (ARM), 0x46 (Fujitsu) - also see https://github.com/hrw/arm-socs-table/blob/main/data/socs.yml

# Software path in EESSI | 'Vendor ID' or 'CPU implementer' | List of defining CPU features
"aarch64/a64fx" "0x46" "asimdhp sve" # Fujitsu A64FX
"aarch64/neoverse_n1" "ARM" "asimddp" # Ampere Altra
"aarch64/neoverse_n1" "" "asimddp" # AWS Graviton2
"aarch64/neoverse_n1" "0x41" "asimddp" # AWS Graviton2
"aarch64/neoverse_v1" "ARM" "asimddp svei8mm"
"aarch64/neoverse_v1" "" "asimddp svei8mm" # AWS Graviton3
"aarch64/neoverse_v1" "0x41" "asimddp svei8mm" # AWS Graviton3
23 changes: 17 additions & 6 deletions init/eessi_archdetect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,27 @@ cpupath(){
update_arch_specs "$base_dir/arch_specs/${spec_file}"

# Identify the host CPU vendor
local cpu_vendor_tag="vendor[ _]id"
local cpu_vendor=$(get_cpuinfo "$cpu_vendor_tag")
local cpu_vendor=$(get_cpuinfo "vendor[ _]id")
if [ "${cpu_vendor}" == "" ]; then
cpu_vendor=$(get_cpuinfo "cpu[ _]implementer")
fi
log "DEBUG" "cpupath: CPU vendor of host system: '$cpu_vendor'"

# Identify the host CPU flags or features
local cpu_flag_tag='flags'
# cpuinfo systems print different line identifiers, eg features, instead of flags
[ "${cpu_vendor}" == "ARM" ] && cpu_flag_tag='flags'
[ "${machine_type}" == "aarch64" ] && [ "${cpu_vendor}x" == "x" ] && cpu_flag_tag='features'
[ "${machine_type}" == "ppc64le" ] && cpu_flag_tag='cpu'
local cpu_flag_tag;
if [ "${cpu_vendor}" == "ARM" ]; then
# if CPU vendor field is ARM, then we should be able to determine CPU microarchitecture based on 'flags' field
cpu_flag_tag='flags'
# if 64-bit Arm CPU without "ARM" as vendor ID, we need to take into account 'features' field
elif [ "${machine_type}" == "aarch64" ]; then
cpu_flag_tag='features'
# on 64-bit POWER, we need to look at 'cpu' field
elif [ "${machine_type}" == "ppc64le" ]; then
cpu_flag_tag='cpu'
else
cpu_flag_tag='flags'
fi

local cpu_flags=$(get_cpuinfo "$cpu_flag_tag")
log "DEBUG" "cpupath: CPU flags of host system: '$cpu_flags'"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aarch64/a64fx:aarch64/generic
8 changes: 8 additions & 0 deletions tests/archdetect/aarch64/a64fx/Deucalion-Rocky85.cpuinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
processor : 0
BogoMIPS : 200.00
Features : fp asimd evtstrm sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm fcma dcpop sve
CPU implementer : 0x46
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x001
CPU revision : 0
1 change: 1 addition & 0 deletions tests/archdetect/aarch64/a64fx/Deucalion-Rocky85.output
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aarch64/a64fx

0 comments on commit 3af9cf6

Please sign in to comment.