aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/NEON/functions/NEConvolutionLayer.cpp
diff options
context:
space:
mode:
authorPablo Marquez Tello <pablo.tello@arm.com>2021-07-12 12:51:22 +0100
committerPablo Marquez Tello <pablo.tello@arm.com>2021-07-15 17:13:04 +0000
commit0b271330cf12b029148a75af75fa38582848b4f6 (patch)
tree02c8167851765dd0ceeba19225d8782ca80b2b0a /src/runtime/NEON/functions/NEConvolutionLayer.cpp
parent29599d01a8f498e33b9c6995bd879473dc02e077 (diff)
downloadComputeLibrary-0b271330cf12b029148a75af75fa38582848b4f6.tar.gz
Disabled DirectConv method for NCHW and kernel > 15
* We prefer GEMM method for kernel size > 15 when data layout is NCHW because direct convolution does not support this. * Resolves COMPMID-4581 Change-Id: Ie18cc96bc6b446fd59e8c8ebb10c3af5ca02c3bb Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5935 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'src/runtime/NEON/functions/NEConvolutionLayer.cpp')
-rw-r--r--src/runtime/NEON/functions/NEConvolutionLayer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/NEON/functions/NEConvolutionLayer.cpp b/src/runtime/NEON/functions/NEConvolutionLayer.cpp
index e43d976944..1022e397d0 100644
--- a/src/runtime/NEON/functions/NEConvolutionLayer.cpp
+++ b/src/runtime/NEON/functions/NEConvolutionLayer.cpp
@@ -180,9 +180,10 @@ ConvolutionMethod NEConvolutionLayer::get_convolution_method(const ITensorInfo *
}
else
{
+ const auto input_layout = input->data_layout();
// SRGAN
// Output might not be initialized when it is an internal tensor of the layer using the convolution
- if(input->total_size() > 1e7 && (weights->dimension(idx_h) > 7)
+ if(input_layout == DataLayout::NHWC && input->total_size() > 1e7 && (weights->dimension(idx_h) > 7)
&& (NEDirectConvolutionLayer::validate(input, weights, nullptr, output, conv_info, act_info)))
{
return ConvolutionMethod::DIRECT;