24.02.1
CLTuningParametersList.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020-2021 Arm Limited.
3
*
4
* SPDX-License-Identifier: MIT
5
*
6
* Permission is hereby granted, free of charge, to any person obtaining a copy
7
* of this software and associated documentation files (the "Software"), to
8
* deal in the Software without restriction, including without limitation the
9
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
* sell copies of the Software, and to permit persons to whom the Software is
11
* furnished to do so, subject to the following conditions:
12
*
13
* The above copyright notice and this permission notice shall be included in all
14
* copies or substantial portions of the Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
* SOFTWARE.
23
*/
24
#ifndef ARM_COMPUTE_CL_TUNINGPARAMETERS_LIST_H
25
#define ARM_COMPUTE_CL_TUNINGPARAMETERS_LIST_H
26
27
#include "
arm_compute/core/CL/OpenCL.h
"
28
#include "
arm_compute/core/Error.h
"
29
#include "
arm_compute/core/Helpers.h
"
30
#include "
arm_compute/runtime/CL/CLTunerTypes.h
"
31
#include "
arm_compute/runtime/CL/CLTuningParams.h
"
32
33
#include "
support/ToolchainSupport.h
"
34
35
#include <memory>
36
37
namespace
arm_compute
38
{
39
namespace
cl_tuner
40
{
41
/** Interface for Tuning Parameters lists
42
*
43
* The tuning parameter lists contain a set of tuning parameters to estimate.
44
* There are 3 tuner modes, each using its specific list:
45
* - Exhaustive tuner mode is the slowest during the tuning but will find faster tuning parameters
46
* - Normal tuner mode is the average modality in terms of tuning time and tuning parameters found
47
* - Rapid tuner mode is the fastest but the tuning parameters might not be the fastest
48
*
49
*/
50
class
ICLTuningParametersList
51
{
52
public
:
53
/** Constructor */
54
ICLTuningParametersList
() =
default
;
55
/** Copy Constructor */
56
ICLTuningParametersList
(
const
ICLTuningParametersList
&) =
default
;
57
/** Move Constructor */
58
ICLTuningParametersList
(
ICLTuningParametersList
&&) noexcept(
true
) =
default
;
59
/** Assignment */
60
ICLTuningParametersList
&
operator=
(
const
ICLTuningParametersList
&) =
default
;
61
/** Move Assignment */
62
ICLTuningParametersList
&
operator=
(
ICLTuningParametersList
&&) noexcept(
true
) =
default
;
63
/** Destructor */
64
virtual
~ICLTuningParametersList
() =
default
;
65
66
/** Return the tuning parameter values at the given index.
67
*
68
* @return tuning parameter values at the given index
69
*/
70
virtual
CLTuningParams
operator[]
(
size_t
) = 0;
71
72
/** Tuning parameters list size.
73
*
74
* @return Tuning parameters list size
75
*/
76
virtual
size_t
size
() = 0;
77
};
78
79
/** Construct an ICLTuningParametersList object for the given tuner mode and gws configuration.
80
*
81
* @param[in] tuning_info Tuning info containng which parameters to tune and the tuner mode
82
* @param[in] gws Global worksize values
83
*
84
* @return unique_ptr to the requested ICLTuningParametersList implementation.
85
*/
86
std::unique_ptr<ICLTuningParametersList>
get_tuning_parameters_list
(
CLTuningInfo
tuning_info,
const
cl::NDRange &gws);
87
88
}
// namespace cl_tuner
89
}
// namespace arm_compute
90
#endif
/*ARM_COMPUTE_CL_TUNINGPARAMETERS_LIST_H */
arm_compute::cl_tuner::ICLTuningParametersList
Interface for Tuning Parameters lists.
Definition:
CLTuningParametersList.h:50
Helpers.h
Error.h
arm_compute::cl_tuner::ICLTuningParametersList::~ICLTuningParametersList
virtual ~ICLTuningParametersList()=default
Destructor.
arm_compute::cl_tuner::ICLTuningParametersList::ICLTuningParametersList
ICLTuningParametersList()=default
Constructor.
arm_compute::cl_tuner::get_tuning_parameters_list
std::unique_ptr< ICLTuningParametersList > get_tuning_parameters_list(CLTuningInfo tuning_info, const cl::NDRange &gws)
Construct an ICLTuningParametersList object for the given tuner mode and gws configuration.
Definition:
CLTuningParametersList.cpp:272
arm_compute::CLTuningInfo
Definition:
CLTunerTypes.h:43
arm_compute::CLTuningParams
< OpenCL tuner parameters
Definition:
CLTuningParams.h:37
OpenCL.h
Wrapper to configure the Khronos OpenCL C++ header.
CLTunerTypes.h
ToolchainSupport.h
arm_compute
Copyright (c) 2017-2024 Arm Limited.
Definition:
introduction.dox:24
arm_compute::cl_tuner::ICLTuningParametersList::operator=
ICLTuningParametersList & operator=(const ICLTuningParametersList &)=default
Assignment.
arm_compute::cl_tuner::ICLTuningParametersList::size
virtual size_t size()=0
Tuning parameters list size.
arm_compute::cl_tuner::ICLTuningParametersList::operator[]
virtual CLTuningParams operator[](size_t)=0
Return the tuning parameter values at the given index.
CLTuningParams.h
arm_compute
runtime
CL
tuners
CLTuningParametersList.h
Generated on Mon Mar 18 2024 11:31:55 for Compute Library by
1.8.17