model_variant_handle.py Source File#
|
SDK qb Runtime Library v1.4
MCS001-KR
|
model_variant_handle.py
Go to the documentation of this file.
Handle to a specific variant of a loaded model.
Definition model_variant_handle.py:18
None release_buffer(self, List[Buffer] buffer)
Buffer Management API.
Definition model_variant_handle.py:183
List[BufferInfo] get_output_buffer_info(self)
Returns the output buffer information for this variant.
Definition model_variant_handle.py:72
_model_variant_handle
Definition model_variant_handle.py:30
None reposition_outputs(self, List[Buffer] output_bufs, List[np.ndarray] outputs, List[List[int]] seqlens=[])
Reposition output.
Definition model_variant_handle.py:211
DataType get_model_input_data_type(self)
Returns the input buffer information for the model.
Definition model_variant_handle.py:101
NPUData acquire_input_npu_data(self, List[int] shape, int idx, bool upload, DataType dtype)
Acquires an NPUData for this variant's input at the given index.
Definition model_variant_handle.py:147
List[_Shape] get_model_input_shape(self)
Returns the input shape for this model variant.
Definition model_variant_handle.py:45
List[Scale] get_input_scale(self)
Returns the input quantization scale(s) for this variant.
Definition model_variant_handle.py:83
List[_Shape] _output_shape
Definition model_variant_handle.py:31
int get_variant_idx(self)
Returns the index of this model variant.
Definition model_variant_handle.py:37
List[_Shape] get_model_output_shape(self)
Returns the output shape for this model variant.
Definition model_variant_handle.py:53
DataType get_model_output_data_type(self)
Returns the output buffer information of the model.
Definition model_variant_handle.py:109
List[Scale] get_output_scale(self)
Returns the output quantization scale(s) for this variant.
Definition model_variant_handle.py:91
List[Buffer] acquire_input_buffer(self, List[List[int]] seqlens=[])
Buffer Management API.
Definition model_variant_handle.py:117
None reposition_inputs(self, List[np.ndarray] inputs, List[Buffer] input_bufs, List[List[int]] seqlens=[])
Reposition input.
Definition model_variant_handle.py:199
List[BufferInfo] get_input_buffer_info(self)
Returns the input buffer information for this variant.
Definition model_variant_handle.py:61
NPUData acquire_output_npu_data(self, List[int] shape, int idx, bool upload, DataType dtype)
Acquires an NPUData for this variant's output at the given index.
Definition model_variant_handle.py:166
List[Buffer] acquire_output_buffer(self, List[List[int]] seqlens=[])
Buffer Management API.
Definition model_variant_handle.py:131
A model input or output tensor that can reside on the host (CPU) or NPU.
Definition npu_data.py:29
Generated by