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

#### 产品支持情况

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


#### 功能说明

根据模型中的输出名称获取对应输出的索引编号。


#### 函数原型

```
aclError aclmdlGetOutputIndexByName(const aclmdlDesc *modelDesc, const char *name, size_t *index)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| modelDesc | 输入 | aclmdlDesc类型的指针。 需提前调用aclmdlCreateDesc接口创建aclmdlDesc类型的数据。 |
| name | 输入 | 输出名称的指针。 |
| index | 输出 | 输出的索引编号的指针。 |


#### 返回值说明

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