| 353 | } |
| 354 | |
| 355 | Status GraphMgr::SendInputs(const int64 step_id, const NamedTensors& in) { |
| 356 | Rendezvous* rendezvous = worker_env_->rendezvous_mgr->Find(step_id); |
| 357 | std::vector<string> keys; |
| 358 | std::vector<Tensor> tensors_to_send; |
| 359 | keys.reserve(in.size()); |
| 360 | tensors_to_send.reserve(in.size()); |
| 361 | size_t input_size = 0; |
| 362 | for (const auto& p : in) { |
| 363 | keys.push_back(p.first); |
| 364 | tensors_to_send.push_back(p.second); |
| 365 | input_size += p.second.AllocatedBytes(); |
| 366 | } |
| 367 | metrics::RecordGraphInputTensors(input_size); |
| 368 | Status s = |
| 369 | SendTensorsToRendezvous(rendezvous, nullptr, {}, keys, tensors_to_send); |
| 370 | rendezvous->Unref(); |
| 371 | return s; |
| 372 | } |
| 373 | |
| 374 | Status GraphMgr::RecvOutputs(const int64 step_id, NamedTensors* out) { |
| 375 | Rendezvous* rendezvous = worker_env_->rendezvous_mgr->Find(step_id); |
no test coverage detected