aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLCol2ImKernel.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-06-19 13:09:53 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:53:34 +0000
commit19ea419e7f14d02aeb208c2fbd5a4ac55f4cb101 (patch)
treefe04ed9d40ebb8b717f63490f672a28c5b27d01e /src/core/CL/kernels/CLCol2ImKernel.cpp
parentbb71fe50930f5669a7a325e0fa95fee559856793 (diff)
downloadComputeLibrary-19ea419e7f14d02aeb208c2fbd5a4ac55f4cb101.tar.gz
COMPMID-809: Add NHWC data format on CLGEMMConvolutionLayer.
Change-Id: I50e4f5e7d47e21c300f754bee2c216863075b5cf Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/136191 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLCol2ImKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLCol2ImKernel.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/CL/kernels/CLCol2ImKernel.cpp b/src/core/CL/kernels/CLCol2ImKernel.cpp
index 4e444206f1..64e6a0b7d8 100644
--- a/src/core/CL/kernels/CLCol2ImKernel.cpp
+++ b/src/core/CL/kernels/CLCol2ImKernel.cpp
@@ -140,23 +140,25 @@ void CLCol2ImKernel::run(const Window &window, cl::CommandQueue &queue)
{
ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
ARM_COMPUTE_ERROR_ON_MISMATCHING_WINDOWS(ICLKernel::window(), window);
- // The collapse method rely on the assumption that the third dimension of input buffer is 1
- ARM_COMPUTE_ERROR_ON(window.z().end() != 1);
+
+ Window out_window;
+ out_window.use_tensor_dimensions(_output->info()->tensor_shape());
Window collapsed_window = window.collapse_if_possible(ICLKernel::window(), Window::DimZ);
- Window slice = collapsed_window.first_slice_window_3D();
+ Window slice = collapsed_window.first_slice_window_2D();
+ Window slice_out = out_window.first_slice_window_3D();
// Set static kernel arguments
- unsigned int idx = 2 * num_arguments_per_3D_tensor();
+ unsigned int idx = num_arguments_per_2D_tensor() + num_arguments_per_3D_tensor();
_kernel.setArg<cl_uint>(idx++, _output->info()->strides_in_bytes()[3]);
do
{
// Set inputs
unsigned int idx = 0;
- add_3D_tensor_argument(idx, _input, slice);
- add_3D_tensor_argument(idx, _output, slice);
+ add_2D_tensor_argument(idx, _input, slice);
+ add_3D_tensor_argument(idx, _output, slice_out);
enqueue(queue, *this, slice, _lws_hint);
}
- while(collapsed_window.slide_window_slice_3D(slice));
+ while(collapsed_window.slide_window_slice_2D(slice) && out_window.slide_window_slice_3D(slice_out));
}