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

Function BM_GraphViewGetFanin

tensorflow/core/grappler/graph_view_test.cc:404–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFanout);
403
404static void BM_GraphViewGetFanin(int iters, int num_fanins, int num_fanouts) {
405 testing::StopTiming();
406 const GraphDef graph_def = test::CreateFaninFanoutNodeGraph(
407 num_fanins, num_fanouts, num_fanins, num_fanouts,
408 /*fanout_unique_index=*/true);
409 GraphView graph_view(&graph_def);
410
411 testing::StartTiming();
412 for (int i = 0; i < iters; ++i) {
413 const NodeDef* node = graph_view.GetNode("node");
414 graph_view.GetFanin({node, 0});
415 }
416 testing::StopTiming();
417}
418
419RUN_FANIN_FANOUT_BENCHMARK(BM_GraphViewGetFanin);
420

Callers

nothing calls this directly

Calls 5

StopTimingFunction · 0.85
StartTimingFunction · 0.85
GetNodeMethod · 0.45
GetFaninMethod · 0.45

Tested by

no test coverage detected