diff options
author | 2017-09-28 23:07:12 -0700 | |
---|---|---|
committer | 2017-09-28 23:14:07 -0700 | |
commit | 9b1b5d85b9ce3c812dc772da1f3f5d09581e5b49 (patch) | |
tree | 798207232f7ae8240d5ee2e7f934669ed1318bef /tensorflow/compiler/xla/service/tuple_points_to_analysis_test.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_points_to_analysis_test.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/tuple_points_to_analysis_test.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tensorflow/compiler/xla/service/tuple_points_to_analysis_test.cc b/tensorflow/compiler/xla/service/tuple_points_to_analysis_test.cc index dfa94db5db..694ed57fa2 100644 --- a/tensorflow/compiler/xla/service/tuple_points_to_analysis_test.cc +++ b/tensorflow/compiler/xla/service/tuple_points_to_analysis_test.cc @@ -661,13 +661,12 @@ class FusionPointsToAnalysisTest : public TuplePointsToAnalysisTest { HloInstruction* operand) { auto it = std::find_if( fusion->fused_instructions().begin(), - fusion->fused_instructions().end(), - [=](const std::unique_ptr<HloInstruction>& fused) { + fusion->fused_instructions().end(), [=](const HloInstruction* fused) { return fused->opcode() == HloOpcode::kParameter && fusion->operand(fused->parameter_number()) == operand; }); CHECK(it != fusion->fused_instructions().end()); - return (*it).get(); + return *it; } // Returns all users of 'fusion_paran' at 'tuple_index'. |