From 3b131ab38fa337af7818d78200b0e7bdf89c5e69 Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Fri, 19 Feb 2021 18:16:44 +0000 Subject: Port OpenCL Scale to new API Partially resolves: COMPMID-4190 Change-Id: I680dd80fcbe4e7568511792c60a725b2646fa6ff Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5197 Comments-Addressed: Arm Jenkins Reviewed-by: TeresaARM Reviewed-by: Michele Di Giorgio Tested-by: Arm Jenkins --- src/runtime/CL/tuners/BifrostTuner.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/runtime/CL/tuners/BifrostTuner.cpp') diff --git a/src/runtime/CL/tuners/BifrostTuner.cpp b/src/runtime/CL/tuners/BifrostTuner.cpp index 7a06de6d1c..fe95829cca 100644 --- a/src/runtime/CL/tuners/BifrostTuner.cpp +++ b/src/runtime/CL/tuners/BifrostTuner.cpp @@ -28,6 +28,7 @@ #include "support/Cast.h" #include "src/core/gpu/cl/kernels/ClPoolingKernel.h" +#include "src/core/gpu/cl/kernels/ClScaleKernel.h" namespace arm_compute { @@ -234,18 +235,18 @@ void tune_pooling_kernel(opencl::kernels::ClPoolingKernel &k) k.set_lws_hint(lws_hint); } -void tune_scale_kernel(CLScaleKernel &k) +void tune_scale_kernel(opencl::kernels::ClScaleKernel &k) { cl::NDRange lws_hint = k.lws_hint(); const GPUTarget gpu_target = k.get_target(); - const DataType dt = k.input()->info()->data_type(); + const DataType dt = k.get_data_type(); const InterpolationPolicy interpolation = k.get_interpolation_policy(); // Configure the local work size for Bifrost, interpolation (bilinear) and datatype F32. // The value are obtained via exhaustive autotuning. if(gpu_target_is_in(gpu_target, GPUTarget::G71, GPUTarget::G72) && (dt == DataType::F32) && (interpolation == InterpolationPolicy::BILINEAR)) { - auto dim_0 = k.output()->info()->dimension(0); + const auto dim_0 = k.get_output_x_dim(); if(dim_0 == 480) { lws_hint = cl::NDRange(2, 1); @@ -285,9 +286,9 @@ void BifrostTuner::tune_kernel_static(ICLKernel &kernel) { tune_pooling_kernel(*utils::cast::polymorphic_downcast(&kernel)); } - else if(dynamic_cast(&kernel) != nullptr) + else if(dynamic_cast(&kernel) != nullptr) { - tune_scale_kernel(*utils::cast::polymorphic_downcast(&kernel)); + tune_scale_kernel(*utils::cast::polymorphic_downcast(&kernel)); } } -- cgit v1.2.1