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

Method Recv

tensorflow/core/framework/rendezvous.cc:117–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115Rendezvous::~Rendezvous() {}
116
117Status Rendezvous::Recv(const ParsedKey& key, const Args& recv_args,
118 Tensor* val, bool* is_dead, int64 timeout_ms) {
119 Status ret;
120 Notification n;
121 RecvAsync(key, recv_args,
122 [&ret, &n, val, is_dead](const Status& s, const Args& send_args,
123 const Args& recv_args, const Tensor& v,
124 const bool dead) {
125 ret = s;
126 *val = v;
127 *is_dead = dead;
128 n.Notify();
129 });
130 if (timeout_ms > 0) {
131 int64 timeout_us = timeout_ms * 1000;
132 bool notified = WaitForNotificationWithTimeout(&n, timeout_us);
133 if (!notified) {
134 return Status(error::DEADLINE_EXCEEDED,
135 "Timed out waiting for notification");
136 }
137 } else {
138 n.WaitForNotification();
139 }
140 return ret;
141}
142
143Status Rendezvous::Recv(const ParsedKey& key, const Args& args, Tensor* val,
144 bool* is_dead) {

Callers 15

TEST_FFunction · 0.45
BM_SendRecvFunction · 0.45
BM_PingPongFunction · 0.45
RunMethod · 0.45
RecvPRunOutputsMethod · 0.45
RunWithArgsMethod · 0.45
TEST_FFunction · 0.45
ComputeMethod · 0.45
RecvTotalBytesMethod · 0.45
RecvShapeMethod · 0.45
RecvStringMethod · 0.45

Calls 5

StatusClass · 0.50
RecvFunction · 0.50
NotifyMethod · 0.45
WaitForNotificationMethod · 0.45

Tested by 6

TEST_FFunction · 0.36
BM_SendRecvFunction · 0.36
BM_PingPongFunction · 0.36
RunWithArgsMethod · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36