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

Method PrepareRunGraph

tensorflow/core/distributed_runtime/worker.cc:127–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127Status Worker::PrepareRunGraph(RunGraphRequestWrapper* req,
128 GraphMgr::NamedTensors* in,
129 GraphMgr::NamedTensors* out) {
130 static Tensor empty_tensor(DT_FLOAT);
131 if (req->num_sends() > 0) {
132 Tensor val;
133 for (size_t i = 0; i < req->num_sends(); ++i) {
134 TF_RETURN_IF_ERROR(req->SendValue(i, &val));
135 in->insert({req->send_key(i), val});
136 }
137 }
138 for (size_t i = 0; i < req->num_recvs(); ++i) {
139 out->insert({req->recv_key(i), empty_tensor});
140 }
141 return Status::OK();
142}
143
144void Worker::RunGraphAsync(CallOptions* opts, RunGraphRequestWrapper* request,
145 MutableRunGraphResponseWrapper* response,

Callers

nothing calls this directly

Calls 4

num_sendsMethod · 0.80
SendValueMethod · 0.80
num_recvsMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected