ONE - On-device Neural Engine
|
TensorRegistry template class for the convenience of backend implementations. More...
#include <ITensorRegistry.h>
Public Member Functions | |
ITensor * | getITensor (const ir::OperandIndex &ind) override |
Returns pointer of ITensor among native and migrant tensors. | |
ITensor * | getNativeITensor (const ir::OperandIndex &ind) override |
Returns pointer of ITensor among native tensors. | |
IPortableTensor * | getPortableTensor (const ir::OperandIndex &ind) |
T_Tensor * | getNativeTensor (const ir::OperandIndex &ind) |
bool | setMigrantTensor (const ir::OperandIndex &ind, IPortableTensor *tensor) override |
Set the Migrant Tensor which are from other backends. | |
void | setNativeTensor (const ir::OperandIndex &ind, std::unique_ptr< T_Tensor > &&tensor) |
const ir::OperandIndexMap< std::unique_ptr< T_Tensor > > & | native_tensors () |
const ir::OperandIndexMap< IPortableTensor * > & | migrant_tensors () |
Public Member Functions inherited from onert::backend::ITensorRegistry | |
virtual | ~ITensorRegistry ()=default |
Deconstruct itself. | |
TensorRegistry template class for the convenience of backend implementations.
If a backend uses IPortableTensor
, and there is no special reason to implement ITensorRegistry
on your own, you may just use this default implementation.
T_Tensor | Tensor type. Must be a subclass of onert::backend::IPortableTensor . |
Definition at line 82 of file ITensorRegistry.h.
|
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 85 of file ITensorRegistry.h.
References onert::backend::PortableTensorRegistryTemplate< T_Tensor >::getNativeTensor().
|
inlineoverridevirtual |
Returns pointer of ITensor among native tensors.
Unlike getITensor
, this function only searches from native tensors
Implements onert::backend::ITensorRegistry.
Definition at line 94 of file ITensorRegistry.h.
References onert::backend::PortableTensorRegistryTemplate< T_Tensor >::getNativeTensor().
|
inline |
Definition at line 107 of file ITensorRegistry.h.
Referenced by onert::backend::PortableTensorRegistryTemplate< T_Tensor >::getITensor(), onert::backend::PortableTensorRegistryTemplate< T_Tensor >::getNativeITensor(), onert::backend::PortableTensorRegistryTemplate< T_Tensor >::getPortableTensor(), and onert::backend::basic::initSharedMemoryConsts().
|
inline |
Definition at line 96 of file ITensorRegistry.h.
References onert::backend::PortableTensorRegistryTemplate< T_Tensor >::getNativeTensor().
|
inline |
Definition at line 136 of file ITensorRegistry.h.
|
inline |
Definition at line 134 of file ITensorRegistry.h.
|
inlineoverridevirtual |
Set the Migrant Tensor which are from other backends.
Reimplemented from onert::backend::ITensorRegistry.
Definition at line 115 of file ITensorRegistry.h.
|
inline |
Definition at line 125 of file ITensorRegistry.h.