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

Function BM_StressTest

tensorflow/compiler/jit/graphcycles/graphcycles_test.cc:511–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509}
510
511static void BM_StressTest(int iters, int num_nodes) {
512 while (iters > 0) {
513 tensorflow::GraphCycles g;
514 int32 *nodes = new int32[num_nodes];
515 for (int i = 0; i < num_nodes; i++) {
516 nodes[i] = g.NewNode();
517 }
518 for (int i = 0; i < num_nodes && iters > 0; i++, iters--) {
519 int end = std::min(num_nodes, i + 5);
520 for (int j = i + 1; j < end; j++) {
521 if (nodes[i] >= 0 && nodes[j] >= 0) {
522 CHECK(g.InsertEdge(nodes[i], nodes[j]));
523 }
524 }
525 }
526 delete[] nodes;
527 }
528}
529BENCHMARK(BM_StressTest)->Range(2048, 1048576);

Callers

nothing calls this directly

Calls 3

InsertEdgeMethod · 0.80
minFunction · 0.50
NewNodeMethod · 0.45

Tested by

no test coverage detected