Function: get_input_size_by_index
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Obtains the input size in bytes based on data of the aclmdlDesc type.
Prototype
- C Prototype
1size_t aclmdlGetInputSizeByIndex(aclmdlDesc *modelDesc, size_t index)
- Python Function
1size = acl.mdl.get_input_size_by_index(model_desc, index)
Parameter Description
Parameter |
Description |
|---|---|
model_desc |
Int, pointer address of the data of the aclmdlDesc type. Call acl.mdl.create_desc to create data of the aclmdlDesc type in advance. |
index |
Int, sequence number of the input to be obtained, starting from 0. |
Return Value Description
Return Value |
Description |
|---|---|
size |
Int, size of the input, in bytes
|
Restrictions
If the shape input by the model is dynamic and the value of the dimension is –1 (indicating that any value greater than or equal to 1 can be used for the dimension), the size obtained from this call is 0. You need to allocate the memory based on the size of the memory occupied.