| 20 | } // namespace |
| 21 | |
| 22 | TEST_F(ROCM, RELAYOUT_MEMCPY_ASYNC) { |
| 23 | Checker<Relayout> checker(handle_rocm()); |
| 24 | checker.set_epsilon(1e-3); |
| 25 | struct Arg { |
| 26 | TensorLayout src, dst; |
| 27 | Arg(TensorLayout src, TensorLayout dst) : src(src), dst(dst) {} |
| 28 | }; |
| 29 | std::vector<Arg> args; |
| 30 | // test for contig |
| 31 | args.emplace_back( |
| 32 | Arg{{{51200}, {1}, dtype::Float32()}, {{51200}, {1}, dtype::Float32()}}); |
| 33 | |
| 34 | // test for copy_2d |
| 35 | args.emplace_back( |
| 36 | Arg{{{51200}, {9}, dtype::Float32()}, {{51200}, {1}, dtype::Float32()}}); |
| 37 | |
| 38 | for (auto&& arg : args) { |
| 39 | checker.set_dtype(0, dtype::Float32()) |
| 40 | .set_dtype(1, dtype::Float32()) |
| 41 | .execl({arg.src, arg.dst}); |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | #if MEGDNN_WITH_BENCHMARK |
| 46 | TEST_F(ROCM, RELAYOUT_BENCHMARK) { |
nothing calls this directly
no test coverage detected