diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-07-04 03:06:18 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-04 03:10:24 -0700 |
commit | cead016fe01e8f0ff732a080203b29990d475c98 (patch) | |
tree | c58af3ed6c76bb0eef56e93e5e186a7204b027ea /tensorflow/compiler/xla/service/hlo_computation.cc | |
parent | 3661a14ddfccc3aad48c2aaf1484d84bed3e7261 (diff) |
Minor performance improvement for ComputeReachability
We have two versions of HloReachabilityMap::SetReachabilityToUnion where
one of them is slightly more efficient by not returning if the
reachability have been changed or not. This change migrates the users
not caring about the return value to the faster variant.
PiperOrigin-RevId: 203256625
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_computation.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_computation.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_computation.cc b/tensorflow/compiler/xla/service/hlo_computation.cc index e36bef60a3..d4b13e0599 100644 --- a/tensorflow/compiler/xla/service/hlo_computation.cc +++ b/tensorflow/compiler/xla/service/hlo_computation.cc @@ -663,7 +663,7 @@ std::unique_ptr<HloReachabilityMap> HloComputation::ComputeReachability() inputs.assign(hlo->operands().begin(), hlo->operands().end()); inputs.insert(inputs.end(), hlo->control_predecessors().begin(), hlo->control_predecessors().end()); - result->SetReachabilityToUnion(inputs, hlo); + result->FastSetReachabilityToUnion(inputs, hlo); } return result; } |