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

Function TEST_F

tensorflow/compiler/xla/service/call_graph_test.cc:95–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93};
94
95TEST_F(CallGraphTest, SingletonComputation) {
96 // Test the call graph of a module with a single computation.
97 auto module = CreateNewVerifiedModule();
98 HloComputation* computation =
99 module->AddEntryComputation(MakeScalarComputation());
100 std::unique_ptr<CallGraph> call_graph = CallGraph::Build(module.get());
101 EXPECT_EQ(1, call_graph->nodes().size());
102 EXPECT_TRUE(call_graph->IsFlattened());
103
104 const CallGraphNode& node = call_graph->GetNode(computation);
105 EXPECT_EQ(computation, node.computation());
106 EXPECT_EQ(node.depth(), 0);
107 EXPECT_TRUE(node.callsites().empty());
108 EXPECT_TRUE(node.callees().empty());
109 EXPECT_TRUE(node.caller_callsites().empty());
110 EXPECT_TRUE(node.callers().empty());
111 EXPECT_EQ(CallContext::kSequential, node.context());
112}
113
114TEST_F(CallGraphTest, UnreachableComputation) {
115 // Test the call graph of a module with an entry computation and an

Callers

nothing calls this directly

Calls 15

TestNameFunction · 0.85
AddEntryComputationMethod · 0.80
IsFlattenedMethod · 0.80
GetCallSiteMethod · 0.80
VisitNodesMethod · 0.80
DominatesMethod · 0.80
root_instructionMethod · 0.80
InternalErrorFunction · 0.50
HasSubstrFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected