aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/distributed_runtime
diff options
context:
space:
mode:
authorGravatar naurril <naurril@gmail.com>2018-07-05 00:52:14 +0800
committerGravatar naurril <naurril@gmail.com>2018-07-05 00:52:14 +0800
commit7d2872f91d454a45a84162cc0e1e881857158730 (patch)
treec2782907a398f32355fefd1e46f99bfda2acd465 /tensorflow/core/distributed_runtime
parent38e56744327f5090585179554d0df21fb52515a6 (diff)
add comments
Diffstat (limited to 'tensorflow/core/distributed_runtime')
-rw-r--r--tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc
index 7987fdbcc0..d54a9d4fd1 100644
--- a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc
+++ b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc
@@ -121,6 +121,9 @@ Status GrpcServer::Init(
worker_env_.env = env_;
+ // Check parameters before DeviceFactory::AddDevices,
+ // otherwise if 'task_index=-1' the program will abort.
+
// Look up the port that has been requested for this task in `server_def_`.
int requested_port = -1;
for (const auto& job : server_def_.cluster().job()) {