Function: set_attr_string
Applicable Products
- Ascend 950PR&950DT products: Supported
- Atlas A3 products: Supported
- Atlas A2 products: Supported
- Atlas 200I/500 A2 inference products: Supported
- Atlas inference products: Supported
- Atlas training products: Supported
Function
Sets the value (a scalar of the string type) of an attribute.
Prototype
-
C Prototype
aclError aclopSetAttrString(aclopAttr *attr, const char *attrName, const char* attrValue) -
Python Function
ret = acl.op.set_attr_string(attr, attr_name, attr_value)
Parameters
| Parameter | Description |
|---|---|
| attr | Int, pointer address of the data of the aclopAttr type. Call acl.op.create_attr to create data of the aclopAttr type in advance. |
| attr_name | Str, attribute name. |
| attr_value | Int, attribute value. |
Return Values
| Return Value | Description |
|---|---|
| ret | Int, error code.0: successOther values: failure |