Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Missing library routines for double-float conversion when compiling with march=rv32imf? #41

Open
tcal-x opened this issue May 4, 2022 · 0 comments

Comments

@tcal-x
Copy link
Member

tcal-x commented May 4, 2022

In CFU playground, when using the conda-provided RISC-V compiler, there are link-time errors (missing __extendsfdf2 and __truncdfsf2) when targeting a rv32imf CPU. When using the SiFive toolchain, the binary links fine. This is only circumstantial evidence, I admit, but could we be missing some library routines?

The errors like like this:

/home/tim/google/CFU-Playground/env/conda/envs/cfu-common/bin/../lib/gcc/riscv32-elf/10.1.0/../../../../riscv32-elf/bin/ld: src/tensorflow/lite/micro/micro_string.o: in function `.L0 ':
/home/tim/google/CFU-Playground/proj/proj_template_v/build/src/tensorflow/lite/micro/micro_string.cc:280: undefined reference to `__truncdfsf2'
/home/tim/google/CFU-Playground/env/conda/envs/cfu-common/bin/../lib/gcc/riscv32-elf/10.1.0/../../../../riscv32-elf/bin/ld: src/tensorflow/lite/micro/micro_utils.o: in function `tflite::SignedSymmetricPerChannelQuantize(float const*, TfLiteIntArray*, int, signed char*, float*)':
/home/tim/google/CFU-Playground/proj/proj_template_v/build/src/tensorflow/lite/micro/micro_utils.cc:77: undefined reference to `__extendsfdf2'

To reproduce in CFU Playground, with current main branch, do the following after completing setup:

$ make env
$ make enter
$ cd proj/proj_template_v
$ make EXTRA_LITEX_ARGS="--cpu-variant=fpu+cfu" software
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant