| 589 | } |
| 590 | |
| 591 | void BM_Iterate(int iters, int depth, int fan_out) { |
| 592 | tensorflow::testing::StopTiming(); |
| 593 | Shape shape = ShapeUtil::MakeShape(F32, {32, 64, 128}); |
| 594 | for (int i = 0; i < depth; ++i) { |
| 595 | std::vector<xla::Shape> shapes(fan_out, shape); |
| 596 | shape = ShapeUtil::MakeTupleShape(shapes); |
| 597 | } |
| 598 | tensorflow::testing::StartTiming(); |
| 599 | |
| 600 | ShapeTree<int> shape_tree(shape); |
| 601 | for (int i = 0; i < iters; ++i) { |
| 602 | for (auto& iter : shape_tree) { |
| 603 | tensorflow::testing::DoNotOptimize(iter.second); |
| 604 | } |
| 605 | } |
| 606 | } |
| 607 | |
| 608 | #define BENCHMARK_WITH_ARGS(name) \ |
| 609 | BENCHMARK(name)->ArgPair(2, 8)->ArgPair(1, 1000) |
nothing calls this directly
no test coverage detected