The StarFive JH7110's U74 cores implement rv64imafdc_..._zba_zbb, so the U74 target now compiles with -march=rv64imafdc_zba_zbb. The generic RISCV64_GENERIC target stays at bare rv64imafdc for portability across unknown RV64GC cores. Measured on the VisionFive 2 (GCC 13.3, -mtune=sifive-u74 held constant): GCC emits Zba shift-add instructions in the packing routines, but DGEMM is unchanged -- the 4x4 kernel holds 1.533 GF either way and packing 1.74 vs 1.75 GB/s. The 4x4 micro-kernel is FMA-bound (fused fmadd.d with immediate-offset loads) and packing is LPDDR4-bandwidth-bound, so integer address generation is not on the critical path. The flag is nonetheless the correct -march for the silicon, is free, and can only help address-gen-bound code elsewhere in the library. The remaining GEMM headroom on the U74 is microarchitectural scheduling (a hand-written assembly micro-kernel), not the ISA.
32 lines
1.1 KiB
Makefile
32 lines
1.1 KiB
Makefile
ifeq ($(CORE), C910V)
|
|
CCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920
|
|
FCOMMON_OPT += -march=rv64imafdcv0p7_zfh_xtheadc -mabi=lp64d -mtune=c920 -static
|
|
endif
|
|
ifeq ($(CORE), x280)
|
|
CCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh_zvl512b -mabi=lp64d
|
|
FCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh -mabi=lp64d -static
|
|
endif
|
|
RISCV64_OPT = rv64imafdcv
|
|
ifeq ($(BUILD_HFLOAT16), 1)
|
|
RISCV64_OPT := $(RISCV64_OPT)_zvfh_zfh
|
|
endif
|
|
ifeq ($(BUILD_BFLOAT16), 1)
|
|
RISCV64_OPT := $(RISCV64_OPT)_zvfbfwma
|
|
endif
|
|
ifeq ($(CORE), RISCV64_ZVL256B)
|
|
CCOMMON_OPT += -march=$(RISCV64_OPT)_zvl256b -mabi=lp64d
|
|
FCOMMON_OPT += -march=$(RISCV64_OPT) -mabi=lp64d
|
|
endif
|
|
ifeq ($(CORE), RISCV64_ZVL128B)
|
|
CCOMMON_OPT += -march=$(RISCV64_OPT) -mabi=lp64d
|
|
FCOMMON_OPT += -march=$(RISCV64_OPT) -mabi=lp64d
|
|
endif
|
|
ifeq ($(CORE), RISCV64_GENERIC)
|
|
CCOMMON_OPT += -march=rv64imafdc -mabi=lp64d
|
|
FCOMMON_OPT += -march=rv64imafdc -mabi=lp64d
|
|
endif
|
|
ifeq ($(CORE), U74)
|
|
CCOMMON_OPT += -march=rv64imafdc_zba_zbb -mabi=lp64d -mtune=sifive-u74
|
|
FCOMMON_OPT += -march=rv64imafdc_zba_zbb -mabi=lp64d -mtune=sifive-u74
|
|
endif
|