Skip to content

Commit

Permalink
aarch64: check for LITTLE cores
Browse files Browse the repository at this point in the history
This is a fix for bug explosion#13 : add logic to setup.py to detect aarch64
LITTLE cores for which BLIS has configure flag BLIS_ARCH="cortexa53".  All other
cores will configure with BLIS_ARCH="cortexa57".
  • Loading branch information
Sebastian Pop committed May 28, 2020
1 parent 55e2bf7 commit 250b5bb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ def build_extensions(self):
def get_arch_name(self):
if "BLIS_ARCH" in os.environ:
return os.environ["BLIS_ARCH"]
machine = os.uname().machine
if machine == "aarch64":
# Check if this is a LITTLE core.
LITTLE_core = os.system("test 'Cortex-A53' = $(lscpu | grep 'Model name' | awk '{print $3}')")
if LITTLE_core == 0:
return "cortexa53"
else:
# Optimize for big cores.
return "cortexa57"
else:
return "x86_64"

Expand Down

0 comments on commit 250b5bb

Please sign in to comment.