ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::train::TrainableBackendContext Class Referenceabstract

#include <TrainableBackendContext.h>

Public Member Functions

 TrainableBackendContext (const ITrainableBackend *backend, std::unique_ptr< TrainableContextData > &&tdata, std::shared_ptr< ITensorRegistry > tensor_registry=nullptr)
 
virtual ~TrainableBackendContext ()=default
 
const ir::train::TrainableGraphtrainable_graph () const
 
const TrainableContextDatadata () const
 
const ITrainableBackendbackend () const
 
const util::Set< ir::OperandIndex > & external_operands () const
 
const ir::OperandIndexMap< ir::Layout > & operand_layouts () const
 
std::shared_ptr< ITensorRegistrytensor_registry ()
 
virtual FunctionMap gen ()=0
 

Protected Attributes

std::unique_ptr< TrainableContextData_tdata
 
std::shared_ptr< ITensorRegistry_tensor_registry
 

Detailed Description

Definition at line 57 of file TrainableBackendContext.h.

Constructor & Destructor Documentation

◆ TrainableBackendContext()

onert::backend::train::TrainableBackendContext::TrainableBackendContext ( const ITrainableBackend backend,
std::unique_ptr< TrainableContextData > &&  tdata,
std::shared_ptr< ITensorRegistry tensor_registry = nullptr 
)
inline

Definition at line 60 of file TrainableBackendContext.h.

63 : _backend{backend}, _tdata{std::move(tdata)}, _tensor_registry{tensor_registry}
64 {
65 assert(_tdata);
66 }
std::shared_ptr< ITensorRegistry > tensor_registry()
std::shared_ptr< ITensorRegistry > _tensor_registry
std::unique_ptr< TrainableContextData > _tdata

References _tdata.

◆ ~TrainableBackendContext()

virtual onert::backend::train::TrainableBackendContext::~TrainableBackendContext ( )
virtualdefault

Member Function Documentation

◆ backend()

const ITrainableBackend * onert::backend::train::TrainableBackendContext::backend ( ) const
inline

Definition at line 73 of file TrainableBackendContext.h.

73{ return _backend; }

Referenced by CfgRunner.CfgRunner::run(), and CfgRunner.CfgRunner::set_backend().

◆ data()

const TrainableContextData * onert::backend::train::TrainableBackendContext::data ( ) const
inline

Definition at line 71 of file TrainableBackendContext.h.

71{ return _tdata.get(); }

References _tdata.

Referenced by onert::backend::train::BackendContext::gen().

◆ external_operands()

const util::Set< ir::OperandIndex > & onert::backend::train::TrainableBackendContext::external_operands ( ) const
inline

◆ gen()

virtual FunctionMap onert::backend::train::TrainableBackendContext::gen ( )
pure virtual

◆ operand_layouts()

const ir::OperandIndexMap< ir::Layout > & onert::backend::train::TrainableBackendContext::operand_layouts ( ) const
inline

Definition at line 75 of file TrainableBackendContext.h.

75{ return _tdata->operand_layouts; }

References _tdata.

◆ tensor_registry()

std::shared_ptr< ITensorRegistry > onert::backend::train::TrainableBackendContext::tensor_registry ( )
inline

◆ trainable_graph()

const ir::train::TrainableGraph * onert::backend::train::TrainableBackendContext::trainable_graph ( ) const
inline

Field Documentation

◆ _tdata

◆ _tensor_registry

std::shared_ptr<ITensorRegistry> onert::backend::train::TrainableBackendContext::_tensor_registry
protected

Definition at line 88 of file TrainableBackendContext.h.

Referenced by tensor_registry().


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