IrAttrDef

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Function Usage

Defines the IR attributes.

Structure Description

Member

Type

Description

attr_name

std::string

Attribute name.

ir_attr_type

IrAttrType

Attribute type.

attr_data_type

std::string

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
const std::map<std::string, std::string> kIrAttrTypesMap = {
    {"Int", "VT_INT"},
    {"Float", "VT_FLOAT"},
    {"String", "VT_STRING"},
    {"Bool", "VT_BOOL"},
    {"Tensor", "VT_TENSOR"},
    {"NamedAttrs", "VT_NAMED_ATTRS"},
    {"ListInt", "VT_LIST_INT"},
    {"ListFloat", "VT_LIST_FLOAT"},
    {"ListString", "VT_LIST_STRING"},
    {"ListBool", "VT_LIST_BOOL"},
    {"ListTensor", "VT_LIST_TENSOR"},
    {"Bytes", "VT_BYTES"},
    {"ListListInt", "VT_LIST_LIST_INT"},
    {"ListNamedAttrs", "VT_LIST_NAMED_ATTRS"},
    {"Type", "VT_DATA_TYPE"},
    {"ListType", "VT_LIST_DATA_TYPE"},
}

Key value in kIrAttrTypesMap.

attr_default_value

AttrValue

Default attribute value.

Constraints

None