aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_instruction.h
diff options
context:
space:
mode:
authorGravatar HyoukJoong Lee <hyouklee@google.com>2018-09-10 08:59:32 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-10 09:03:48 -0700
commit73fd552491252494f71ec1fbf39daa5b41a48749 (patch)
tree3e5ead455f4b201dc36c48e0939c09de6b51b188 /tensorflow/compiler/xla/service/hlo_instruction.h
parentbdbf4a4ab5e612487f0ee3699391956c6c472d88 (diff)
Don't print control dependencies when dumping HLO profile
PiperOrigin-RevId: 212275570
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_instruction.h')
-rw-r--r--tensorflow/compiler/xla/service/hlo_instruction.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_instruction.h b/tensorflow/compiler/xla/service/hlo_instruction.h
index 5581c17c2d..bf25157395 100644
--- a/tensorflow/compiler/xla/service/hlo_instruction.h
+++ b/tensorflow/compiler/xla/service/hlo_instruction.h
@@ -82,6 +82,7 @@ class HloPrintOptions {
print_operand_shape_(true),
print_program_shape_(true),
print_percent_(true),
+ print_control_dependencies_(true),
canonicalize_instruction_names_(false),
indent_amount_(0),
is_in_nested_computation_(false) {}
@@ -94,7 +95,8 @@ class HloPrintOptions {
.set_print_backend_config(false)
.set_print_operand_shape(false)
.set_print_program_shape(false)
- .set_print_percent(false);
+ .set_print_percent(false)
+ .set_print_control_dependencies(false);
}
// Options to produce the canonical string representing an isomorphic
@@ -108,6 +110,7 @@ class HloPrintOptions {
.set_print_operand_shape(true)
.set_print_program_shape(false)
.set_print_percent(false)
+ .set_print_control_dependencies(false)
.set_canonicalize_instruction_names(true);
}
@@ -153,6 +156,12 @@ class HloPrintOptions {
return *this;
}
+ // If true, control dependencies will be printed.
+ HloPrintOptions& set_print_control_dependencies(bool value) {
+ print_control_dependencies_ = value;
+ return *this;
+ }
+
// If true, only a part of operands will be printed out, and their names will
// be omitted (note that in this case the text will not be parsable).
HloPrintOptions& set_compact_operands(bool value) {
@@ -190,6 +199,9 @@ class HloPrintOptions {
bool print_operand_shape() const { return print_operand_shape_; }
bool print_program_shape() const { return print_program_shape_; }
bool print_percent() const { return print_percent_; }
+ bool print_control_dependencies() const {
+ return print_control_dependencies_;
+ }
bool canonicalize_instruction_names() const {
return canonicalize_instruction_names_;
}
@@ -205,6 +217,7 @@ class HloPrintOptions {
bool print_operand_shape_;
bool print_program_shape_;
bool print_percent_;
+ bool print_control_dependencies_;
bool canonicalize_instruction_names_;
int indent_amount_;
bool is_in_nested_computation_;