| 512 | } |
| 513 | |
| 514 | void BM_Construct(int iters, int depth, int fan_out) { |
| 515 | tensorflow::testing::StopTiming(); |
| 516 | Shape shape = ShapeUtil::MakeShape(F32, {32, 64, 128}); |
| 517 | for (int i = 0; i < depth; ++i) { |
| 518 | std::vector<xla::Shape> shapes(fan_out, shape); |
| 519 | shape = ShapeUtil::MakeTupleShape(shapes); |
| 520 | } |
| 521 | tensorflow::testing::StartTiming(); |
| 522 | |
| 523 | for (int i = 0; i < iters; ++i) { |
| 524 | ShapeTree<int> shape_tree(shape); |
| 525 | } |
| 526 | } |
| 527 | |
| 528 | void BM_ConstructUnowned(int iters, int depth, int fan_out) { |
| 529 | tensorflow::testing::StopTiming(); |
nothing calls this directly
no test coverage detected