-
I’m new to debug the tvm code with gdb, but has no idea to print its value? such as for a stmt node:
a) I tried the *p ::tvm::ir::AsText(stmt.get()) and p tvm::AsText(stmt).str(),and both failed with the following info.
b)I have built the tvm with O0 -g option
(gdb) p ::tvm::ir::AsText(*stmt.get())
No symbol "tvm" in current context.
(gdb) p *stmt.get()
$14 = {<ascend_tvm::runtime::Object> = {static _type_key = <optimized out>, static _type_final = false, static _type_child_slots = 0, static _type_child_slots_can_overflow = true, static _type_has_method_visit_attrs = true,
static _type_has_method_sequal_reduce = false, static _type_has_method_shash_reduce = false, static _type_index = 9, type_index_ = 227, ref_counter_ = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = 2}, <No data fields>}, deleter_ = 0x7fffd48e885b
<ascend_tvm::runtime::SimpleObjAllocator::Handler<ascend_tvm::tir::StoreNode>::Deleter_(ascend_tvm::runtime::Object*)>}, span = {<ascend_tvm::runtime::ObjectRef> = {static _type_is_nullable = true, data_ = {data_ = 0x0}}, <No data fields>},
static _type_key = <optimized out>, static _type_has_method_sequal_reduce = true, static _type_has_method_shash_reduce = true, static _type_child_slots = 15}
(gdb) p tvm::AsText(stmt).str()
No symbol "tvm" in current context.