aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/common_runtime/session_factory.h
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/common_runtime/session_factory.h')
-rw-r--r--tensorflow/core/common_runtime/session_factory.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/tensorflow/core/common_runtime/session_factory.h b/tensorflow/core/common_runtime/session_factory.h
index df3198a70d..81c172c6ae 100644
--- a/tensorflow/core/common_runtime/session_factory.h
+++ b/tensorflow/core/common_runtime/session_factory.h
@@ -30,7 +30,12 @@ struct SessionOptions;
class SessionFactory {
public:
- virtual Session* NewSession(const SessionOptions& options) = 0;
+ // Creates a new session and stores it in *out_session, or fails with an error
+ // status if the Session could not be created. Caller takes ownership of
+ // *out_session if this returns Status::OK().
+ virtual Status NewSession(const SessionOptions& options,
+ Session** out_session) = 0;
+
virtual bool AcceptsOptions(const SessionOptions& options) = 0;
// Abort and close all existing sessions, disconnecting their resources from