ONE - On-device Neural Engine
|
Tensor registry class for builtin backend. More...
#include <TensorRegistry.h>
Public Member Functions | |
TensorRegistry () | |
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) |
IPortableTensor * | getNativeTensor (const ir::OperandIndex &ind) |
Tensor * | getNativeOwnTensor (const ir::OperandIndex &ind) |
IOTensor * | getNativeIOTensor (const ir::OperandIndex &ind) |
bool | setMigrantTensor (const ir::OperandIndex &ind, IPortableTensor *tensor) override |
Set the Migrant Tensor which are from other backends. | |
void | setNativeOwnTensor (ir::OperandIndex ind, std::unique_ptr< Tensor > &&tensor) |
void | setNativeIOTensor (ir::OperandIndex ind, std::unique_ptr< IOTensor > &&tensor) |
const ir::OperandIndexMap< std::unique_ptr< IOTensor > > & | native_io_tensors () |
std::shared_ptr< basic::TensorRegistry > | base_reg () |
Public Member Functions inherited from onert::backend::ITensorRegistry | |
virtual | ~ITensorRegistry ()=default |
Deconstruct itself. | |
Tensor registry class for builtin backend.
This class contains three types of tensors. Two native tensors(tensors that are managed by this backend) and the other is migrant tensor.
IOTensor
managed by this backend ( in _base_reg
)basic::Tensor
managed by this backend ( in _base_reg
)IPortableTensor
managed by other backends_base_reg
is used in implementation to reuse basic::StaticTensorManager
Definition at line 47 of file TensorRegistry.h.
|
inline |
Definition at line 50 of file TensorRegistry.h.
|
inline |
Definition at line 123 of file TensorRegistry.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 52 of file TensorRegistry.h.
References getNativeIOTensor().
Referenced by setMigrantTensor(), setNativeIOTensor(), and setNativeOwnTensor().
|
inline |
Definition at line 89 of file TensorRegistry.h.
Referenced by getITensor(), getNativeITensor(), getNativeTensor(), and getPortableTensor().
|
inlineoverridevirtual |
Returns pointer of ITensor among native tensors.
Unlike getITensor
, this function only searches from native tensors
Implements onert::backend::ITensorRegistry.
Definition at line 60 of file TensorRegistry.h.
References getNativeIOTensor().
|
inline |
Definition at line 84 of file TensorRegistry.h.
|
inline |
Definition at line 76 of file TensorRegistry.h.
References getNativeIOTensor().
|
inline |
Definition at line 68 of file TensorRegistry.h.
References getNativeIOTensor().
|
inline |
Definition at line 119 of file TensorRegistry.h.
|
inlineoverridevirtual |
Set the Migrant Tensor which are from other backends.
Reimplemented from onert::backend::ITensorRegistry.
Definition at line 97 of file TensorRegistry.h.
References getITensor().
|
inline |
Definition at line 112 of file TensorRegistry.h.
References getITensor().
|
inline |
Definition at line 105 of file TensorRegistry.h.
References getITensor().