mbrookhart commented on a change in pull request #12502: [NGRAPH] MXNet -
nGraph initial integration
URL: https://github.com/apache/incubator-mxnet/pull/12502#discussion_r220786616
##########
File path: src/operator/subgraph/partition_graph.cc
##########
@@ -753,13 +844,14 @@ Graph PartitionGraph(Graph&& g) {
CreateSimpleGraph(g, &simple_nodes);
std::vector<std::vector<SimpleNode*>> subgraph_nodes;
FindSubgraphs(&g, *subg_prop, simple_nodes, &subgraph_nodes);
+ std::unordered_map<const nnvm::Node*, nnvm::Symbol> subgraphs;
for (size_t i = 0; i < subgraph_nodes.size(); ++i) {
#if DEBUG_SUBGRAPH
std::set<SimpleNode*> simple_node_set(subgraph_nodes[i].begin(),
subgraph_nodes[i].end());
CHECK_EQ(simple_node_set.size(), subgraph_nodes[i].size());
PrintSubgraph(subgraph_nodes[i]);
#endif
- CreateSubgraphNode(&g, simple_nodes, subgraph_nodes[i], i,
&entry_top_order_map);
+ CreateSubgraphNode(&g, simple_nodes, subgraph_nodes[i], i, &subgraphs,
&entry_top_order_map);
Review comment:
We use it to infer the attributes of the subgraph nodes at line 672. This is
to fix problems that arise when fused subgraphs become inputs to later
subgraphs.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services