| 78 | } |
| 79 | |
| 80 | SessionOptions Options(const string& target, int placement_period) { |
| 81 | SessionOptions options; |
| 82 | // NOTE(mrry): GrpcSession requires a grpc:// scheme prefix in the target |
| 83 | // string. |
| 84 | options.target = strings::StrCat("grpc://", target); |
| 85 | options.config.set_placement_period(placement_period); |
| 86 | options.config.mutable_graph_options() |
| 87 | ->mutable_optimizer_options() |
| 88 | ->set_opt_level(OptimizerOptions::L0); |
| 89 | options.config.mutable_graph_options() |
| 90 | ->mutable_rewrite_options() |
| 91 | ->set_constant_folding(RewriterConfig::OFF); |
| 92 | return options; |
| 93 | } |
| 94 | |
| 95 | std::unique_ptr<Session> NewRemote(const SessionOptions& options) { |
| 96 | return std::unique_ptr<Session>(CHECK_NOTNULL(NewSession(options))); |