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

#### 产品支持情况

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


#### 头文件和库文件

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


#### 功能说明

设置指定子图构建的函数对象。


#### 函数原型

```
void SetSubgraphBuilder(const char_t *ir_name, uint32_t index, const SubgraphBuilder &builder)
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| ir\_name | 输入 | 子图名称。 |
| index | 输入 | 动态个数子图场景（子图数量不固定），标识子图的序号。 |
| builder | 输入 | 子图构建的函数对象。 |


#### 返回值说明

无。


#### 异常处理

无。


#### 约束说明

无。
