Skip to content

Commit 5c58994

Browse files
authored
Add fallback warning
1 parent ca7199f commit 5c58994

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

driver/others/dynamic_arm64.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ extern gotoblas_t gotoblas_CORTEXA55;
137137
#endif
138138

139139
extern void openblas_warning(int verbose, const char * msg);
140+
#define FALLBACK_VERBOSE 1
141+
#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"
140142

141143
#define NUM_CORETYPES 13
142144

@@ -284,14 +286,16 @@ static gotoblas_t *get_coretype(void) {
284286
return &gotoblas_NEOVERSEN1;
285287
#ifndef NO_SVE
286288
case 0xd49:
287-
if (!(getauxval(AT_HWCAP) & HWCAP_SVE))
289+
if (!(getauxval(AT_HWCAP) & HWCAP_SVE)) {
290+
openblas_warning(FALLBACK_VERBOSE, NEOVERSEN1_FALLBACK);
288291
return &gotoblas_NEOVERSEN1;
289-
else
292+
} else
290293
return &gotoblas_NEOVERSEN2;
291294
case 0xd40:
292-
if (!(getauxval(AT_HWCAP) & HWCAP_SVE))
295+
if (!(getauxval(AT_HWCAP) & HWCAP_SVE)) {
296+
openblas_warning(FALLBACK_VERBOSE, NEOVERSEN1_FALLBACK);
293297
return &gotoblas_NEOVERSEN1;
294-
else
298+
}else
295299
return &gotoblas_NEOVERSEV1;
296300
#endif
297301
case 0xd05: // Cortex A55

0 commit comments

Comments
 (0)