aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2019-05-14 17:11:53 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-05-15 12:49:59 +0100
commitb3e72b6926d577215e3f8f6a3aef17919927f69a (patch)
tree4fcceb05d20a03f1796a1d271797cc887396c71c
parentc6f1391d50a99716c5de598e1714817139a7257a (diff)
downloadComputeLibrary-b3e72b6926d577215e3f8f6a3aef17919927f69a.tar.gz
COMPMID-2334: Extend search space for the EXHAUSTIVE OpenCL tuner
Change-Id Ic71d875542f19d5a4f717f397e1e6ce9ce2536f Change-Id: I7f9cc86b149aa392acffed602b431451499704d7 Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Reviewed-on: https://review.mlplatform.org/c/1133 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--src/runtime/CL/CLTuner.cpp5
-rw-r--r--src/runtime/CL/tuners/CLLWSList.cpp6
2 files changed, 6 insertions, 5 deletions
diff --git a/src/runtime/CL/CLTuner.cpp b/src/runtime/CL/CLTuner.cpp
index f2de78dce..2c3f9ce33 100644
--- a/src/runtime/CL/CLTuner.cpp
+++ b/src/runtime/CL/CLTuner.cpp
@@ -185,9 +185,7 @@ cl::NDRange CLTuner::find_optimal_lws(ICLKernel &kernel)
auto x = lws_test[0];
auto y = lws_test[1];
auto z = lws_test[2];
- bool invalid_lws = (x * y * z > kernel.get_max_workgroup_size()) || (x == 1 && y == 1 && z == 1);
-
- invalid_lws = invalid_lws || (x > gws[0]) || (y > gws[1]) || (z > gws[2]);
+ const bool invalid_lws = (x * y * z > kernel.get_max_workgroup_size()) || (x == 1 && y == 1 && z == 1);
if(invalid_lws)
{
@@ -206,6 +204,7 @@ cl::NDRange CLTuner::find_optimal_lws(ICLKernel &kernel)
const cl_ulong end = _kernel_event.getProfilingInfo<CL_PROFILING_COMMAND_END>();
const cl_ulong diff = end - start;
_kernel_event = nullptr;
+
// Check the execution time
if(diff < min_exec_time)
{
diff --git a/src/runtime/CL/tuners/CLLWSList.cpp b/src/runtime/CL/tuners/CLLWSList.cpp
index 6eb251420..30fd558ef 100644
--- a/src/runtime/CL/tuners/CLLWSList.cpp
+++ b/src/runtime/CL/tuners/CLLWSList.cpp
@@ -41,8 +41,10 @@ cl::NDRange CLLWSListExhaustive::operator[](size_t index)
CLLWSListExhaustive::CLLWSListExhaustive(const cl::NDRange &gws)
{
- search_space_shape = TensorShape(std::min(static_cast<unsigned int>(gws[0]), max_lws_supported_x), std::min(static_cast<unsigned int>(gws[1]), max_lws_supported_y),
- std::min(static_cast<unsigned int>(gws[2]), max_lws_supported_z));
+ ARM_COMPUTE_UNUSED(gws);
+ search_space_shape = TensorShape(max_lws_supported_x,
+ max_lws_supported_y,
+ max_lws_supported_z);
}
cl::NDRange CLLWSListNormal::operator[](size_t index)