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
 
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 51 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 54 of file TrainableBackendContext.h.

57 : _backend{backend}, _tdata{std::move(tdata)}, _tensor_registry{tensor_registry}
58 {
59 assert(_tdata);
60 }
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 67 of file TrainableBackendContext.h.

67{ 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 65 of file TrainableBackendContext.h.

65{ 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

◆ 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

std::unique_ptr<TrainableContextData> onert::backend::train::TrainableBackendContext::_tdata
protected

◆ _tensor_registry

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

Definition at line 81 of file TrainableBackendContext.h.

Referenced by tensor_registry().


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