aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_computation.h
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_computation.h
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_computation.h')
-rw-r--r--tensorflow/compiler/xla/service/hlo_computation.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_computation.h b/tensorflow/compiler/xla/service/hlo_computation.h
index c9782cc981..2835dbbb84 100644
--- a/tensorflow/compiler/xla/service/hlo_computation.h
+++ b/tensorflow/compiler/xla/service/hlo_computation.h
@@ -326,6 +326,9 @@ class HloComputation {
// Returns the owning fusion instruction, or nullptr if this is not a fusion
// computation.
HloInstruction* FusionInstruction() const { return fusion_instruction_; }
+ void SetFusionInstruction(HloInstruction* fusion_instruction) {
+ fusion_instruction_ = fusion_instruction;
+ }
private:
explicit HloComputation(