函数:set_attr_bool
产品支持情况
- Ascend 950PR&950DT系列产品:支持
- Atlas A3系列产品:支持
- Atlas A2系列产品:支持
- Atlas 200I/500 A2推理产品:支持
- Atlas推理系列产品:支持
- Atlas训练系列产品:支持
功能说明
设置bool类型标量的属性值。
函数原型
-
C函数原型
aclError aclopSetAttrBool(aclopAttr *attr, const char *attrName, uint8_t attrValue) -
python函数
ret = acl.op.set_attr_bool(attr, attr_name, attr_value)
参数说明
| 参数名 | 说明 |
|---|---|
| attr | int,aclopAttr类型数据的指针地址。需提前调用acl.op.create_attr接口创建aclopAttr类型数据。 |
| attr_name | str,属性名。 |
| attr_value | int,属性值。 |
返回值说明
| 返回值 | 说明 |
|---|---|
| ret | int,错误码。 返回0表示成功。 返回其它值表示失败。 |