File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ ifeq ($(BUILD_HFLOAT16), 1)
1111RISCV64_OPT := $(RISCV64_OPT)_zvfh_zfh
1212endif
1313ifeq ($(BUILD_BFLOAT16), 1)
14- RISCV64_OPT := $(RISCV64_OPT)_zfbfmin_zvfbfmin_zvfbfwma
14+ RISCV64_OPT := $(RISCV64_OPT)_zvfbfwma
1515endif
1616ifeq ($(CORE), RISCV64_ZVL256B)
1717CCOMMON_OPT += -march=$(RISCV64_OPT)_zvl256b -mabi=lp64d
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ struct riscv_hwprobe {
9999#define RISCV_HWPROBE_IMA_V (1 << 2)
100100#define RISCV_HWPROBE_EXT_ZFH (1 << 27)
101101#define RISCV_HWPROBE_EXT_ZVFH (1 << 30)
102+ #define RISCV_HWPROBE_EXT_ZVFBFWMA (1 << 54)
102103
103104#ifndef NR_riscv_hwprobe
104105#ifndef NR_arch_specific_syscall
@@ -170,6 +171,8 @@ static gotoblas_t* get_coretype(void) {
170171 if (ret == 0 ) {
171172#if defined(BUILD_HFLOAT16 )
172173 vector_mask = (RISCV_HWPROBE_IMA_V | RISCV_HWPROBE_EXT_ZFH | RISCV_HWPROBE_EXT_ZVFH );
174+ #elif defined(BUILD_BFLOAT16 )
175+ vector_mask = (RISCV_HWPROBE_IMA_V | RISCV_HWPROBE_EXT_ZVFBFWMA );
173176#else
174177 vector_mask = RISCV_HWPROBE_IMA_V ;
175178#endif
@@ -180,6 +183,10 @@ static gotoblas_t* get_coretype(void) {
180183 snprintf (coremsg , sizeof (coremsg ), "Cpu support for Zfh+Zvfh extensions required due to BUILD_HFLOAT16=1\n" );
181184 openblas_warning (1 , coremsg );
182185 return NULL ;
186+ #elif defined(BUILD_BFLOAT16 )
187+ snprintf (coremsg , sizeof (coremsg ), "Cpu support for Zvfbfwma extensions required due to BUILD_BFLOAT16=1\n" );
188+ openblas_warning (1 , coremsg );
189+ return NULL ;
183190#else
184191 if (!(getauxval (AT_HWCAP ) & DETECT_RISCV64_HWCAP_ISA_V ))
185192 return NULL ;
You can’t perform that action at this time.
0 commit comments