|
ONE - On-device Neural Engine
|
#include <EdgeTensor.h>

Public Member Functions | |
| EdgeTensor (const ir::OperandInfo &info) | |
| ~EdgeTensor ()=default | |
| uint8_t * | buffer () const override |
| void | set_dynamic () override |
| set this tensor dynamic | |
| bool | applyShape (const ir::Shape &new_shape) override |
Set the shape to shape and possibly re-allocate the buffer. | |
| void | setShape (const ir::Shape &new_shape) override |
| Set the shape of tenser to new_shape. | |
| void | allocate_buffer () |
| void | increase_ref () |
| void | decrease_ref () |
Public Member Functions inherited from onert::backend::IPortableTensor | |
| IPortableTensor (const ir::OperandInfo &info) | |
| virtual | ~IPortableTensor () |
| const ir::OperandInfo & | get_info () const |
| const ir::Sparsity * | sparsity () const |
| size_t | total_size () const override final |
| size_t | calcOffset (const ir::Coordinates &coords) const override final |
| ir::DataType | data_type () const override final |
| float | data_scale () const override final |
| int32_t | data_zero_point () const override final |
| const std::vector< float > & | data_scales () const override final |
| const std::vector< int32_t > & | data_zero_points () const override |
| bool | is_constant () const override final |
| Return true if the tensor is constant. | |
| bool | is_dynamic () const override final |
| Return true if the tensor needs dynamic allocation, meaning that during compile-time the outpus shape cannot be known and the output shape is calculated during kernel execution-time. | |
| ir::Shape | getShape () const override final |
| Get ir::Shape of tensor. | |
| bool | has_padding () const final |
| void | access (const std::function< void(ITensor &tensor)> &fn) final |
Public Member Functions inherited from onert::backend::ITensor | |
| virtual | ~ITensor () |
| virtual void | deallocBuffer () |
| Dealloc the buffer (only for dynamic tensors) | |
| virtual bool | is_subtensor () const |
| virtual bool | needMemoryMap () const |
| virtual void | enqueueWriteBuffer (const void *, bool) |
| virtual void | enqueueReadBuffer (void *, bool) |
Additional Inherited Members | |
Protected Attributes inherited from onert::backend::IPortableTensor | |
| ir::OperandInfo | _info |
Definition at line 27 of file EdgeTensor.h.
|
inline |
Definition at line 30 of file EdgeTensor.h.
|
default |
|
inline |
Definition at line 40 of file EdgeTensor.h.
References onert::backend::IPortableTensor::_info, onert::ir::OperandInfo::total_size(), and onert::backend::IPortableTensor::total_size().
|
overridevirtual |
Set the shape to shape and possibly re-allocate the buffer.
If a tensor is dynamic tensor and previously allocated memory exists, it will be deallocated. If a tensor is static tensor (with previously allocated memory by StaticTensorManager), buffer() will be overwriten
| shape | tensor's new shape. While allocating memory for this new_shape, tensor's shape is set to new_shape |
Reimplemented from onert::backend::ITensor.
Definition at line 22 of file EdgeTensor.cc.
References onert::backend::IPortableTensor::data_type(), onert::backend::IPortableTensor::get_info(), onert::backend::IPortableTensor::is_dynamic(), set_dynamic(), setShape(), onert::ir::sizeOfDataType(), onert::ir::OperandInfo::total_size(), and onert::backend::IPortableTensor::total_size().
|
inlineoverridevirtual |
Implements onert::backend::ITensor.
Definition at line 35 of file EdgeTensor.h.
|
inline |
Definition at line 49 of file EdgeTensor.h.
|
inline |
Definition at line 47 of file EdgeTensor.h.
|
inlineoverridevirtual |
set this tensor dynamic
Reimplemented from onert::backend::ITensor.
Definition at line 36 of file EdgeTensor.h.
References onert::backend::IPortableTensor::_info, and onert::ir::OperandInfo::setDynamic().
Referenced by applyShape().
|
inlineoverridevirtual |
Set the shape of tenser to new_shape.
Reimplemented from onert::backend::ITensor.
Definition at line 38 of file EdgeTensor.h.
References onert::backend::IPortableTensor::_info, and onert::ir::OperandInfo::shape().
Referenced by applyShape().