Merge pull request #4494 from ChipKerchner/fixPower10CPUID

Make sure CPU ID works for all POWER_10 conditions
This commit is contained in:
Martin Kroeker 2024-02-08 21:21:32 +01:00 committed by GitHub
commit 974f29c4e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -69,7 +69,7 @@ static int cpuid(void)
else if (arch == POWER_9) return CPU_POWER9; else if (arch == POWER_9) return CPU_POWER9;
#endif #endif
#ifdef POWER_10 #ifdef POWER_10
else if (arch == POWER_10) return CPU_POWER10; else if (arch >= POWER_10) return CPU_POWER10;
#endif #endif
return CPU_UNKNOWN; return CPU_UNKNOWN;
} }
@ -339,6 +339,9 @@ void gotoblas_dynamic_init(void) {
if (gotoblas && gotoblas -> init) { if (gotoblas && gotoblas -> init) {
strncpy(coren,gotoblas_corename(),20); strncpy(coren,gotoblas_corename(),20);
sprintf(coremsg, "Core: %s\n",coren); sprintf(coremsg, "Core: %s\n",coren);
if (getenv("GET_OPENBLAS_CORETYPE")) {
fprintf(stderr, "%s", coremsg);
}
openblas_warning(2, coremsg); openblas_warning(2, coremsg);
gotoblas -> init(); gotoblas -> init();
} else { } else {