Function: set_attr_string

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

Function Usage

Sets the value (a scalar of the string type) of an attribute.

Prototype

  • C Prototype
    1
    aclError aclopSetAttrString(aclopAttr *attr, const char *attrName, const char* attrValue)
    
  • Python Function
    1
    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.

Returns

Return Value

Description

ret

Int, error code.