| 323 | } |
| 324 | |
| 325 | Status RecordRunCallable(Session* session, Session::CallableHandle handle, |
| 326 | const std::vector<Tensor>& feed_tensors, |
| 327 | std::vector<Tensor>* fetch_tensors, |
| 328 | RunMetadata* run_metadata) { |
| 329 | ReplayOp op; |
| 330 | RunCallableRequest* req = op.mutable_run_callable(); |
| 331 | req->set_session_handle(SessionToHandle(session)); |
| 332 | req->set_handle(handle); |
| 333 | for (auto& tensor : feed_tensors) { |
| 334 | tensor.AsProtoField(req->add_feed()); |
| 335 | } |
| 336 | RUN_WITH_TIMESTAMP(RunCallable, handle, feed_tensors, fetch_tensors, |
| 337 | run_metadata); |
| 338 | |
| 339 | RunCallableResponse* resp = op.mutable_run_callable_response(); |
| 340 | if (run_metadata) { |
| 341 | *resp->mutable_metadata() = *run_metadata; |
| 342 | } |
| 343 | for (const Tensor& tensor : *fetch_tensors) { |
| 344 | tensor.AsProtoTensorContent(resp->add_fetch()); |
| 345 | } |
| 346 | return Flush(op); |
| 347 | } |
| 348 | |
| 349 | Status RecordReleaseCallable(Session* session, |
| 350 | Session::CallableHandle handle) { |
nothing calls this directly
no test coverage detected