24.02.1
|
Go to the documentation of this file.
24 #ifndef ACL_SRC_DYNAMIC_FUSION_SKETCH_GPU_GPUKERNELCOMPONENTGRAPH
25 #define ACL_SRC_DYNAMIC_FUSION_SKETCH_GPU_GPUKERNELCOMPONENTGRAPH
36 namespace experimental
38 namespace dynamic_fusion
40 class IGpuKernelComponent;
72 template <
typename T,
typename... Args>
79 bool success = _dependency_graph.
add_operator(comp->id(), src_tensor_ids, dst_tensor_ids);
82 _components[comp->id()] = std::move(comp);
85 _tensors[
t->id()] =
t;
89 _tensors[
t->id()] =
t;
101 static std::vector<DependencyGraph::TensorId> get_tensor_ids(
const std::vector<const ITensorInfo *> tensors);
104 std::map<ComponentId, std::unique_ptr<IGpuKernelComponent>> _components;
105 std::map<ITensorInfo::Id, const ITensorInfo *> _tensors;
A multi-input (tensors), multi-output (tensors) acyclic directed graph of gpu kernel components Its m...
GpuKernelComponentStream fuse(const MemoryDescriptorMap &mem_map) const
Perform component fusion and serialize the graph into a stream of component groups.
This is a generic class that packs the arguments of an operator.
A linear sequence of component groups serialized from the GpuKernelComponentGraph Each component grou...
A multi-input (tensors), multi-output (tensors) acyclic directed graph Represented as a doubly-linked...
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
std::unique_ptr< IGpuKernelComponent > create(Args &&...args)
Create a new kernel component.
bool add_operator(OperatorId op, const std::vector< TensorId > &inputs, const std::vector< TensorId > &outputs, bool is_output=false)
Add a new operator Return invalid if it violates the DAG invariant Invalid operation will not change ...
GpuKernelComponentFactory & component_factory()
Get reference to component factory.
Provide context necessary for the creation and configuration of a workload e.g.
GpuKernelComponentGraph(GpuWorkloadContext *context, GpuComponentServices *services)
Constructor.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
std::vector< const T * > get_const_dst_tensors() const
Get the const ACL_DST_* tensors.
GpuKernelComponentGraph & operator=(const GpuKernelComponentGraph &graph)=delete
Prevent instances of this class from being copied.
void add_new_component(Args &&...args)
Create a new component and add it to the component graph Component id is automatically allocated.
Copyright (c) 2017-2024 Arm Limited.
Services that are used throughout the creation phase of workload code.
std::vector< const T * > get_const_src_tensors() const
Get the const ACL_SRC_* tensors.
std::map< ITensorInfo::Id, MemoryDescriptor > MemoryDescriptorMap
A map from ITensorInfo to their corresponding MemoryDescriptor.