aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLFastCornersKernel.cpp
diff options
context:
space:
mode:
authorGary Antcliffe <gary.antcliffe@arm.com>2019-05-28 11:40:21 +0100
committerGary Antcliffe <gary.antcliffe@arm.com>2019-06-27 14:09:00 +0000
commitfffbdbcc52ae2f30b9c51637d82e5e1f5d604e71 (patch)
treeac2c43d7b69d61aed29a6ee3151806797e87f739 /src/core/CL/kernels/CLFastCornersKernel.cpp
parentd8a468f90030edf7be512c00fce7230065456f61 (diff)
downloadComputeLibrary-fffbdbcc52ae2f30b9c51637d82e5e1f5d604e71.tar.gz
COMPUTE-10611: CL: Set config_id to enabling LWS tuning
Change-Id: Ie457ab751e1527841c3e2881a25eac889435a26e Signed-off-by: Gary Antcliffe <gary.antcliffe@arm.com> Reviewed-on: https://review.mlplatform.org/c/1408 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLFastCornersKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLFastCornersKernel.cpp34
1 files changed, 31 insertions, 3 deletions
diff --git a/src/core/CL/kernels/CLFastCornersKernel.cpp b/src/core/CL/kernels/CLFastCornersKernel.cpp
index 782ab7a7c0..ca3d528142 100644
--- a/src/core/CL/kernels/CLFastCornersKernel.cpp
+++ b/src/core/CL/kernels/CLFastCornersKernel.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2018 ARM Limited.
+ * Copyright (c) 2016-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -67,7 +67,8 @@ void CLFastCornersKernel::configure(const ICLImage *input, ICLImage *output, flo
}
// Create kernel
- _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel("fast_corners", build_opts));
+ const std::string kernel_name = std::string("fast_corners");
+ _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(kernel_name, build_opts));
// Set static kernel arguments
unsigned int idx = 2 * num_arguments_per_2D_tensor(); // Skip the input and output parameters
@@ -88,6 +89,23 @@ void CLFastCornersKernel::configure(const ICLImage *input, ICLImage *output, flo
output_access.set_valid_region(win, input->info()->valid_region(), border_mode == BorderMode::UNDEFINED, border_size());
ICLKernel::configure_internal(win);
+
+ // Set config_id for enabling LWS tuning
+ _config_id = kernel_name;
+ _config_id += "_";
+ _config_id += lower_string(string_from_data_type(input->info()->data_type()));
+ _config_id += "_";
+ _config_id += support::cpp11::to_string(input->info()->dimension(0));
+ _config_id += "_";
+ _config_id += support::cpp11::to_string(input->info()->dimension(1));
+ _config_id += "_";
+ _config_id += support::cpp11::to_string(output->info()->dimension(0));
+ _config_id += "_";
+ _config_id += support::cpp11::to_string(output->info()->dimension(1));
+ _config_id += "_";
+ _config_id += support::cpp11::to_string(non_max_suppression);
+ _config_id += "_";
+ _config_id += lower_string(string_from_border_mode(border_mode));
}
void CLFastCornersKernel::run(const Window &window, cl::CommandQueue &queue)
@@ -131,7 +149,8 @@ void CLCopyToArrayKernel::configure(const ICLImage *input, bool update_number, I
}
// Create kernel
- _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel("copy_to_keypoint", build_opts));
+ const std::string kernel_name = std::string("copy_to_keypoint");
+ _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(kernel_name, build_opts));
//Get how many pixels skipped in the x dimension in the previous stages
unsigned int offset = _input->info()->valid_region().anchor.x();
@@ -149,6 +168,15 @@ void CLCopyToArrayKernel::configure(const ICLImage *input, bool update_number, I
update_window_and_padding(win,
AccessWindowHorizontal(input->info(), 0, num_elems_processed_per_iteration));
ICLKernel::configure_internal(win);
+
+ // Set config_id for enabling LWS tuning
+ _config_id = kernel_name;
+ _config_id += "_";
+ _config_id += lower_string(string_from_data_type(input->info()->data_type()));
+ _config_id += "_";
+ _config_id += support::cpp11::to_string(input->info()->dimension(0));
+ _config_id += "_";
+ _config_id += support::cpp11::to_string(input->info()->dimension(1));
}
void CLCopyToArrayKernel::run(const Window &window, cl::CommandQueue &queue)