diff options
author | 2018-05-02 17:25:10 -0700 | |
---|---|---|
committer | 2018-05-02 17:28:24 -0700 | |
commit | a1ef905926d12b0362c0dcf6d669e1c3d2ffcf70 (patch) | |
tree | b201ca5878acec8c9ba2306d4393d7a26e23a058 /tensorflow/compiler/xla/service/heap_simulator_test.cc | |
parent | dde83d4bee2c524cb5bd0adc4f702c9fc5ac6f3f (diff) |
BufferValue is a new base class for LogicalBuffer and HloValue. This makes it
easier to migrate from TuplePointsToAnalysis/LogicalBuffer to
HloDataflowAnalysis/HloValue. No functional changes.
PiperOrigin-RevId: 195179676
Diffstat (limited to 'tensorflow/compiler/xla/service/heap_simulator_test.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/heap_simulator_test.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/compiler/xla/service/heap_simulator_test.cc b/tensorflow/compiler/xla/service/heap_simulator_test.cc index e983fd11d4..fd56a603bb 100644 --- a/tensorflow/compiler/xla/service/heap_simulator_test.cc +++ b/tensorflow/compiler/xla/service/heap_simulator_test.cc @@ -20,6 +20,7 @@ limitations under the License. #include <vector> #include "tensorflow/compiler/xla/literal_util.h" +#include "tensorflow/compiler/xla/service/buffer_value.h" #include "tensorflow/compiler/xla/service/hlo_computation.h" #include "tensorflow/compiler/xla/service/hlo_instruction.h" #include "tensorflow/compiler/xla/service/hlo_module.h" @@ -85,7 +86,7 @@ class HeapSimulatorTracker { // size of the buffers doesn't matter, so we always return 0. We rely on // the secondary sorting criteria of DecreasingSizeRunsHeap to sort calls by // buffer id, for determinism in the tests. - auto zero_size = [](const LogicalBuffer& buffer) { return 0; }; + auto zero_size = [](const BufferValue& buffer) { return 0; }; auto algorithm = MakeUnique<DecreasingSizeRunsHeap>( MakeUnique<HeapCallRecorder>(&actual_calls_)); result_ = HeapSimulator::Run( @@ -119,7 +120,7 @@ class HeapSimulatorTracker { // the sequence. This lets us ensure the Alloc calls are in the sequence // order. The Free calls are sorted by LogicalBuffer.id, which is at least // deterministic. - auto size_fn = [&reverse_position](const LogicalBuffer& buffer) { + auto size_fn = [&reverse_position](const BufferValue& buffer) { return reverse_position[buffer.instruction()]; }; auto algorithm = MakeUnique<DecreasingSizeRunsHeap>( |