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

Function TEST_F

tensorflow/core/common_runtime/rendezvous_util_test.cc:53–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53TEST_F(RendezvousUtilTest, SendBeforeRecv) {
54 // Fire off sends before receive the tensors.
55 TF_ASSERT_OK(SendTensorsToRendezvous(
56 rendez_, nullptr, {}, {MakeStringKey("hello1"), MakeStringKey("hello2")},
57 {V("hello1"), V("hello2")}));
58
59 Notification n;
60 std::vector<Tensor> received_keys;
61 RecvOutputsFromRendezvousAsync(
62 rendez_, nullptr, {}, {MakeStringKey("hello1"), MakeStringKey("hello2")},
63 &received_keys, [&n](const Status& status) { n.Notify(); });
64 n.WaitForNotification();
65
66 EXPECT_EQ(2, received_keys.size());
67 EXPECT_EQ("hello1", V(received_keys[0]));
68 EXPECT_EQ("hello2", V(received_keys[1]));
69}
70
71TEST_F(RendezvousUtilTest, RecvBeforeSend) {
72 // Fire off recvs, wait for a notification in the callback.

Callers

nothing calls this directly

Calls 7

SendTensorsToRendezvousFunction · 0.85
MakeStringKeyFunction · 0.85
VFunction · 0.70
NotifyMethod · 0.45
WaitForNotificationMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected