| 372 | } |
| 373 | |
| 374 | Status GraphMgr::RecvOutputs(const int64 step_id, NamedTensors* out) { |
| 375 | Rendezvous* rendezvous = worker_env_->rendezvous_mgr->Find(step_id); |
| 376 | Status s = RecvOutputsFromRendezvous(rendezvous, out, Rendezvous::Args()); |
| 377 | rendezvous->Unref(); |
| 378 | if (!s.ok()) { |
| 379 | // Failing to fetch the outputs should not be possible, so rewrite the error |
| 380 | // status to an INTERNAL error. |
| 381 | s = errors::Internal("Failed to fetch outputs for step ", step_id, |
| 382 | ". (Original error message: ", s.ToString(), ")"); |
| 383 | } |
| 384 | size_t output_size = 0; |
| 385 | for (auto& p : *out) { |
| 386 | output_size += p.second.AllocatedBytes(); |
| 387 | } |
| 388 | metrics::RecordGraphOutputTensors(output_size); |
| 389 | return s; |
| 390 | } |
| 391 | |
| 392 | Status GraphMgr::RecvOutputs(const int64 step_id, NamedTensors* out, |
| 393 | std::map<std::string, bool>* is_out_dead) { |
no test coverage detected