From 2b84be544e4a27f7e8e80827e9c85c8f0d58b4ce Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Wed, 8 Apr 2020 10:15:51 +0100 Subject: COMPMID-3280: Make all ML primitives for CL use the new interface - Part 2 - CLFunctions have been updated Change-Id: Ie3256a6c775bc12f3126482bd8e8a46da54b267c Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3053 Reviewed-by: Georgios Pinitas Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins --- src/runtime/CL/functions/CLHarrisCorners.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/runtime/CL/functions/CLHarrisCorners.cpp') diff --git a/src/runtime/CL/functions/CLHarrisCorners.cpp b/src/runtime/CL/functions/CLHarrisCorners.cpp index 3cae95f551..aecec0d3c5 100644 --- a/src/runtime/CL/functions/CLHarrisCorners.cpp +++ b/src/runtime/CL/functions/CLHarrisCorners.cpp @@ -64,6 +64,13 @@ CLHarrisCorners::CLHarrisCorners(std::shared_ptr memory_manager) void CLHarrisCorners::configure(ICLImage *input, float threshold, float min_dist, float sensitivity, int32_t gradient_size, int32_t block_size, ICLKeyPointArray *corners, BorderMode border_mode, uint8_t constant_border_value, bool use_fp16) +{ + configure(CLKernelLibrary::get().get_compile_context(), input, threshold, min_dist, sensitivity, gradient_size, block_size, corners, border_mode, constant_border_value, use_fp16); +} + +void CLHarrisCorners::configure(const CLCompileContext &compile_context, ICLImage *input, float threshold, float min_dist, + float sensitivity, int32_t gradient_size, int32_t block_size, ICLKeyPointArray *corners, + BorderMode border_mode, uint8_t constant_border_value, bool use_fp16) { ARM_COMPUTE_UNUSED(use_fp16); //TODO(COMPMID-772): Add half float support ARM_COMPUTE_ERROR_ON_TENSOR_NOT_2D(input); @@ -96,21 +103,21 @@ void CLHarrisCorners::configure(ICLImage *input, float threshold, float min_dist case 3: { auto k = arm_compute::support::cpp14::make_unique(); - k->configure(input, &_gx, &_gy, border_mode, constant_border_value); + k->configure(compile_context, input, &_gx, &_gy, border_mode, constant_border_value); _sobel = std::move(k); break; } case 5: { auto k = arm_compute::support::cpp14::make_unique(); - k->configure(input, &_gx, &_gy, border_mode, constant_border_value); + k->configure(compile_context, input, &_gx, &_gy, border_mode, constant_border_value); _sobel = std::move(k); break; } case 7: { auto k = arm_compute::support::cpp14::make_unique(); - k->configure(input, &_gx, &_gy, border_mode, constant_border_value); + k->configure(compile_context, input, &_gx, &_gy, border_mode, constant_border_value); _sobel = std::move(k); break; } @@ -126,11 +133,11 @@ void CLHarrisCorners::configure(ICLImage *input, float threshold, float min_dist _memory_group.manage(&_score); // Set/init Harris Score kernel accordingly with block_size - _harris_score.configure(&_gx, &_gy, &_score, block_size, pow4_normalization_factor, threshold, sensitivity, border_mode == BorderMode::UNDEFINED); + _harris_score.configure(compile_context, &_gx, &_gy, &_score, block_size, pow4_normalization_factor, threshold, sensitivity, border_mode == BorderMode::UNDEFINED); // Configure border filling using harris score kernel's block size - _border_gx.configure(&_gx, _harris_score.border_size(), border_mode, PixelValue(constant_border_value)); - _border_gy.configure(&_gy, _harris_score.border_size(), border_mode, PixelValue(constant_border_value)); + _border_gx.configure(compile_context, &_gx, _harris_score.border_size(), border_mode, PixelValue(constant_border_value)); + _border_gy.configure(compile_context, &_gy, _harris_score.border_size(), border_mode, PixelValue(constant_border_value)); // Allocate intermediate buffers _gx.allocator()->allocate(); @@ -140,7 +147,7 @@ void CLHarrisCorners::configure(ICLImage *input, float threshold, float min_dist _memory_group.manage(&_nonmax); // Init non-maxima suppression function - _non_max_suppr.configure(&_score, &_nonmax, border_mode); + _non_max_suppr.configure(compile_context, &_score, &_nonmax, border_mode); // Allocate intermediate buffers _score.allocator()->allocate(); -- cgit v1.2.1