Commit c9bbea96 authored by Jimin Ha's avatar Jimin Ha Committed by Scott Cyphers

Remove true user check for Slice sinker (#2383)

parent 7f7f425f
......@@ -529,8 +529,11 @@ bool ngraph::pass::ReshapeSinking::run_on_function(std::shared_ptr<ngraph::Funct
// scenarios and marks some reshapes as too "toxic" to sink
// For now, this heuristic works really well.
// Note, get_users(*true*) which means we only care about
// live users of Reshape
if (slice->get_argument(0)->get_users(true).size() == 1)
// live users of Reshape. However get_users(*true*) cause
// significant time increase on graphs with many slice ops,
// so for now we are removing "true" check and let backend
// handle reshape sinking for slice operation.
if (slice->get_argument(0)->get_users().size() == 1)
{
sink_slice(slice, reorders, reshapes_to_delete);
}
......
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