Hello everyone, I was trying to create a custom target (as a part of a thesis) > self.target = tvm.target.Target( > "llvm -mcpu=rv32gc --mtriple=riscv32-unknown-elf --system-lib > --runtime=c -mfloat-abi=hard"). Using LLVM backend that generated 2 object files that I linked to the tool chain in the CMake and used our micro TVM as a codegen (similar approach while using the C backend by other colleagues) and made some minor changes. Thus, I run into an incompatibility as the 2 files has an architecture of riscv32i20p (inspecting with readelf) using soft floating and the toolchain that uses hard floating.
> home/heatdh/Desktop/Ba/ml_on_mcu/deps/install/gcc_riscv/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: > ../lib/ml_interface/libml_interface.a(lib1.o): can't link soft-float modules > with double-float modules > /home/heatdh/Desktop/Ba/ml_on_mcu/deps/install/gcc_riscv/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: > failed to merge target specific data of file > ../lib/ml_interface/libml_interface.a(lib1.o) > /home/heatdh/Desktop/Ba/ml_on_mcu/deps/install/gcc_riscv/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: > ../lib/ml_interface/libml_interface.a(lib1.o): in function > `fused_nn_contrib_dense_pack_add_compute_': > TVMMod:(.text+0x57c): undefined reference to `__mulsf3' > /home/heatdh/Desktop/Ba/ml_on_mcu/deps/install/gcc_riscv/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: > TVMMod:(.text+0x588): undefined reference to `__addsf3' > /home/heatdh/Desktop/Ba/ml_on_mcu/deps/install/gcc_riscv/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: > TVMMod:(.text+0x5a0): undefined reference to `__mulsf3' > /home/heatdh/Desktop/Ba/ml_on_mcu/deps/install/gcc_riscv/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: > TVMMod:(.text+0x5ac): undefined reference to `__addsf3' (These function doesn't seem to be implemented in the object files) I tried playing around in the TVM target implementation changing some attributes and printing within the llvm codegen, but it seems that mfloat-abi is not set properly, and the scope is not being executed. Rebuilding the tool chain as discussed with my supervisor doesn't seem to be practical for us. Would you have any suggestions Thank you in advance and would be happy to explain in details if something is unclear --- [Visit Topic](https://discuss.tvm.apache.org/t/using-llvm-target-for-riscv-incompatibility-error/10393/1) to respond. You are receiving this because you enabled mailing list mode. To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/93ee1d7d8a6cf1b147ddacd6e8f47cb16bce148a16d90599dfe670349faa50c2).