diff options
Diffstat (limited to 'src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp')
-rw-r--r-- | src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp index b8672c662d..d7c645d09d 100644 --- a/src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp +++ b/src/core/GLES_COMPUTE/kernels/GCActivationLayerKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -109,16 +109,26 @@ void GCActivationLayerKernel::run(const Window &window) _kernel.use(); - Window slice = window.first_slice_window_3D(); + _output->set_needs_shifting(true); + + Window slice = window.first_slice_window_3D(); + Window slice_in = window.first_slice_window_3D(); + + slice.shift(Window::DimX, -(_output->info()->padding()).left); + + if(_input == _output) + { + slice_in.shift(Window::DimX, -(_input->info()->padding()).left); + } do { unsigned int idx = 0; unsigned int binding = 1; - add_3D_tensor_argument(idx, _input, binding++, slice); + add_3D_tensor_argument(idx, _input, binding++, slice_in); add_3D_tensor_argument(idx, _output, binding++, slice); _kernel.update_shader_params(); enqueue(*this, slice); } - while(window.slide_window_slice_3D(slice)); + while(window.slide_window_slice_3D(slice) && window.slide_window_slice_3D(slice_in)); } |