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

Function BM_GraphViewGetFanins

tensorflow/core/grappler/graph_view_test.cc:456–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFanouts);
455
456static void BM_GraphViewGetFanins(int iters, int num_fanins, int num_fanouts) {
457 testing::StopTiming();
458 const GraphDef graph_def = test::CreateFaninFanoutNodeGraph(
459 num_fanins, num_fanouts, num_fanins, num_fanouts,
460 /*fanout_unique_index=*/true);
461 GraphView graph_view(&graph_def);
462
463 testing::StartTiming();
464 for (int i = 0; i < iters; ++i) {
465 const NodeDef* node = graph_view.GetNode("node");
466 graph_view.GetFanins(*node, /*include_controlling_nodes=*/false);
467 }
468 testing::StopTiming();
469}
470
471RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFanins);
472

Callers

nothing calls this directly

Calls 5

StopTimingFunction · 0.85
StartTimingFunction · 0.85
GetFaninsMethod · 0.80
GetNodeMethod · 0.45

Tested by

no test coverage detected