16 #ifndef TENSORFLOW_SERVING_SERVABLES_TENSORFLOW_MULTI_INFERENCE_H_
17 #define TENSORFLOW_SERVING_SERVABLES_TENSORFLOW_MULTI_INFERENCE_H_
19 #include "absl/types/optional.h"
20 #include "tensorflow/core/lib/core/status.h"
21 #include "tensorflow/core/platform/threadpool_options.h"
22 #include "tensorflow/core/protobuf/meta_graph.pb.h"
23 #include "tensorflow/core/public/session.h"
24 #include "tensorflow_serving/apis/inference.pb.h"
26 namespace tensorflow {
34 const MetaGraphDef* meta_graph_def)
39 Session* session,
const MetaGraphDef* meta_graph_def,
40 absl::optional<int64_t> servable_version,
41 const thread::ThreadPoolOptions& thread_pool_options =
42 thread::ThreadPoolOptions())
44 meta_graph_def_(meta_graph_def),
45 servable_version_(servable_version),
46 thread_pool_options_(thread_pool_options) {}
50 Status Infer(
const RunOptions& run_options,
51 const MultiInferenceRequest& request,
52 MultiInferenceResponse* response);
57 Session*
const session_;
58 const MetaGraphDef*
const meta_graph_def_;
61 const absl::optional<int64_t> servable_version_;
62 const tensorflow::thread::ThreadPoolOptions thread_pool_options_;
66 Status RunMultiInference(
67 const RunOptions& run_options,
const MetaGraphDef& meta_graph_def,
68 const absl::optional<int64_t>& servable_version, Session* session,
69 const MultiInferenceRequest& request, MultiInferenceResponse* response,
70 const tensorflow::thread::ThreadPoolOptions& thread_pool_options =
71 tensorflow::thread::ThreadPoolOptions());