---
title: 函数：ctx_set_sys_param_opt
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclpythondevg_01_0972.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclpythondevg_01_0972.html
indexId: 9411f681fa15c9574521aa5afc7c3138605b58d099a8ce5278e0eebc160721ff71
---
# 函数：ctx_set_sys_param_opt

#### 产品支持情况

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


#### 功能说明

设置当前Context中的系统参数值。


#### 函数原型

- C函数原型
  1 aclError aclrtCtxSetSysParamOpt(aclSysParamOpt opt, int64_t value)

- python函数
  1 ret = acl.rt.ctx_set_sys_param_opt(opt, value)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| opt | int，系统参数，参考aclSysParamOpt。 |
| value | int，系统参数值。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| ret | int，错误码，返回0表示成功，返回其它值表示失败。 |


#### 约束说明

多次调用本接口，以最后一次设置的值为准。
