Hi @donglinz, see the doc Install from Source — tvm 0.8.dev0 documentation (apache.org)
To debug with IRs, set(USE_RELAY_DEBUG ON) and set environment variable TVM_LOG_DEBUG.
export TVM_LOG_DEBUG="ir/transform.cc=1;relay/ir/transform.cc=1"
In short, first, you have to build TVM with debugging support and then set the environment variable before running.