Skip to content

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

@tcal-x

Description

@tcal-x

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions