aclgrphSetOpAttr
Applicability
|
Product |
Supported or Not |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Header File/Library File
- Header file: #include <ge/ge_ir_build.h>
- Library file: libge_compiler.so
Function Usage
Sets node attributes to modify a graph.
Prototype
1
|
graphStatus aclgrphSetOpAttr(Graph &graph, aclgrphAttrType attr_type, const char_t *cfg_path) |
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
Restrictions
None