aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Shanqing Cai <cais@google.com>2016-12-07 18:40:07 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-12-07 18:46:20 -0800
commite527a56892d6ddfbb882d0e0ea1ca25dc160682a (patch)
tree2013cafa36d0df5269115ddff372b50e0f293e6d
parentb09842e89870fe68f0017e1e48570d3315c35612 (diff)
tfdbg core: remove unnecessary construction of DebuggerState when there is no watch
Hitchhiking change: * A typo fix Change: 141386349
-rw-r--r--tensorflow/core/common_runtime/direct_session.cc6
-rw-r--r--tensorflow/core/protobuf/config.proto2
2 files changed, 5 insertions, 3 deletions
diff --git a/tensorflow/core/common_runtime/direct_session.cc b/tensorflow/core/common_runtime/direct_session.cc
index 6052d57239..0950ca8d8b 100644
--- a/tensorflow/core/common_runtime/direct_session.cc
+++ b/tensorflow/core/common_runtime/direct_session.cc
@@ -398,8 +398,10 @@ Status DirectSession::Run(const RunOptions& run_options,
// EXPERIMENTAL: Options that allow the client to insert nodes into partition
// graphs for debugging.
- run_state_args.debugger_state =
- DebuggerStateRegistry::CreateState(run_options.debug_options());
+ if (!run_options.debug_options().debug_tensor_watch_opts().empty()) {
+ run_state_args.debugger_state =
+ DebuggerStateRegistry::CreateState(run_options.debug_options());
+ }
TF_RETURN_IF_ERROR(
GetOrCreateExecutors(pool, input_tensor_names, output_names, target_nodes,
diff --git a/tensorflow/core/protobuf/config.proto b/tensorflow/core/protobuf/config.proto
index 3e4589ab00..612f90597c 100644
--- a/tensorflow/core/protobuf/config.proto
+++ b/tensorflow/core/protobuf/config.proto
@@ -245,7 +245,7 @@ message RunOptions {
// outputted via RunMetadata.
bool output_partition_graphs = 5;
- // EXPERIMENTAL. Options used to intialize DebuggerState, if enabled.
+ // EXPERIMENTAL. Options used to initialize DebuggerState, if enabled.
DebugOptions debug_options = 6;
reserved 4;