Skip to content

Commit

Permalink
[GRAPHIR] Print attributes of input (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen committed Oct 6, 2017
1 parent 73e6274 commit f78c9c1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/pass/print_graph_ir.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
const auto& inode = idx[nid];
if (inode.source->is_variable()) continue;
Expand Down

0 comments on commit f78c9c1

Please sign in to comment.