Add DYNAMIC_ARCH support for ARMV8 EMAG8180

This commit is contained in:
Martin Kroeker 2020-02-24 19:20:00 +01:00 committed by GitHub
parent e57b11acca
commit 9b732696c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions

View File

@ -51,10 +51,11 @@ extern gotoblas_t gotoblas_FALKOR;
extern gotoblas_t gotoblas_THUNDERX; extern gotoblas_t gotoblas_THUNDERX;
extern gotoblas_t gotoblas_THUNDERX2T99; extern gotoblas_t gotoblas_THUNDERX2T99;
extern gotoblas_t gotoblas_TSV110; extern gotoblas_t gotoblas_TSV110;
extern gotoblas_t gotoblas_EMAG8180;
extern void openblas_warning(int verbose, const char * msg); extern void openblas_warning(int verbose, const char * msg);
#define NUM_CORETYPES 9 #define NUM_CORETYPES 10
/* /*
* In case asm/hwcap.h is outdated on the build system, make sure * In case asm/hwcap.h is outdated on the build system, make sure
@ -78,6 +79,7 @@ static char *corename[] = {
"thunderx", "thunderx",
"thunderx2t99", "thunderx2t99",
"tsv110", "tsv110",
"emag8180",
"unknown" "unknown"
}; };
@ -91,6 +93,7 @@ char *gotoblas_corename(void) {
if (gotoblas == &gotoblas_THUNDERX) return corename[ 6]; if (gotoblas == &gotoblas_THUNDERX) return corename[ 6];
if (gotoblas == &gotoblas_THUNDERX2T99) return corename[ 7]; if (gotoblas == &gotoblas_THUNDERX2T99) return corename[ 7];
if (gotoblas == &gotoblas_TSV110) return corename[ 8]; if (gotoblas == &gotoblas_TSV110) return corename[ 8];
if (gotoblas == &gotoblas_EMAG8180) return corename[ 9];
return corename[NUM_CORETYPES]; return corename[NUM_CORETYPES];
} }
@ -119,6 +122,7 @@ static gotoblas_t *force_coretype(char *coretype) {
case 6: return (&gotoblas_THUNDERX); case 6: return (&gotoblas_THUNDERX);
case 7: return (&gotoblas_THUNDERX2T99); case 7: return (&gotoblas_THUNDERX2T99);
case 8: return (&gotoblas_TSV110); case 8: return (&gotoblas_TSV110);
case 9: return (&gotoblas_EMAG8180);
} }
snprintf(message, 128, "Core not found: %s\n", coretype); snprintf(message, 128, "Core not found: %s\n", coretype);
openblas_warning(1, message); openblas_warning(1, message);
@ -189,6 +193,13 @@ static gotoblas_t *get_coretype(void) {
return &gotoblas_TSV110; return &gotoblas_TSV110;
} }
break; break;
case 0x50: // Ampere
switch (part)
{
case 0x000: // Skylark/EMAG8180
return &gotoblas_EMAG818;
}
break;
case 0x51: // Qualcomm case 0x51: // Qualcomm
switch (part) switch (part)
{ {