ONE - On-device Neural Engine
|
#include <AclConstantInitializer.h>
Public Types | |
using | Initializer = std::function< void(const ir::Operand &, backend::ITensor &)> |
Public Member Functions | |
void | run () |
AclConstantInitializer (const ir::Operands &operands, const std::shared_ptr< ITensorRegistry > &tensor_reg) | |
void | registerDefaultInitializer (const ir::OperandIndex &index, const ir::Operand &obj) |
void | registerCopyInitializer (const ir::OperandIndex &index, const ir::Operand &obj) |
bool | exist (const ir::OperandIndex &ind) |
void | visit (const ir::operation::BatchToSpaceND &) override |
void | visit (const ir::operation::Conv2D &) override |
void | visit (const ir::operation::DepthwiseConv2D &) override |
void | visit (const ir::operation::FullyConnected &) override |
void | visit (const ir::operation::LSTM &) override |
void | visit (const ir::operation::RNN &) override |
void | visit (const ir::operation::TransposeConv &) override |
Public Member Functions inherited from onert::ir::OperationVisitor | |
virtual | ~OperationVisitor ()=default |
Protected Member Functions | |
void | copyInputInitialize (const ir::Operation &node, uint32_t index) |
Protected Attributes | |
const ir::Operands & | _operands |
std::shared_ptr< ITensorRegistry > | _tensor_reg |
std::unordered_map< ir::OperandIndex, Initializer > | _init_map |
Definition at line 149 of file AclConstantInitializer.h.
using onert::backend::acl_common::AclConstantInitializer::Initializer = std::function<void(const ir::Operand &, backend::ITensor &)> |
Definition at line 171 of file AclConstantInitializer.h.
onert::backend::acl_common::AclConstantInitializer::AclConstantInitializer | ( | const ir::Operands & | operands, |
const std::shared_ptr< ITensorRegistry > & | tensor_reg | ||
) |
Definition at line 26 of file AclConstantInitializer.cc.
|
protected |
Definition at line 33 of file AclConstantInitializer.cc.
References _operands, onert::util::ObjectManager< Index, Object >::at(), onert::ir::OperandIndexSequence::at(), onert::ir::Operation::getInputs(), registerCopyInitializer(), and onert::ir::OperandIndexSequence::size().
Referenced by visit(), visit(), onert::backend::acl_cl::ConstantInitializer::visit(), visit(), onert::backend::acl_cl::ConstantInitializer::visit(), onert::backend::acl_cl::ConstantInitializer::visit(), visit(), visit(), and visit().
|
inline |
Definition at line 181 of file AclConstantInitializer.h.
References _init_map.
void onert::backend::acl_common::AclConstantInitializer::registerCopyInitializer | ( | const ir::OperandIndex & | index, |
const ir::Operand & | obj | ||
) |
Definition at line 123 of file AclConstantInitializer.cc.
References _init_map.
Referenced by copyInputInitialize(), and registerDefaultInitializer().
|
inline |
Definition at line 174 of file AclConstantInitializer.h.
References registerCopyInitializer().
|
inline |
Definition at line 152 of file AclConstantInitializer.h.
References _init_map, _operands, _tensor_reg, onert::util::ObjectManager< Index, Object >::at(), and VERBOSE.
Referenced by package.infer.session::inference().
|
override |
Definition at line 45 of file AclConstantInitializer.cc.
References _init_map, _operands, onert::util::ObjectManager< Index, Object >::at(), onert::ir::OperandIndexSequence::at(), onert::ir::operation::BatchToSpaceND::BLOCK_SIZE, onert::ir::Operand::data(), onert::ir::Operation::getInputs(), and onert::ir::Operand::shape().
|
override |
Definition at line 70 of file AclConstantInitializer.cc.
References onert::ir::operation::Conv2D::BIAS, copyInputInitialize(), and onert::ir::operation::Conv2D::KERNEL.
|
override |
Definition at line 76 of file AclConstantInitializer.cc.
References onert::ir::operation::DepthwiseConv2D::BIAS, copyInputInitialize(), and onert::ir::operation::DepthwiseConv2D::KERNEL.
|
override |
Definition at line 82 of file AclConstantInitializer.cc.
References onert::ir::operation::FullyConnected::BIAS, copyInputInitialize(), and onert::ir::operation::FullyConnected::WEIGHT.
|
override |
Definition at line 88 of file AclConstantInitializer.cc.
References onert::ir::operation::LSTM::CELL_TO_FORGET_WEIGHTS, onert::ir::operation::LSTM::CELL_TO_INPUT_WEIGHTS, onert::ir::operation::LSTM::CELL_TO_OUTPUT_WEIGHTS, copyInputInitialize(), onert::ir::operation::LSTM::FORGET_GATE_BIAS, onert::ir::operation::LSTM::INPUT_GATE_BIAS, onert::ir::operation::LSTM::INPUT_TO_CELL_WEIGHTS, onert::ir::operation::LSTM::INPUT_TO_FORGET_WEIGHTS, onert::ir::operation::LSTM::INPUT_TO_INPUT_WEIGHTS, onert::ir::operation::LSTM::INPUT_TO_OUTPUT_WEIGHTS, onert::ir::operation::LSTM::OUTPUT_GATE_BIAS, onert::ir::operation::LSTM::PROJECTION_BIAS, onert::ir::operation::LSTM::PROJECTION_WEIGHTS, onert::ir::operation::LSTM::RECURRENT_TO_CELL_WEIGHTS, onert::ir::operation::LSTM::RECURRENT_TO_FORGET_WEIGHTS, onert::ir::operation::LSTM::RECURRENT_TO_INPUT_WEIGHTS, and onert::ir::operation::LSTM::RECURRENT_TO_OUTPUT_WEIGHTS.
|
override |
Definition at line 108 of file AclConstantInitializer.cc.
References onert::ir::operation::RNN::BIAS, copyInputInitialize(), onert::ir::operation::RNN::RECURRENT_WEIGHTS, and onert::ir::operation::RNN::WEIGHTS.
|
override |
Definition at line 115 of file AclConstantInitializer.cc.
References copyInputInitialize(), and onert::ir::operation::TransposeConv::KERNEL.
|
protected |
Definition at line 198 of file AclConstantInitializer.h.
Referenced by exist(), registerCopyInitializer(), run(), visit(), onert::backend::acl_cl::ConstantInitializer::visit(), onert::backend::acl_cl::ConstantInitializer::visit(), and onert::backend::acl_neon::ConstantInitializer::visit().
|
protected |
Definition at line 196 of file AclConstantInitializer.h.
Referenced by copyInputInitialize(), run(), visit(), onert::backend::acl_cl::ConstantInitializer::visit(), onert::backend::acl_cl::ConstantInitializer::visit(), and onert::backend::acl_neon::ConstantInitializer::visit().
|
protected |
Definition at line 197 of file AclConstantInitializer.h.
Referenced by run().