From 3eaa41455a4c32bd7bcbd9e73dc7df2e03d2d31c Mon Sep 17 00:00:00 2001 From: Serge Panev Date: Fri, 12 Jun 2020 21:50:05 -0700 Subject: [PATCH] Remove check for subgraph with cycles Signed-off-by: Serge Panev --- src/operator/subgraph/build_subgraph.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/operator/subgraph/build_subgraph.cc b/src/operator/subgraph/build_subgraph.cc index 413395c3b74f..f95f1f4e670b 100644 --- a/src/operator/subgraph/build_subgraph.cc +++ b/src/operator/subgraph/build_subgraph.cc @@ -276,10 +276,6 @@ bool LabelSubgraph(const nnvm::Graph& g, SubgraphSelectorV2Ptr subgraph_selector if (excluded_node_id != -1) { CHECK_LT(excluded_node_id, static_cast(simple_nodes.size())); - CHECK_NE(excluded_node_id, static_cast(snid)) - << "A cycle is found in the computational graph between nodes " - << simple_nodes[excluded_node_id]->node->attrs.name << " and " - << simple_nodes[snid]->node->attrs.name; excluded_nodes->insert(simple_nodes[excluded_node_id].get()); ResetNodeLabels(g, simple_nodes, subgraph_nodes); return false;