diff options
author | Pablo Marquez Tello <pablo.tello@arm.com> | 2021-07-12 12:51:22 +0100 |
---|---|---|
committer | Pablo Marquez Tello <pablo.tello@arm.com> | 2021-07-15 17:13:04 +0000 |
commit | 0b271330cf12b029148a75af75fa38582848b4f6 (patch) | |
tree | 02c8167851765dd0ceeba19225d8782ca80b2b0a | |
parent | 29599d01a8f498e33b9c6995bd879473dc02e077 (diff) | |
download | ComputeLibrary-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>
-rw-r--r-- | src/runtime/NEON/functions/NEConvolutionLayer.cpp | 3 |
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; |