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

Function BM_Copy

tensorflow/compiler/xla/shape_tree_test.cc:542–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

540}
541
542void 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
558void BM_Move(int iters, int depth, int fan_out) {
559 tensorflow::testing::StopTiming();

Callers

nothing calls this directly

Calls 4

StopTimingFunction · 0.85
MakeShapeFunction · 0.85
StartTimingFunction · 0.85
DoNotOptimizeFunction · 0.85

Tested by

no test coverage detected