Hi all, I’m excited that I can debug tvm source code now! But when I dive into the source code, I can’t see very helpfull messages. Could you give some experience?
You can print any TVM Object with tvm::Dump(...) call. For example in your above case, you can print the IRModule with tvm::Dump(mod), which would print the entire IRModule in text format.
There are also a couple of GDB extensions that might help while debugging.
Full Disclosure: I built the second one because I needed an easy way to explore the AST in GDB similar to what’s possible in python.
Assuming you’re mentioning the pass_list defined in src/driver/driver_api.cc based on the piece of code shared, It’s defined using tvm::runtime::Array as Array<tvm::transform::Pass> pass_list, so you should be able to print that as well using tvm::Dump(pass_list)
I didn’t use extensions, I tried some plugins, but they don’t work well. I think the pdb + gdb is ok for me. But I’m just a new bird, maybe there are some other good ways.