---
title: aclGetTensorDescByIndex
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/aclcppdevg_03_1496.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/aclcppdevg_03_1496.html
indexId: 51cf1d6b3784e1e500587022cb3e8fb94adbe14576b62a042698310fd701bc9072
---
# aclGetTensorDescByIndex

#### 产品支持情况

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


#### 功能说明

获取算子的指定Index的tensor描述信息。


#### 函数原型

```
aclTensorDesc *aclGetTensorDescByIndex(aclTensorDesc *desc, size_t index)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| desc | 输入 | aclTensorDesc类型的指针。 调用aclmdlCreateAndGetOpDesc接口获取算子所有输入/输出的tensor描述，作为本接口的输入。 |
| index | 输入 | 指定获取第几个输入/输出的tensor描述，index值从0开始。 用户调用aclmdlCreateAndGetOpDesc接口获取的算子输入/输出的数量后，这个Index的取值范围：[0, (算子输入/输出的数量\-1)]。 |


#### 返回值说明

返回指定输入/输出的aclTensorDesc类型数据的指针。
