aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/distributed_runtime
diff options
context:
space:
mode:
authorGravatar Yifei Feng <yifeif@google.com>2018-07-06 13:31:44 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-06 13:34:42 -0700
commit602f8fad24eded4a7fcf5289840e2c646afc1bd0 (patch)
tree2d0901e379f322f585a98d1bc76a0394be95474a /tensorflow/core/distributed_runtime
parentcbeaf2947a9627fbf3aa2dceee465a50f81c0534 (diff)
Merge changes from github.
PiperOrigin-RevId: 203518000
Diffstat (limited to 'tensorflow/core/distributed_runtime')
-rw-r--r--tensorflow/core/distributed_runtime/eager/eager_service_impl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/core/distributed_runtime/eager/eager_service_impl.cc b/tensorflow/core/distributed_runtime/eager/eager_service_impl.cc
index 8ecccd4d06..466e779fab 100644
--- a/tensorflow/core/distributed_runtime/eager/eager_service_impl.cc
+++ b/tensorflow/core/distributed_runtime/eager/eager_service_impl.cc
@@ -81,6 +81,10 @@ Status GetNumRetvals(tensorflow::EagerContext* context, const string& op_name,
Status EagerServiceImpl::CreateContext(const CreateContextRequest* request,
CreateContextResponse* response) {
+ //make sure env_ , env_->rendezvous_mgr available
+ if (env_ == nullptr || env_->rendezvous_mgr == nullptr) {
+ return tensorflow::errors::Internal("invalid eager env_ or env_->rendezvous_mgr.");
+ }
std::vector<tensorflow::Device*> devices;
TF_RETURN_IF_ERROR(tensorflow::DeviceFactory::AddDevices(