| 5 | |
| 6 | #ifdef ENABLE_KERNEL_BENCHMARK |
| 7 | TEST(AARCH64, BENCHMARK_TYPECVT) { |
| 8 | Benchmarker<TypeCvtForward> benchmarker(Arch::ARM64); |
| 9 | std::vector<std::pair<megdnn::DType, megdnn::DType>> types = { |
| 10 | {dtype::Uint8(), dtype::Float32()}, |
| 11 | {dtype::QuantizedS8(0.3f), dtype::Float32()}, |
| 12 | {dtype::Float32(), dtype::QuantizedS8(1.7f)}, |
| 13 | {dtype::QuantizedS8(1.7f), dtype::QuantizedS8(0.3f)}}; |
| 14 | |
| 15 | for (auto type : types) { |
| 16 | benchmarker.set_dtype(0, type.first); |
| 17 | benchmarker.set_dtype(1, type.second); |
| 18 | benchmarker.execs({{1, 16, 1024, 1024}, {1, 16, 1024, 1024}}).print(); |
| 19 | } |
| 20 | } |
| 21 | #endif |