Skip to content

Commit daca016

Browse files
authored
fix detection of Neoverse V1 and user-enforced selection of N2 in ARM64 DYNAMIC_ARCH (#3700)
* fix detection of Neoverse V1 and user-enforced selection of N2
1 parent c322aab commit daca016

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

driver/others/dynamic_arm64.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ extern gotoblas_t gotoblas_NEOVERSEN1;
9999
#else
100100
#define gotoblas_NEOVERSEN1 gotoblas_ARMV8
101101
#endif
102+
#ifdef DYN_NEOVERSEV1
103+
extern gotoblas_t gotoblas_NEOVERSEV1;
104+
#else
105+
#define gotoblas_NEOVERSEV1 gotoblas_ARMV8
106+
#endif
102107
#ifdef DYN_NEOVERSEN2
103108
extern gotoblas_t gotoblas_NEOVERSEN2;
104109
#else
@@ -120,6 +125,7 @@ extern gotoblas_t gotoblas_THUNDERX2T99;
120125
extern gotoblas_t gotoblas_TSV110;
121126
extern gotoblas_t gotoblas_EMAG8180;
122127
extern gotoblas_t gotoblas_NEOVERSEN1;
128+
extern gotoblas_t gotoblas_NEOVERSEV1;
123129
extern gotoblas_t gotoblas_NEOVERSEN2;
124130
extern gotoblas_t gotoblas_THUNDERX3T110;
125131
extern gotoblas_t gotoblas_CORTEXA55;
@@ -172,6 +178,7 @@ char *gotoblas_corename(void) {
172178
if (gotoblas == &gotoblas_TSV110) return corename[ 8];
173179
if (gotoblas == &gotoblas_EMAG8180) return corename[ 9];
174180
if (gotoblas == &gotoblas_NEOVERSEN1) return corename[10];
181+
if (gotoblas == &gotoblas_NEOVERSEV1) return corename[11];
175182
if (gotoblas == &gotoblas_NEOVERSEN2) return corename[12];
176183
if (gotoblas == &gotoblas_THUNDERX3T110) return corename[13];
177184
if (gotoblas == &gotoblas_CORTEXA55) return corename[14];
@@ -205,8 +212,10 @@ static gotoblas_t *force_coretype(char *coretype) {
205212
case 8: return (&gotoblas_TSV110);
206213
case 9: return (&gotoblas_EMAG8180);
207214
case 10: return (&gotoblas_NEOVERSEN1);
208-
case 11: return (&gotoblas_THUNDERX3T110);
209-
case 12: return (&gotoblas_CORTEXA55);
215+
case 11: return (&gotoblas_NEOVERSEV1);
216+
case 12: return (&gotoblas_NEOVERSEN2);
217+
case 13: return (&gotoblas_THUNDERX3T110);
218+
case 14: return (&gotoblas_CORTEXA55);
210219
}
211220
snprintf(message, 128, "Core not found: %s\n", coretype);
212221
openblas_warning(1, message);
@@ -267,6 +276,8 @@ static gotoblas_t *get_coretype(void) {
267276
return &gotoblas_NEOVERSEN1;
268277
case 0xd49:
269278
return &gotoblas_NEOVERSEN2;
279+
case 0xd40:
280+
return &gotoblas_NEOVERSEV1;
270281
case 0xd05: // Cortex A55
271282
return &gotoblas_CORTEXA55;
272283
}

0 commit comments

Comments
 (0)