aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_instruction_test.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-11-13 18:34:37 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-13 18:38:40 -0800
commitf9e3e8d8731daf338b6dc743aef84c35740ca037 (patch)
tree23362102dc58bdc7f6e39e32e875ced61921fcbe /tensorflow/compiler/xla/service/hlo_instruction_test.cc
parent579276a0d39127d221260697f0f34151f7e66f4c (diff)
Hlo parser: support fusion.
Also, - Add a HloInstruction::CreateFusion interface that creates a fusion instruction with given fusion computation. Add a HloComputation::SetFusionInstruction interface to help do that. - Change how we print fusion kind. Before this change we print fusion kind together with the opcode, e.g., fusion:kLoop, which is not easy to parse. Now we append fusion kind as an attribute. - Print fusion computation the same way as other computations, instead of nested in an instruction. PiperOrigin-RevId: 175621768
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_instruction_test.cc')
-rw-r--r--tensorflow/compiler/xla/service/hlo_instruction_test.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_instruction_test.cc b/tensorflow/compiler/xla/service/hlo_instruction_test.cc
index 4ead64d997..41b916e2c7 100644
--- a/tensorflow/compiler/xla/service/hlo_instruction_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_instruction_test.cc
@@ -1195,9 +1195,10 @@ TEST_F(HloInstructionTest, Stringification) {
HloInstruction* fusion = computation->CreateFusionInstruction(
{dot, reshape}, HloInstruction::FusionKind::kTransposeDot);
- EXPECT_EQ(fusion->ToString(false, false),
- "%fusion = f32[5,20]{1,0} fusion:kTransposeDot(f32[5,10]{1,0} %x, "
- "f32[20,10]{1,0} %y), calls=%fused_computation");
+ EXPECT_EQ(
+ fusion->ToString(false, false),
+ "%fusion = f32[5,20]{1,0} fusion(f32[5,10]{1,0} %x, "
+ "f32[20,10]{1,0} %y), kind=kTransposeDot, calls=%fused_computation");
HloInstruction* loop = builder.AddInstruction(
HloInstruction::CreateWhile(sout, computation, computation, x));