aclgrphSetOpAttr

Description

Sets node attributes to modify a graph.

Prototype

graphStatus aclgrphSetOpAttr(Graph &graph, aclgrphAttrType attr_type, const char_t *cfg_path);

Restrictions

None

Parameters

Parameter

Input/Output

Description

graph

Input/Output

Input: graph to be modified by setting attributes.

Output: modified graph.

attr_type

Input

The enumeration of attr_type is defined as follows:

enum aclgrphAttrType { ATTR_TYPE_KEEP_DTYPE = 0, ATTR_TYPE_WEIGHT_COMPRESS };

ATTR_TYPE_KEEP_DTYPE: preserves the computing precision of certain operators at model build time.

ATTR_TYPE_WEIGHT_COMPRESS: compresses weights for certain operators at model build time.

cfg_path

Output

Configuration file path. Example configuration files:

To preserve the computing precision:

Opname1
Opname2
...

To compress weight:

Opname1;Opname2

Returns

Parameter

Type

Description

-

graphStatus

0 on success;

else, failure.