ONE - On-device Neural Engine
|
#include <ITensorRegistry.h>
Public Types | |
using | TrainingTensors = std::tuple< TrainableTensor *, GradientTensor * > |
Public Member Functions | |
ITensor * | getITensor (const ir::OperandIndex &index) override |
Returns pointer of ITensor among native and migrant tensors. | |
ITensor * | getNativeITensor (const ir::OperandIndex &index) override |
Returns pointer of ITensor among native tensors. | |
ITensor * | getBackPropITensor (const ir::OperandIndex &index) override |
Returns pointer of ITensor for back propatation. | |
ITensor * | getGradientITensor (const ir::OperandIndex &index) override |
Returns pointer of ITensor for gradient. | |
void | iterateTrainableTensors (const std::function< void(const ir::OperandIndex &, const train::ITrainableTensor *)> &fn) const override |
Iterate ITrainableTensors with fn. | |
IPortableTensor * | getPortableTensor (const ir::OperandIndex &index) |
Tensor * | getNonConstTensor (const ir::OperandIndex &index) |
TrainableTensor * | getTrainableTensor (const ir::OperandIndex &index) |
BackPropTensor * | getBackPropTensor (const ir::OperandIndex &index) |
GradientTensor * | getGradientTensor (const ir::OperandIndex &index) |
TrainingTensors | getTrainingTensors (const ir::OperandIndex &index) |
bool | setMigrantTensor (const ir::OperandIndex &index, IPortableTensor *tensor) override |
Set the Migrant Tensor which are from other backends. | |
void | setNonConstTensor (const ir::OperandIndex &index, std::unique_ptr< Tensor > tensor) |
void | setTrainableTensor (const ir::OperandIndex &index, std::unique_ptr< TrainableTensor > tensor) |
void | setBackPropTensor (const ir::OperandIndex &index, std::unique_ptr< BackPropTensor > tensor) |
void | setGradientTensor (const ir::OperandIndex &index, std::unique_ptr< GradientTensor > tensor) |
const ir::OperandIndexMap< std::unique_ptr< TrainableTensor > > & | trainable_tensors () |
const ir::OperandIndexMap< std::unique_ptr< Tensor > > & | nonconst_tensors () |
const ir::OperandIndexMap< std::unique_ptr< Tensor > > & | back_prop_tensors () |
const ir::OperandIndexMap< std::unique_ptr< GradientTensor > > & | gradient_tensors () |
Public Member Functions inherited from onert::backend::ITensorRegistry | |
virtual | ~ITensorRegistry ()=default |
Deconstruct itself. | |
Definition at line 82 of file ITensorRegistry.h.
using onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::TrainingTensors = std::tuple<TrainableTensor *, GradientTensor *> |
Definition at line 85 of file ITensorRegistry.h.
|
inline |
Definition at line 239 of file ITensorRegistry.h.
|
inlineoverridevirtual |
Returns pointer of ITensor for back propatation.
Implements onert::backend::train::ITensorRegistry.
Definition at line 104 of file ITensorRegistry.h.
|
inline |
Definition at line 150 of file ITensorRegistry.h.
Referenced by onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::getBackPropITensor().
|
inlineoverridevirtual |
Returns pointer of ITensor for gradient.
Implements onert::backend::train::ITensorRegistry.
Definition at line 109 of file ITensorRegistry.h.
|
inline |
Definition at line 158 of file ITensorRegistry.h.
Referenced by onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::getGradientITensor(), and onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::getTrainingTensors().
|
inlineoverridevirtual |
Returns pointer of ITensor among native and migrant tensors.
Native Tensor is a tensor that is managed by this backend Migrant Tensor is a tensor that is imported from another backend
Implements onert::backend::ITensorRegistry.
Definition at line 88 of file ITensorRegistry.h.
Referenced by onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::setMigrantTensor(), onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::setNonConstTensor(), and onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::setTrainableTensor().
|
inlineoverridevirtual |
Returns pointer of ITensor among native tensors.
Unlike getITensor
, this function only searches from native tensors
Implements onert::backend::ITensorRegistry.
Definition at line 96 of file ITensorRegistry.h.
References onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::getNonConstTensor(), and onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::getTrainableTensor().
Referenced by onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::getITensor().
|
inline |
Definition at line 133 of file ITensorRegistry.h.
Referenced by onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::getNativeITensor(), and onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::getPortableTensor().
|
inline |
Definition at line 122 of file ITensorRegistry.h.
|
inline |
Definition at line 141 of file ITensorRegistry.h.
Referenced by onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::getNativeITensor(), and onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::getTrainingTensors().
|
inline |
Definition at line 166 of file ITensorRegistry.h.
References onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::getGradientTensor(), and onert::backend::train::PortableTensorRegistryTemplate< Tensor, TrainableTensor, BackPropTensor, GradientTensor >::getTrainableTensor().
|
inline |
Definition at line 240 of file ITensorRegistry.h.
|
inlineoverridevirtual |
Iterate ITrainableTensors with fn.
fn | function to be called with OperandIndex and a pointer to ITrainableTensor |
Implements onert::backend::train::ITensorRegistry.
Definition at line 114 of file ITensorRegistry.h.
|
inline |
Definition at line 238 of file ITensorRegistry.h.
|
inline |
Definition at line 212 of file ITensorRegistry.h.
|
inline |
Definition at line 223 of file ITensorRegistry.h.
|
inlineoverridevirtual |
Set the Migrant Tensor which are from other backends.
Reimplemented from onert::backend::ITensorRegistry.
Definition at line 181 of file ITensorRegistry.h.
|
inline |
Definition at line 192 of file ITensorRegistry.h.
|
inline |
Definition at line 202 of file ITensorRegistry.h.
|
inline |
Definition at line 234 of file ITensorRegistry.h.