Function: trans_tensor_desc_format

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

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)
    

Parameters

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.

Returns

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.