Disable POWER9 with old gcc versions
This commit is contained in:
parent
9f8da7e5ef
commit
8c6638ba7c
|
@ -3,7 +3,9 @@
|
||||||
|
|
||||||
extern gotoblas_t gotoblas_POWER6;
|
extern gotoblas_t gotoblas_POWER6;
|
||||||
extern gotoblas_t gotoblas_POWER8;
|
extern gotoblas_t gotoblas_POWER8;
|
||||||
|
#if (!defined C_GCC) || (GCC_VERSION >= 60000)
|
||||||
extern gotoblas_t gotoblas_POWER9;
|
extern gotoblas_t gotoblas_POWER9;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void openblas_warning(int verbose, const char *msg);
|
extern void openblas_warning(int verbose, const char *msg);
|
||||||
|
|
||||||
|
@ -19,7 +21,9 @@ static char *corename[] = {
|
||||||
char *gotoblas_corename(void) {
|
char *gotoblas_corename(void) {
|
||||||
if (gotoblas == &gotoblas_POWER6) return corename[1];
|
if (gotoblas == &gotoblas_POWER6) return corename[1];
|
||||||
if (gotoblas == &gotoblas_POWER8) return corename[2];
|
if (gotoblas == &gotoblas_POWER8) return corename[2];
|
||||||
|
#if (!defined C_GCC) || (GCC_VERSION >= 60000)
|
||||||
if (gotoblas == &gotoblas_POWER9) return corename[3];
|
if (gotoblas == &gotoblas_POWER9) return corename[3];
|
||||||
|
#endif
|
||||||
return corename[0];
|
return corename[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,8 +33,10 @@ static gotoblas_t *get_coretype(void) {
|
||||||
return &gotoblas_POWER6;
|
return &gotoblas_POWER6;
|
||||||
if (__builtin_cpu_is("power8"))
|
if (__builtin_cpu_is("power8"))
|
||||||
return &gotoblas_POWER8;
|
return &gotoblas_POWER8;
|
||||||
|
#if (!defined C_GCC) || (GCC_VERSION >= 60000)
|
||||||
if (__builtin_cpu_is("power9"))
|
if (__builtin_cpu_is("power9"))
|
||||||
return &gotoblas_POWER9;
|
return &gotoblas_POWER9;
|
||||||
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +59,9 @@ static gotoblas_t *force_coretype(char * coretype) {
|
||||||
{
|
{
|
||||||
case 1: return (&gotoblas_POWER6);
|
case 1: return (&gotoblas_POWER6);
|
||||||
case 2: return (&gotoblas_POWER8);
|
case 2: return (&gotoblas_POWER8);
|
||||||
|
#if (!defined C_GCC) || (GCC_VERSION >= 60000)
|
||||||
case 3: return (&gotoblas_POWER9);
|
case 3: return (&gotoblas_POWER9);
|
||||||
|
#endif
|
||||||
default: return NULL;
|
default: return NULL;
|
||||||
}
|
}
|
||||||
snprintf(message, 128, "Core not found: %s\n", coretype);
|
snprintf(message, 128, "Core not found: %s\n", coretype);
|
||||||
|
|
Loading…
Reference in New Issue