shibatch / sleef

SIMD Library for Evaluating Elementary Functions, vectorized libm and DFT
https://sleef.org
Boost Software License 1.0
635 stars 129 forks source link

Support for RiscV architecture #468

Closed anuphalarnkar closed 9 months ago

anuphalarnkar commented 1 year ago

Hi,

I am working to port Pytorch to RiscV.

Platform details: OS: Ubuntu Image: SiFive HiFive unmatched RiscV64 Booted on Qemu

Application details: Pytorch, Sleef

The build fails with error as shown below.

[ 29%] Building C object sleef/src/libm/CMakeFiles/sleefpurecfma_scalar.dir/sleefsimdsp.c.o In file included from /home/ubuntu/pytorch/third_party/sleef/src/libm/sleefsimdsp.c:358: /home/ubuntu/pytorch/third_party/sleef/src/arch/helperpurec_scalar.h:69:2: error: #error FP_FAST_FMA or FP_FAST_FMAF not defined 69 | #error FP_FAST_FMA or FP_FAST_FMAF not defined | ^~~~~ gmake[2]: [sleef/src/libm/CMakeFiles/sleefpurecfma_scalar.dir/build.make:81: sleef/src/libm/CMakeFiles/sleefpurecfma_scalar.dir/sleefsimdsp.c.o] Error 1 gmake[1]: [CMakeFiles/Makefile2:6565: sleef/src/libm/CMakeFiles/sleefpurecfma_scalar.dir/all] Error 2 gmake[1]: Waiting for unfinished jobs.... gmake: [Makefile:146: all] Error 2

I edited the file "sleef/src/arch/helperpurec_scalar.h" and updated the architecture "__riscv" after which the issue was resolved and build proceeded.

Regards, Anup

GlassOfWhiskey commented 11 months ago

Hi, this seems to be a duplicate of #448

blapie commented 10 months ago

Hello! We are in the process of changing maintainers for SLEEF, pending issues and PRs will be addressed in timely manner. Apologies for any further delay, but this issue will be addressed. See discussion here #472