From 47f177e679874dc901888973c5fc237b756b38cb Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Wed, 22 Feb 2023 17:24:09 +0000 Subject: Fix LWS search space used by CLTuner * Ensure CLTuner uses the real GWS used by run(), instead of the static GWS (which is usually changed at run time), by caching GWS in each kernel Note this is a somewhat inelegant workaround. The real issue stems from the fact that execution window and scheduler are very much coupled with our operator run() / run_op() method. (Please see COMPMID-5934) * Restrict LWS values to explore within GWS bound for exhaustive mode * Refactor gws_from_window() to include all the information required to calculate GWS * Log lws search space used for tuning * Fix ClDirectConv2dKernel config id Resolves COMPMID-5892 Signed-off-by: SiCong Li Change-Id: I420490d8b94d13ada2e44eb0a12078f883379334 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9193 Reviewed-by: Gian Marco Iodice Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- utils/TypePrinter.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'utils') diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h index 448f184432..db27ddccde 100644 --- a/utils/TypePrinter.h +++ b/utils/TypePrinter.h @@ -1437,6 +1437,36 @@ inline std::string to_string(ICLTensor *cl_tensor) { return to_string(static_cast(cl_tensor)); } + +/** Formatted output of the cl::NDRange type. + * + * @param[out] os Output stream. + * @param[in] nd_range cl::NDRange to output. + * + * @return Modified output stream. + */ +inline ::std::ostream &operator<<(::std::ostream &os, const cl::NDRange &nd_range) +{ + os << "{" + << nd_range[0] << "," + << nd_range[1] << "," + << nd_range[2] + << "}"; + return os; +} + +/** Formatted output of the cl::NDRange type + * + * @param[in] nd_Range Type to output. + * + * @return Formatted string. + */ +inline std::string to_string(const cl::NDRange &nd_range) +{ + std::stringstream str; + str << nd_range; + return str.str(); +} #endif /* ARM_COMPUTE_OPENCL_ENABLED */ /** Formatted output of the Dimensions type. -- cgit v1.2.1