diff options
author | Russell Power <power@google.com> | 2018-07-23 10:05:16 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-23 10:09:28 -0700 |
commit | b8a9d163d9cbb4b581c044d9c4b1b256c801a9c4 (patch) | |
tree | ddee231f6b4a0b0a6d65b5170b95fb817ee3deae /tensorflow/python/client | |
parent | bbc2c3f1c82fb3987134019e11dbd055a623d395 (diff) |
Automated rollback of commit 8048b3a53d5a919fef74874fcffbec9039e6acd1
PiperOrigin-RevId: 205679162
Diffstat (limited to 'tensorflow/python/client')
-rw-r--r-- | tensorflow/python/client/session.py | 2 | ||||
-rw-r--r-- | tensorflow/python/client/tf_session.i | 1 | ||||
-rw-r--r-- | tensorflow/python/client/tf_session_helper.cc | 14 | ||||
-rw-r--r-- | tensorflow/python/client/tf_session_helper.h | 3 |
4 files changed, 1 insertions, 19 deletions
diff --git a/tensorflow/python/client/session.py b/tensorflow/python/client/session.py index f3aa135fe4..8ede6ab54c 100644 --- a/tensorflow/python/client/session.py +++ b/tensorflow/python/client/session.py @@ -629,7 +629,7 @@ class BaseSession(SessionInterface): opts = tf_session.TF_NewSessionOptions(target=self._target, config=config) try: # pylint: disable=protected-access - self._session = tf_session.TF_NewSessionRef(self._graph._c_graph, opts) + self._session = tf_session.TF_NewSession(self._graph._c_graph, opts) # pylint: enable=protected-access finally: tf_session.TF_DeleteSessionOptions(opts) diff --git a/tensorflow/python/client/tf_session.i b/tensorflow/python/client/tf_session.i index 39a2922ac0..1cdd8e0b6a 100644 --- a/tensorflow/python/client/tf_session.i +++ b/tensorflow/python/client/tf_session.i @@ -777,7 +777,6 @@ def TF_Reset(target, containers=None, config=None): $1 = &types_local; } -%unignore TF_NewSessionRef; %unignore SetRequireShapeInferenceFns; %unignore TF_TryEvaluateConstant_wrapper; %noexception TF_TryEvaluateConstant_wrapper; diff --git a/tensorflow/python/client/tf_session_helper.cc b/tensorflow/python/client/tf_session_helper.cc index bcd4af2912..b6481e7e29 100644 --- a/tensorflow/python/client/tf_session_helper.cc +++ b/tensorflow/python/client/tf_session_helper.cc @@ -20,7 +20,6 @@ limitations under the License. #include "tensorflow/c/c_api.h" #include "tensorflow/c/c_api_internal.h" #include "tensorflow/c/tf_status_helper.h" -#include "tensorflow/core/common_runtime/session_ref.h" #include "tensorflow/core/framework/allocator.h" #include "tensorflow/core/framework/attr_value.pb.h" #include "tensorflow/core/framework/attr_value_util.h" @@ -43,19 +42,6 @@ static const char* kFeedDictErrorMsg = "feed_dict must be a dictionary mapping strings to NumPy arrays."; } // end namespace -TF_Session* TF_NewSessionRef(TF_Graph* graph, const TF_SessionOptions* opts, - TF_Status* status) { - TF_Session* tf_session = TF_NewSession(graph, opts, status); - if (tf_session == nullptr) { - return nullptr; - } - - Session* session = reinterpret_cast<Session*>(tf_session->session); - SessionRef* session_ref = new SessionRef(session); - tf_session->session = session_ref; - return tf_session; -} - void TF_Run_wrapper_helper(TF_DeprecatedSession* session, const char* handle, const TF_Buffer* run_options, PyObject* feed_dict, const NameVector& output_names, diff --git a/tensorflow/python/client/tf_session_helper.h b/tensorflow/python/client/tf_session_helper.h index dab7e71aac..cfd27c2bee 100644 --- a/tensorflow/python/client/tf_session_helper.h +++ b/tensorflow/python/client/tf_session_helper.h @@ -40,9 +40,6 @@ typedef tensorflow::gtl::InlinedVector<PyObject*, 8> PyObjectVector; // A TF_TensorVector is a vector of borrowed pointers to TF_Tensors. typedef gtl::InlinedVector<TF_Tensor*, 8> TF_TensorVector; -TF_Session* TF_NewSessionRef(TF_Graph* graph, const TF_SessionOptions* opts, - TF_Status* status); - // Run the graph associated with the session starting with the // supplied inputs[]. Regardless of success or failure, inputs[] are // stolen by the implementation (i.e. the implementation will |