ONE - On-device Neural Engine
|
Class to infer shape before running kernels. It does the following: More...
#include <StaticShapeInferer.h>
Public Member Functions | |
StaticShapeInferer (compiler::ILoweredGraph *lowered_subg) | |
virtual | ~StaticShapeInferer ()=default |
void | appendSubgInputObserver (const ir::SubgraphIndex &subg_idx, std::unique_ptr< OperandObserver > &&subg_input_observer) noexcept |
void | setControlflowOutputObserver (std::unique_ptr< OperandObserver > &&output_observer) noexcept |
void | appendChildInferer (const ir::SubgraphIndex &subg_idx, compiler::StaticShapeInferer *inferer) |
void | infer (void) |
Infer shape of operands belonging to ops and set the output shape. If output shape cannot be known without running op, mark it so that it can be allocated when running kernel. | |
void | dump () |
![]() | |
virtual | ~OperationVisitor ()=default |
Static Public Member Functions | |
static std::unordered_map< ir::SubgraphIndex, std::unique_ptr< StaticShapeInferer > > | createStaticShapeInferers (const std::unordered_map< ir::SubgraphIndex, ILoweredGraph * > &lowered_subgs) |
Create a shape inferer map for a lowered model. | |
Class to infer shape before running kernels. It does the following:
Definition at line 66 of file StaticShapeInferer.h.
|
inline |
Definition at line 69 of file StaticShapeInferer.h.
|
virtualdefault |
|
inline |
Definition at line 88 of file StaticShapeInferer.h.
Referenced by createStaticShapeInferers().
|
inlinenoexcept |
Definition at line 77 of file StaticShapeInferer.h.
|
static |
Create a shape inferer map for a lowered model.
[in] | lowered_subgs | lowered model map |
Definition at line 192 of file StaticShapeInferer.cc.
References appendChildInferer(), onert::ir::IOperation::getOutputs(), and onert::ir::IOperation::opcode().
void onert::compiler::StaticShapeInferer::dump | ( | ) |
Definition at line 167 of file StaticShapeInferer.cc.
References onert::compiler::ILoweredGraph::graph(), onert::ir::Operand::info(), onert::ir::OperandInfo::isDynamic(), onert::util::ObjectManager< Index, Object >::iterate(), onert::ir::Graph::operands(), onert::ir::OperandInfo::shape(), and VERBOSE.
void onert::compiler::StaticShapeInferer::infer | ( | void | ) |
Infer shape of operands belonging to ops and set the output shape. If output shape cannot be known without running op, mark it so that it can be allocated when running kernel.
Definition at line 56 of file StaticShapeInferer.cc.
References onert::util::ObjectManager< Index, Object >::at(), onert::compiler::ILoweredGraph::graph(), onert::ir::Graph::operations(), onert::compiler::ILoweredGraph::setHasDynamicTensor(), and onert::ir::Graph::topolSortOperations().
|
inlinenoexcept |
Definition at line 83 of file StaticShapeInferer.h.