| 18 | /* ======================= AlgoFP32WinogradF23_4x4 ======================== */ |
| 19 | |
| 20 | bool ConvBiasImpl::AlgoFP32WinogradF23_4x4::usable( |
| 21 | const NCBKernSizeParam& param, |
| 22 | AlgoSelectionStrategy /*algo_selection_strategy*/) const { |
| 23 | MEGDNN_MARK_USED_VAR(param); |
| 24 | MIDOUT_BEGIN(megdnn_fallback_winograd_fp32, 0, 0) { |
| 25 | if (param.filter_meta.icpg % 4 != 0 || param.filter_meta.ocpg % 4 != 0) |
| 26 | return false; |
| 27 | using Strategy = winograd::winograd_gi_2x3_4x4_f; |
| 28 | using PackMode = fallback::MatrixMulImpl::AlgoBase::PackMode; |
| 29 | Strategy strategy(param.src_type, param.filter_type, param.dst_type); |
| 30 | auto&& matmul_param = |
| 31 | megdnn::winograd::ConvBias<Strategy, param::MatrixMul::Format::MK4>( |
| 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() == PackMode::NO_PACK && |
| 36 | param.filter_meta.format == param::ConvBias::Format::NCHW && |
| 37 | !param.filter_meta.should_flip && |
| 38 | (param.filter_meta.spatial[0] == param.filter_meta.spatial[1] && |
| 39 | param.filter_meta.spatial[0] == 3) && |
| 40 | (param.filter_meta.stride[0] == param.filter_meta.stride[1] && |
| 41 | param.filter_meta.stride[0] == 1) && |
| 42 | (param.filter_meta.dilation[0] == param.filter_meta.dilation[1] && |
| 43 | param.filter_meta.dilation[0] == 1) && |
| 44 | param.compute_mode == param::ConvBias::ComputeMode::DEFAULT && |
| 45 | param.src_type.enumv() == DTypeEnum::Float32; |
| 46 | } |
| 47 | MIDOUT_END(); |
| 48 | return false; |
| 49 | } |
| 50 | |
| 51 | MEGDNN_WINOGRAD_ALGO_FUN_DEFINE_ALL( |
| 52 | AlgoFP32WinogradF23_4x4, winograd::winograd_gi_2x3_4x4_f, |
nothing calls this directly
no test coverage detected