Function: get_tensor_desc_num_dims

C Prototype

size_t aclGetTensorDescNumDims(const aclTensorDesc *desc)

Python Function

size = acl.get_tensor_desc_num_dims(desc)

Function Usage

Obtains the shape dimension count specified in a tensor description.

Input Description

desc: int, pointer address of aclTensorDesc.

Call acl.create_tensor_desc to create data of the aclTensorDesc type in advance.

Return Value

size: int, number of shape dimensions in the tensor description.

If ACL_UNKNOWN_RANK(0xFFFFFFFFFFFFFFFE) is returned, the dimension count is unknown.

Restrictions

None