函数:set_config
产品支持情况
- Ascend 950PR&950DT系列产品:支持
- Atlas A3系列产品:支持
- Atlas A2系列产品:支持
- Atlas 200I/500 A2推理产品:支持
- Atlas推理系列产品:支持
- Atlas训练系列产品:支持
功能说明
acl.prof.create_config接口的扩展接口,用于设置性能数据采集参数。
该接口支持多次调用,用户需要保证数据的一致性和准确性。
函数原型
-
C函数原型
aclError aclprofSetConfig(aclprofConfigType configType, const char *config, size_t configLength) -
python函数
ret = acl.prof.set_config(config_type, config)
参数说明
| 参数名 | 说明 |
|---|---|
| config_type | int,作为config_type参数值。每个常量表示不同采集配置,若要使用该接口下不同的选项采集多种性能数据,则需要多次调用该接口,详细说明见aclprofConfigType。 |
| config | str,配置项的参数值。 |
返回值说明
| 返回值 | 说明 |
|---|---|
| ret | int,错误码。 返回0表示成功。 返回其它值表示失败。 |
约束说明
先调用acl.prof.set_config接口再调用acl.prof.start接口,可根据需求选择调用该接口。