| 18 | /* =================== AlgoFP16WinogradF43_8x8_NCHW88 ===================== */ |
| 19 | |
| 20 | bool ConvBiasImpl::AlgoFP16WinogradF43_8x8_NCHW88::usable( |
| 21 | const NCBKernSizeParam& param, |
| 22 | AlgoSelectionStrategy /*algo_selection_strategy*/) const { |
| 23 | MIDOUT_BEGIN( |
| 24 | megdnn_fallback_winograd_fp16_nchw88, |
| 25 | midout_iv("AlgoFP16WinogradF43_8x8_NCHW88"_hash)) { |
| 26 | if (param.filter_meta.icpg % 8 != 0 || param.filter_meta.ocpg % 8 != 0) |
| 27 | return false; |
| 28 | using Strategy = winograd::winograd_F43_mk8_f16_nchw88; |
| 29 | Strategy strategy(param.src_type, param.filter_type, param.dst_type); |
| 30 | auto&& matmul_param = |
| 31 | megdnn::winograd::ConvBias<Strategy, param::MatrixMul::Format::MK8>( |
| 32 | strategy, m_tile_size, param) |
| 33 | .get_matmul_kern_param(param); |
| 34 | return m_matmul_algo->usable(matmul_param) && |
| 35 | m_matmul_algo->packmode() == |
| 36 | fallback::MatrixMulImpl::AlgoBase::PackMode::NO_PACK && |
| 37 | param.filter_meta.format == param::ConvBias::Format::NCHW88 && |
| 38 | !param.filter_meta.should_flip && |
| 39 | (param.filter_meta.spatial[0] == param.filter_meta.spatial[1] && |
| 40 | param.filter_meta.spatial[0] == 3) && |
| 41 | (param.filter_meta.stride[0] == param.filter_meta.stride[1] && |
| 42 | param.filter_meta.stride[0] == 1) && |
| 43 | (param.filter_meta.dilation[0] == param.filter_meta.dilation[1] && |
| 44 | param.filter_meta.dilation[0] == 1) && |
| 45 | param.compute_mode == param::ConvBias::ComputeMode::DEFAULT && |
| 46 | param.src_type.enumv() == DTypeEnum::Float16; |
| 47 | } |
| 48 | MIDOUT_END(); |
| 49 | return false; |
| 50 | } |
| 51 | |
| 52 | MEGDNN_WINOGRAD_ALGO_FUN_DEFINE_ALL( |
| 53 | AlgoFP16WinogradF43_8x8_NCHW88, winograd::winograd_F43_mk8_f16_nchw88, |
nothing calls this directly
no test coverage detected