From 484e7b3724c0e77751b5bed05180271fd5376e5d Mon Sep 17 00:00:00 2001 From: Moritz Pflanzer Date: Wed, 9 Aug 2017 11:43:18 +0100 Subject: COMPMID-417: Cleanup NEON FullyConnectedLayer Change-Id: Ie02a0a1a28ca2771e29a5e6552242caf0f6db1cf Reviewed-on: http://mpd-gerrit.cambridge.arm.com/83555 Tested-by: Kaizen Reviewed-by: Anthony Barbier --- src/core/NEON/kernels/NEGEMMMatrixAccumulateBiasesKernel.cpp | 2 +- src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp | 3 ++- src/core/NEON/kernels/NEIm2ColKernel.cpp | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/NEON/kernels/NEGEMMMatrixAccumulateBiasesKernel.cpp b/src/core/NEON/kernels/NEGEMMMatrixAccumulateBiasesKernel.cpp index a4fc494f16..6ed3791ce5 100644 --- a/src/core/NEON/kernels/NEGEMMMatrixAccumulateBiasesKernel.cpp +++ b/src/core/NEON/kernels/NEGEMMMatrixAccumulateBiasesKernel.cpp @@ -48,7 +48,7 @@ void NEGEMMMatrixAccumulateBiasesKernel::configure(ITensor *accum, const ITensor ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(accum, 1, DataType::QS8, DataType::QS16, DataType::F16, DataType::F32); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(biases, accum); ARM_COMPUTE_ERROR_ON_MISMATCHING_FIXED_POINT_POSITION(biases, accum); - ARM_COMPUTE_ERROR_ON(biases->info()->num_dimensions() != 1); + ARM_COMPUTE_ERROR_ON(biases->info()->num_dimensions() > 1); _biases = biases; _accum = accum; diff --git a/src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp b/src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp index 8381dd8a73..8a2a481bde 100644 --- a/src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp +++ b/src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp @@ -23,6 +23,7 @@ */ #include "arm_compute/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.h" +#include "arm_compute/core/AccessWindowStatic.h" #include "arm_compute/core/AccessWindowTranspose.h" #include "arm_compute/core/Error.h" #include "arm_compute/core/Helpers.h" @@ -1462,7 +1463,7 @@ void NEGEMMMatrixMultiplyKernel::configure(const ITensor *input0, const ITensor AccessWindowHorizontal output_access(output->info(), 0, num_elems_processed_per_iteration_x); update_window_and_padding(win, - AccessWindowHorizontal(input0->info(), 0, num_elems_processed_per_iteration_x), + AccessWindowStatic(input0->info(), 0, 0, input0->info()->tensor_shape().x(), 1), AccessWindowHorizontal(input1->info(), 0, num_elems_processed_per_iteration_x), output_access); diff --git a/src/core/NEON/kernels/NEIm2ColKernel.cpp b/src/core/NEON/kernels/NEIm2ColKernel.cpp index e4de60df80..6e15f82b6d 100644 --- a/src/core/NEON/kernels/NEIm2ColKernel.cpp +++ b/src/core/NEON/kernels/NEIm2ColKernel.cpp @@ -291,7 +291,10 @@ void NEIm2ColKernel::configure(const ITensor *input, ITensor *output, const Size _conv_info); _has_bias = has_bias; - unsigned int pad_x, pad_y, stride_x, stride_y = 0; + unsigned int pad_x = 0; + unsigned int pad_y = 0; + unsigned int stride_x = 0; + unsigned int stride_y = 0; std::tie(pad_x, pad_y) = conv_info.pad(); std::tie(stride_x, stride_y) = conv_info.stride(); -- cgit v1.2.1