Merge pull request #2658 from RajalakshmiSR/p10

powerpc: Add support for future processor
This commit is contained in:
Martin Kroeker
2020-06-23 00:02:37 +02:00
committed by GitHub
38 changed files with 309 additions and 42 deletions

View File

@@ -6,6 +6,9 @@ extern gotoblas_t gotoblas_POWER8;
#if (!defined __GNUC__) || ( __GNUC__ >= 6)
extern gotoblas_t gotoblas_POWER9;
#endif
#if (!defined __GNUC__) || ( __GNUC__ >= 11)
extern gotoblas_t gotoblas_POWER10;
#endif
extern void openblas_warning(int verbose, const char *msg);
@@ -13,7 +16,8 @@ static char *corename[] = {
"unknown",
"POWER6",
"POWER8",
"POWER9"
"POWER9",
"POWER10"
};
#define NUM_CORETYPES 4
@@ -23,6 +27,9 @@ char *gotoblas_corename(void) {
if (gotoblas == &gotoblas_POWER8) return corename[2];
#if (!defined __GNUC__) || ( __GNUC__ >= 6)
if (gotoblas == &gotoblas_POWER9) return corename[3];
#endif
#if (!defined __GNUC__) || ( __GNUC__ >= 11)
if (gotoblas == &gotoblas_POWER10) return corename[4];
#endif
return corename[0];
}
@@ -36,6 +43,10 @@ static gotoblas_t *get_coretype(void) {
#if (!defined __GNUC__) || ( __GNUC__ >= 6)
if (__builtin_cpu_is("power9"))
return &gotoblas_POWER9;
#endif
#if (!defined __GNUC__) || ( __GNUC__ >= 11)
if (__builtin_cpu_is("isa_3_1") && __builtin_cpu_supports ("mma"))
return &gotoblas_POWER10;
#endif
return NULL;
}
@@ -61,6 +72,9 @@ static gotoblas_t *force_coretype(char * coretype) {
case 2: return (&gotoblas_POWER8);
#if (!defined __GNUC__) || ( __GNUC__ >= 6)
case 3: return (&gotoblas_POWER9);
#endif
#if (!defined __GNUC__) || ( __GNUC__ >= 11)
case 4: return (&gotoblas_POWER10);
#endif
default: return NULL;
}