Skip to content

Commit f7f7fea

Browse files
authored
Merge pull request #3472 from kavanabhat/p10_aixas_p8
Fallback for Power kernels
2 parents 2241068 + eee3381 commit f7f7fea

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
@@ -2606,8 +2606,13 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26062606

26072607
#define SGEMM_DEFAULT_UNROLL_M 16
26082608
#define SGEMM_DEFAULT_UNROLL_N 8
2609+
#if defined(HAVE_GAS) && (HAVE_GAS == 1)
2610+
#define DGEMM_DEFAULT_UNROLL_M 16
2611+
#define DGEMM_DEFAULT_UNROLL_N 4
2612+
#else
26092613
#define DGEMM_DEFAULT_UNROLL_M 8
26102614
#define DGEMM_DEFAULT_UNROLL_N 8
2615+
#endif
26112616
#define CGEMM_DEFAULT_UNROLL_M 8
26122617
#define CGEMM_DEFAULT_UNROLL_N 4
26132618
#define ZGEMM_DEFAULT_UNROLL_M 8

0 commit comments

Comments
 (0)