ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::acl_neon::KernelGenerator Class Reference

#include <KernelGenerator.h>

Collaboration diagram for onert::backend::acl_neon::KernelGenerator:

Public Member Functions

 KernelGenerator (const ir::Graph &graph, const std::shared_ptr< TensorBuilder > &tensor_builder, const std::shared_ptr< acl_common::AclTensorRegistry< TensorManager > > &_tensor_reg)
 
std::unique_ptr< exec::FunctionSequencegenerate (ir::OperationIndex ind) override
 
- Public Member Functions inherited from onert::backend::basic::KernelGeneratorBase
virtual ~KernelGeneratorBase ()=default
 
 KernelGeneratorBase (const ir::Graph &graph)
 
- Public Member Functions inherited from onert::ir::OperationVisitor
virtual ~OperationVisitor ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from onert::backend::basic::KernelGeneratorBase
std::unique_ptr< exec::IFunctionreleaseFunction ()
 
- Protected Attributes inherited from onert::backend::basic::KernelGeneratorBase
const ir::Graph_graph
 
std::unique_ptr< exec::IFunction_return_fn
 

Detailed Description

Definition at line 34 of file KernelGenerator.h.

Constructor & Destructor Documentation

◆ KernelGenerator()

onert::backend::acl_neon::KernelGenerator::KernelGenerator ( const ir::Graph graph,
const std::shared_ptr< TensorBuilder > &  tensor_builder,
const std::shared_ptr< acl_common::AclTensorRegistry< TensorManager > > &  _tensor_reg 
)

Definition at line 45 of file KernelGenerator.cc.

48 : basic::KernelGeneratorBase{graph}, _ctx(graph.operands()), _operations_ctx(graph.operations()),
49 _tensor_builder(tensor_builder), _tensor_reg(tensor_reg)
50{
51 // DO NOTHING
52}

Member Function Documentation

◆ generate()

std::unique_ptr< exec::FunctionSequence > onert::backend::acl_neon::KernelGenerator::generate ( ir::OperationIndex  ind)
overridevirtual

Implements onert::backend::basic::KernelGeneratorBase.

Definition at line 54 of file KernelGenerator.cc.

55{
56 auto ret = std::make_unique<exec::FunctionSequence>();
57 ret->enableDynamicShapeInferer(false);
58
59 const auto &op = _graph.operations().at(ind);
60 op.accept(*this);
61 ret->append(releaseFunction());
62 return ret;
63}
std::unique_ptr< exec::IFunction > releaseFunction()
const Operations & operations() const override
Definition Graph.h:114
const Object & at(const Index &index) const
Get the object that is associated with the given index.

References onert::backend::basic::KernelGeneratorBase::_graph, onert::util::ObjectManager< Index, Object >::at(), onert::ir::Graph::operations(), and onert::backend::basic::KernelGeneratorBase::releaseFunction().


The documentation for this class was generated from the following files: