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

#### 产品支持情况

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


#### 头文件/库文件

- 头文件：#include <graph/graph.h>
- 库文件：libgraph.so


#### 功能说明

获取Graph中已注册的所有缓存算子的名称列表。


#### 函数原型

数据类型为string的接口后续版本会废弃，建议使用数据类型为非string的接口。


```
graphStatus GetAllOpName(std::vector<std::string> &op_name) const
graphStatus GetAllOpName(std::vector<AscendString> &names) const
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| op\_name | 输出 | 返回Graph中的所有算子的名称。 |
| names | 输出 | 返回Graph中的所有算子的名称。 |


#### 返回值说明

| 参数名 | 类型 | 说明 |
| --- | --- | --- |
| \- | graphStatus | SUCCESS：操作成功 FAILED：操作失败 |


#### 约束说明

此接口为非必需接口，与AddOp搭配使用。
