24.02.1
|
Go to the documentation of this file.
24 #ifndef SRC_DYNAMIC_FUSION_SKETCH_GPU_GPUKERNELCOMPONENTGROUP
25 #define SRC_DYNAMIC_FUSION_SKETCH_GPU_GPUKERNELCOMPONENTGROUP
38 namespace experimental
40 namespace dynamic_fusion
42 class IGpuKernelComponent;
120 std::vector<const ITensorInfo *>
get_tiles()
const;
134 typename std::vector<ComponentPtr>::iterator
begin();
135 typename std::vector<ComponentPtr>::iterator
end();
136 typename std::vector<ComponentPtr>::const_iterator
begin()
const;
137 typename std::vector<ComponentPtr>::const_iterator
end()
const;
138 typename std::vector<ComponentPtr>::const_iterator
cbegin()
const;
139 typename std::vector<ComponentPtr>::const_iterator
cend()
const;
142 std::vector<ComponentPtr> _components{};
144 bool _finalized{
false};
146 std::vector<const ITensorInfo *> _argument_tensors{};
147 std::set<const ITensorInfo *> _input_tensors{};
148 std::set<const ITensorInfo *> _interm_tensors{};
149 const ITensorInfo *_any_output_tensor{
nullptr};
150 std::vector<const ITensorInfo *> _tiles{};
151 std::map<const ITensorInfo *, const ITensorInfo *> _tile_map{};
std::vector< ComponentPtr >::iterator end()
ComponentPtr & operator[](size_t index)
ComponentPtr get_root_component() const
Get the root (first) component of this group.
std::vector< const ITensorInfo * > get_argument_tensors() const
Get tensor argument of this group A tensor is an argument if it is a source or destination tensor to ...
const ITensorInfo * get_any_dst_tensor() const
Get one of the destination tensors of this group.
std::vector< ComponentPtr >::const_iterator cend() const
std::vector< ComponentPtr >::iterator begin()
std::vector< const ITensorInfo * > get_tiles() const
Get the list of temporary tiles that need to be declared.
bool is_intermediate_tensor(const ITensorInfo *tensor) const
Check if a ITensorInfo is an "intermediate" tensor of the group.
bool empty() const
Check if the component group is empty.
static constexpr size_t max_dst_tensors
Maximum number of dst tensors allowed for a component / component.
CLTensor * tensor
Pointer to the auxiliary tensor.
GpuKernelComponentGroup & operator=(const GpuKernelComponentGroup &)=default
Allow instances of this class to be copied.
GpuKernelComponentGroup()=default
Default constructor.
const ITensorInfo * get_tile_for_tensor(const ITensorInfo *tensor) const
Get the shared tile that can be used to store temporary data of the specified tensor.
static constexpr size_t max_fused_components
Maximum number of components that can be fused into the same component group.
std::vector< ComponentPtr >::const_iterator cbegin() const
bool is_input_tensor(const ITensorInfo *tensor) const
Check if an ITensorInfo is an input tensor of the group.
void finalize()
Optimize and pre-compute information about the component group.
Copyright (c) 2017-2024 Arm Limited.
An abstract interface of a component.
A group of gpu kernel components to be fused together PRECONDITIONS:
Store the tensor's metadata.
size_t size() const
Get the number of components within the group.
bool add_component(ComponentPtr component)
Add a component pointer into the group If the operation fails, then no change is made to the group.