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

Function BM_RemoveNode

tensorflow/core/graph/graph_test.cc:785–800  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

783BENCHMARK(BM_ToGraphDef)->ArgPair(1 << 15, 16);
784
785static void BM_RemoveNode(int iters, int num_nodes, int num_edges_per_node) {
786 testing::StopTiming();
787 const GraphDef graph_def =
788 test::CreateGraphDef(num_nodes, num_edges_per_node);
789 const auto registry = OpRegistry::Global();
790 GraphConstructorOptions opts;
791 for (int i = 0; i < iters; ++i) {
792 Graph graph(registry);
793 TF_CHECK_OK(ConvertGraphDefToGraph(opts, graph_def, &graph));
794 testing::StartTiming();
795 for (Node* n : graph.op_nodes()) {
796 graph.RemoveNode(n);
797 }
798 testing::StopTiming();
799 }
800}
801BENCHMARK(BM_RemoveNode)->ArgPair(10, 2);
802BENCHMARK(BM_RemoveNode)->ArgPair(1 << 6, 2);
803BENCHMARK(BM_RemoveNode)->ArgPair(1 << 9, 2);

Callers

nothing calls this directly

Calls 6

StopTimingFunction · 0.85
ConvertGraphDefToGraphFunction · 0.85
StartTimingFunction · 0.85
op_nodesMethod · 0.80
CreateGraphDefFunction · 0.70
RemoveNodeMethod · 0.45

Tested by

no test coverage detected