aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/CLTuner.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/runtime/CL/CLTuner.h')
-rw-r--r--arm_compute/runtime/CL/CLTuner.h62
1 files changed, 18 insertions, 44 deletions
diff --git a/arm_compute/runtime/CL/CLTuner.h b/arm_compute/runtime/CL/CLTuner.h
index f1bae3f8dc..cf293d3d27 100644
--- a/arm_compute/runtime/CL/CLTuner.h
+++ b/arm_compute/runtime/CL/CLTuner.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2022 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -75,24 +75,6 @@ public:
*/
void set_tuner_mode(CLTunerMode mode);
- /** Get the current OpenCL tuner mode
- *
- * @return tuner_mode Indicates how exhaustive the search for the optimal tuning parameters should be while tuning
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.08 release
- */
- 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
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.08 release
- */
- ARM_COMPUTE_DEPRECATED_REL_REPLACE(21.02, add_tuning_params)
- void add_lws_to_table(const std::string &kernel_id, cl::NDRange optimal_lws);
-
/** Manually add tuning parameters for a kernel
*
* @param[in] kernel_id Unique identifiant of the kernel
@@ -100,30 +82,12 @@ public:
*/
void add_tuning_params(const std::string &kernel_id, CLTuningParams optimal_tuning_params);
- /** Import LWS table
- *
- * @param[in] lws_table The unordered_map container to import
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.08 release
- */
- ARM_COMPUTE_DEPRECATED_REL_REPLACE(21.02, import_tuning_params)
- void import_lws_table(const std::unordered_map<std::string, cl::NDRange> &lws_table);
-
/** Import tuning parameters table
*
* @param[in] tuning_params_table The unordered_map container to import
*/
void import_tuning_params(const std::unordered_map<std::string, CLTuningParams> &tuning_params_table);
- /** Give read access to the LWS table
- *
- * @return The lws table as unordered_map container
- *
- * @deprecated This function is deprecated and is intended to be removed in 21.08 release
- */
- ARM_COMPUTE_DEPRECATED_REL_REPLACE(21.02, tuning_params_table)
- const std::unordered_map<std::string, cl::NDRange> &lws_table();
-
/** Give read access to the tuning params table
*
* @return The tuning params table as unordered_map container
@@ -160,28 +124,38 @@ public:
void tune_kernel_static(ICLKernel &kernel) override;
void tune_kernel_dynamic(ICLKernel &kernel) override;
void tune_kernel_dynamic(ICLKernel &kernel, ITensorPack &tensors) override;
-
/** Is the kernel_event set ?
*
* @return true if the kernel_event is set.
*/
bool kernel_event_is_set() const;
+ /** A wrapper wrapping tensors and other objects needed for running the kernel
+ */
+ struct IKernelData;
+
private:
+ /** Perform tune_kernel_dynamic
+ *
+ * @param[in] kernel OpenCL kernel to be tuned with tuning parameters
+ * @param[in,out] data IKernelData object wrapping tensors and other objects needed for running the kernel
+ *
+ */
+ void do_tune_kernel_dynamic(ICLKernel &kernel, IKernelData *data);
/** Find optimal tuning parameters using brute-force approach
*
- * @param[in] kernel OpenCL kernel to be tuned with tuning parameters
- * @param[in,out] tensors Tensors for the kernel to operate on
+ * @param[in] kernel OpenCL kernel to be tuned with tuning parameters
+ * @param[in,out] data IKernelData object wrapping tensors and other objects needed for running the kernel
*
* @return The optimal tuning parameters to use
*/
- CLTuningParams find_optimal_tuning_params(ICLKernel &kernel, ITensorPack &tensors);
+ CLTuningParams find_optimal_tuning_params(ICLKernel &kernel, IKernelData *data);
std::unordered_map<std::string, CLTuningParams> _tuning_params_table;
std::unordered_map<std::string, cl::NDRange> _lws_table;
- cl::Event _kernel_event;
- bool _tune_new_kernels;
- CLTuningInfo _tuning_info;
+ cl::Event _kernel_event;
+ bool _tune_new_kernels;
+ CLTuningInfo _tuning_info;
};
} // namespace arm_compute
#endif /*ARM_COMPUTE_CLTUNER_H */