ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::exec::IExecutor Struct Referenceabstract

Struct to define interface of Executor. More...

#include <IExecutor.h>

Public Member Functions

 IExecutor ()=default
 Construct a new IExecutor object.
 
virtual ~IExecutor ()=default
 Destroy the IExecutor object.
 
virtual const ir::Graphgraph () const =0
 Returns graph object.
 
virtual void setIndexedRanks (std::shared_ptr< ir::OperationIndexMap< int64_t > >)=0
 Set an ordering on operations.
 
virtual void execute (const std::vector< backend::IPortableTensor * > &inputs, const std::vector< backend::IPortableTensor * > &outputs, const ExecutionOptions &options)=0
 Execute with given input/output tensors.
 
virtual uint32_t inputSize () const =0
 Get input size.
 
virtual uint32_t outputSize () const =0
 Get output size.
 
virtual const ir::OperandInfoinputInfo (uint32_t index) const =0
 Get input info at index.
 
virtual const ir::OperandInfooutputInfo (uint32_t index) const =0
 Get output info at index.
 
virtual ir::Layout inputLayout (uint32_t index) const =0
 Get input layout at index.
 
virtual ir::Layout outputLayout (uint32_t index) const =0
 Get output layout at index.
 
virtual const ExecutionOptionscurrentOptions () const =0
 Return current execution configuration.
 

Detailed Description

Struct to define interface of Executor.

Definition at line 42 of file IExecutor.h.

Constructor & Destructor Documentation

◆ IExecutor()

onert::exec::IExecutor::IExecutor ( )
default

Construct a new IExecutor object.

◆ ~IExecutor()

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

Destroy the IExecutor object.

Member Function Documentation

◆ currentOptions()

virtual const ExecutionOptions & onert::exec::IExecutor::currentOptions ( ) const
pure virtual

Return current execution configuration.

Returns
Current execution configuration

Implemented in onert::exec::ExecutorBase, and onert::exec::train::TrainableExecutor.

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

◆ execute()

virtual void onert::exec::IExecutor::execute ( const std::vector< backend::IPortableTensor * > &  inputs,
const std::vector< backend::IPortableTensor * > &  outputs,
const ExecutionOptions options 
)
pure virtual

Execute with given input/output tensors.

Input and output tensors must be given.

Parameters
[in]inputsTensors that are passed as inputs
[in]outputsTensors that are passed as outputs
[in]optionsExecution options

Implemented in onert::exec::ExecutorBase, and onert::exec::train::TrainableExecutor.

Referenced by onert::exec::SingleModelExecutors::execute(), and onert::backend::builtin::kernel::IfLayer::run().

◆ graph()

◆ inputInfo()

virtual const ir::OperandInfo & onert::exec::IExecutor::inputInfo ( uint32_t  index) const
pure virtual

Get input info at index.

Parameters
[in]indexIndex of input
Returns
Input operand info

Implemented in onert::exec::ExecutorBase, and onert::exec::train::TrainableExecutor.

Referenced by onert::exec::SingleModelExecutors::execute(), and onert::exec::SingleModelExecutors::inputInfo().

◆ inputLayout()

virtual ir::Layout onert::exec::IExecutor::inputLayout ( uint32_t  index) const
pure virtual

Get input layout at index.

Parameters
[in]indexIndex of input
Returns
Input operand layout

Implemented in onert::exec::ExecutorBase, and onert::exec::train::TrainableExecutor.

◆ inputSize()

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

◆ outputInfo()

virtual const ir::OperandInfo & onert::exec::IExecutor::outputInfo ( uint32_t  index) const
pure virtual

Get output info at index.

Parameters
[in]indexIndex of output
Returns
Output operand info

Implemented in onert::exec::ExecutorBase, and onert::exec::train::TrainableExecutor.

Referenced by onert::exec::SingleModelExecutors::execute(), and onert::exec::SingleModelExecutors::outputInfo().

◆ outputLayout()

virtual ir::Layout onert::exec::IExecutor::outputLayout ( uint32_t  index) const
pure virtual

Get output layout at index.

Parameters
[in]indexIndex of output
Returns
Output operand layout

Implemented in onert::exec::ExecutorBase, and onert::exec::train::TrainableExecutor.

◆ outputSize()

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

Get output size.

Returns
Output size

Implemented in onert::exec::ExecutorBase, and onert::exec::train::TrainableExecutor.

Referenced by onert::exec::SingleModelExecutors::outputSize().

◆ setIndexedRanks()

virtual void onert::exec::IExecutor::setIndexedRanks ( std::shared_ptr< ir::OperationIndexMap< int64_t > >  )
pure virtual

Set an ordering on operations.

Parameters
[in]ranksThe table encoding the ordering

Implemented in onert::exec::ExecutorBase, and onert::exec::train::TrainableExecutor.

Referenced by onert::compiler::Compiler::compile(), onert::compiler::MultiModelCompiler::compile(), and onert::compiler::train::TrainingCompiler::compile().


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