|
VART-ML
0.3.0
|
Metadata structure describing a tensor used in VART. More...
#include <vart_npu_tensor.hpp>
Public Member Functions | |
| void | print () const |
Public Attributes | |
| std::string | name |
| DataType | data_type = DataType::UNKNOWN |
| TensorDirection | direction = TensorDirection::INPUT |
| TensorType | tensor_type = TensorType::HW |
| MemoryLayout | memory_layout = MemoryLayout::UNKNOWN |
| std::vector< uint32_t > | memory_layout_order |
| size_t | size = 0 |
| size_t | size_in_bytes = 0 |
| std::vector< uint32_t > | shape |
| std::vector< uint32_t > | strides |
Metadata structure describing a tensor used in VART.
Contains various attributes used to define and manage a tensor:
| void vart::NpuTensorInfo::print | ( | ) | const |
Prints tensor metadata to standard output.
| vart::NpuTensorInfo::data_type = DataType::UNKNOWN |
Data type of the tensor elements.
| vart::NpuTensorInfo::direction = TensorDirection::INPUT |
Direction of the tensor (input or output).
| vart::NpuTensorInfo::memory_layout = MemoryLayout::UNKNOWN |
Memory layout type of the tensor.
| vart::NpuTensorInfo::memory_layout_order |
(Optional) Only relevant when memory_layout is GENERIC. Specifies the dimension permutation order for buffer data. This vector defines how dimensions are arranged compared to the reference TensorType::CPU tensor format. For example, if the TensorType::CPU format is "ABCD", memory_layout_order is {0, 1, 2, 3}; if the TensorType::HW format is "ADBC", memory_layout_order is {0, 3, 1, 2}.
| vart::NpuTensorInfo::name |
Name of the tensor.
| vart::NpuTensorInfo::shape |
Dimensions of the tensor.
| vart::NpuTensorInfo::size = 0 |
Number of elements in the tensor.
| vart::NpuTensorInfo::size_in_bytes = 0 |
Size of the tensor data in bytes.
| vart::NpuTensorInfo::strides |
Stride values for each dimension, specified in units of elements.
| vart::NpuTensorInfo::tensor_type = TensorType::HW |
Type of the tensor (CPU or HW).