Hi,
I want to generate the LLVM IR for resnet50-v2-7.onnx
using tvmc
but I don’t have any idea regarding what arguments must be passed to it to generate LLVM IR?
Any help would really be appreciated.
Hi,
I want to generate the LLVM IR for resnet50-v2-7.onnx
using tvmc
but I don’t have any idea regarding what arguments must be passed to it to generate LLVM IR?
Any help would really be appreciated.
Hi @kami_10x,
You can use the option --dump-code ll
. All the options can be checked with tvmc compile --help
.
--dump-code FORMAT comma separated list of formats to export the input
model, e.g. 'asm,ll,relay'.
Hope that helps.
Sure leandron. Thanks for the help.
Hi,
I got the point but now, I am having another issue, while I try to compile the resnet50,
tvmc compile --target "llvm -march=rv64imv -mcpu=generic-rv64" --output resnet50-v2-7-tvm.tar resnet50-v2-7.onnx
It gives the following error:
LLVM ERROR: CPU 'generic' is not supported. Use generic-rv64
The LLVM I have is a cross compiler for RISC V. I don’t know why and how I need to explicitly specify the CPU using tvmc
to LLVM.
There might be an issue with tvmc when parsing your target.
Can you try using separate arguments --target=llvm --target-llvm-march=rv64imv --target-llvm-mcpu=generic-rv64
rather than a single string target? Let me know if that helps.
It still gives the same error message