Merge pull request #2713 from RajalakshmiSR/p10-gcc10

Change minimum gcc version for POWER10
This commit is contained in:
Martin Kroeker 2020-07-10 10:43:33 +02:00 committed by GitHub
commit 3de80b3f5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 5 deletions

View File

@ -286,6 +286,8 @@ GCCVERSIONEQ5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` = 5)
GCCVERSIONGT5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 5)
GCCVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 7)
GCCVERSIONGTEQ9 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 9)
GCCVERSIONGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
GCCVERSIONGTEQ10 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 10)
# Note that the behavior of -dumpversion is compile-time-configurable for
# gcc-7.x and newer. Use -dumpfullversion there
ifeq ($(GCCVERSIONGTEQ7),1)
@ -619,9 +621,12 @@ DYNAMIC_CORE += POWER9
else
$(info, OpenBLAS: Your gcc version is too old to build the POWER9 kernels.)
endif
GCCVERSIONGTEQ11 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
ifeq ($(GCCVERSIONGTEQ11), 1)
DYNAMIC_CORE += POWER10
else ifeq ($(GCCVERSIONEQ10), 1)
ifeq ($(GCCMINORVERSIONGTEQ2), 1)
DYNAMIC_CORE += POWER10
endif
else
$(info, OpenBLAS: Your gcc version is too old to build the POWER10 kernels.)
endif

View File

@ -6,7 +6,11 @@ extern gotoblas_t gotoblas_POWER8;
#if (!defined __GNUC__) || ( __GNUC__ >= 6)
extern gotoblas_t gotoblas_POWER9;
#endif
#if (!defined __GNUC__) || ( __GNUC__ >= 11)
#if (!defined __GNUC__) || ( __GNUC__ >= 11) \
|| (__GNUC__ == 10 && __GNUC_MINOR__ >= 2)
#define HAVE_P10_SUPPORT 1
#endif
#ifdef HAVE_P10_SUPPORT
extern gotoblas_t gotoblas_POWER10;
#endif
@ -28,7 +32,7 @@ char *gotoblas_corename(void) {
#if (!defined __GNUC__) || ( __GNUC__ >= 6)
if (gotoblas == &gotoblas_POWER9) return corename[3];
#endif
#if (!defined __GNUC__) || ( __GNUC__ >= 11)
#ifdef HAVE_P10_SUPPORT
if (gotoblas == &gotoblas_POWER10) return corename[4];
#endif
return corename[0];
@ -44,7 +48,7 @@ static gotoblas_t *get_coretype(void) {
if (__builtin_cpu_is("power9"))
return &gotoblas_POWER9;
#endif
#if (!defined __GNUC__) || ( __GNUC__ >= 11)
#ifdef HAVE_P10_SUPPORT
if (__builtin_cpu_supports ("arch_3_1") && __builtin_cpu_supports ("mma"))
return &gotoblas_POWER10;
#endif
@ -73,7 +77,7 @@ static gotoblas_t *force_coretype(char * coretype) {
#if (!defined __GNUC__) || ( __GNUC__ >= 6)
case 3: return (&gotoblas_POWER9);
#endif
#if (!defined __GNUC__) || ( __GNUC__ >= 11)
#ifdef HAVE_P10_SUPPORT
case 4: return (&gotoblas_POWER10);
#endif
default: return NULL;