ONE - On-device Neural Engine
|
Class to handle execution phase. Simple run the sequence of operations that is sorted in topological order. More...
#include <LinearExecutor.h>
Public Member Functions | |
LinearExecutor (std::unique_ptr< compiler::LoweredGraph > lowered_graph, backend::BackendContexts &&backend_contexts, const compiler::TensorRegistries &tensor_regs, compiler::CodeMap &&code_map, const std::vector< ir::OperationIndex > &order, const util::TracingCtx *tracing_ctx) | |
Construct a new LinearExecutor object. | |
void | executeImpl (const ExecutionObservee &subject) override |
Public Member Functions inherited from onert::exec::ExecutorBase | |
ExecutorBase (std::unique_ptr< compiler::LoweredGraph > &&lowered_graph, backend::BackendContexts &&backend_contexts, const compiler::TensorRegistries &tensor_regs, const util::TracingCtx *tracing_ctx) | |
Construct a new ExecutorBase object. | |
virtual | ~ExecutorBase ()=default |
const ir::Graph & | graph () const final |
Returns graph object. | |
void | execute (const std::vector< backend::IPortableTensor * > &inputs, const std::vector< backend::IPortableTensor * > &outputs, const ExecutionOptions &options) override |
Execute with given input/output tensors. | |
uint32_t | inputSize () const override |
Get input size. | |
uint32_t | outputSize () const override |
Get output size. | |
const ir::OperandInfo & | inputInfo (uint32_t index) const override |
Get input info at index. | |
const ir::OperandInfo & | outputInfo (uint32_t index) const override |
Get output info at index. | |
ir::Layout | inputLayout (uint32_t index) const override |
Get input layout at index. | |
ir::Layout | outputLayout (uint32_t index) const override |
Get output layout at index. | |
void | setIndexedRanks (std::shared_ptr< ir::OperationIndexMap< int64_t > > ranks) final |
Set an ordering on operations. | |
void | addObserver (std::unique_ptr< IExecutionObserver > ref) |
backend::BackendContexts & | getBackendContexts () |
const ExecutionOptions & | currentOptions () const override |
Return current execution configuration. | |
Public Member Functions inherited from onert::exec::IExecutor | |
IExecutor ()=default | |
Construct a new IExecutor object. | |
virtual | ~IExecutor ()=default |
Destroy the IExecutor object. | |
Additional Inherited Members | |
Protected Member Functions inherited from onert::exec::ExecutorBase | |
bool | hasDynamicInput () |
Returns true if any input tensor is dynamic; false if all are static tensors. | |
Protected Attributes inherited from onert::exec::ExecutorBase | |
ExecObservers | _observers |
std::shared_ptr< ir::OperationIndexMap< int64_t > > | _indexed_ranks |
std::unique_ptr< compiler::LoweredGraph > | _lowered_graph |
backend::BackendContexts | _backend_contexts |
const ir::Graph & | _graph |
std::vector< backend::builtin::IOTensor * > | _input_tensors |
std::vector< backend::builtin::IOTensor * > | _output_tensors |
std::mutex | _mutex |
const util::TracingCtx * | _tracing_ctx |
ExecutionOptions | _current_options |
Class to handle execution phase. Simple run the sequence of operations that is sorted in topological order.
Definition at line 40 of file LinearExecutor.h.
|
inline |
Construct a new LinearExecutor object.
lowered_graph | LoweredGraph object |
tensor_builders | Tensor builders that are currently used |
code_map | ir::Operation and its code map |
Definition at line 49 of file LinearExecutor.h.
|
overridevirtual |
Implements onert::exec::ExecutorBase.
Definition at line 27 of file LinearExecutor.cc.
References onert::exec::ExecutorBase::_graph, onert::exec::ExecutorBase::_lowered_graph, onert::exec::ExecutorBase::_tracing_ctx, onert::util::TracingCtx::getSubgraphIndex(), onert::exec::ExecutorBase::hasDynamicInput(), onert::exec::ExecutionObservee::isEmpty(), onert::exec::ExecutionObservee::notifyJobBegin(), onert::exec::ExecutionObservee::notifyJobEnd(), onert::exec::ExecutionObservee::notifySubgraphBegin(), and onert::exec::ExecutionObservee::notifySubgraphEnd().