Hi all,
I look into tvm source code and wonder how tvm codegen specific target machine code.
with transform.PassContext(opt_level=3):
graph, lib, params = relay.build_module.build(mod, target, params=params)
lib.export_library("./testnet.tar")
Take arm
as an example, relay.build_module.build
returns lib
as module, I think it is the container of tvm module. And lib.export_library
interpret the Module
into machine code as shared library
and compress it as *.tar
file.
- How
export_library
codegen the arm machine code?
I tried to read the source code and find the calling stack as follows:
export_library -->PackImportsToLLVM -->CodeGenBlob
However I don’t find where CodeGenBlob
map LLVM IR into corresponding machine code
- how
export_library
codegen shared library?
Does the LLVM
do anything for us?
Thanks for any reply!