I have finished a new backend via implementing its CodegenC in tvm’s source code and it works well with tvm when I use relay.build
to compile models.
Recently, I followed deploy yolov5 via tvm and some errors occurred. When I use relay.vm.compile to compile yolov5 and run it, some symbols like tvmgen_default_mybackend_main_34
can’t be found. I want to export the lib and analyze it, but TVMError: Module[llvm] does not support GetFormat
occurs.
vm_exec = relay.vm.compile(mod, target=target,params=params)
code, lib = vm_exec.save()
with open("./code.ro", "wb") as fo:
fo.write(code)
lib.export_library('./lib.so') # TVMError: Module[llvm] does not support GetFormat
How can I use my backend in tvm.vm properly?