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

#include <KernelGenerator.h>

Collaboration diagram for onert::backend::acl_cl::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 33 of file KernelGenerator.h.

Constructor & Destructor Documentation

◆ KernelGenerator()

onert::backend::acl_cl::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 46 of file KernelGenerator.cc.

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

Member Function Documentation

◆ generate()

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

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

Definition at line 55 of file KernelGenerator.cc.

56{
57 auto ret = std::make_unique<exec::FunctionSequence>();
58 ret->enableDynamicShapeInferer(false);
59
60 const auto &op = _graph.operations().at(ind);
61 op.accept(*this);
62 ret->append(releaseFunction());
63 return ret;
64}
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: