Function: get_tensor_desc_dim_v2
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Obtains the size of a specified dimension of a tensor description.
Prototype
- C Prototype
1aclError aclGetTensorDescDimV2(const aclTensorDesc *desc, size_t index, int64_t *dimSize)
- Python Function
1dim_size, ret = acl.get_tensor_desc_dim_v2(desc, index)
Parameters
|
Parameter |
Description |
|---|---|
|
desc |
Int, pointer address of the aclTensorDesc type. Call acl.create_tensor_desc to create data of the aclTensorDesc type in advance. |
|
index |
Int, sequence number of the dimension whose size is to be obtained, starting from 0. Value range: [0, Dimension count – 1]. Call acl.get_tensor_desc_num_dims to obtain the dimension count. |
Returns
Restrictions
If the return value of acl.get_tensor_desc_num_dims is ACL_UNKNOWN_RANK(0xFFFFFFFFFFFFFFFE), the dimension count is unknown. In this case, calling acl.get_tensor_desc_dim_v2 cannot obtain the range of the specified dimension.