diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2021-06-22 15:37:17 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-06-22 15:44:48 +0000 |
commit | 2db3a9955ef22be4be8ccd5a45bc0973ef80e42a (patch) | |
tree | 6051a8d7caac4201ff4f675867e0029dfb3fb2a0 /src/runtime/CL | |
parent | ef5aac6c1e119e8db16a33332b5551829f409786 (diff) | |
download | ComputeLibrary-2db3a9955ef22be4be8ccd5a45bc0973ef80e42a.tar.gz |
Fix Winograd heuristic in CLConvolutionLayer
- Dispath CLWinogradConvolutionLayer only for IFM >= 16
Resolves COMPMID-4591
Change-Id: Id314cd0003a0d938c48b49a1936ff7c6b7f8391f
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5841
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL')
-rw-r--r-- | src/runtime/CL/functions/CLConvolutionLayer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/runtime/CL/functions/CLConvolutionLayer.cpp b/src/runtime/CL/functions/CLConvolutionLayer.cpp index 3204497fb3..2480276d79 100644 --- a/src/runtime/CL/functions/CLConvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLConvolutionLayer.cpp @@ -232,12 +232,13 @@ ConvolutionMethod CLConvolutionLayer::get_convolution_method(const ITensorInfo * if(is_data_type_float(input->data_type())) { const bool is_large_kernel_sz = (weights->dimension(idx_w) >= 5) && (weights->dimension(idx_h) >= 5); + const bool is_ifm_gt_eq_16 = input->dimension(idx_c) >= 16; // Large kernel size with IFMs >= OFMs if(is_large_kernel_sz) { // First check if we can use Winograd - if(is_wino_valid) + if(is_wino_valid && is_ifm_gt_eq_16) { return ConvolutionMethod::WINOGRAD; } @@ -252,7 +253,7 @@ ConvolutionMethod CLConvolutionLayer::get_convolution_method(const ITensorInfo * } else // Small kernel size { - return is_wino_valid ? ConvolutionMethod::WINOGRAD : ConvolutionMethod::GEMM; + return is_wino_valid && is_ifm_gt_eq_16 ? ConvolutionMethod::WINOGRAD : ConvolutionMethod::GEMM; } } |