diff options
author | Alexandre Passos <apassos@google.com> | 2018-03-07 12:30:47 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-03-07 12:36:08 -0800 |
commit | c209eb4ceca82f6c910047f20c207e8f226e6dc9 (patch) | |
tree | 6c8a4ace6c82302cf0f62ab8f3e7abb03411d46a /tensorflow/c/c_api.cc | |
parent | c6705910f782a3f07d610cb21af5cba167eaa65f (diff) |
TFE_Context gets its local devices from the source instead of a session.
PiperOrigin-RevId: 188216178
Diffstat (limited to 'tensorflow/c/c_api.cc')
-rw-r--r-- | tensorflow/c/c_api.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tensorflow/c/c_api.cc b/tensorflow/c/c_api.cc index e3a95a0577..8b9b3da21c 100644 --- a/tensorflow/c/c_api.cc +++ b/tensorflow/c/c_api.cc @@ -2462,15 +2462,7 @@ void TF_AddGradients(TF_Graph* g, TF_Output* y, int ny, TF_Output* x, int nx, // TF_Session functions ---------------------------------------------- TF_Session::TF_Session(tensorflow::Session* s, TF_Graph* g) - : session(s), - graph(g), - last_num_graph_nodes(0), - device_mgr(nullptr), - extend_before_run(true) { - if (s->LocalDeviceManager(&device_mgr).ok()) { - devices = device_mgr->ListDevices(); - } -} + : session(s), graph(g), last_num_graph_nodes(0), extend_before_run(true) {} TF_Session* TF_NewSession(TF_Graph* graph, const TF_SessionOptions* opt, TF_Status* status) { |