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

#### 产品支持情况

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


#### 头文件/库文件

- 头文件：#include <ge/es_tensor_holder.h>
- 库文件：libeager_style_graph_builder_base.so、libeager_style_graph_builder_base_static.a


#### 功能说明

获取产生该张量的图节点。


#### 函数原型

```
GNode *GetProducer() const
```


#### 参数说明

无


#### 返回值说明

| 参数名 | 类型 | 说明 |
| --- | --- | --- |
| \- | GNode \* | 返回图节点指针。 |


#### 约束说明

无


#### 调用示例

```
auto builder = std::make_unique<ge::EsGraphBuilder>("graph");  
  auto tensor0 = builder->CreateInput(0);
  GNode *data0 = tensor0.GetProducer(); // 获取输出tensor0的节点data0
```
