24.02.1
|
#include <ClTemplateDirectConv2d.h>
Public Types | |
using | Attributes = ClComponentDirectConv2d::Attributes |
using | Settings = ClComponentDirectConv2d::Settings |
Public Types inherited from IGpuTemplateComponentWriter | |
using | ComponentGroup = GpuKernelComponentGroup |
Public Member Functions | |
ClTemplateDirectConv2d (ComponentId id, const ArgumentPack< ITensorInfo > &tensors, const Attributes &attributes, const Settings &settings) | |
Constructor. More... | |
~ClTemplateDirectConv2d () override=default | |
Destructor. More... | |
ClTemplateDirectConv2d (const ClTemplateDirectConv2d &direct_conv2d)=delete | |
Prevent instances of this class from being copy constructed. More... | |
ClTemplateDirectConv2d & | operator= (const ClTemplateDirectConv2d &direct_conv2d)=delete |
Prevent instances of this class from being copied. More... | |
ClTemplateDirectConv2d (ClTemplateDirectConv2d &&direct_conv2d)=default | |
Allow instances of this class to be move constructed. More... | |
ClTemplateDirectConv2d & | operator= (ClTemplateDirectConv2d &&direct_conv2d)=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 ClTemplateDirectConv2d.h.
Definition at line 43 of file ClTemplateDirectConv2d.h.
Definition at line 44 of file ClTemplateDirectConv2d.h.
ClTemplateDirectConv2d | ( | ComponentId | id, |
const ArgumentPack< ITensorInfo > & | tensors, | ||
const Attributes & | attributes, | ||
const Settings & | settings | ||
) |
Constructor.
Similar to ClComponentDirectConv2d::validate()
[in] | id | Component id |
[in] | tensors | Tensor arguments to the components |
[in] | attributes | Component attributes |
[in] | settings | Component settings |
Definition at line 41 of file ClTemplateDirectConv2d.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 227 of file ClTemplateDirectConv2d.cpp.
References IGpuTemplateComponentWriter::common_tensor_type, GpuKernelVariableTable::declare_variable(), ClComponentDirectConv2dSettings::export_to_cl_image(), ITensorInfo::has_valid_id(), GpuKernelArgumentInfo::Tensor_4D_t_Buffer, GpuKernelArgumentInfo::Tensor_4D_t_Image, and GpuKernelArgumentInfo::Vector.
|
overridevirtual |
Generate the build options used in the component.
[in] | comp_group | Component group of which the component is a part of |
Reimplemented from IGpuTemplateComponentWriter.
Definition at line 309 of file ClTemplateDirectConv2d.cpp.
References CLBuildOptions::add_option(), arm_compute::adjust_vec_size(), arm_compute::CHANNEL, arm_compute::cpu::channel_idx, ITensorInfo::data_layout(), ITensorInfo::dimension(), ClComponentDirectConv2dSettings::direct_conv_descriptor(), ClComponentDirectConv2dSettings::fast_relaxed_math(), arm_compute::get_data_layout_dimension_index(), 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 68 of file ClTemplateDirectConv2d.cpp.
References arm_compute::adjust_vec_size(), ARM_COMPUTE_UNUSED, arm_compute::CHANNEL, arm_compute::cpu::channel_idx, ITensorInfo::data_layout(), ITensorInfo::dimension(), ClComponentDirectConv2dSettings::direct_conv_descriptor(), arm_compute::get_data_layout_dimension_index(), and ITensorInfo::has_valid_id().
|
overridevirtual |
Generate the component config id string used for tuning.
Reimplemented from IGpuTemplateComponentWriter.
Definition at line 339 of file ClTemplateDirectConv2d.cpp.
References arm_compute::cpu::data_layout, ITensorInfo::data_layout(), arm_compute::test::validation::data_type, ITensorInfo::data_type(), ITensorInfo::dimension(), arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::cpu::height_idx, arm_compute::lower_string(), Conv2dAttributes::stride(), arm_compute::string_from_data_layout(), arm_compute::string_from_data_type(), arm_compute::support::cpp11::to_string(), arm_compute::WIDTH, and arm_compute::cpu::width_idx.
|
overridevirtual |
Generate the header list used in the component.
Reimplemented from IGpuTemplateComponentWriter.
Definition at line 366 of file ClTemplateDirectConv2d.cpp.
|
overridevirtual |
Generate kernel component name.
Implements IGpuTemplateComponentWriter.
Definition at line 63 of file ClTemplateDirectConv2d.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 244 of file ClTemplateDirectConv2d.cpp.
References arm_compute::cpu::channel_idx, ITensorInfo::data_type(), ITensorInfo::dimension(), GpuKernelComponentGroup::get_any_dst_tensor(), arm_compute::get_cl_type_from_data_type(), GpuKernelVariableTable::get_variable(), ITensorInfo::has_valid_id(), arm_compute::cpu::height_idx, IGpuTemplateComponentWriter::id(), GpuKernelArgumentInfo::Image_3D_Export_To_ClImage2D, GpuKernelArgumentInfo::Image_Export_To_ClImage2D, GpuKernelVariableTable::TensorVariable::kernel_argument_info, Conv2dAttributes::pad(), Conv2dAttributes::stride(), GpuKernelArgumentInfo::Tensor_4D_t_Image, GpuKernelArgumentInfo::type, GpuKernelVariableTable::TensorVariable::uniq_name, and arm_compute::cpu::width_idx.
|
overridevirtual |
Generate the execution window for the component.
Reimplemented from IGpuTemplateComponentWriter.
Definition at line 371 of file ClTemplateDirectConv2d.cpp.
References arm_compute::adjust_vec_size(), ARM_COMPUTE_ERROR_ON_MSG, arm_compute::calculate_max_window(), arm_compute::ceil_to_multiple(), Window::DimY, Window::DimZ, ClComponentDirectConv2dSettings::direct_conv_descriptor(), arm_compute::test::validation::output_shape, Window::set(), ITensorInfo::tensor_shape(), TensorShape::total_size(), TensorShape::total_size_upper(), and arm_compute::utils::cast::U.
|
default |
Allow instances of this class to be moved.
|
delete |
Prevent instances of this class from being copied.