How can I view the 'real' assembly of a TVM model, and how exactly does it get called?


#1

I know that after calling graph, lib, params = nnvm.compiler.build(

I can use lib.get_source() to get LLVM. I can even use llc -march to compile that to a legal .s file (that I can’t run).

Does tvm.target.create('llvm') or tvm.target.arm_cpu('rasp3b') store usable assembly anywhere?

I’m assuming that somehow the runtime has access to these functions, and then using the graph schedule invokes these functions as needed. Is this a correct understanding?

If I wanted to compile all of this for a bare-metal system (like riscv-isa-sim) what would I have to change?


#2

you can use lib.get_source("asm") to view the asm.