aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_instruction_test.cc
diff options
context:
space:
mode:
authorGravatar David Majnemer <majnemer@google.com>2017-08-31 09:46:52 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-08-31 09:50:58 -0700
commit8b20ddf3e0eedb52a7ae0f10a55658e64efc4d1a (patch)
tree3e6e8c683bfc6905640fab409d144ea2151d6a44 /tensorflow/compiler/xla/service/hlo_instruction_test.cc
parent7862d3c98aaba44f2811eb4657ff2c174414d7a1 (diff)
[XLA] Sanity check the list of called computations for fusion nodes
called_compuatations for a fusion node should only include the fusion computation that it calls. PiperOrigin-RevId: 167149669
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_instruction_test.cc')
-rw-r--r--tensorflow/compiler/xla/service/hlo_instruction_test.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_instruction_test.cc b/tensorflow/compiler/xla/service/hlo_instruction_test.cc
index ea5749581b..2e1eeee36b 100644
--- a/tensorflow/compiler/xla/service/hlo_instruction_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_instruction_test.cc
@@ -758,16 +758,13 @@ TEST_F(HloInstructionTest, FusionOpWithCalledComputations) {
auto* fusion = computation->CreateFusionInstruction(
{map_3_y}, HloInstruction::FusionKind::kLoop);
auto* fused_computation = fusion->fused_instructions_computation();
- EXPECT_THAT(fusion->called_computations(),
- ElementsAre(fused_computation, computation_y));
+ EXPECT_THAT(fusion->called_computations(), ElementsAre(fused_computation));
fusion->FuseInstruction(map_2_x);
- EXPECT_THAT(fusion->called_computations(),
- ElementsAre(fused_computation, computation_y, computation_x));
+ EXPECT_THAT(fusion->called_computations(), ElementsAre(fused_computation));
fusion->FuseInstruction(map_1_x);
- EXPECT_THAT(fusion->called_computations(),
- ElementsAre(fused_computation, computation_y, computation_x));
+ EXPECT_THAT(fusion->called_computations(), ElementsAre(fused_computation));
}
TEST_F(HloInstructionTest, ComplexFusionOp) {