aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/eager/c_api.cc
diff options
context:
space:
mode:
authorGravatar Alexandre Passos <apassos@google.com>2018-03-08 18:12:54 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-08 18:17:31 -0800
commit99bb01a681f9993677a4e1086db7ee7879dc792f (patch)
tree84066b80ef4aeb74e7930e6b148ceab342737a78 /tensorflow/c/eager/c_api.cc
parent410647b29f7172ae8d4c525421a671907f505c86 (diff)
Pulling Rendezvous initialization out of TFE_Context constructor.
PiperOrigin-RevId: 188423386
Diffstat (limited to 'tensorflow/c/eager/c_api.cc')
-rw-r--r--tensorflow/c/eager/c_api.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/tensorflow/c/eager/c_api.cc b/tensorflow/c/eager/c_api.cc
index dfe2089d60..6793bb548c 100644
--- a/tensorflow/c/eager/c_api.cc
+++ b/tensorflow/c/eager/c_api.cc
@@ -105,8 +105,11 @@ TFE_Context* TFE_NewContext(const TFE_ContextOptions* opts, TF_Status* status) {
if (!status->status.ok()) {
return nullptr;
}
- return new TFE_Context(*opts, std::unique_ptr<tensorflow::DeviceMgr>(
- new tensorflow::DeviceMgr(devices)));
+ std::unique_ptr<tensorflow::DeviceMgr> device_mgr(
+ new tensorflow::DeviceMgr(devices));
+ tensorflow::Rendezvous* r =
+ new tensorflow::IntraProcessRendezvous(device_mgr.get());
+ return new TFE_Context(*opts, std::move(device_mgr), r);
}
void TFE_DeleteContext(TFE_Context* ctx, TF_Status* status) {