---
title: aclSetTensorStorageShape（废弃）
description: "须知：此接口后续版本会废弃，请使用aclSetTensorShape接口。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/aclcppdevg_03_1488.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/aclcppdevg_03_1488.html
indexId: 0f53be4daccc1af2f618339b02693539a14e82a3bd2784d66c8451e60b26bd8d72
---
# aclSetTensorStorageShape（废弃）

须知：此接口后续版本会废弃，请使用aclSetTensorShape接口。

#### 产品支持情况

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


#### 功能说明

调用aclCreateTensorDesc接口创建tensor描述信息后，可通过aclSetTensorStorageShape接口设置tensor的实际dims信息。


#### 函数原型

```
aclError aclSetTensorStorageShape(aclTensorDesc *desc, int numDims, const int64_t *dims)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| desc | 输出 | aclTensorDesc类型的指针。 需提前调用aclCreateTensorDesc接口创建aclTensorDesc类型。 |
| numDims | 输入 | 需要设置的dims维度数。 |
| dims | 输入 | dims的指针。 |


#### 返回值说明

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