Skip to content

Commit

Permalink
re-order power and add aarch64 detection
Browse files Browse the repository at this point in the history
  • Loading branch information
hmeiland committed Sep 16, 2022
1 parent e8341a6 commit 3ce8a01
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions init/eessi_archdetect.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/bin/bash

# current pathways implemented in EESSI
# current pathways implemented in EESSI 2021.12 pilot version
# x86_64/generic
# x86_64/intel/haswell
# x86_64/intel/skylake_avx512
# x86_64/amd/zen2
# x86_64/amd/zen3
# aarch64/generic
# aarch64/graviton2
# aarch64/graviton3
# ppc64le/generic
# ppc64le/power9le

Expand All @@ -24,6 +26,14 @@ cpupath () {
CPU_PATH="${MACHINE_TYPE}/generic"

if [ ${MACHINE_TYPE} == "aarch64" ]; then
CPU_FLAGS=$(grep -m 1 -i ^flags ${PROC_CPUINFO} | sed 's/$/ /g')
[[ $CPU_FLAGS =~ " asimd " ]] && EESSI_HAS_ASIMD=true
[[ $CPU_FLAGS =~ " svei8mm " ]] && EESSI_HAS_SVEI8MM=true

[[ ${EESSI_HAS_ASIMD} ]] && EESSI_CPU_TYPE=graviton2
[[ ${EESSI_HAS_SVEI8MM} ]] && EESSI_CPU_TYPE=graviton3

[[ $EESSI_CPU_TYPE ]] && CPU_PATH="${MACHINE_TYPE}/${EESSI_CPU_TYPE}"
echo ${CPU_PATH}
exit
fi
Expand All @@ -32,7 +42,9 @@ cpupath () {
CPU_FLAGS=$(grep -m 1 -i ^cpu ${PROC_CPUINFO})
[[ $CPU_FLAGS =~ " POWER9 " ]] && EESSI_HAS_POWER9=true

[[ ${EESSI_HAS_POWER9} ]] && CPU_PATH=${MACHINE_TYPE}/power9le
[[ ${EESSI_HAS_POWER9} ]] && EESSI_CPU_TYPE=power9le

[[ $EESSI_CPU_TYPE ]] && CPU_PATH="${MACHINE_TYPE}/${EESSI_CPU_TYPE}"
echo ${CPU_PATH}
exit
fi
Expand Down

0 comments on commit 3ce8a01

Please sign in to comment.