Commit c53180c7 by Tianqi Chen

[GRAPHIR] Print attributes of input (#69)

parent fafa768b
...@@ -109,6 +109,17 @@ void PrintGraphIR_(Graph src, ...@@ -109,6 +109,17 @@ void PrintGraphIR_(Graph src,
} }
}; };
if (trigger.size() != 0) {
for (size_t i = 0; i < idx.input_nodes().size(); ++i) {
uint32_t nid = idx.input_nodes()[i];
os << " %" << idx[nid].source->attrs.name;
for (const auto& fp : trigger) {
fp(nid, os);
}
os << '\n';
}
}
for (uint32_t nid = 0; nid < idx.num_nodes(); ++nid) { for (uint32_t nid = 0; nid < idx.num_nodes(); ++nid) {
const auto& inode = idx[nid]; const auto& inode = idx[nid];
if (inode.source->is_variable()) continue; if (inode.source->is_variable()) continue;
......
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