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

Function BM_Construct

tensorflow/compiler/xla/shape_tree_test.cc:514–526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512}
513
514void 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
528void BM_ConstructUnowned(int iters, int depth, int fan_out) {
529 tensorflow::testing::StopTiming();

Callers

nothing calls this directly

Calls 3

StopTimingFunction · 0.85
MakeShapeFunction · 0.85
StartTimingFunction · 0.85

Tested by

no test coverage detected