Tuning Workflow
During the generation of a network model, the Auto Tune tool performs tuning during operator building. The following figure shows the default tuning workflow.
- Import the third-party network model to the GE and FE for graph preparation (such as shape inference and operator selection) and graph tuning (such as fusion and constant folding).
- Start operator building. The detailed building process is as follows:
- Look up tiling policy matches in existing repositories for each layer.
- If hit:
- If either Auto Tune or REPEAT_TUNE is disabled, build the operator using the tiling policy match.
- If both Auto Tune and REPEAT_TUNE are enabled, perform tuning again.
If the tiling policy after tuning is better than the existing policies in the built-in repository and custom repository, it is saved to the custom repository and is used to build the operator.
Otherwise, no custom repository is generated, and the existing repository is directly used to build the operator.
- If missed:Check if Auto Tune is enabled.
- If Auto Tune is enabled:
If the tiling policy after tuning is better than the default tuning policy, it is saved to the custom repository and is used to build the operator.
Otherwise, the default tuning policy is stored in the custom repository and the custom repository is used to build the operator.
- If Auto Tune is not enabled, the default tuning policy is used to build the operator.
- If Auto Tune is enabled:
- If hit:
- Look up tiling policy matches in existing repositories for each layer.
- In the inference scenario, an offline model that adapts to the Ascend AI Processor is generated after build.