aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/NEWinogradConvolutionLayerKernel.cpp
diff options
context:
space:
mode:
authorPablo Tello <pablo.tello@arm.com>2018-06-14 15:35:49 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:53:09 +0000
commit7282d562d459066dff3e27fd5299f71e0809990d (patch)
treeed13231d9d4a2eecbc5d1a6227bff0effbd10c95 /src/core/NEON/kernels/NEWinogradConvolutionLayerKernel.cpp
parent542e92d95536f2ab7fc6f1cc1aa1bd4f1d471212 (diff)
downloadComputeLibrary-7282d562d459066dff3e27fd5299f71e0809990d.tar.gz
COMPMID-1287: Extending NEWinogradLayer test suite
Added NHWC to the dataset to the validation tests Fixed a problem in the output transform which made the Activation to fail because way/ordering the output transform wrote the data to the output tensor. Change-Id: I9609f86605dbfef70b47a0fb043287bf0e5d675b Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/136015 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/NEWinogradConvolutionLayerKernel.cpp')
-rw-r--r--src/core/NEON/kernels/NEWinogradConvolutionLayerKernel.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/NEON/kernels/NEWinogradConvolutionLayerKernel.cpp b/src/core/NEON/kernels/NEWinogradConvolutionLayerKernel.cpp
index cfd53d7082..50e69a8adf 100644
--- a/src/core/NEON/kernels/NEWinogradConvolutionLayerKernel.cpp
+++ b/src/core/NEON/kernels/NEWinogradConvolutionLayerKernel.cpp
@@ -182,7 +182,6 @@ Status validate_arguments_winograd_output_trans(const ITensorInfo *input, const
ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input);
ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(output);
ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32);
- ARM_COMPUTE_RETURN_ERROR_ON(winograd_info.output_data_layout != DataLayout::NCHW);
ARM_COMPUTE_RETURN_ERROR_ON(input->dimension(1) != num_tiles.area());
ARM_COMPUTE_RETURN_ERROR_ON_MSG((kernel_dims.width != 3U && kernel_dims.width != 5U), "Winograd output transform only supports 3x3 and 5x5 kernels");
ARM_COMPUTE_RETURN_ERROR_ON_MSG((kernel_dims.width != kernel_dims.height), "Winograd output transform only supports 3x3 and 5x5 kernels");
@@ -529,12 +528,15 @@ void NEWinogradLayerTransformOutputKernel<T, OutputTileRows, OutputTileCols, Ker
_num_rows = num_rows;
_num_cols = num_cols;
_num_channels = num_channels;
-
// We don't have the biases buffer at this stage as it hasn't been allocated, we pass in nullptr OutputTransform is only used here to compute the window
OutputTransform output_transform(_output_workspace, _matrix_stride, _matrix_row_stride, nullptr, nullptr, _num_batches, _num_rows, _num_cols, _num_channels);
- Window win;
- auto win_last = output_transform.get_window();
+
+ Window win;
+ auto win_last = output_transform.get_window();
win.set(Window::DimX, Window::Dimension(0, win_last, 1));
+
+ _output_nhwc->info()->set_valid_region(ValidRegion(Coordinates(), _output_nhwc->info()->tensor_shape()));
+
INEKernel::configure(win);
}
@@ -548,7 +550,7 @@ void NEWinogradLayerTransformOutputKernel<T, OutputTileRows, OutputTileCols, Ker
OutputTransform output_transform(_output_workspace, _matrix_stride, _matrix_row_stride,
(_biases ? reinterpret_cast<T *>(_biases->buffer()) : nullptr), reinterpret_cast<T *>(_output_nhwc->buffer()),
- _num_batches, _num_rows, _num_cols, _num_channels);
+ _num_batches, _num_rows, _num_cols, _num_channels, 0, _output_nhwc->info()->strides_in_bytes()[2] / sizeof(T), _output_nhwc->info()->strides_in_bytes()[1] / sizeof(T));
// The code below cannot be moved to configure because biases hasn't been allocated at that point
const size_t fst = window.x().start();