Function: get_tensor_desc_dim

Applicability

Product

Supported (√/x)

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

Function Usage

Obtains the size of a specified dimension of a tensor description.

This API will be deprecated in future releases. Use acl.get_tensor_desc_dim_v2 instead.

Prototype

  • C Prototype
    1
    int64_t aclGetTensorDescDim(const aclTensorDesc *desc, size_t index)
    
  • Python Function
    1
    dim_size = acl.get_tensor_desc_dim(desc, index)
    

Parameter Description

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_dim to obtain the dimension count.

Return Value Description

Return Value

Description

dim_size

Int, size of a specified dimension of a tensor description.