diff options
author | Justin Lebar <jlebar@google.com> | 2017-09-28 23:07:12 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-09-28 23:14:07 -0700 |
commit | 9b1b5d85b9ce3c812dc772da1f3f5d09581e5b49 (patch) | |
tree | 798207232f7ae8240d5ee2e7f934669ed1318bef /tensorflow/compiler/xla/service/tuple_simplifier.cc | |
parent | 75e07e01a41434fdf40eea6291fe7bc47ad74312 (diff) |
[XLA] Make HloComputation::instructions() return a view of HloInstruction*s.
Currently it returns a view of unique_ptr<HloInstruction>s. But the
fact that these are unique_ptrs is an implementation detail, and it's
ugly to leak it everywhere.
PiperOrigin-RevId: 170445375
Diffstat (limited to 'tensorflow/compiler/xla/service/tuple_simplifier.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/tuple_simplifier.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/compiler/xla/service/tuple_simplifier.cc b/tensorflow/compiler/xla/service/tuple_simplifier.cc index d1f4a5076c..c649444adf 100644 --- a/tensorflow/compiler/xla/service/tuple_simplifier.cc +++ b/tensorflow/compiler/xla/service/tuple_simplifier.cc @@ -34,10 +34,10 @@ StatusOr<bool> TupleSimplifier::Run(HloModule* module) { // Initially add all GTE and Tuple instructions to the worklist. std::queue<HloInstruction*> worklist; for (auto& computation : module->computations()) { - for (auto& instruction : computation->instructions()) { + for (auto* instruction : computation->instructions()) { if (instruction->opcode() == HloOpcode::kTuple || instruction->opcode() == HloOpcode::kGetTupleElement) { - worklist.push(instruction.get()); + worklist.push(instruction); } } } |