Using ATC for Tuning
The following is an example of the command for running the ATC tool:
atc --framework=5 \
--model=models/vit-b-16.img.fp32.bs${bs}.opt.onnx \
--output=models/vit-b-16.img.bs${bs} \
--input_format=NCHW \
--input_shape="image:${bs},3,224,224" \
--soc_version=Ascend${chip_name} \
--log=error \
--optypelist_for_implmode="Sigmoid" \
--op_select_implmode=high_performance \
--enable_small_channel \
--insert_op_conf=./insert_op.cfg
Table 1 describes the parameters in the command. For more parameters, see ATC Instructions.
Parameter |
Description |
|---|---|
--model |
Specifies the ONNX model file. |
--framework |
The value 5 indicates the ONNX model. |
--output |
Specifies the output OM model. |
--input_format |
Specifies the format of the input data. |
--input_shape |
Specifies the shape of the input data. |
--log |
Specifies the log level. |
--soc_version |
Specifies the processor model. |
--optypelist_for_implmode |
Specifies an operator. |
--op_select_implmode |
Selects the high-performance or high-precision mode. This parameter is used together with --optypelist_for_implmode. |
--enable_small_channel |
This parameter is used together with --insert_op_conf. |
--fusion_switch_file |
Disables or enables some fusion patterns. |