Commit 0565fcc8 by Yang Chen Committed by Tianqi Chen

Added a helper function that dumps Node to stderr (#1703)

parent 8e7ff260
......@@ -230,6 +230,13 @@ using Domain = Array<Range>;
// print functions for expr
TVM_DLL std::ostream& operator<<(std::ostream& os, const NodeRef& n); // NOLINT(*)
/*!
* \brief Dump the node to stderr, used for debug purposes.
* \param node The input node
*/
TVM_DLL void Dump(const NodeRef& node);
// definition of Node.
/*!
* \brief An iteration variable representing an iteration
......
......@@ -47,6 +47,10 @@ std::ostream& operator<<(std::ostream& os, const NodeRef& n) { // NOLINT(*)
return os;
}
void Dump(const NodeRef& n) {
std::cerr << n << "\n";
}
Var var(const std::string& name_hint, Type t) {
return Var(name_hint, t);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment