a derived node is designed in tvm/src/land/expr.h and is exported to python interface
but in python it count print the specification of the node
example:
class Mynode: public Node{
public : Expr params
…
TVM_DECLARE_NODE_TYPE_INFO(MyNode,Node)
}
class MynodeRef: public Node{
…
Contain Type MyNode;
}
TVM_STATIC_IR_FUNCTOR(IRPrinter, vtable)
.set_dispatch([](const Mynode*op, IRPrinter *p)
python demo
a=tvm.MyNode()
print a
it is Expect to print the member variable , (like Add prints (a+b))
MyNode(param)
but it print
<tvm._ffi._ctypes.node.NodeBase object at 0x7f7062977440>