Skip to content

Commit

Permalink
openblas: enable ARM-specific optimizations
Browse files Browse the repository at this point in the history
Signed-off-by: krant <[email protected]>
  • Loading branch information
krant committed Feb 16, 2024
1 parent f394fa3 commit 2d96fbd
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions libs/openblas/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,26 @@ endmenu
endef

OPENBLAS_TARGET=$(call qstrip,$(CONFIG_OPENBLAS_TARGET_OVERRIDE))
CPU_TYPE=$(call qstrip,$(CONFIG_CPU_TYPE))

ifeq ($(OPENBLAS_TARGET),)
# initialize to GENERIC as default
OPENBLAS_TARGET:=GENERIC

ifeq ($(ARCH),aarch64)
ifneq ($(findstring cortex-a9,$(CONFIG_CPU_TYPE)),)
ifneq ($(findstring neon,$(CONFIG_CPU_TYPE)),)
# CORTEXA9 relies on NEON
OPENBLAS_TARGET:=CORTEXA9
else
# Fallback for CPUs without NEON
OPENBLAS_TARGET:=ARMV7
endif
else ifneq ($(findstring cortex-a15,$(CONFIG_CPU_TYPE)),)
OPENBLAS_TARGET:=CORTEXA15
else ifneq ($(findstring cortex-a53,$(CONFIG_CPU_TYPE)),)
OPENBLAS_TARGET:=CORTEXA53
else ifneq ($(findstring cortex-a72,$(CONFIG_CPU_TYPE)),)
OPENBLAS_TARGET:=CORTEXA72
else ifeq ($(ARCH),aarch64)
OPENBLAS_TARGET:=ARMV8
else ifeq ($(ARCH),arm)
OPENBLAS_TARGET:=ARMV5
Expand Down

0 comments on commit 2d96fbd

Please sign in to comment.