aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/common_runtime/session_factory.h
blob: f770ba93ffabdb33440afeed763a1b3679eeab62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef TENSORFLOW_COMMON_RUNTIME_SESSION_FACTORY_H_
#define TENSORFLOW_COMMON_RUNTIME_SESSION_FACTORY_H_

#include <string>

#include "tensorflow/core/lib/gtl/array_slice.h"
#include "tensorflow/core/platform/port.h"
#include "tensorflow/core/public/status.h"

namespace tensorflow {

class Session;
class SessionOptions;

class SessionFactory {
 public:
  virtual Session* NewSession(const SessionOptions& options) = 0;
  virtual ~SessionFactory() {}
  static void Register(const string& runtime_type, SessionFactory* factory);
  static SessionFactory* GetFactory(const string& runtime_type);
};

}  // namespace tensorflow

#endif  // TENSORFLOW_COMMON_RUNTIME_SESSION_FACTORY_H_