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/layout_assignment.h | |
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/layout_assignment.h')
-rw-r--r-- | tensorflow/compiler/xla/service/layout_assignment.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/compiler/xla/service/layout_assignment.h b/tensorflow/compiler/xla/service/layout_assignment.h index 118d68dc47..0b97fba744 100644 --- a/tensorflow/compiler/xla/service/layout_assignment.h +++ b/tensorflow/compiler/xla/service/layout_assignment.h @@ -121,10 +121,11 @@ class ResultLayoutConstraint : public LayoutConstraint { class LayoutConstraints { public: LayoutConstraints(const TuplePointsToAnalysis& points_to_analysis, - const HloComputation* computation); + HloComputation* computation); ~LayoutConstraints() = default; const HloComputation* computation() const { return computation_; } + HloComputation* computation() { return computation_; } const TuplePointsToAnalysis& points_to_analysis() const { return points_to_analysis_; } @@ -211,7 +212,7 @@ class LayoutConstraints { // Array-shaped buffers which have not yet been constrained. std::set<LogicalBuffer::Id> unconstrained_buffer_ids_; - const HloComputation* computation_; + HloComputation* computation_; }; // HLO pass which assigns layouts to all instructions in the HLO module while |