24.02.1
|
#include <ClTemplateActivation.h>
Public Types | |
using | Attributes = ClComponentActivation::Attributes |
Public Types inherited from IGpuTemplateComponentWriter | |
using | ComponentGroup = GpuKernelComponentGroup |
Public Member Functions | |
ClTemplateActivation (ComponentId id, const ArgumentPack< ITensorInfo > &tensors, const Attributes &attributes) | |
Constructor. More... | |
~ClTemplateActivation () override=default | |
Destructor. More... | |
ClTemplateActivation (const ClTemplateActivation &activation)=delete | |
Prevent instances of this class from being copy constructed. More... | |
ClTemplateActivation & | operator= (const ClTemplateActivation &activation)=delete |
Prevent instances of this class from being copied. More... | |
ClTemplateActivation (ClTemplateActivation &&activation)=default | |
Allow instances of this class to be move constructed. More... | |
ClTemplateActivation & | operator= (ClTemplateActivation &&activation)=default |
Allow instances of this class to be moved. More... | |
std::string | get_name () const override |
Generate kernel component name. More... | |
std::string | get_component_code (const ComponentGroup &comp_group) const override |
Generate kernel component code template. More... | |
void | declare_variables (GpuKernelVariableTable &vtable, const ComponentGroup &comp_group) const override |
Declare all variables used by the component in the vtable . More... | |
TagLUT | get_tag_lut (const GpuKernelVariableTable &vtable, const ComponentGroup &comp_group) const override |
Generate the tag look-up table used to instantiate the component code. More... | |
CLBuildOptions | get_build_options (const ComponentGroup &comp_group) const override |
Generate the build options used in the component. More... | |
std::string | get_config_id () const override |
Generate the component config id string used for tuning. More... | |
std::set< std::string > | get_headers_list () const override |
Generate the header list used in the component. More... | |
Window | get_window () const override |
Generate the execution window for the component. More... | |
Public Member Functions inherited from IGpuTemplateComponentWriter | |
IGpuTemplateComponentWriter (ComponentId id, const ArgumentPack< ITensorInfo > &tensors) | |
Constructor. More... | |
virtual | ~IGpuTemplateComponentWriter () |
Destructor. More... | |
virtual std::string | get_additional_macros () const |
Generate additional macros used in the component. More... | |
ArgumentPack< ITensorInfo > | tensors () const |
Get tensor arguments. More... | |
ComponentId | id () const |
Get component id. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from IGpuTemplateComponentWriter | |
static constexpr GpuKernelArgumentInfo::Type | common_tensor_type = GpuKernelArgumentInfo::Type::Tensor_4D_t_Buffer |
For now all kernel intermeditate/destination tensors are expected to be of type Tensor_4D_t_Buffer. More... | |
Definition at line 40 of file ClTemplateActivation.h.
Definition at line 43 of file ClTemplateActivation.h.
ClTemplateActivation | ( | ComponentId | id, |
const ArgumentPack< ITensorInfo > & | tensors, | ||
const Attributes & | attributes | ||
) |
Constructor.
[in] | id | Component id |
[in] | tensors | Tensor arguments to the components |
[in] | attributes | Component attributes |
Definition at line 40 of file ClTemplateActivation.cpp.
References IGpuTemplateComponentWriter::id(), and IGpuTemplateComponentWriter::tensors().
|
overridedefault |
Destructor.
|
delete |
Prevent instances of this class from being copy constructed.
|
default |
Allow instances of this class to be move constructed.
|
overridevirtual |
Declare all variables used by the component in the vtable
.
[out] | vtable | Variable table |
[in] | comp_group | Component group of which the component is a part of |
Implements IGpuTemplateComponentWriter.
Definition at line 103 of file ClTemplateActivation.cpp.
References GpuKernelVariableTable::declare_variable(), and GpuKernelArgumentInfo::Tensor_4D_t_Buffer.
|
overridevirtual |
Generate the build options used in the component.
[in] | comp_group | Component group of which the component is a part of |
NOTE: For now tile sizes (n0, m0) are set by the execution window. This may change in the future
Reimplemented from IGpuTemplateComponentWriter.
Definition at line 138 of file ClTemplateActivation.cpp.
References CLBuildOptions::add_option(), ITensorInfo::dimension(), GpuKernelComponentGroup::get_root_component(), IGpuTemplateComponentWriter::get_window(), Window::Dimension::step(), IGpuKernelComponent::template_writer(), arm_compute::support::cpp11::to_string(), and Window::x().
|
overridevirtual |
Generate kernel component code template.
[in] | comp_group | Component group of which the component is a part of |
Implements IGpuTemplateComponentWriter.
Definition at line 55 of file ClTemplateActivation.cpp.
References GpuKernelComponentGroup::get_root_component(), IGpuKernelComponent::id(), and IGpuTemplateComponentWriter::id().
|
overridevirtual |
Generate the component config id string used for tuning.
Reimplemented from IGpuTemplateComponentWriter.
Definition at line 154 of file ClTemplateActivation.cpp.
References ITensorInfo::data_type(), ITensorInfo::dimension(), arm_compute::lower_string(), arm_compute::string_from_data_type(), and arm_compute::support::cpp11::to_string().
|
overridevirtual |
Generate the header list used in the component.
Reimplemented from IGpuTemplateComponentWriter.
Definition at line 166 of file ClTemplateActivation.cpp.
|
overridevirtual |
Generate kernel component name.
Implements IGpuTemplateComponentWriter.
Definition at line 50 of file ClTemplateActivation.cpp.
|
overridevirtual |
Generate the tag look-up table used to instantiate the component code.
[in] | vtable | Variable table |
[in] | comp_group | Component group of which the component is a part of |
Implements IGpuTemplateComponentWriter.
Definition at line 112 of file ClTemplateActivation.cpp.
References ActivationLayerInfo::a(), ActivationLayerInfo::activation(), ARM_COMPUTE_UNUSED, ActivationLayerInfo::b(), ITensorInfo::data_type(), arm_compute::float_to_string_with_full_precision(), GpuKernelComponentGroup::get_any_dst_tensor(), arm_compute::get_cl_type_from_data_type(), GpuKernelVariableTable::get_variable(), IGpuTemplateComponentWriter::id(), arm_compute::lower_string(), arm_compute::string_from_activation_func(), and GpuKernelVariableTable::TensorVariable::uniq_name.
|
overridevirtual |
Generate the execution window for the component.
Reimplemented from IGpuTemplateComponentWriter.
Definition at line 171 of file ClTemplateActivation.cpp.
References arm_compute::adjust_vec_size(), ARM_COMPUTE_ERROR_ON_MSG, arm_compute::calculate_max_window(), Window::collapse(), ITensorInfo::dimension(), Window::DimZ, ITensorInfo::element_size(), ITensorInfo::tensor_shape(), TensorShape::total_size(), and arm_compute::utils::cast::U.
|
default |
Allow instances of this class to be moved.
|
delete |
Prevent instances of this class from being copied.