mirror of
https://github.com/amd/blis.git
synced 2026-06-06 04:34:02 +00:00
Augment zen CFLAGS to prevent illegal instruction.
Details: - Added various compiler flags (-mno-fma4 -mno-tbm -mno-xop -mno-lwp) so that compiling with -march=bdver4 on zen-based architectures does not result in an illegal instruction error at runtime. Note: This fix is only needed for gcc 5.4; gcc 6.3 or later supports the use of -march=znver1, which can be used in lieu of the augmented set of flags based on bdver4. Thanks to Nisanth Padinharepatt for reporting this error.
This commit is contained in:
@@ -68,10 +68,13 @@ endif
|
||||
CKOPTFLAGS := $(COPTFLAGS)
|
||||
|
||||
ifeq ($(CC_VENDOR),gcc)
|
||||
CVECFLAGS := -mavx2 -mfpmath=sse -mfma -march=bdver4
|
||||
# gcc 6.3 or later:
|
||||
#CVECFLAGS := -mavx2 -mfpmath=sse -mfma -march=bdver4
|
||||
# gcc 5.4:
|
||||
CVECFLAGS := -mavx2 -mfpmath=sse -mfma -march=bdver4 -mno-fma4 -mno-tbm -mno-xop -mno-lwp
|
||||
else
|
||||
ifeq ($(CC_VENDOR),clang)
|
||||
CVECFLAGS := -mavx2 -mfpmath=sse -mfma -march=bdver4
|
||||
CVECFLAGS := -mavx2 -mfpmath=sse -mfma -march=bdver4 -mno-fma4 -mno-tbm -mno-xop -mno-lwp
|
||||
else
|
||||
$(error gcc or clang are required for this configuration.)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user