---
title: aclTransTensorDescFormat
description: "须知：本接口为预留接口，暂不支持。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/aclcppdevg_03_1487.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/aclcppdevg_03_1487.html
indexId: a33a4f8f00187d21a29d0b3e0f238e23d430c0ba6b137f6f1d1eabff2eadaf6272
---
# aclTransTensorDescFormat

须知：本接口为预留接口，暂不支持。

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |


#### 功能说明

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


#### 函数原型

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


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| srcDesc | 输入 | 源aclTensorDesc数据的指针。 需提前调用aclCreateTensorDesc接口创建aclTensorDesc类型。 |
| dstFormat | 输入 | 需要设置的目标format。类型定义请参见aclFormat(https://www.hiascend.comdocument/detail/zh/canncommercial/900/API/runtimeapi/aclcppdevg\_03\_1348.html)。 |
| dstDesc | 输出 | “目标aclTensorDesc数据指针”的指针。 需提前调用aclCreateTensorDesc接口创建aclTensorDesc类型。 |


#### 返回值说明

返回0表示成功，返回其他值表示失败，请参见aclError。
