aclmdlGetInputSizeByIndex
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Obtains the size (in bytes) of an input based on the model description.
Prototype
size_t aclmdlGetInputSizeByIndex(aclmdlDesc *modelDesc, size_t index)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
modelDesc |
Input |
Pointer to data of the aclmdlDesc type. Call aclmdlCreateDesc to create data of the aclmdlDesc type in advance. |
index |
Input |
Sequence number of the input to obtain, indexed starting at 0. |
Returns
If dynamic batch/image size is enabled, the input size of the maximum profile is returned. In other cases, the size of the specified input is returned. The unit is byte.
Restrictions
If the input has a dynamic shape and dimension size is set to –1 (indicating a dimension size greater than or equal to 1), the input size obtained by this call is 0. The user needs to allocate memory based on the memory requested.