diff options
author | Vidhya Sudhan Loganathan <vidhyasudhan.loganathan@arm.com> | 2019-04-25 09:27:24 +0100 |
---|---|---|
committer | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2019-04-25 16:18:58 +0000 |
commit | 050471e40fc58cb5ea745701a43ec5b2b9586b81 (patch) | |
tree | 0ee684bcc93fae693686c391e42a2b824705aeb1 /arm_compute/runtime/CL/CLTuner.h | |
parent | d038dafe3810d22c8664ceef4fe49aad77abdbd1 (diff) | |
download | ComputeLibrary-050471e40fc58cb5ea745701a43ec5b2b9586b81.tar.gz |
COMPMID-1974 : Extend CLTuner to support different of level of tuning
Change-Id: I52e4a00a25e7f7a17050038cee7c30e508553722
Signed-off-by: Vidhya Sudhan Loganathan <vidhyasudhan.loganathan@arm.com>
Reviewed-on: https://review.mlplatform.org/c/977
Comments-Addressed: Pablo Marquez <pablo.tello@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/CL/CLTuner.h')
-rw-r--r-- | arm_compute/runtime/CL/CLTuner.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/arm_compute/runtime/CL/CLTuner.h b/arm_compute/runtime/CL/CLTuner.h index ee83f6933c..3f3df5f236 100644 --- a/arm_compute/runtime/CL/CLTuner.h +++ b/arm_compute/runtime/CL/CLTuner.h @@ -25,6 +25,7 @@ #define __ARM_COMPUTE_CLTUNER_H__ #include "arm_compute/core/CL/OpenCL.h" +#include "arm_compute/runtime/CL/CLTunerTypes.h" #include "arm_compute/runtime/CL/ICLTuner.h" #include <unordered_map> @@ -57,12 +58,26 @@ public: * @return True if tuning of new kernels is enabled. */ bool tune_new_kernels() const; + + /** Set OpenCL tuner mode + * + * @param[in] mode Indicates how exhaustive the search for the optimal LWS should be while tuning. Default is Exhaustive mode + */ + void set_tuner_mode(CLTunerMode mode); + + /** Get the current OpenCL tuner mode + * + * @return tuner_mode Indicates how exhaustive the search for the optimal LWS should be while tuning + */ + CLTunerMode get_tuner_mode() const; + /** Manually add a LWS for a kernel * * @param[in] kernel_id Unique identifiant of the kernel * @param[in] optimal_lws Optimal local workgroup size to use for the given kernel */ void add_lws_to_table(const std::string &kernel_id, cl::NDRange optimal_lws); + /** Import LWS table * * @param[in] lws_table The unordered_map container to import @@ -118,8 +133,9 @@ private: cl::NDRange find_optimal_lws(ICLKernel &kernel); std::unordered_map<std::string, cl::NDRange> _lws_table; - cl::Event _kernel_event; - bool _tune_new_kernels; + cl::Event _kernel_event; + bool _tune_new_kernels; + CLTunerMode _tuner_mode; }; } // namespace arm_compute #endif /*__ARM_COMPUTE_CLTUNER_H__ */ |