aboutsummaryrefslogtreecommitdiff
path: root/src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp
diff options
context:
space:
mode:
authorJoel Liang <joel.liang@arm.com>2017-11-10 09:59:19 +0800
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commitf1f3ebd517089e934cf3f06e64d90619a395ad87 (patch)
tree8dac05909b5f522a1c78e0ac4423cb6f65254391 /src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp
parent283c1790da45ab562ecfb2aa7741297191886d85 (diff)
downloadComputeLibrary-f1f3ebd517089e934cf3f06e64d90619a395ad87.tar.gz
APPBROWSER-298, APPBROWSER-306: Reimplement the common code of compute shader
The new common code of compute shader is in file helpers_cs.h Rewrite the direct_convolution1x1.cs and softmax_layer.cs to use the new common code. It will also remove the dependence of the token pasting operator (##). We'll remove the "##" support after we rewrite all of the compute shader code. Change-Id: Icd8553ef6b61ad484a8507590ac8ed499bd47061 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95455 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-by: Frank Lei <frank.lei@arm.com> (cherry picked from commit 0a4f83570d261f839d9866b68979efe8d7a95883) Reviewed-on: http://mpd-gerrit.cambridge.arm.com/95601 Reviewed-by: Jim He <jim.he@arm.com>
Diffstat (limited to 'src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp')
-rw-r--r--src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp b/src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp
index 935d8420ff..97c4dc48a1 100644
--- a/src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp
+++ b/src/core/GLES_COMPUTE/kernels/GCIm2ColKernel.cpp
@@ -52,7 +52,6 @@ void GCIm2ColKernel::configure(const IGCTensor *input, IGCTensor *output, std::p
_input = input;
_output = output;
- _kernel.clear_params();
std::set<std::string> build_opts;
std::string dt_name = (input->info()->data_type() == DataType::F32) ? "DATA_TYPE_FP32" : "DATA_TYPE_FP16";
@@ -141,8 +140,6 @@ void GCIm2ColKernel::configure(const IGCTensor *input, IGCTensor *output, std::p
win.set_dimension_step(Window::DimZ, win[Window::DimZ].end() - win[Window::DimZ].start());
}
- // set shader params binding point
- _kernel.set_shader_params_binding_point(0);
IGCKernel::configure(win);
}
@@ -189,9 +186,9 @@ void GCIm2ColKernel::run_generic(const Window &window)
add_3D_tensor_argument(idx, _input, 1, slice_in);
add_2D_tensor_argument(idx, _output, 2, slice_out);
- _kernel.set_params(idx++, static_cast<unsigned int>(_input->info()->dimension(2)));
- _kernel.set_params(idx++, static_cast<unsigned int>(_input->info()->strides_in_bytes()[3]));
- _kernel.set_params(idx++, static_cast<unsigned int>(_output->info()->strides_in_bytes()[3]));
+ _kernel.set_argument(idx++, static_cast<unsigned int>(_input->info()->dimension(2)));
+ _kernel.set_argument(idx++, static_cast<unsigned int>(_input->info()->strides_in_bytes()[3]));
+ _kernel.set_argument(idx++, static_cast<unsigned int>(_output->info()->strides_in_bytes()[3]));
_kernel.update_shader_params();
enqueue(*this, slice);
@@ -220,8 +217,8 @@ void GCIm2ColKernel::run_reduced(const Window &window)
add_3D_tensor_argument(idx, _input, 1, in_slice);
add_1D_tensor_argument(idx, _output, 2, out_slice);
- _kernel.set_params(idx++, _input->info()->dimension(0));
- _kernel.set_params(idx++, _input->info()->dimension(1));
+ _kernel.set_argument(idx++, _input->info()->dimension(0));
+ _kernel.set_argument(idx++, _input->info()->dimension(1));
_kernel.update_shader_params();
enqueue(*this, in_slice);