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

Function TEST

tensorflow/core/graph/collective_order_test.cc:141–146  ·  view source on GitHub ↗

Tests that in the graph created by `InitGraph`, exactly 2 control edges are added after calling `OrderCollectives`: c3_0 -> c2_0 and c3_1 -> c2_1.

Source from the content-addressed store, hash-verified

139// Tests that in the graph created by `InitGraph`, exactly 2 control edges are
140// added after calling `OrderCollectives`: c3_0 -> c2_0 and c3_1 -> c2_1.
141TEST(CollectiveOrderTest, SimpleOrder) {
142 std::unique_ptr<Graph> graph = InitGraph();
143 TF_EXPECT_OK(OrderCollectives(graph.get(), GraphCollectiveOrder::kEdges));
144 VerifyGraph(*graph, {"c1_0", "c1_1", "c2_0", "c2_1", "c3_0", "c3_1"},
145 {{"c3_0", "c2_0"}, {"c3_1", "c2_1"}});
146}
147
148TEST(CollectiveOrderTest, SimpleOrderAttr) {
149 std::unique_ptr<Graph> graph = InitGraph();

Callers

nothing calls this directly

Calls 7

OrderCollectivesFunction · 0.85
VerifyGraphFunction · 0.85
VerifyAttrsFunction · 0.85
InitGraph2Function · 0.85
InitGraphForPruningFunction · 0.85
InitGraphFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected