diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-11-13 18:34:37 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-11-13 18:38:40 -0800 |
commit | f9e3e8d8731daf338b6dc743aef84c35740ca037 (patch) | |
tree | 23362102dc58bdc7f6e39e32e875ced61921fcbe /tensorflow/compiler/xla/service/hlo_computation.h | |
parent | 579276a0d39127d221260697f0f34151f7e66f4c (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.h | 3 |
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( |