LLVM ERROR: Program used external function '__gnu_h2f_ieee' which could not be resolved!

I built a kernel with llvm target. But I got the following error:
LLVM ERROR: Program used external function '__gnu_h2f_ieee' which could not be resolved!

It seems something wrong with the function call of fp32 to fp16 converting.
I followed the instructions from @merrymercy, including some files from compiler-rt to the tvm/src/runtime/fp16.cc. (lvm-error-when-using-opt-level-3-with-half-precision). But I got some compile errors when building tvm, such as some redefinitions and conflicting declarations.

Anyone knows how to fix this? Thanks in advance.

I updated my answer in that thread. We can simply put them into two files to avoid the redefinition.
Can you check it out?

Yes, it works. Thanks a lot :slight_smile: