Skip to content

Commit eee3381

Browse files
committed
Fallback for Power kernels
1 parent 2ae73a2 commit eee3381

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

Makefile.system

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,13 @@ endif
145145
ifeq ($(TARGET), POWER8)
146146
GETARCH_FLAGS := -DFORCE_POWER6
147147
endif
148+
ifeq ($(TARGET), POWER9)
149+
GETARCH_FLAGS := -DFORCE_POWER6
150+
endif
151+
ifeq ($(TARGET), POWER10)
152+
GETARCH_FLAGS := -DFORCE_POWER6
153+
endif
148154
endif
149-
150155

151156
#TARGET_CORE will override TARGET which is used in DYNAMIC_ARCH=1.
152157
#
@@ -267,6 +272,10 @@ endif
267272
ifndef GOTOBLAS_MAKEFILE
268273
export GOTOBLAS_MAKEFILE = 1
269274

275+
# Determine if the assembler is GNU Assembler
276+
HAVE_GAS := $(shell $(AS) -v < /dev/null 2>&1 | grep GNU 2>&1 >/dev/null ; echo $$?)
277+
GETARCH_FLAGS += -DHAVE_GAS=$(HAVE_GAS)
278+
270279
# Generating Makefile.conf and config.h
271280
DUMMY := $(shell $(MAKE) -C $(TOPDIR) -f Makefile.prebuild CC="$(CC)" FC="$(FC)" HOSTCC="$(HOSTCC)" HOST_CFLAGS="$(GETARCH_FLAGS)" CFLAGS="$(CFLAGS)" BINARY=$(BINARY) USE_OPENMP=$(USE_OPENMP) TARGET_CORE=$(TARGET_CORE) ONLY_CBLAS=$(ONLY_CBLAS) TARGET=$(TARGET) all)
272281

@@ -368,8 +377,6 @@ GCCMINORVERSIONGTEQ2 := $(shell expr `$(CC) $(GCCDUMPVERSION_PARAM) | cut -f2 -d
368377
GCCMINORVERSIONGTEQ7 := $(shell expr `$(CC) $(GCCDUMPVERSION_PARAM) | cut -f2 -d.` \>= 7)
369378
endif
370379

371-
HAVE_GAS := $(shell $(AS) -v < /dev/null 2>&1 | grep GNU 2>&1 >/dev/null ; echo $$?)
372-
373380
#
374381
# OS dependent settings
375382
#

param.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2598,8 +2598,13 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25982598

25992599
#define SGEMM_DEFAULT_UNROLL_M 16
26002600
#define SGEMM_DEFAULT_UNROLL_N 8
2601+
#if defined(HAVE_GAS) && (HAVE_GAS == 1)
2602+
#define DGEMM_DEFAULT_UNROLL_M 16
2603+
#define DGEMM_DEFAULT_UNROLL_N 4
2604+
#else
26012605
#define DGEMM_DEFAULT_UNROLL_M 8
26022606
#define DGEMM_DEFAULT_UNROLL_N 8
2607+
#endif
26032608
#define CGEMM_DEFAULT_UNROLL_M 8
26042609
#define CGEMM_DEFAULT_UNROLL_N 4
26052610
#define ZGEMM_DEFAULT_UNROLL_M 8

0 commit comments

Comments
 (0)