---
title: aclTransTensorDescFormat
description: "按指定dstFormat转换源aclTensorDesc中的format，生成新的目标aclTensorDesc，源aclTensorDesc中的format保持不变。同步接口。不支持该接口，预留接口。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/aadgc/aclcppdevg_03_1784.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/aadgc/aclcppdevg_03_1784.html
indexId: 81661c9921d9830b746765f488235ac64806a9a102a90ed6b6ddee09dc94b488105
---
# aclTransTensorDescFormat

#### 函数功能

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


#### 函数原型

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


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| srcDesc | 输入 | 源aclTensorDesc数据的指针。 需提前调用aclCreateTensorDesc接口创建aclTensorDesc类型。 |
| dstFormat | 输入 | 需要设置的目标format。 |
| dstDesc | 输出 | “目标aclTensorDesc数据指针”的指针。 需提前调用aclCreateTensorDesc接口创建aclTensorDesc类型。 |


#### 返回值说明

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