aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_ordering.h
diff options
context:
space:
mode:
authorGravatar Mark Heffernan <meheff@google.com>2017-06-27 21:12:31 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-06-28 00:28:20 -0700
commitb7af918c580a17242bb64a721c71ecc968d706a3 (patch)
tree7949755c3417309e461e1e61f6ddef46a61bc5a0 /tensorflow/compiler/xla/service/hlo_ordering.h
parent5c21edd6a43ca56ff1c9b209c9f54d6fedb0823b (diff)
[XLA] Several fixes to HLO reachability analysis.
(1) Account for control dependencies in reachability. (2) Invert sense of reachability. We draw our HLO graphs with arrows from producers to consumers so it makes more sense for reachability to be defined along the direction of these edges. (3) Rename ComputeTransitiveOperands to ComputeReachability. PiperOrigin-RevId: 160366307
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_ordering.h')
-rw-r--r--tensorflow/compiler/xla/service/hlo_ordering.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_ordering.h b/tensorflow/compiler/xla/service/hlo_ordering.h
index ff84f887f7..b4cd78dd2e 100644
--- a/tensorflow/compiler/xla/service/hlo_ordering.h
+++ b/tensorflow/compiler/xla/service/hlo_ordering.h
@@ -68,8 +68,8 @@ class HloOrdering {
std::unique_ptr<CallGraph> call_graph_;
};
-// Base class for partial orderings implemented by a map of strict predecessors
-// for each instruction. Subclasses should fill in strict_predecessors_.
+// Base class for partial orderings implemented by a map of predecessors for
+// each instruction. Subclasses should fill in predecessors_.
class PredecessorHloOrdering : public HloOrdering {
public:
~PredecessorHloOrdering() override = default;
@@ -89,13 +89,12 @@ class PredecessorHloOrdering : public HloOrdering {
const HloInstruction* b) const override;
// For each computation in the module, this is the set of the instruction's
- // strict predecessors. An instruction is not an element of its own strict
- // predecessor set.
+ // predecessors. An instruction is an element of its own predecessor set.
//
// Subclasses should fill this in to define the desired ordering.
tensorflow::gtl::FlatMap<const HloComputation*,
std::unique_ptr<HloComputation::ReachabilityMap>>
- strict_predecessors_;
+ predecessors_;
};
// An HLO ordering based on data dependencies in the HLO graph. In this partial