ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::acl_common::AclTensorRegistry< T_AclTensorManager > Class Template Reference

Tensor registry class for acl backends. More...

#include <AclTensorRegistry.h>

Collaboration diagram for onert::backend::acl_common::AclTensorRegistry< T_AclTensorManager >:

Public Member Functions

 AclTensorRegistry (T_AclTensorManager *tensor_mgr)
 
ITensorgetITensor (const ir::OperandIndex &ind) override
 Returns pointer of ITensor among native and migrant tensors.
 
ITensorgetNativeITensor (const ir::OperandIndex &ind) override
 Returns pointer of ITensor among native tensors.
 
auto getAclTensor (const ir::OperandIndex &ind)
 
- Public Member Functions inherited from onert::backend::ITensorRegistry
virtual ~ITensorRegistry ()=default
 Deconstruct itself.
 
virtual bool setMigrantTensor (const ir::OperandIndex &, IPortableTensor *)
 Set the Migrant Tensor which are from other backends.
 

Detailed Description

template<typename T_AclTensorManager>
class onert::backend::acl_common::AclTensorRegistry< T_AclTensorManager >

Tensor registry class for acl backends.

This is implemented as a wrapper of AclTensorManager.

Definition at line 34 of file AclTensorRegistry.h.

Constructor & Destructor Documentation

◆ AclTensorRegistry()

template<typename T_AclTensorManager >
onert::backend::acl_common::AclTensorRegistry< T_AclTensorManager >::AclTensorRegistry ( T_AclTensorManager *  tensor_mgr)
inline

Definition at line 37 of file AclTensorRegistry.h.

37: _tensor_mgr{tensor_mgr} {}

Member Function Documentation

◆ getAclTensor()

template<typename T_AclTensorManager >
auto onert::backend::acl_common::AclTensorRegistry< T_AclTensorManager >::getAclTensor ( const ir::OperandIndex ind)
inline

Definition at line 43 of file AclTensorRegistry.h.

43{ return _tensor_mgr->at(ind).get(); }

◆ getITensor()

template<typename T_AclTensorManager >
ITensor * onert::backend::acl_common::AclTensorRegistry< T_AclTensorManager >::getITensor ( const ir::OperandIndex )
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

Note
Return tensor cannot be used longer than dynamic tensor manager

Implements onert::backend::ITensorRegistry.

Definition at line 39 of file AclTensorRegistry.h.

39{ return _tensor_mgr->at(ind).get(); }

Referenced by onert::backend::acl_common::AclTensorRegistry< T_AclTensorManager >::getNativeITensor().

◆ getNativeITensor()

template<typename T_AclTensorManager >
ITensor * onert::backend::acl_common::AclTensorRegistry< T_AclTensorManager >::getNativeITensor ( const ir::OperandIndex )
inlineoverridevirtual

Returns pointer of ITensor among native tensors.

Unlike getITensor , this function only searches from native tensors

Note
Returned tensor cannot be used longer than dynamic tensor manager

Implements onert::backend::ITensorRegistry.

Definition at line 41 of file AclTensorRegistry.h.

41{ return getITensor(ind); }
ITensor * getITensor(const ir::OperandIndex &ind) override
Returns pointer of ITensor among native and migrant tensors.

References onert::backend::acl_common::AclTensorRegistry< T_AclTensorManager >::getITensor().


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