ONE - On-device Neural Engine
|
#include <BackendContext.h>
Public Member Functions | |
BackendContext (const Backend *backend, ContextData &&data, std::shared_ptr< ITensorRegistry > tensor_registry=nullptr, std::shared_ptr< T_TensorBuilder > tensor_builder=nullptr, std::shared_ptr< T_ConstantInitializer > constant_initializer=nullptr, std::shared_ptr< T_KernelGenerator > kernel_gen=nullptr) | |
FunctionMap | genKernels () override |
Public Member Functions inherited from onert::backend::BackendContext | |
BackendContext (const Backend *backend, ContextData &&data, std::shared_ptr< ITensorRegistry > tensor_registry=nullptr) | |
virtual | ~BackendContext ()=default |
const Backend * | backend () const |
const ir::Graph * | graph () const |
const util::Set< ir::OperandIndex > & | external_operands () const |
const ContextData & | data () const |
virtual ITensorRegistry * | genTensors ()=0 |
Data Fields | |
std::shared_ptr< T_TensorBuilder > | tensor_builder |
std::shared_ptr< T_ConstantInitializer > | constant_initializer |
std::shared_ptr< T_KernelGenerator > | kernel_gen |
Data Fields inherited from onert::backend::BackendContext | |
std::shared_ptr< ITensorRegistry > | tensor_registry |
Protected Member Functions | |
void | initConsts () |
virtual void | registerTensorInfo (const ir::OperandIndex &ind, const ir::OperandInfo &info)=0 |
void | planTensors () |
Additional Inherited Members | |
Protected Attributes inherited from onert::backend::BackendContext | |
const Backend * | _backend {nullptr} |
ContextData | _data |
Definition at line 35 of file BackendContext.h.
|
inline |
Definition at line 38 of file BackendContext.h.
|
inlineoverridevirtual |
Implements onert::backend::BackendContext.
Definition at line 49 of file BackendContext.h.
References onert::backend::BackendContext::_data, onert::backend::ContextData::graph, onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::initConsts(), onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::kernel_gen, onert::backend::ContextData::op_order, onert::exec::IFunction::prepare(), and onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::tensor_builder.
|
inlineprotected |
Definition at line 81 of file BackendContext.h.
References onert::backend::BackendContext::_data, onert::ir::IOperation::accept(), onert::util::ObjectManager< Index, Object >::at(), onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::constant_initializer, onert::backend::ContextData::external_operands, onert::backend::ContextData::graph, onert::backend::BackendContext::graph(), onert::ir::Operand::isConstant(), and onert::ir::Graph::operands().
Referenced by onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::genKernels().
|
inlineprotected |
Definition at line 102 of file BackendContext.h.
References onert::backend::BackendContext::_data, onert::ir::OperandIndexSequence::append(), onert::util::ObjectManager< Index, Object >::at(), onert::ir::DUPLICATED, onert::backend::ContextData::external_operands, onert::backend::ContextData::graph, onert::backend::BackendContext::graph(), info, onert::backend::ContextData::op_order, onert::ir::Graph::operands(), onert::ir::Graph::operations(), onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::planTensors(), onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::registerTensorInfo(), onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::tensor_builder, onert::ir::UNDEFINED, and VERBOSE.
Referenced by onert::backend::acl_common::AclBackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator, T_Optimizer >::genTensors(), and onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::planTensors().
|
protectedpure virtual |
std::shared_ptr<T_ConstantInitializer> onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::constant_initializer |
Definition at line 224 of file BackendContext.h.
Referenced by onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::initConsts().
std::shared_ptr<T_KernelGenerator> onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::kernel_gen |
Definition at line 225 of file BackendContext.h.
Referenced by onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::genKernels().
std::shared_ptr<T_TensorBuilder> onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::tensor_builder |
Definition at line 223 of file BackendContext.h.
Referenced by onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::genKernels(), onert::backend::acl_common::AclBackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator, T_Optimizer >::genTensors(), onert::backend::cl_common::BackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator >::planTensors(), and onert::backend::acl_common::AclBackendContext< T_TensorBuilder, T_ConstantInitializer, T_KernelGenerator, T_Optimizer >::registerTensorInfo().