diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-12-14 19:07:06 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-12-14 19:10:31 -0800 |
commit | d57ab2c4a7cd13e47f942aaff495912fdc96f84a (patch) | |
tree | 968ac565a1ecc3977cee3160e4292eb0d34edcdc /tensorflow/compiler/xla/service/hlo_computation.cc | |
parent | aadc84cce45cccce0c6967cbb50793276bcf4874 (diff) |
[XLA] Allow omitting operands shapes and program shapes.
PiperOrigin-RevId: 179132435
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_computation.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_computation.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_computation.cc b/tensorflow/compiler/xla/service/hlo_computation.cc index 4f6feefb43..4202c08336 100644 --- a/tensorflow/compiler/xla/service/hlo_computation.cc +++ b/tensorflow/compiler/xla/service/hlo_computation.cc @@ -369,8 +369,11 @@ string HloComputation::ToString(const HloPrintOptions& options) const { for (int i = 0; i < options.indent_amount(); i++) { s << " "; } - s << "%" << name() << " " << ShapeUtil::HumanString(ComputeProgramShape()) - << " {\n"; + s << "%" << name(); + if (options.print_program_shape()) { + s << " " << ShapeUtil::HumanString(ComputeProgramShape()); + } + s << " {\n"; for (const HloInstruction* instruction : MakeInstructionPostOrder()) { for (int i = 0; i < options.indent_amount(); i++) { s << " "; |