mirror of
https://github.com/amd/blis.git
synced 2026-05-11 17:50:00 +00:00
Don't override -mcpu with -march on ARM (#353)
* Use -mcpu for ARM See the GCC doc about -march, -mtune, and -mpu and maybe https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mcpu * Fix typo in flags * Fix typo in cortexa9 flags * Modify cortexa53 compilation flags to fix failing BLAS check (#341)
This commit is contained in:
@@ -63,7 +63,7 @@ endif
|
||||
# Flags specific to optimized kernels.
|
||||
CKOPTFLAGS := $(COPTFLAGS)
|
||||
ifeq ($(CC_VENDOR),gcc)
|
||||
CKVECFLAGS := -march=armv7-a
|
||||
CKVECFLAGS := -mcpu=cortex-a15
|
||||
else
|
||||
$(error gcc is required for this configuration.)
|
||||
endif
|
||||
|
||||
@@ -57,19 +57,21 @@ endif
|
||||
ifeq ($(DEBUG_TYPE),noopt)
|
||||
COPTFLAGS := -O0
|
||||
else
|
||||
COPTFLAGS := -O3 -ftree-vectorize -mtune=cortex-a53
|
||||
# Use -O2 here to avoid issue #341 -- BLAS check failing, using GCC 8.
|
||||
# (It's at least -ftree-loop-vectorize which causes the trouble.)
|
||||
COPTFLAGS := -O2 -mcpu=cortex-a53
|
||||
endif
|
||||
|
||||
# Flags specific to optimized kernels.
|
||||
CKOPTFLAGS := $(COPTFLAGS)
|
||||
ifeq ($(CC_VENDOR),gcc)
|
||||
CKVECFLAGS := -march=armv8-a+fp+simd -mcpu=cortex-a53
|
||||
CKVECFLAGS := -mcpu=cortex-a53
|
||||
else
|
||||
$(error gcc is required for this configuration.)
|
||||
endif
|
||||
|
||||
# Flags specific to reference kernels.
|
||||
CROPTFLAGS := $(CKOPTFLAGS)
|
||||
CROPTFLAGS := $(CKOPTFLAGS) -O3
|
||||
ifeq ($(CC_VENDOR),gcc)
|
||||
CRVECFLAGS := $(CKVECFLAGS) -funsafe-math-optimizations -ffp-contract=fast
|
||||
else
|
||||
|
||||
@@ -57,13 +57,13 @@ endif
|
||||
ifeq ($(DEBUG_TYPE),noopt)
|
||||
COPTFLAGS := -O0
|
||||
else
|
||||
COPTFLAGS := -O3 -ftree-vectorize -mtune=cortex-a57
|
||||
COPTFLAGS := -O3 -mcpu=cortex-a57
|
||||
endif
|
||||
|
||||
# Flags specific to optimized kernels.
|
||||
CKOPTFLAGS := $(COPTFLAGS)
|
||||
ifeq ($(CC_VENDOR),gcc)
|
||||
CKVECFLAGS := -march=armv8-a+fp+simd -mcpu=cortex-a57
|
||||
CKVECFLAGS := -mcpu=cortex-a57
|
||||
else
|
||||
$(error gcc is required for this configuration.)
|
||||
endif
|
||||
|
||||
@@ -63,7 +63,7 @@ endif
|
||||
# Flags specific to optimized kernels.
|
||||
CKOPTFLAGS := $(COPTFLAGS)
|
||||
ifeq ($(CC_VENDOR),gcc)
|
||||
CKVECFLAGS := -march=armv7-a
|
||||
CKVECFLAGS := -mcpu=cortex-a9
|
||||
else
|
||||
$(error gcc is required for this configuration.)
|
||||
endif
|
||||
|
||||
@@ -57,13 +57,13 @@ endif
|
||||
ifeq ($(DEBUG_TYPE),noopt)
|
||||
COPTFLAGS := -O0
|
||||
else
|
||||
COPTFLAGS := -O3 -ftree-vectorize -mtune=thunderx2t99
|
||||
COPTFLAGS := -O3 -mcpu=thunderx2t99
|
||||
endif
|
||||
|
||||
# Flags specific to optimized kernels.
|
||||
CKOPTFLAGS := $(COPTFLAGS)
|
||||
ifeq ($(CC_VENDOR),gcc)
|
||||
CKVECFLAGS := -march=armv8.1-a+fp+simd -mcpu=thunderx2t99
|
||||
CKVECFLAGS := -mcpu=thunderx2t99
|
||||
else
|
||||
$(error gcc is required for this configuration.)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user