Tensor handler to wrap and handle tensor allocations on workspace buffers.
More...
#include <ClAuxTensorHandler.h>
Tensor handler to wrap and handle tensor allocations on workspace buffers.
- Note
- About memory handling using bypass_* flags See arm_compute::cpu::CpuAuxTensorHandler
Definition at line 43 of file ClAuxTensorHandler.h.
◆ CLAuxTensorHandler() [1/3]
Create a temporary tensor handle, by either important an existing tensor from a tensor pack, or allocating a new one.
- Parameters
-
[in] | slot_id | Slot id of the tensor to be retrieved in the tensor pack If no such tensor exists in the tensor pack, a new tensor will be allocated. |
[in] | info | Tensor info containing requested size of the new tensor. If requested size is larger than the tensor retrieved from the tensor pack, a new tensor will be allocated. |
[in,out] | pack | Tensor pack to retrieve the old tensor. When pack_inject is true, the new tensor will also be added here. |
[in] | pack_inject | In case of a newly allocated tensor, whether to add this tensor back to the pack |
[in] | bypass_alloc | Bypass allocation in case of a new tensor This is to prevent unnecessary memory operations when the handler object is not used |
[in] | bypass_import | Bypass importation in case of a retrieved tensor This is to prevent unnecessary memory operations when the handler object is not used |
Definition at line 65 of file ClAuxTensorHandler.h.
73 if (
info.total_size() == 0)
79 ICLTensor *packed_tensor = utils::cast::polymorphic_downcast<ICLTensor *>(
pack.
get_tensor(slot_id));
80 if ((packed_tensor ==
nullptr) || (
info.total_size() > packed_tensor->info()->total_size()))
91 _injected_tensor_pack = &
pack;
92 _injected_slot_id = slot_id;
References ITensorPack::add_tensor(), CLTensorAllocator::allocate(), CLTensor::allocator(), ARM_COMPUTE_LOG_INFO_WITH_FUNCNAME_ACL, ICLTensor::cl_buffer(), ITensorPack::get_tensor(), CLTensorAllocator::import_memory(), ITensor::info(), arm_compute::test::validation::info, arm_compute::test::validation::pack, ITensorAllocator::soft_init(), and ITensorInfo::total_size().
◆ CLAuxTensorHandler() [2/3]
◆ CLAuxTensorHandler() [3/3]
◆ ~CLAuxTensorHandler()
◆ get()
Definition at line 136 of file ClAuxTensorHandler.h.
Referenced by ClFullyConnected::prepare(), ClGemmLowpMatrixMultiplyCore::prepare(), ClGemm::prepare(), ClWinogradConv2d::prepare(), ClGemmConv2d::prepare(), ClSoftmax::run(), ClIndirectConv2d::run(), ClFullyConnected::run(), ClGemmLowpMatrixMultiplyCore::run(), ClGemm::run(), ClWinogradConv2d::run(), and ClGemmConv2d::run().
◆ operator()()
◆ operator=()
The documentation for this class was generated from the following file: