Skip to content

Commit 3bdcf32

Browse files
authored
Merge branch 'xianyi:develop' into issue4101
2 parents b34f19a + 5cb4f59 commit 3bdcf32

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

driver/others/dynamic_arm64.c

Lines changed: 15 additions & 2 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

@@ -147,6 +149,9 @@ extern void openblas_warning(int verbose, const char * msg);
147149
#ifndef HWCAP_CPUID
148150
#define HWCAP_CPUID (1 << 11)
149151
#endif
152+
#ifndef HWCAP_SVE
153+
#define HWCAP_SVE (1 << 22)
154+
#endif
150155

151156
#define get_cpu_ftr(id, var) ({ \
152157
__asm__ __volatile__ ("mrs %0, "#id : "=r" (var)); \
@@ -281,9 +286,17 @@ static gotoblas_t *get_coretype(void) {
281286
return &gotoblas_NEOVERSEN1;
282287
#ifndef NO_SVE
283288
case 0xd49:
284-
return &gotoblas_NEOVERSEN2;
289+
if (!(getauxval(AT_HWCAP) & HWCAP_SVE)) {
290+
openblas_warning(FALLBACK_VERBOSE, NEOVERSEN1_FALLBACK);
291+
return &gotoblas_NEOVERSEN1;
292+
} else
293+
return &gotoblas_NEOVERSEN2;
285294
case 0xd40:
286-
return &gotoblas_NEOVERSEV1;
295+
if (!(getauxval(AT_HWCAP) & HWCAP_SVE)) {
296+
openblas_warning(FALLBACK_VERBOSE, NEOVERSEN1_FALLBACK);
297+
return &gotoblas_NEOVERSEN1;
298+
}else
299+
return &gotoblas_NEOVERSEV1;
287300
#endif
288301
case 0xd05: // Cortex A55
289302
return &gotoblas_CORTEXA55;

kernel/riscv64/KERNEL.C910V

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ SDOTKERNEL = dot_vector.c
5959
DDOTKERNEL = dot_vector.c
6060
CDOTKERNEL = zdot_vector.c
6161
ZDOTKERNEL = zdot_vector.c
62+
DSDOTKERNEL = ../generic/dot.c
6263

6364
SNRM2KERNEL = nrm2_vector.c
6465
DNRM2KERNEL = nrm2_vector.c

0 commit comments

Comments
 (0)