ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::exec::IExecutors Class Referenceabstract

Class to gather NN package's executor set. More...

#include <IExecutors.h>

Public Member Functions

virtual ~IExecutors ()=default
 Virtual IExecutors destructor.
 
virtual void emplace (const ir::ModelIndex &model_index, const ir::SubgraphIndex &subg_index, std::unique_ptr< IExecutor > exec)=0
 Insert executor in executor set.
 
virtual IExecutorat (const ir::ModelIndex &model_index, const ir::SubgraphIndex &subg_index) const =0
 Return executor of index.
 
IExecutorentryExecutor () const
 
virtual uint32_t inputSize () const =0
 Return executor set's number of input.
 
virtual uint32_t outputSize () const =0
 Return executor set's number of output.
 
virtual const ir::OperandInfoinputInfo (const ir::IOIndex &index) const =0
 Return NN package input tensor info.
 
virtual const ir::OperandInfooutputInfo (const ir::IOIndex &index) const =0
 Return NN package output tensor info.
 
virtual void execute (const ExecutionContext &ctx)=0
 Execute NN package executor set.
 

Detailed Description

Class to gather NN package's executor set.

Definition at line 30 of file IExecutors.h.

Constructor & Destructor Documentation

◆ ~IExecutors()

virtual onert::exec::IExecutors::~IExecutors ( )
virtualdefault

Virtual IExecutors destructor.

Note
Require derived class destructor

Member Function Documentation

◆ at()

virtual IExecutor * onert::exec::IExecutors::at ( const ir::ModelIndex model_index,
const ir::SubgraphIndex subg_index 
) const
pure virtual

Return executor of index.

Parameters
[in]model_indexModel index
[in]subg_indexSubgraph index
Returns
Executor

Implemented in onert::exec::MultiModelExecutors, onert::exec::SingleModelExecutors, and onert::exec::train::TrainableExecutors.

Referenced by entryExecutor(), onert::backend::builtin::kernel::IfLayer::run(), and onert::backend::builtin::kernel::WhileLayer::run().

◆ emplace()

virtual void onert::exec::IExecutors::emplace ( const ir::ModelIndex model_index,
const ir::SubgraphIndex subg_index,
std::unique_ptr< IExecutor exec 
)
pure virtual

Insert executor in executor set.

Parameters
[in]model_indexModel index
[in]subg_indexSubgraph index
[in]execExecutor to insert

Implemented in onert::exec::MultiModelExecutors, onert::exec::SingleModelExecutors, and onert::exec::train::TrainableExecutors.

◆ entryExecutor()

IExecutor * onert::exec::IExecutors::entryExecutor ( ) const
inline

Definition at line 60 of file IExecutors.h.

60{ return at(ir::ModelIndex{0}, ir::SubgraphIndex{0}); }
virtual IExecutor * at(const ir::ModelIndex &model_index, const ir::SubgraphIndex &subg_index) const =0
Return executor of index.
::onert::util::Index< uint16_t, ModelIndexTag > ModelIndex
Definition Index.h:44
::onert::util::Index< uint16_t, SubgraphIndexTag > SubgraphIndex
Definition Index.h:41

References at().

Referenced by onert::exec::SingleModelExecutors::execute(), onert::exec::SingleModelExecutors::inputInfo(), onert::exec::SingleModelExecutors::inputSize(), onert::exec::SingleModelExecutors::outputInfo(), onert::exec::SingleModelExecutors::outputSize(), onert::backend::builtin::kernel::IfLayer::run(), and onert::backend::builtin::kernel::WhileLayer::run().

◆ execute()

virtual void onert::exec::IExecutors::execute ( const ExecutionContext ctx)
pure virtual

Execute NN package executor set.

Parameters
[in]ctxExecution context

Implemented in onert::exec::MultiModelExecutors, onert::exec::SingleModelExecutors, and onert::exec::train::TrainableExecutors.

◆ inputInfo()

virtual const ir::OperandInfo & onert::exec::IExecutors::inputInfo ( const ir::IOIndex index) const
pure virtual

Return NN package input tensor info.

Parameters
[in]indexInput index
Returns
Tensor info

Implemented in onert::exec::MultiModelExecutors, onert::exec::SingleModelExecutors, and onert::exec::train::TrainableExecutors.

◆ inputSize()

virtual uint32_t onert::exec::IExecutors::inputSize ( ) const
pure virtual

Return executor set's number of input.

Returns
Number of input

Implemented in onert::exec::MultiModelExecutors, onert::exec::SingleModelExecutors, and onert::exec::train::TrainableExecutors.

◆ outputInfo()

virtual const ir::OperandInfo & onert::exec::IExecutors::outputInfo ( const ir::IOIndex index) const
pure virtual

Return NN package output tensor info.

Parameters
[in]indexOutput index
Returns
Tensor info

Implemented in onert::exec::MultiModelExecutors, onert::exec::SingleModelExecutors, and onert::exec::train::TrainableExecutors.

◆ outputSize()

virtual uint32_t onert::exec::IExecutors::outputSize ( ) const
pure virtual

Return executor set's number of output.

Returns
Number of output

Implemented in onert::exec::MultiModelExecutors, onert::exec::SingleModelExecutors, and onert::exec::train::TrainableExecutors.


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