[SOLVED] How to print out tvm::LoweredFunc in C++


Hi, folks,
I’m debugging some codegen in C++ and would like to print out tvm::LoweredFunc. It seems that print in Python just works but LOG(INFO) << lowered_func; doesn’t. It gives me something like

LoweredFunc(fused_sparse, 0x6080000c68a0)

Instead of the whole IR. Any idea? Thanks.


Resolved. The print function is fine. We just need to do LOG(INFO) << stmt; before calling ir::MakeAPI here: