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

#### 产品支持情况

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


#### 功能说明

用户可调用本接口设置对应的编译选项，该选项为进程级全局共享。在算子或模型编译前，调用本接口设置编译选项，在编译时，以当前的编译选项为准，一次编译过程中不会变更。


#### 函数原型

```
aclError aclSetCompileopt(aclCompileOpt opt, const char *value)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| opt | 输入 | 编译选项。类型定义请参见aclCompileOpt。 |
| value | 输入 | 编译选项具体值的指针。 |


#### 返回值说明

返回0表示成功，返回其他值表示失败，请参见aclError。
