Skip to content

Commit 4873c95

Browse files
committed
Add ARMV9SME to AArch64 Dynamic Dispatch
1 parent 04915be commit 4873c95

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

driver/others/dynamic_arm64.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ extern gotoblas_t gotoblas_A64FX;
157157
#ifndef NO_SME
158158
extern gotoblas_t gotoblas_ARMV9SME;
159159
#else
160-
#define gotoblas_ARMV9SME gotoblas_ARMV8SVE
160+
#define gotoblas_ARMV9SME gotoblas_ARMV8
161161
#endif
162162

163163
extern gotoblas_t gotoblas_THUNDERX3T110;
@@ -168,7 +168,7 @@ extern void openblas_warning(int verbose, const char * msg);
168168
#define FALLBACK_VERBOSE 1
169169
#define NEOVERSEN1_FALLBACK "OpenBLAS : Your OS does not support SVE instructions. OpenBLAS is using Neoverse N1 kernels as a fallback, which may give poorer performance.\n"
170170

171-
#define NUM_CORETYPES 18
171+
#define NUM_CORETYPES 19
172172

173173
/*
174174
* In case asm/hwcap.h is outdated on the build system, make sure
@@ -207,6 +207,7 @@ static char *corename[] = {
207207
"cortexa55",
208208
"armv8sve",
209209
"a64fx",
210+
"armv9sme"
210211
"unknown"
211212
};
212213

@@ -229,6 +230,7 @@ char *gotoblas_corename(void) {
229230
if (gotoblas == &gotoblas_CORTEXA55) return corename[15];
230231
if (gotoblas == &gotoblas_ARMV8SVE) return corename[16];
231232
if (gotoblas == &gotoblas_A64FX) return corename[17];
233+
if (gotoblas == &gotoblas_ARMV9SME) return corename[18];
232234
return corename[NUM_CORETYPES];
233235
}
234236

@@ -266,6 +268,7 @@ static gotoblas_t *force_coretype(char *coretype) {
266268
case 15: return (&gotoblas_CORTEXA55);
267269
case 16: return (&gotoblas_ARMV8SVE);
268270
case 17: return (&gotoblas_A64FX);
271+
case 18: return (&gotoblas_ARMV9SME);
269272
}
270273
snprintf(message, 128, "Core not found: %s\n", coretype);
271274
openblas_warning(1, message);
@@ -446,7 +449,7 @@ static gotoblas_t *get_coretype(void) {
446449
openblas_warning(1, coremsg);
447450
}
448451

449-
#if !defined(NO_SME) && defined(HWCAP2_SME)
452+
#ifndef NO_SME
450453
if ((getauxval(AT_HWCAP2) & HWCAP2_SME)) {
451454
return &gotoblas_ARMV9SME;
452455
}

0 commit comments

Comments
 (0)