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

#### 产品支持情况

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


#### 头文件和库文件

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


#### 功能说明

根据子图名称和子图索引获取算子对应的动态输入子图的构建函数对象。


#### 函数原型

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


```
SubgraphBuilder GetDynamicSubgraphBuilder(const std::string &name, uint32_t index) const
SubgraphBuilder GetDynamicSubgraphBuilder(const char_t *name, uint32_t index) const
```


#### 参数说明

| 参数 | 输入/输出 | 描述 |
| --- | --- | --- |
| name | 输入 | 子图名。 |
| index | 输入 | 同名子图的索引。 |


#### 返回值说明

SubgraphBuilder对象。


#### 异常处理

无。


#### 约束说明

无。
