24.02.1
|
An interface used by ClTemplateWriter to write source code for a kernel component. More...
#include <IGpuTemplateComponentWriter.h>
Public Types | |
using | ComponentGroup = GpuKernelComponentGroup |
Public Member Functions | |
IGpuTemplateComponentWriter (ComponentId id, const ArgumentPack< ITensorInfo > &tensors) | |
Constructor. More... | |
virtual | ~IGpuTemplateComponentWriter () |
Destructor. More... | |
virtual std::string | get_name () const =0 |
Generate kernel component name. More... | |
virtual std::string | get_component_code (const ComponentGroup &comp_group) const =0 |
Generate kernel component code template. More... | |
virtual void | declare_variables (GpuKernelVariableTable &vtable, const ComponentGroup &comp_group) const =0 |
Declare all variables used by the component in the vtable . More... | |
virtual TagLUT | get_tag_lut (const GpuKernelVariableTable &vtable, const ComponentGroup &comp_group) const =0 |
Generate the tag look-up table used to instantiate the component code. More... | |
virtual std::string | get_additional_macros () const |
Generate additional macros used in the component. More... | |
virtual CLBuildOptions | get_build_options (const ComponentGroup &comp_group) const |
Generate the build options used in the component. More... | |
virtual std::string | get_config_id () const |
Generate the component config id string used for tuning. More... | |
virtual std::set< std::string > | get_headers_list () const |
Generate the header list used in the component. More... | |
virtual Window | get_window () const |
Generate the execution window for the component. More... | |
ArgumentPack< ITensorInfo > | tensors () const |
Get tensor arguments. More... | |
ComponentId | id () const |
Get component id. More... | |
Static Public Attributes | |
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... | |
An interface used by ClTemplateWriter to write source code for a kernel component.
Definition at line 47 of file IGpuTemplateComponentWriter.h.
Definition at line 50 of file IGpuTemplateComponentWriter.h.
|
inline |
Constructor.
[in] | id | Component id |
[in] | tensors | Tensor arguments to the components |
Definition at line 61 of file IGpuTemplateComponentWriter.h.
|
inlinevirtual |
|
pure virtual |
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 |
Implemented in ClTemplatePool2d, ClTemplateActivation, ClTemplateDirectConv2d, ClTemplateResize, ClTemplateDepthwiseConv2d, ClTemplateElementwiseBinary, ClTemplateLogits1DMaxShiftExpSum, ClTemplateLogits1DNorm, ClTemplateReshape, ClTemplateCast, and ClTemplateStore.
|
inlinevirtual |
Generate additional macros used in the component.
Definition at line 92 of file IGpuTemplateComponentWriter.h.
|
inlinevirtual |
Generate the build options used in the component.
[in] | comp_group | Component group of which the component is a part of |
Reimplemented in ClTemplateActivation, ClTemplatePool2d, ClTemplateResize, ClTemplateDirectConv2d, ClTemplateElementwiseBinary, ClTemplateDepthwiseConv2d, ClTemplateLogits1DMaxShiftExpSum, ClTemplateReshape, ClTemplateLogits1DNorm, and ClTemplateCast.
Definition at line 102 of file IGpuTemplateComponentWriter.h.
References ARM_COMPUTE_UNUSED.
|
pure virtual |
Generate kernel component code template.
[in] | comp_group | Component group of which the component is a part of |
Implemented in ClTemplatePool2d, ClTemplateActivation, ClTemplateDirectConv2d, ClTemplateResize, ClTemplateDepthwiseConv2d, ClTemplateElementwiseBinary, ClTemplateLogits1DMaxShiftExpSum, ClTemplateLogits1DNorm, ClTemplateCast, ClTemplateReshape, and ClTemplateStore.
|
inlinevirtual |
Generate the component config id string used for tuning.
Reimplemented in ClTemplateActivation, ClTemplatePool2d, ClTemplateResize, ClTemplateDirectConv2d, ClTemplateElementwiseBinary, ClTemplateDepthwiseConv2d, ClTemplateReshape, ClTemplateLogits1DMaxShiftExpSum, ClTemplateLogits1DNorm, and ClTemplateCast.
Definition at line 108 of file IGpuTemplateComponentWriter.h.
|
inlinevirtual |
Generate the header list used in the component.
Reimplemented in ClTemplateActivation, ClTemplatePool2d, ClTemplateResize, ClTemplateDirectConv2d, ClTemplateElementwiseBinary, ClTemplateDepthwiseConv2d, ClTemplateReshape, ClTemplateLogits1DMaxShiftExpSum, ClTemplateLogits1DNorm, and ClTemplateCast.
Definition at line 113 of file IGpuTemplateComponentWriter.h.
|
pure virtual |
Generate kernel component name.
Implemented in ClTemplatePool2d, ClTemplateActivation, ClTemplateDirectConv2d, ClTemplateResize, ClTemplateDepthwiseConv2d, ClTemplateElementwiseBinary, ClTemplateLogits1DMaxShiftExpSum, ClTemplateLogits1DNorm, ClTemplateCast, ClTemplateReshape, and ClTemplateStore.
|
pure virtual |
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 |
Implemented in ClTemplateActivation, ClTemplatePool2d, ClTemplateResize, ClTemplateDirectConv2d, ClTemplateElementwiseBinary, ClTemplateDepthwiseConv2d, ClTemplateLogits1DMaxShiftExpSum, ClTemplateReshape, ClTemplateLogits1DNorm, ClTemplateCast, and ClTemplateStore.
|
inlinevirtual |
Generate the execution window for the component.
Reimplemented in ClTemplateActivation, ClTemplatePool2d, ClTemplateResize, ClTemplateElementwiseBinary, ClTemplateDirectConv2d, ClTemplateDepthwiseConv2d, ClTemplateReshape, ClTemplateLogits1DMaxShiftExpSum, ClTemplateLogits1DNorm, and ClTemplateCast.
Definition at line 118 of file IGpuTemplateComponentWriter.h.
Referenced by ClTemplateCast::get_build_options(), ClTemplateLogits1DNorm::get_build_options(), ClTemplateReshape::get_build_options(), ClTemplateDirectConv2d::get_build_options(), ClTemplateResize::get_build_options(), ClTemplatePool2d::get_build_options(), and ClTemplateActivation::get_build_options().
|
inline |
Get component id.
Definition at line 128 of file IGpuTemplateComponentWriter.h.
Referenced by ClTemplateActivation::ClTemplateActivation(), ClTemplateCast::ClTemplateCast(), ClTemplateDepthwiseConv2d::ClTemplateDepthwiseConv2d(), ClTemplateDirectConv2d::ClTemplateDirectConv2d(), ClTemplateElementwiseBinary::ClTemplateElementwiseBinary(), ClTemplateLogits1DMaxShiftExpSum::ClTemplateLogits1DMaxShiftExpSum(), ClTemplateLogits1DNorm::ClTemplateLogits1DNorm(), ClTemplatePool2d::ClTemplatePool2d(), ClTemplateReshape::ClTemplateReshape(), ClTemplateResize::ClTemplateResize(), ClTemplateStore::ClTemplateStore(), ClTemplateCast::get_component_code(), ClTemplateElementwiseBinary::get_component_code(), ClTemplateActivation::get_component_code(), ClTemplateStore::get_tag_lut(), ClTemplateCast::get_tag_lut(), ClTemplateLogits1DNorm::get_tag_lut(), ClTemplateReshape::get_tag_lut(), ClTemplateLogits1DMaxShiftExpSum::get_tag_lut(), ClTemplateDepthwiseConv2d::get_tag_lut(), ClTemplateDirectConv2d::get_tag_lut(), ClTemplateResize::get_tag_lut(), ClTemplateActivation::get_tag_lut(), and ClTemplatePool2d::get_tag_lut().
|
inline |
Get tensor arguments.
Definition at line 123 of file IGpuTemplateComponentWriter.h.
Referenced by ClTemplateActivation::ClTemplateActivation(), ClTemplateCast::ClTemplateCast(), ClTemplateDepthwiseConv2d::ClTemplateDepthwiseConv2d(), ClTemplateDirectConv2d::ClTemplateDirectConv2d(), ClTemplateElementwiseBinary::ClTemplateElementwiseBinary(), ClTemplateLogits1DMaxShiftExpSum::ClTemplateLogits1DMaxShiftExpSum(), ClTemplateLogits1DNorm::ClTemplateLogits1DNorm(), ClTemplatePool2d::ClTemplatePool2d(), ClTemplateReshape::ClTemplateReshape(), ClTemplateResize::ClTemplateResize(), and ClTemplateStore::ClTemplateStore().
|
staticconstexpr |
For now all kernel intermeditate/destination tensors are expected to be of type Tensor_4D_t_Buffer.
Definition at line 53 of file IGpuTemplateComponentWriter.h.
Referenced by ClTemplateReshape::declare_variables(), and ClTemplateDirectConv2d::declare_variables().