aclGetTensorDescDimV2
Description
Obtains the size of a tensor dimension specified in the tensor description.
Restrictions
If the aclGetTensorDescNumDims call returns ACL_UNKNOWN_RANK, it indicates that the dimension count is unknown. In this case, aclGetTensorDescDimV2 does not output the size of the specified dimension.
Prototype
aclError aclGetTensorDescDimV2(const aclTensorDesc *desc, size_t index, int64_t *dimSize)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
desc |
Input |
Pointer to data of the aclTensorDesc type. Call aclCreateTensorDesc to create data of the aclTensorDesc type in advance. |
index |
Input |
Sequence number of the dimension whose size to obtain, indexed starting at 0. Must be in the range of [0, Dimension count – 1]. Call aclGetTensorDescNumDims to obtain the dimension count. |
dimSize |
Output |
Pointer to the size of the dimension specified by index in the tensor description. If -1 is returned, the dimension size is not determinable until runtime. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.