diff options
author | steniu01 <steven.niu@arm.com> | 2017-09-11 15:29:12 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | f81652dc970a8071f41c4138508c39684ed9111a (patch) | |
tree | 6bbda484b46784f1e9ddf132849c15d16ee61230 /src/core/CL/kernels/CLScaleKernel.cpp | |
parent | 9fe414430c3c989b1cdc79d41e031495aed2cb7c (diff) | |
download | ComputeLibrary-f81652dc970a8071f41c4138508c39684ed9111a.tar.gz |
COMPMID-516 Increase tolerance rate of Scale, Conv, fully connected and GEMM
This patch also fix the scale kernel issue where it was calcuated the
scale factor inside the gpu but now in the CPU. The GPU and CPU gave
different result for simple float division operation
Change-Id: Ib6709cb6c41dcf4fc0fa4eb79e481430695bf40e
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87266
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLScaleKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLScaleKernel.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/CL/kernels/CLScaleKernel.cpp b/src/core/CL/kernels/CLScaleKernel.cpp index 66afc3db60..82ebe644ea 100644 --- a/src/core/CL/kernels/CLScaleKernel.cpp +++ b/src/core/CL/kernels/CLScaleKernel.cpp @@ -98,9 +98,12 @@ void CLScaleKernel::configure(const ICLTensor *input, ICLTensor *output, Interpo ICLKernel::configure(win); // Set static kernel arguments + const float scale_x = static_cast<float>(input->info()->dimension(0)) / output->info()->dimension(0); + const float scale_y = static_cast<float>(input->info()->dimension(1)) / output->info()->dimension(1); + unsigned int idx = 2 * num_arguments_per_2D_tensor(); //Skip the input and output parameters _kernel.setArg<float>(idx++, input->info()->dimension(0)); _kernel.setArg<float>(idx++, input->info()->dimension(1)); - _kernel.setArg<float>(idx++, output->info()->dimension(0)); - _kernel.setArg<float>(idx++, output->info()->dimension(1)); + _kernel.setArg<float>(idx++, scale_x); + _kernel.setArg<float>(idx++, scale_y); } |