File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,9 @@ extern void openblas_warning(int verbose, const char * msg);
147
147
#ifndef HWCAP_CPUID
148
148
#define HWCAP_CPUID (1 << 11)
149
149
#endif
150
+ #ifndef HWCAP_SVE
151
+ #define HWCAP_SVE (1 << 22)
152
+ #endif
150
153
151
154
#define get_cpu_ftr (id , var ) ({ \
152
155
__asm__ __volatile__ ("mrs %0, "#id : "=r" (var)); \
@@ -281,9 +284,15 @@ static gotoblas_t *get_coretype(void) {
281
284
return & gotoblas_NEOVERSEN1 ;
282
285
#ifndef NO_SVE
283
286
case 0xd49 :
284
- return & gotoblas_NEOVERSEN2 ;
287
+ if (!(getauxval (AT_HWCAP ) & HWCAP_SVE ))
288
+ return & gotoblas_NEOVERSEN1 ;
289
+ else
290
+ return & gotoblas_NEOVERSEN2 ;
285
291
case 0xd40 :
286
- return & gotoblas_NEOVERSEV1 ;
292
+ if (!(getauxval (AT_HWCAP ) & HWCAP_SVE ))
293
+ return & gotoblas_NEOVERSEN1 ;
294
+ else
295
+ return & gotoblas_NEOVERSEV1 ;
287
296
#endif
288
297
case 0xd05 : // Cortex A55
289
298
return & gotoblas_CORTEXA55 ;
You can’t perform that action at this time.
0 commit comments