aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_computation.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-12-14 19:07:06 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-12-14 19:10:31 -0800
commitd57ab2c4a7cd13e47f942aaff495912fdc96f84a (patch)
tree968ac565a1ecc3977cee3160e4292eb0d34edcdc /tensorflow/compiler/xla/service/hlo_computation.cc
parentaadc84cce45cccce0c6967cbb50793276bcf4874 (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.cc7
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 << " ";