| 540 | } |
| 541 | |
| 542 | void BM_Copy(int iters, int depth, int fan_out) { |
| 543 | tensorflow::testing::StopTiming(); |
| 544 | Shape shape = ShapeUtil::MakeShape(F32, {32, 64, 128}); |
| 545 | for (int i = 0; i < depth; ++i) { |
| 546 | std::vector<xla::Shape> shapes(fan_out, shape); |
| 547 | shape = ShapeUtil::MakeTupleShape(shapes); |
| 548 | } |
| 549 | tensorflow::testing::StartTiming(); |
| 550 | |
| 551 | ShapeTree<int> shape_tree(shape); |
| 552 | for (int i = 0; i < iters; ++i) { |
| 553 | ShapeTree<int> copy = shape_tree; |
| 554 | tensorflow::testing::DoNotOptimize(copy); |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | void BM_Move(int iters, int depth, int fan_out) { |
| 559 | tensorflow::testing::StopTiming(); |
nothing calls this directly
no test coverage detected