aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLCropKernel.cpp
diff options
context:
space:
mode:
authorManuel Bottini <manuel.bottini@arm.com>2020-04-08 10:15:51 +0100
committerManuel Bottini <manuel.bottini@arm.com>2020-04-17 14:10:38 +0000
commit4c6bd514a8d424a29b776754f1b3426fa3a8c339 (patch)
treeed20ea238ae069ab138b62ea6879e0c1b955b606 /src/core/CL/kernels/CLCropKernel.cpp
parentd2f6d96cdc2ad2169c4abd0a8c4884f61ed6d186 (diff)
downloadComputeLibrary-4c6bd514a8d424a29b776754f1b3426fa3a8c339.tar.gz
COMPMID-3280: Make all ML primitives for CL use the new interface - Part 1
- Only CLKernels have been updated Change-Id: Ife55b847c2e39e712a186eb6ca452503d5b66937 Signed-off-by: Manuel Bottini <manuel.bottini@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3001 Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLCropKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLCropKernel.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/CL/kernels/CLCropKernel.cpp b/src/core/CL/kernels/CLCropKernel.cpp
index e51861e9aa..2c17c99559 100644
--- a/src/core/CL/kernels/CLCropKernel.cpp
+++ b/src/core/CL/kernels/CLCropKernel.cpp
@@ -49,6 +49,12 @@ CLCropKernel::CLCropKernel()
void CLCropKernel::configure(const ICLTensor *input, ICLTensor *output, Coordinates2D start, Coordinates2D end, uint32_t batch_index, float extrapolation_value, Window *output_window)
{
+ configure(CLKernelLibrary::get().get_compile_context(), input, output, start, end, batch_index, extrapolation_value, output_window);
+}
+
+void CLCropKernel::configure(CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output, Coordinates2D start, Coordinates2D end, uint32_t batch_index, float extrapolation_value,
+ Window *output_window)
+{
ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
ARM_COMPUTE_ERROR_THROW_ON(validate(input->info(), output->info(), start, end, batch_index, extrapolation_value, output_window));
@@ -86,7 +92,7 @@ void CLCropKernel::configure(const ICLTensor *input, ICLTensor *output, Coordina
build_opts.add_option_if(multi_access_x && remainder_x, "-DLAST_ACCESSED_X=" + support::cpp11::to_string(std::max<int>(output_width_x - vec_size_x, 0)));
build_opts.add_option_if(start.x > end.x, "-DWIDTH_FLIPPED=");
build_opts.add_option_if(start.y > end.y, "-DHEIGHT_FLIPPED=");
- _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel("crop_tensor", build_opts.options()));
+ _kernel = create_kernel(compile_context, "crop_tensor", build_opts.options());
}
Status CLCropKernel::validate(const ITensorInfo *input, const ITensorInfo *output, Coordinates2D start, Coordinates2D end, uint32_t batch_index, float extrapolation_value, Window *output_window)