函数:trans_tensor_desc_format

C函数原型

aclError aclTransTensorDescFormat(const aclTensorDesc *srcDesc, aclFormat dstFormat, aclTensorDesc **dstDesc)

Python函数

dstDesc, ret = acl.trans_tensor_desc_format(srcDesc, dstFormat)

函数功能

按指定dstFormat转换源aclTensorDesc中的format,生成新的目标aclTensorDesc,源aclTensorDesc中的format保持不变。同步接口。当前版本不支持该接口,预留接口。

输入说明

srcDesc:int,输入源aclTensorDesc数据的指针地址。需提前调用函数:create_tensor_desc接口创建aclTensorDesc类型。

dstFormat:int 需要设置的目标format

输出说明

dstDesc:int,输出“目标aclTensorDesc数据指针”的指针地址。需提前调用aclCreateTensorDesc接口创建aclTensorDesc类型。

返回值说明

ret:int,错误码。

  • 返回0表示成功。
  • 返回其它值表示失败。

约束说明

注意事项