From de691f055ac255c798a766483eef63465ac90c75 Mon Sep 17 00:00:00 2001 From: Gian Marco Date: Fri, 8 Sep 2017 16:13:11 +0100 Subject: COMPMID-524 - Implemented CLTuner object Change-Id: Idbdbecca1fc299ed042936119d90e2bed8db0938 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87101 Reviewed-by: Anthony Barbier Tested-by: Kaizen --- arm_compute/core/CL/ICLKernel.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'arm_compute/core/CL/ICLKernel.h') diff --git a/arm_compute/core/CL/ICLKernel.h b/arm_compute/core/CL/ICLKernel.h index 1334c54a6c..d118d13f3f 100644 --- a/arm_compute/core/CL/ICLKernel.h +++ b/arm_compute/core/CL/ICLKernel.h @@ -29,6 +29,8 @@ #include "arm_compute/core/CL/OpenCL.h" #include "arm_compute/core/IKernel.h" +#include + namespace arm_compute { template @@ -140,6 +142,21 @@ public: _lws_hint = lws_hint; } + /** Get the configuration ID + * + * @note The configuration ID can be used by the caller to distinguish different calls of the same OpenCL kernel + * In particular, this method can be used by CLScheduler to keep track of the best LWS for each configuration of the same kernel. + * The configuration ID should be provided only for the kernels potentially affected by the LWS geometry + * + * @note This method should be called after the configuration of the kernel + * + * @return configuration id string + */ + const std::string &config_id() const + { + return _config_id; + } + /** Set the targeted GPU architecture * * @param[in] target The targeted GPU architecture @@ -191,9 +208,10 @@ private: unsigned int num_arguments_per_tensor() const; protected: - cl::Kernel _kernel; /**< OpenCL kernel to run */ - cl::NDRange _lws_hint; /**< Local workgroup size hint for the OpenCL kernel */ - GPUTarget _target; /**< The targeted GPU */ + cl::Kernel _kernel; /**< OpenCL kernel to run */ + cl::NDRange _lws_hint; /**< Local workgroup size hint for the OpenCL kernel */ + GPUTarget _target; /**< The targeted GPU */ + std::string _config_id; /**< Configuration ID */ }; /** Add the kernel to the command queue with the given window. -- cgit v1.2.1