From 511771fbe0a74e6d9dfd37ba9b4926a8315ec7aa Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Thu, 19 Aug 2021 13:04:56 +0100 Subject: Remove padding from ClScaleKernel - Merge quantized kernels with fp for bilinear interpolation (both NCHW and NHWC) - Pass dimensions at compile time rather than at run time - Use tile-based approach to rework the NCHW kernels - Remove unused functions/files Resolve COMPMID-4723 Signed-off-by: Giorgio Arena Change-Id: Ifcdf02beb9daa9f318395751b3c85eb2fe874082 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6138 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio --- src/runtime/gpu/cl/operators/ClScale.cpp | 11 +---------- src/runtime/gpu/cl/operators/ClScale.h | 4 ---- 2 files changed, 1 insertion(+), 14 deletions(-) (limited to 'src/runtime/gpu/cl/operators') diff --git a/src/runtime/gpu/cl/operators/ClScale.cpp b/src/runtime/gpu/cl/operators/ClScale.cpp index 4730c8a16e..5c8d754c7e 100644 --- a/src/runtime/gpu/cl/operators/ClScale.cpp +++ b/src/runtime/gpu/cl/operators/ClScale.cpp @@ -41,12 +41,7 @@ void ClScale::configure(const CLCompileContext &compile_context, ITensorInfo *sr k->set_target(CLScheduler::get().target()); k->configure(compile_context, src, dst, info); _kernel = std::move(k); - if(!_kernel->border_size().empty()) - { - auto b = std::make_unique(); - b->configure(compile_context, src, _kernel->border_size(), info.border_mode, info.constant_border_value); - _border_handler = std::move(b); - } + // Tune kernel CLScheduler::get().tune_kernel_static(*_kernel); } @@ -59,10 +54,6 @@ Status ClScale::validate(const ITensorInfo *src, const ITensorInfo *dst, const S void ClScale::run(ITensorPack &tensors) { ARM_COMPUTE_ERROR_ON_MSG(tensors.empty(), "No inputs provided"); - if(!_kernel->border_size().empty()) - { - CLScheduler::get().enqueue_op(*_border_handler.get(), tensors, false); - } CLScheduler::get().enqueue_op(*_kernel.get(), tensors); } } // namespace opencl diff --git a/src/runtime/gpu/cl/operators/ClScale.h b/src/runtime/gpu/cl/operators/ClScale.h index 905c43a41c..0ff78640f7 100644 --- a/src/runtime/gpu/cl/operators/ClScale.h +++ b/src/runtime/gpu/cl/operators/ClScale.h @@ -34,7 +34,6 @@ namespace opencl { /** Basic function to simulate a scale layer. This function calls the following OpenCL kernels: * - * -# @ref CLFillBorderKernel (executed if padding size is different from zero) * -# @ref kernels::ClScaleKernel */ class ClScale : public IClOperator @@ -61,9 +60,6 @@ public: // Inherited method overridden void run(ITensorPack &tensors) override; - -protected: - std::unique_ptr _border_handler{ nullptr }; }; } // namespace opencl } // namespace arm_compute -- cgit v1.2.1