---
title: SetCompileConfig
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/dfrefc_23_0048.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/dfrefc_23_0048.html
indexId: 9a85e13c7f46b3779e1d478977e3cc5ffd0d1372df3c021b93bc0415a7a0261869
---
# SetCompileConfig

#### 产品支持情况

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


#### 函数功能

设置GraphPp的json配置文件路径和文件名。配置文件用于AscendGraph的描述和编译。

返回设置好的GraphPp。


#### 函数原型

```
GraphPp &SetCompileConfig(const char_t *json_file_path)
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| json\_file\_path | 输入 | GraphPp的json配置文件路径和文件名。 GraphPp的json配置文件用于AscendGraph的描述和编译。 示例如下，参数解释请参考表1。 {"build\_option":{},"inputs\_tensor\_desc":[{"data\_type":"DT\_UINT32","shape":[3]},{"data\_type":"DT\_UINT32","shape":[3]}]} |


**表1 GraphPp的json配置文件**

| 配置项 | 可选/必选 | 描述 |
| --- | --- | --- |
| build\_option | 可选 | 值为map<string, string>, 有需要设置时参考Ascend Graph中的build\_option。 options详细描述可以参考“options参数说明(https://www.hiascend.comdocument/detail/zh/canncommercial/900/API/ascendgraphapi/atlasgeapi\_07\_0150.html)”。 |
| inputs\_tensor\_desc | 可选 | 值为list，Ascend Graph的输入节点，list元素为Tensor的描述。 |
| inputs\_tensor\_desc.data\_type | 可选 | 字符串类型。 取值为Ascend Graph中的data\_type对应字符串。 |
| inputs\_tensor\_desc.shape | 可选 | 值为整数类型的列表 取值为Ascend Graph中的shape。 |


#### 返回值

返回设置好的GraphPp。


#### 异常处理

无。


#### 约束说明

无。
