函数:trans_tensor_desc_format
产品支持情况
产品 |
是否支持 |
---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
功能说明
根据指定的“dstFormat”转换“srcDesc”(输入源aclTensorDesc中)的Format,生成新的目标aclTensorDesc,源aclTensorDesc中的Format保持不变。当前版本不支持该接口,预留接口。
函数原型
- C函数原型
1
aclError aclTransTensorDescFormat(const aclTensorDesc *srcDesc, aclFormat dstFormat, aclTensorDesc **dstDesc)
- python函数
1
dst_desc, ret =acl.trans_tensor_desc_format(src_desc, dst_format)
参数说明
参数名 |
说明 |
---|---|
src_desc |
int,输入源aclTensorDesc数据的指针地址。需提前调用函数:create_tensor_desc接口创建aclTensorDesc类型。 |
dst_format |
int,需要设置的目标Format,具体请参见aclFormat。 |
返回值说明
返回值 |
说明 |
---|---|
dst_desc |
int,输出aclTensorDesc的指针地址。需提前调用函数:create_tensor_desc接口创建aclTensorDesc类型。 |
ret |
int,错误码。
|
父主题: aclmdlTensorDesc