qbruntime.type.BufferInfo Class Reference#
|
SDK qb Runtime Library v1.2
MCS001-EN
|
qbruntime.type.BufferInfo Class Reference
Struct representing input/output buffer information. More...
Public Member Functions | |
| __init__ (self, int original_height=0, int original_width=0, int original_channel=0, int reshaped_height=0, int reshaped_width=0, int reshaped_channel=0, int height=0, int width=0, int channel=0, int max_height=0, int max_width=0, int max_channel=0, int max_cache_size=0) | |
| from_cpp (cls, _cQbRuntime.BufferInfo _buffer_info) | |
| int | original_height (self) |
| Height of original input/output. | |
| int | original_width (self) |
| Width of original input/output. | |
| int | original_channel (self) |
| Channel of original input/output. | |
| int | reshaped_height (self) |
| Height of reshaped input/output. | |
| int | reshaped_width (self) |
| Width of reshaped input/output. | |
| int | reshaped_channel (self) |
| Channel of reshaped input/output. | |
| int | height (self) |
| Height of NPU input/output. | |
| int | width (self) |
| Width of NPU input/output. | |
| int | channel (self) |
| Channel of NPU input/output. | |
| int | max_height (self) |
| Maximum height of original input/output if data is sequential. | |
| int | max_width (self) |
| Maximum width of original input/output if data is sequential. | |
| int | max_channel (self) |
| Maximum channel of original input/output if data is sequential. | |
| int | max_cache_size (self) |
| Maximum KV-cache size, relevant for LLM models using KV cache. | |
| original_height (self, int value) | |
| original_width (self, int value) | |
| original_channel (self, int value) | |
| reshaped_height (self, int value) | |
| reshaped_width (self, int value) | |
| reshaped_channel (self, int value) | |
| height (self, int value) | |
| width (self, int value) | |
| channel (self, int value) | |
| max_height (self, int value) | |
| max_width (self, int value) | |
| max_channel (self, int value) | |
| max_cache_size (self, int value) | |
| int | original_size (self) |
| Returns the total size of the original input/output. | |
| int | reshaped_size (self) |
| Returns the total size of the reshaped input/output. | |
| int | size (self) |
| Returns the total size of the NPU input/output. | |
| Tuple[int, int, int] | original_shape (self) |
| Tuple[int, int, int] | original_shape_chw (self) |
| Tuple[int, int, int] | reshaped_shape (self) |
| Tuple[int, int, int] | reshaped_shape_chw (self) |
| Tuple[int, int, int] | shape (self) |
| Tuple[int, int, int] | shape_chw (self) |
| __repr__ (self) | |
Protected Attributes | |
| _buffer_info = _cQbRuntime.BufferInfo() | |
Detailed Description
Constructor & Destructor Documentation
◆ __init__()
| qbruntime.type.BufferInfo.__init__ | ( | self, | |
| int | original_height = 0, | ||
| int | original_width = 0, | ||
| int | original_channel = 0, | ||
| int | reshaped_height = 0, | ||
| int | reshaped_width = 0, | ||
| int | reshaped_channel = 0, | ||
| int | height = 0, | ||
| int | width = 0, | ||
| int | channel = 0, | ||
| int | max_height = 0, | ||
| int | max_width = 0, | ||
| int | max_channel = 0, | ||
| int | max_cache_size = 0 ) |
Member Function Documentation
◆ from_cpp()
| qbruntime.type.BufferInfo.from_cpp | ( | cls, | |
| _cQbRuntime.BufferInfo | _buffer_info ) |
◆ original_height() [1/2]
| int qbruntime.type.BufferInfo.original_height | ( | self | ) |
◆ original_width() [1/2]
| int qbruntime.type.BufferInfo.original_width | ( | self | ) |
◆ original_channel() [1/2]
| int qbruntime.type.BufferInfo.original_channel | ( | self | ) |
◆ reshaped_height() [1/2]
| int qbruntime.type.BufferInfo.reshaped_height | ( | self | ) |
◆ reshaped_width() [1/2]
| int qbruntime.type.BufferInfo.reshaped_width | ( | self | ) |
◆ reshaped_channel() [1/2]
| int qbruntime.type.BufferInfo.reshaped_channel | ( | self | ) |
◆ height() [1/2]
| int qbruntime.type.BufferInfo.height | ( | self | ) |
◆ width() [1/2]
| int qbruntime.type.BufferInfo.width | ( | self | ) |
◆ channel() [1/2]
| int qbruntime.type.BufferInfo.channel | ( | self | ) |
◆ max_height() [1/2]
| int qbruntime.type.BufferInfo.max_height | ( | self | ) |
◆ max_width() [1/2]
| int qbruntime.type.BufferInfo.max_width | ( | self | ) |
◆ max_channel() [1/2]
| int qbruntime.type.BufferInfo.max_channel | ( | self | ) |
◆ max_cache_size() [1/2]
| int qbruntime.type.BufferInfo.max_cache_size | ( | self | ) |
◆ original_height() [2/2]
| qbruntime.type.BufferInfo.original_height | ( | self, | |
| int | value ) |
◆ original_width() [2/2]
| qbruntime.type.BufferInfo.original_width | ( | self, | |
| int | value ) |
◆ original_channel() [2/2]
| qbruntime.type.BufferInfo.original_channel | ( | self, | |
| int | value ) |
◆ reshaped_height() [2/2]
| qbruntime.type.BufferInfo.reshaped_height | ( | self, | |
| int | value ) |
◆ reshaped_width() [2/2]
| qbruntime.type.BufferInfo.reshaped_width | ( | self, | |
| int | value ) |
◆ reshaped_channel() [2/2]
| qbruntime.type.BufferInfo.reshaped_channel | ( | self, | |
| int | value ) |
◆ height() [2/2]
◆ width() [2/2]
◆ channel() [2/2]
◆ max_height() [2/2]
◆ max_width() [2/2]
◆ max_channel() [2/2]
◆ max_cache_size() [2/2]
| qbruntime.type.BufferInfo.max_cache_size | ( | self, | |
| int | value ) |
◆ original_size()
| int qbruntime.type.BufferInfo.original_size | ( | self | ) |
◆ reshaped_size()
| int qbruntime.type.BufferInfo.reshaped_size | ( | self | ) |
◆ size()
| int qbruntime.type.BufferInfo.size | ( | self | ) |
◆ original_shape()
| Tuple[int, int, int] qbruntime.type.BufferInfo.original_shape | ( | self | ) |
◆ original_shape_chw()
| Tuple[int, int, int] qbruntime.type.BufferInfo.original_shape_chw | ( | self | ) |
◆ reshaped_shape()
| Tuple[int, int, int] qbruntime.type.BufferInfo.reshaped_shape | ( | self | ) |
◆ reshaped_shape_chw()
| Tuple[int, int, int] qbruntime.type.BufferInfo.reshaped_shape_chw | ( | self | ) |
◆ shape()
| Tuple[int, int, int] qbruntime.type.BufferInfo.shape | ( | self | ) |
◆ shape_chw()
| Tuple[int, int, int] qbruntime.type.BufferInfo.shape_chw | ( | self | ) |
◆ __repr__()
Member Data Documentation
◆ _buffer_info
|
protected |
The documentation for this class was generated from the following file:
Generated by