Debugging libtvm.so

I’ve built a debug version of libtvm.so so I can step through all the code and see what it’s doing. Symbols resolve fine, but since everything is encapsulated in a tvm::runtime::ObjectRef, it’s really difficult to see anything meaningful in the debugger. For example, here’s an attempt to dig down into a GraphCodegen object. It’s container in container in container, and once the bottom is hit, there’s nothing but a type index and a ref counter. (this is lldb on a mac)

How do TVM folks usually debug things while adding/modifying the tvm C++ source?

In TVM we can define our own ReprPrinter for different subclasses of ObjectRef. Try LOG(INFO) << some_object_ref

Thanks for the quick reply. This is for logging though, correct? I’m looking for a way of examining values without adding code & rebuilding - to understand the flow of the code. That would happen much faster without rebuilding, rerunning and grepping logs.