--tune_ops_file

Description

Specifies the operator name or operator type in the configuration file to tune a specified operator. For details about the operators that can be specified, see Operator List. Operators that are not listed in Operator List cannot be tuned. This option is used in the following scenarios:

After profiling an .om model generated after AOE-based tuning or ATC-based conversion, you can use this option to tune a particular operator with low performance.

The name and type of the particular operator must be set to OP Name and OP Type in the .om model generated after AOE-based tuning. The OP Name and OP Type can be obtained from the tuned profile data. For details, see the Performance Tuning Tool User Guide .

See Also

None

Arguments

Argument: directory (including the name) of the configuration file of the operator.

Format: The directory (including the file name) can contain letters, digits, underscores (_), hyphens (-), periods (.), and Chinese characters.

Restrictions: The file name extension is not limited to .cfg. The file content must be in .json format. Only one file is supported.

Examples

The configuration file tune_ops_file.cfg is used as an example.

{
	"tune_ops_name":["bert/embeddings/addbert/embeddings/add_1","loss/MatMul"],
	"tune_ops_type":["Add", "Mul"]
}
  • tune_ops_name: name of the specified operator (whole word match). You can specify one or more operator names. If multiple operator names are specified, separate them with commas (,).
  • tune_ops_type: specified operator type (whole word match). You can specify one or more operator types. If multiple operator types are specified, separate them with commas (,). If a fused operator contains the specified operator type, the fused operator will also be tuned.
  • The content of the preceding configuration file must be placed in braces ({}), and the tune_ops_type and tune_ops_name configurations must be placed in square brackets ([]).
  • Either or both of tune_ops_type and tune_ops_name can exist at the same time. If both of them exist, use the union set.

Upload the configured tune_ops_file.cfg file to any directory on the server where the AOE is located. In the following command, /home/Davinci/ is used as an example.

--tune_ops_file=/home/Davinci/tune_ops_file.cfg