diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2022-02-16 14:41:28 +0000 |
---|---|---|
committer | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2022-02-21 10:31:13 +0000 |
commit | 51d7119d3e7fb9f2b387632270f99270b3cd1163 (patch) | |
tree | 3f24ccf4d05347bcbb5fbf47326de674158835cf /src/gpu/cl | |
parent | 5e99318e4378b1f151fc85cd241adf7b222a088c (diff) | |
download | ComputeLibrary-51d7119d3e7fb9f2b387632270f99270b3cd1163.tar.gz |
Fix performance regression on Arm(R) Mali(TM)-G71
Resolves COMPMID-5095
Change-Id: Ib7f6e891095372f870fc08833cca922909506dad
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7158
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/gpu/cl')
-rw-r--r-- | src/gpu/cl/operators/ClConv2d.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gpu/cl/operators/ClConv2d.cpp b/src/gpu/cl/operators/ClConv2d.cpp index 71f83780c5..23c1b8af9a 100644 --- a/src/gpu/cl/operators/ClConv2d.cpp +++ b/src/gpu/cl/operators/ClConv2d.cpp @@ -261,6 +261,7 @@ ConvolutionMethod ClConv2d::get_convolution_method(const ITensorInfo *src, const const bool is_ifm_ge_16 = src->dimension(idx_c) >= 16; const bool is_ofm_lte_8 = weights->dimension(3U) <= 8; const bool workload_gte_8192 = (output_shape[0] * output_shape[1] * output_shape[2]) / 16 >= 8192; + const bool is_ifm_gt_ofm = src->dimension(idx_c) > weights->dimension(3U); // Run Winograd if valid and IFM >= 16 if(is_wino_valid && is_ifm_ge_16) @@ -271,9 +272,21 @@ ConvolutionMethod ClConv2d::get_convolution_method(const ITensorInfo *src, const // Direct convolution case if(is_direct_valid) { - if((is_large_kernel_sz && workload_gte_8192 && is_ifm_ge_16) || (is_ofm_lte_8 && is_ifm_ge_16)) + if((gpu_target == arm_compute::GPUTarget::G71 || + gpu_target == arm_compute::GPUTarget::G72 || + gpu_target == arm_compute::GPUTarget::MIDGARD)) { - return ConvolutionMethod::DIRECT; + if(is_large_kernel_sz && is_ifm_ge_16 && is_ifm_gt_ofm) + { + return ConvolutionMethod::DIRECT; + } + } + else + { + if((is_large_kernel_sz && workload_gte_8192 && is_ifm_ge_16) || (is_ofm_lte_8 && is_ifm_ge_16)) + { + return ConvolutionMethod::DIRECT; + } } } |