Does frontend.from_xxx do anything like tvm.lower()?

Hi @chiuchiu,

  1. In TVM, an IRModule can represent both high-level relay.Function and low-level tir.PrimFunc, as shown in the graph in the Design and Architecture. My understanding is that tvm.lower() only does the lowering when the IRModule contains tir.PrimFunc. I think it’s worth adding comments around the API code to clarify it.

  2. Yes, relay.build transforms Relay IR to Tir IR and does the codegen. I think today it’s hard to inspect the compilation flow of each stage. There is a work in progress to replace the compile engine with TEcompiler to have an intermediate stage where Relay is lowered to TIR. I think once it’s done, it’s easier to print the content of TIR after lowering.