• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 
16 #ifndef TENSORFLOW_PUBLIC_SESSION_OPTIONS_H_
17 #define TENSORFLOW_PUBLIC_SESSION_OPTIONS_H_
18 
19 #include <string>
20 #include "tensorflow/core/platform/types.h"
21 #include "tensorflow/core/protobuf/config.pb.h"
22 
23 namespace tensorflow {
24 
25 class Env;
26 
27 /// Configuration information for a Session.
28 struct SessionOptions {
29   /// The environment to use.
30   Env* env;
31 
32   /// \brief The TensorFlow runtime to connect to.
33   ///
34   /// If 'target' is empty or unspecified, the local TensorFlow runtime
35   /// implementation will be used.  Otherwise, the TensorFlow engine
36   /// defined by 'target' will be used to perform all computations.
37   ///
38   /// "target" can be either a single entry or a comma separated list
39   /// of entries. Each entry is a resolvable address of the
40   /// following format:
41   ///   local
42   ///   ip:port
43   ///   host:port
44   ///   ... other system-specific formats to identify tasks and jobs ...
45   ///
46   /// NOTE: at the moment 'local' maps to an in-process service-based
47   /// runtime.
48   ///
49   /// Upon creation, a single session affines itself to one of the
50   /// remote processes, with possible load balancing choices when the
51   /// "target" resolves to a list of possible processes.
52   ///
53   /// If the session disconnects from the remote process during its
54   /// lifetime, session calls may fail immediately.
55   string target;
56 
57   /// Configuration options.
58   ConfigProto config;
59 
60   SessionOptions();
61 };
62 
63 }  // end namespace tensorflow
64 
65 #endif  // TENSORFLOW_PUBLIC_SESSION_OPTIONS_H_
66