16 #ifndef TENSORFLOW_SERVING_SERVABLES_TENSORFLOW_SAVED_MODEL_CONFIG_UTIL_H_
17 #define TENSORFLOW_SERVING_SERVABLES_TENSORFLOW_SAVED_MODEL_CONFIG_UTIL_H_
21 #include "absl/status/statusor.h"
22 #include "tensorflow/core/protobuf/rewriter_config.pb.h"
23 #include "tensorflow_serving/servables/tensorflow/saved_model_config.pb.h"
25 namespace tensorflow {
29 inline constexpr
char kSavedModelConfigPath[] =
"saved_model_config.pb";
31 inline constexpr
char kRemoteOpConfigRewriter[] =
"remote_op_config_rewrite";
32 inline constexpr
char kBatchOpRewriter[] =
"batch_op_rewriter";
34 inline constexpr
char kRemoteOpRewriteConfigParamKey[] =
35 "remote_op_rewrite_config";
36 inline constexpr
char kBatchOpRewriteConfigParamKey[] =
37 "batch_op_rewrite_config";
42 absl::StatusOr<SavedModelConfig> LoadSavedModelConfigOrDefault(
43 const std::string& export_dir);
46 void UpdateRewriterConfig(
47 const tensorflow::serving::SessionOverrides& session_overrides,
48 tensorflow::RewriterConfig* rewrite_options);