aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_computation.h
diff options
context:
space:
mode:
authorGravatar Benjamin Kramer <kramerb@google.com>2018-06-15 11:10:03 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-06-15 11:13:08 -0700
commitb62d76d932f93ff324d2598cdeac792fa61135a4 (patch)
treef6c9dda35d6ae6263cb16984278fbebf93b46574 /tensorflow/compiler/xla/service/hlo_computation.h
parent1ca4b6f797a168036e2708faf45753b333f467dc (diff)
[XLA] Switch PostOrder accessors to use std::vector instead of std::list.
std::list is just hilariously inefficient and the postorder list creation has been rewritten not to not depend on splicing anymore so there's no need for the list. While there remove the old unused postorder list creation code. PiperOrigin-RevId: 200743677
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_computation.h')
-rw-r--r--tensorflow/compiler/xla/service/hlo_computation.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_computation.h b/tensorflow/compiler/xla/service/hlo_computation.h
index 0da4a305f3..0f111a1a76 100644
--- a/tensorflow/compiler/xla/service/hlo_computation.h
+++ b/tensorflow/compiler/xla/service/hlo_computation.h
@@ -199,7 +199,7 @@ class HloComputation {
// Compute and return a post-order of the instructions in the computation. In
// this order, definitions of values always appear before their uses.
- std::list<HloInstruction*> MakeInstructionPostOrder() const;
+ std::vector<HloInstruction*> MakeInstructionPostOrder() const;
// Computes and returns the reachability between HLO instructions in the
// computation. The returned HloReachabilityMap is constructed such that
@@ -221,7 +221,7 @@ class HloComputation {
// transitively. The embedded computations are sorted such that if computation
// A calls computation B (eg, via a map instruction) then A will appear after
// B in the list.
- std::list<HloComputation*> MakeEmbeddedComputationsList() const;
+ std::vector<HloComputation*> MakeEmbeddedComputationsList() const;
// Creates a fusion instruction containing the given instructions.
// `fusion_kind` indicates the type of the fusion, e.g., loop fusion or fusion