Function: trans_tensor_desc_format

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

Converts the format of srcDesc (in the input source aclTensorDesc) based on the specified dstFormat to generate a new target aclTensorDesc. The format in the source aclTensorDesc remains unchanged. This API is not supported in the current version and is reserved.

Prototype

  • C Prototype
    1
    aclError aclTransTensorDescFormat(const aclTensorDesc *srcDesc, aclFormat dstFormat, aclTensorDesc **dstDesc)
    
  • Python Function
    1
    dst_desc, ret =acl.trans_tensor_desc_format(src_desc, dst_format)
    

Parameter Description

Parameter

Description

src_desc

Int, pointer address of the input source aclTensorDesc data. Call Function: create_tensor_desc to create data of the aclTensorDesc type in advance.

dst_format

Int, target format to be set. For details, see aclFormat.

Return Value Description

Return Value

Description

dst_desc

Int, pointer address of the output aclTensorDesc. Call Function: create_tensor_desc to create data of the aclTensorDesc type in advance.

ret

Int, error code.