| 6 | |
| 7 | #ifdef ENABLE_KERNEL_BENCHMARK |
| 8 | TEST(AARCH64, BENCHMARK_Relayout) { |
| 9 | Benchmarker<RelayoutForward> benchmarker(Arch::ARM64); |
| 10 | megdnn::DType dtype = dtype::Int8(); |
| 11 | |
| 12 | TensorLayout src({1, 128, 32, 32}, {1024, 2048, 32, 1}, dtype); |
| 13 | TensorLayout dst({1, 128, 32, 32}, {131072, 1024, 32, 1}, dtype); |
| 14 | benchmarker.execl({src, dst}); |
| 15 | benchmarker.execl({src, dst}).print(); |
| 16 | |
| 17 | src = {{1, 32, 32, 32, 4}, {262144, 8192, 32, 1, 2048}, dtype}; |
| 18 | dst = {{1, 32, 32, 32, 4}, {131072, 4096, 128, 4, 1}, dtype}; |
| 19 | benchmarker.execl({src, dst}).print(); |
| 20 | |
| 21 | src = {{1, 64, 4, 32, 32}, {262144, 4096, 1, 128, 4}, dtype}; |
| 22 | dst = {{1, 64, 4, 32, 32}, {262144, 4096, 1024, 32, 1}, dtype}; |
| 23 | benchmarker.execl({src, dst}).print(); |
| 24 | |
| 25 | src = {{1, 3, 256, 320}, {245760, 1, 960, 3}, dtype}; |
| 26 | dst = {{1, 3, 256, 320}, {245760, 81920, 320, 1}, dtype}; |
| 27 | benchmarker.execl({src, dst}).print(); |
| 28 | |
| 29 | src = {{1, 1, 256, 256}, {65536, 65536, 1, 256}, dtype::Float32()}; |
| 30 | dst = {{1, 1, 256, 256}, {65536, 65536, 256, 1}, dtype::Float32()}; |
| 31 | benchmarker.execl({src, dst}).print(); |
| 32 | |
| 33 | src = {{1, 2307, 4, 4}, {36912, 1, 2307, 9228}, dtype::Float32()}; |
| 34 | dst = {{1, 2307, 4, 4}, {36912, 16, 4, 1}, dtype::Float32()}; |
| 35 | benchmarker.execl({src, dst}).print(); |
| 36 | |
| 37 | src = {{1, 64, 4, 32, 32}, {262144, 4096, 1, 128, 4}, dtype::Float32()}; |
| 38 | dst = {{1, 64, 4, 32, 32}, {262144, 4096, 1024, 32, 1}, dtype::Float32()}; |
| 39 | benchmarker.execl({src, dst}).print(); |
| 40 | |
| 41 | src = {{2, 32, 4, 32, 20}, {81920, 2560, 1, 80, 4}, dtype::Float32()}; |
| 42 | dst = {{2, 32, 4, 32, 20}, {81920, 2560, 640, 20, 1}, dtype::Float32()}; |
| 43 | benchmarker.execl({src, dst}).print(); |
| 44 | } |
| 45 | #endif |
| 46 | //*/ |