ONE - On-device Neural Engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
onert::backend::acl_cl::Optimizer Class Reference

#include <Optimizer.h>

Public Member Functions

 Optimizer (BackendContext *context)
 
void optimize ()
 

Detailed Description

Definition at line 26 of file Optimizer.h.

Constructor & Destructor Documentation

◆ Optimizer()

onert::backend::acl_cl::Optimizer::Optimizer ( BackendContext context)

Definition at line 29 of file Optimizer.cc.

30 : _context{context},
31 _tensor_builder{std::dynamic_pointer_cast<TensorBuilder>(context->tensor_builder)}
32{
33 assert(context);
34}

Member Function Documentation

◆ optimize()

void onert::backend::acl_cl::Optimizer::optimize ( )

Definition at line 36 of file Optimizer.cc.

37{
38 // Concat elimination (build subtensor info)
39 {
40 acl_common::AclSubTensorAnalyzer sa{*_context->graph()};
41 sa.setUsePadding();
42 _context->graph()->operations().iterate(
43 [&](const ir::OperationIndex &, const ir::IOperation &op) { op.accept(sa); });
44
45 _tensor_builder->parent_map(sa.releaseParentMap());
46 }
47}
const ir::Graph * graph() const
const Operations & operations() const override
Definition Graph.h:112
void iterate(const std::function< void(const Index &, const Object &)> &fn) const
Iterate over the container with given function.
::onert::util::Index< uint32_t, OperationIndexTag > OperationIndex
Definition Index.h:30

References onert::ir::IOperation::accept(), onert::backend::BackendContext::graph(), onert::util::ObjectManager< Index, Object >::iterate(), and onert::ir::Graph::operations().


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