aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/CL/CLHelpers.h
diff options
context:
space:
mode:
authorManuel Bottini <manuel.bottini@arm.com>2019-10-21 17:59:07 +0100
committerManuel Bottini <manuel.bottini@arm.com>2019-12-03 13:58:56 +0000
commit7b9998d0fe1f98768b690ead10ebfa166d1b873d (patch)
treed3f6b81fb2e414a9e0f8ed9597eab27ef970d725 /arm_compute/core/CL/CLHelpers.h
parentf9179d393a07eb9eed753e315df79d22391906c6 (diff)
downloadComputeLibrary-7b9998d0fe1f98768b690ead10ebfa166d1b873d.tar.gz
COMPMID-1816: Use parallel reduction on 0 axis in CL ARG_MIN/ARG_MAX
Introducing new CLArgMinMax kernel Change-Id: I0b8254207cc3859d19ceef9b6429cf5c1c586db0 Signed-off-by: Manuel Bottini <manuel.bottini@arm.com> Reviewed-on: https://review.mlplatform.org/c/2202 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Diffstat (limited to 'arm_compute/core/CL/CLHelpers.h')
-rw-r--r--arm_compute/core/CL/CLHelpers.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arm_compute/core/CL/CLHelpers.h b/arm_compute/core/CL/CLHelpers.h
index cd65eafc9c..7e549be989 100644
--- a/arm_compute/core/CL/CLHelpers.h
+++ b/arm_compute/core/CL/CLHelpers.h
@@ -190,5 +190,16 @@ bool preferred_dummy_work_items_support(const cl::Device &device);
* @return An opencl kernel
*/
cl::Kernel create_opencl_kernel(CLCoreRuntimeContext *ctx, const std::string &kernel_name, const CLBuildOptions &build_opts);
+
+/** Creates a suitable LWS hint object for parallel implementations. Sets the number of WG based on the input size.
+ * If input width is smaller than 128 we can use fewer threads than 8.
+ *
+ * @param[in] input_dimension number of elements along the dimension to apply the parallellization
+ * @param[in] vector_size size of the vector in OpenCL
+ *
+ * @return An LWS hint object
+ */
+cl::NDRange create_lws_hint_parallel_implementations(unsigned int input_dimension, unsigned int vector_size);
+
} // namespace arm_compute
#endif /* __ARM_COMPUTE_CLHELPERS_H__ */