Skip to content

Commit 18d8a67

Browse files
authored
Merge pull request #2994 from antonblanchard/power10-fixes
Power10 fixes
2 parents 043128c + 043f3d6 commit 18d8a67

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Makefile.system

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ DYNAMIC_CORE += POWER9
676676
else
677677
$(info, OpenBLAS: Your gcc version is too old to build the POWER9 kernels.)
678678
endif
679-
LDVERSIONGTEQ35 := $(shell expr `ld --version | head -1 | cut -f2 -d "." | cut -f1 -d "-"` >= 35)
679+
LDVERSIONGTEQ35 := $(shell expr `$(CC) -Wl,--version 2> /dev/null | head -1 | cut -f2 -d "." | cut -f1 -d "-"` \>= 35)
680680
ifeq ($(GCCVERSIONGTEQ11)$(LDVERSIONGTEQ35), 11)
681681
DYNAMIC_CORE += POWER10
682682
CCOMMON_OPT += -DHAVE_P10_SUPPORT

driver/others/dynamic_power.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ static gotoblas_t *get_coretype(void) {
5252
if (__builtin_cpu_supports ("arch_3_1") && __builtin_cpu_supports ("mma"))
5353
return &gotoblas_POWER10;
5454
#endif
55+
/* Fall back to the POWER9 implementation if the toolchain is too old or the MMA feature is not set */
56+
if (__builtin_cpu_is("power10"))
57+
return &gotoblas_POWER9;
5558
return NULL;
5659
}
5760

0 commit comments

Comments
 (0)