| 274 | } |
| 275 | |
| 276 | Status RecordPRun(Session* session, const string& handle, |
| 277 | const std::vector<std::pair<string, Tensor> >& inputs, |
| 278 | const std::vector<string>& output_names, |
| 279 | std::vector<Tensor>* outputs) { |
| 280 | ReplayOp op; |
| 281 | RunStepRequest* req = op.mutable_run_step(); |
| 282 | RunStepResponse* resp = op.mutable_run_step_response(); |
| 283 | req->set_session_handle(SessionToHandle(session)); |
| 284 | |
| 285 | // Mark this step as a partial run for replay. |
| 286 | req->set_partial_run_handle(handle); |
| 287 | for (auto& input : inputs) { |
| 288 | auto* feed = req->add_feed(); |
| 289 | feed->set_name(input.first); |
| 290 | input.second.AsProtoField(feed->mutable_tensor()); |
| 291 | } |
| 292 | |
| 293 | for (auto& output : output_names) { |
| 294 | req->add_fetch(output); |
| 295 | } |
| 296 | |
| 297 | RUN_WITH_TIMESTAMP(PRun, handle, inputs, output_names, outputs); |
| 298 | |
| 299 | for (size_t i = 0; i < outputs->size(); ++i) { |
| 300 | const Tensor& tensor = (*outputs)[i]; |
| 301 | NamedTensorProto* tproto = resp->add_tensor(); |
| 302 | tensor.AsProtoField(tproto->mutable_tensor()); |
| 303 | tproto->set_name(output_names[i]); |
| 304 | } |
| 305 | |
| 306 | return Flush(op); |
| 307 | } |
| 308 | |
| 309 | Status RecordMakeCallable(Session* session, |
| 310 | const CallableOptions& callable_options, |
nothing calls this directly
no test coverage detected