aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/buffer_liveness_test.cc
diff options
context:
space:
mode:
authorGravatar HyoukJoong Lee <hyouklee@google.com>2017-12-19 07:43:14 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-12-19 07:48:34 -0800
commit2071f7ff4fe13d0b5a7b8d9dceaeb3c211e37199 (patch)
treeb77876a01c8551db9be2c4bfc3b7fe7df349b828 /tensorflow/compiler/xla/service/buffer_liveness_test.cc
parentb61de902345da2a2a2320159f415a707844b1605 (diff)
Automated g4 rollback of changelist 179506342
PiperOrigin-RevId: 179552496
Diffstat (limited to 'tensorflow/compiler/xla/service/buffer_liveness_test.cc')
-rw-r--r--tensorflow/compiler/xla/service/buffer_liveness_test.cc42
1 files changed, 0 insertions, 42 deletions
diff --git a/tensorflow/compiler/xla/service/buffer_liveness_test.cc b/tensorflow/compiler/xla/service/buffer_liveness_test.cc
index f623aef67a..13825fe05b 100644
--- a/tensorflow/compiler/xla/service/buffer_liveness_test.cc
+++ b/tensorflow/compiler/xla/service/buffer_liveness_test.cc
@@ -311,48 +311,6 @@ TEST_F(BufferLivenessTest, OverlappedBuffersSequentialOrder) {
EXPECT_FALSE(InstructionsMayInterfere(*liveness, add, exp));
}
-TEST_F(BufferLivenessTest, RootInstructionIsNotLastInSequentialOrder) {
- // Tests that when the root instruction is not the last instruction in the
- // schedule, the live range of its buffers interfere with the buffers of the
- // later instructions.
- //
- // Two sets of independent instructions are executed in the computation.
- // param --> add (root)
- // recv --> recv-done --> send --> send-done
- //
- // Sequential order:
- // param, add (root), recv, recv-done, send, send-done
- auto builder = HloComputation::Builder(TestName());
- auto param =
- builder.AddInstruction(HloInstruction::CreateParameter(0, vec_, "param"));
- auto add = builder.AddInstruction(
- HloInstruction::CreateBinary(vec_, HloOpcode::kAdd, param, param));
- auto recv = builder.AddInstruction(
- HloInstruction::CreateRecv(vec_, /*channel_id=*/0));
- auto recv_done = builder.AddInstruction(HloInstruction::CreateRecvDone(recv));
- auto send = builder.AddInstruction(
- HloInstruction::CreateSend(recv_done, /*channel_id=*/1));
- auto send_done = builder.AddInstruction(HloInstruction::CreateSendDone(send));
-
- auto module = CreateNewModule();
- auto computation = module->AddEntryComputation(builder.Build(add));
-
- SequentialHloOrdering::HloModuleSequence module_sequence;
- std::vector<const HloInstruction*> order = {param, add, recv,
- recv_done, send, send_done};
- module_sequence.emplace(computation, order);
- auto liveness =
- BufferLiveness::Run(module.get(), xla::MakeUnique<SequentialHloOrdering>(
- module.get(), module_sequence))
- .ConsumeValueOrDie();
-
- EXPECT_FALSE(InstructionsMayInterfere(*liveness, param, add));
- // Check the root instruction (add) buffer interferes with the recv buffer.
- EXPECT_TRUE(
- liveness->MayInterfere(GetBuffer(*liveness, add, /*index=*/{}),
- GetBuffer(*liveness, recv, /*index=*/{0})));
-}
-
TEST_F(BufferLivenessTest, TupleLiveOut) {
// Verify MaybeLiveOut with nested tuples. Result of computation looks like:
//