aclmdlGetOutputDims
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Obtains the dimension information of an output tensor based on the model description.
In the static-shape scenario, this API is used to obtain the dimension information of the output tensor of a model.
In the dynamic-shape scenario, this API is used to obtain the dimension information of the maximum batch/image size profile.
Prototype
aclError aclmdlGetOutputDims(const aclmdlDesc *modelDesc, size_t index, aclmdlIODims *dims)
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 |
Index of the output whose dimension is to be obtained, indexed from 0. |
dims |
Output |
Pointer to the output dimension information. For details about the type definition, see aclmdlIODims. If the length of a tensor name exceeds 127, the system replaces it with the format acl_modelId_${id}_output_${index}_${random string} when outputting dims.name. If the converted name conflicts with an existing tensor name, a random string (_${random string}) is appended; otherwise, no random string is added. The system also maintains a mapping between the converted and original names. You can call aclmdlGetTensorRealName to retrieve the original name by passing the converted one (or simply pass the original name to get it back unchanged). For a tensor name that has a length of 127 or fewer, dims.name directly reflects the original tensor name. |
Returns
0 on success; else, failure. For details, see aclError.