Commit 6e999add authored by Nagy Mostafa's avatar Nagy Mostafa Committed by Scott Cyphers

Copy outputs only if the use is outside the sub-graph (#3446)

* Copy outputs only if the use is outside the sub-graph

* Use unordered_set find
parent bd161593
......@@ -257,7 +257,10 @@ bool MLIRSubgraphExtractionPass::run_on_function(std::shared_ptr<Function> func)
for (descriptor::Input* in_desc : input_descs)
{
in_desc->replace_output(ck, i);
if (nodes.find(in_desc->get_node()) == nodes.end())
{
in_desc->replace_output(ck, i);
}
}
}
}
......
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