diff options
author | Dimitris Vardoulakis <dimvar@google.com> | 2018-06-12 11:52:20 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-12 11:54:33 -0700 |
commit | e47701d1d30c744b8bffc263b640c401d611bc0e (patch) | |
tree | 5131b9235bdb450e541ee51a058387720a93e52a /tensorflow/compiler/xla/service/heap_simulator.h | |
parent | c5436b90adff058500e88b497fc4f7a0b0379d28 (diff) |
[TF:XLA] Move methods MinimumMemoryFor... from hlo_scheduling to heap_simulator.
These methods have nothing to do with scheduling.
Also, rename methods CreateMemoryMinimizingSequence in hlo_scheduling.
PiperOrigin-RevId: 200254100
Diffstat (limited to 'tensorflow/compiler/xla/service/heap_simulator.h')
-rw-r--r-- | tensorflow/compiler/xla/service/heap_simulator.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/service/heap_simulator.h b/tensorflow/compiler/xla/service/heap_simulator.h index 8b2b43a37a..3be3bb8e7f 100644 --- a/tensorflow/compiler/xla/service/heap_simulator.h +++ b/tensorflow/compiler/xla/service/heap_simulator.h @@ -34,6 +34,21 @@ limitations under the License. namespace xla { +// Returns the minimum memory required to compute an HLO module where all +// computations have been scheduled (represented by the given module_sequence), +// assuming no fragmentation. +StatusOr<int64> MinimumMemoryForModule( + const SequentialHloOrdering::HloModuleSequence& module_sequence, + const LogicalBuffer::SizeFunction& size_function); + +// Returns the minimum memory required to compute the given computation, +// assuming no fragmentation. +StatusOr<int64> MinimumMemoryForComputation( + const HloComputation& computation, + const std::vector<const HloInstruction*>& sequence, + const TuplePointsToAnalysis& points_to_analysis, + const LogicalBuffer::SizeFunction& size_function); + // Forward declare classes defined below. class HeapAlgorithm; |