MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / SendInputs

Method SendInputs

tensorflow/core/distributed_runtime/graph_mgr.cc:355–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355Status 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
374Status GraphMgr::RecvOutputs(const int64 step_id, NamedTensors* out) {
375 Rendezvous* rendezvous = worker_env_->rendezvous_mgr->Find(step_id);

Callers 1

DoPartialRunGraphMethod · 0.80

Calls 8

RecordGraphInputTensorsFunction · 0.85
SendTensorsToRendezvousFunction · 0.85
FindMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
AllocatedBytesMethod · 0.45
UnrefMethod · 0.45

Tested by

no test coverage detected