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

Function TEST_F

tensorflow/core/grappler/utils/scc_test.cc:54–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52};
53
54TEST_F(SCCTest, NoLoops) {
55 // Create a simple graph without any loop.
56 TrivialTestGraphInputYielder fake_input(4, 1, 10, false,
57 cluster_->GetDeviceNames());
58 GrapplerItem item;
59 CHECK(fake_input.NextItem(&item));
60
61 std::unordered_map<const NodeDef*, int> components;
62 int num_components;
63 StronglyConnectedComponents(item.graph, &components, &num_components);
64
65 EXPECT_EQ(num_components, 1);
66 for (const auto& node : item.graph.node()) {
67 EXPECT_EQ(-1, components[&node]);
68 }
69}
70
71TEST_F(SCCTest, DisjointCycleAndPath) {
72 GraphDef graph;

Callers

nothing calls this directly

Calls 11

ReadGraphDefFromFileFunction · 0.85
IdentifyLoopsFunction · 0.85
GetDeviceNamesMethod · 0.80
nameMethod · 0.65
JoinPathFunction · 0.50
TensorFlowSrcRootFunction · 0.50
NextItemMethod · 0.45
nodeMethod · 0.45
push_backMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected