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

Function BM_GraphViewGetFaninEdges

tensorflow/core/grappler/graph_view_test.cc:491–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFanoutEdges);
490
491static void BM_GraphViewGetFaninEdges(int iters, int num_fanins,
492 int num_fanouts) {
493 testing::StopTiming();
494 const GraphDef graph_def = test::CreateFaninFanoutNodeGraph(
495 num_fanins, num_fanouts, num_fanins, num_fanouts,
496 /*fanout_unique_index=*/true);
497 GraphView graph_view(&graph_def);
498
499 testing::StartTiming();
500 for (int i = 0; i < iters; ++i) {
501 const NodeDef* node = graph_view.GetNode("node");
502 graph_view.GetFaninEdges(*node, /*include_controlling_edges=*/false);
503 }
504 testing::StopTiming();
505}
506
507RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFaninEdges);
508

Callers

nothing calls this directly

Calls 5

StopTimingFunction · 0.85
StartTimingFunction · 0.85
GetFaninEdgesMethod · 0.80
GetNodeMethod · 0.45

Tested by

no test coverage detected