OpenMathLib / OpenBLAS

OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
http://www.openblas.net
BSD 3-Clause "New" or "Revised" License
6.43k stars 1.51k forks source link

Build for sifive P870 #4970

Closed liut89 closed 2 weeks ago

liut89 commented 2 weeks ago

Hi, I want to buid a .bin for sifive P870 core, can I reuse any of the targets in TargetList.txt? Or should I modify the Makefile? could you give me some guidence please, thank you~

martin-frbg commented 2 weeks ago

I think this would be the RISCV64_ZVL128B target (if I remember correctly that P870 has 128b vector length)

liut89 commented 1 week ago

Thank you. So I think I just need to modify Makefile.riscv64:

ifeq ($(CORE), x280)
CCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh_zvl512b -mabi=lp64d -ffast-math //change zvl512b to zvl128b 
FCOMMON_OPT += -march=rv64imafdcv_zba_zbb_zfh -mabi=lp64d -static
endif

Right?

martin-frbg commented 1 week ago

Which version of OpenBLAS are you trying to build ? Don't you have COMMON_OPT settings for the RISCV64_ZVL128B target in Makefile.riscv64 ? (Modifying the entries for x280 will probably not be enough, as all the BLAS kernels for x280 require the longer vector length)

liut89 commented 1 week ago

Which version of OpenBLAS are you trying to build ? Don't you have COMMON_OPT settings for the RISCV64_ZVL128B target in Makefile.riscv64 ? (Modifying the entries for x280 will probably not be enough, as all the BLAS kernels for x280 require the longer vector length)

So you mean I should choose target RISCV64_ZVL128B for P870? image

martin-frbg commented 1 week ago

Yes I think this should be the appropriate one for the P870.