Procedure
Preparations
Procedure
To configure the one-click performance tuning tool, perform the following steps:
- Select and open an application project.
- Choose from the menu bar. The corresponding tool page is displayed. See Figure 1.
- Select Inference Optimization on the Figure 1. The configuration page is displayed, on which you can select Remote Run or Local Run. Figure 2 uses Remote Run as an example.
Table 1 Parameters Parameter
Description
Run Mode
- Remote Run
- Local Run
Deployment
Run configuration. This parameter is mandatory and is available only when Remote Run is selected. You can use the Deployment function to synchronize the files and folders in a specified project to a specified directory on a remote device. For details, see Ascend Deployment.
Project Location
Directory for storing the .json file after analysis. The default value is ${HOME}/AscendProjects/AscendAdvisor/untitled. This parameter is mandatory and can be customized.
ONNX Location
ONNX model directory. Specify this parameter to a file suffixed with .onnx.
Environment Variables
Environment variable configuration. You need to configure the environment variables on which Python depends.
- PYTHONPATH=${PATH}/msadvisor-master:$PYTHONPATH
- LD_LIBRARY_PATH=${HOME}/python3/lib:$LD_LIBRARY_PATH
${PATH} indicates the directory for storing the ONNX model tuning repository, and ${HOME} indicates the home directory for installing Python.
Remote CANN Path
Installation path of the CANN package in the remote operating environment, available when you select the Remote Run mode. This parameter is mandatory. For example, set this parameter to Ascend-cann-toolkit_installation_path/ascend-toolkit/{version}.
KnowledgeBase Configuration
Repository configuration file ecosystem.json. The file is stored in the ONNX model tuning repository's directory, for example, ${PATH}/msadvisor-master/ecosystem/onnx_refactor/ecosystem.json.
- After the configuration is complete, click Start to start the performance bottleneck analysis by Advisor.
Figure 3 shows the analysis process. You can click Cancel to cancel the task or click Previous to reconfigure parameters.
Figure 4 shows the analysis result.
- Items marked with
do not need to be tuned. - For items marked with
, select each item and click Optimization to perform one-click performance tuning. You can click See More... to view details about the tuning item, as shown in Figure 5.
- Items marked with
- Click Optimization to perform tuning. Figure 6 shows the result.
The one-click performance tuning capability is being improved.





