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

#### 产品支持情况

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


#### 功能说明

获取当前Context中的系统参数值。


#### 函数原型

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

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


#### 参数说明

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


#### 返回值说明

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


#### 约束说明

系统参数无默认值，如果不调用acl.rt.ctx_set_sys_param_opt接口设置系统参数的值，直接调用本接口获取系统参数的值，接口会返回失败。
