Vectorization Check
The tool checks vectorizable code fragments and provides modification suggestions.
Prerequisites
- /opt is the default installation directory of the tool. The following uses this directory as an example. Replace it with the actual directory.
- On the WebUI, this feature requires uploading the files or compressed package. In the IDE, the tool plugin can scan local projects. If the source code is included in a compressed package, decompress the package and select the decompressed folder.
Procedure
- On the left pane of the page, choose Affinity Analyzer > Vectorization Check and click
to create a task. See Figure 1. - Enter Source File Path in either of the following ways:
- If you want to use uploaded source code, click the text box and select a source code path from the drop-down list or manually enter a source code path.
- Click Upload on the right to upload the package or folder. (The package is automatically decompressed during the upload.)
- Only TAR, TAR.BZ, TAR.BZ2, TAR.GZ, TAR.XZ, TBZ, TBZ2, TGZ, TXZ and ZIP packages can be uploaded. Only one package can be uploaded at a time. The source package cannot exceed 1 GB, and the extracted files must be less than or equal to half of the remaining drive space.
- Only one folder can be uploaded at a time. The size of the folder must be less than or equal to half of the remaining drive space.
- Enter the compile command, for example, cd src;cmake ..;make.
- Compile commands include make, cmake, configure, shell, and shell scripts. The make install command is not supported.
- The build command or build script cannot be used to create or modify directories or files that are not in the user space (/opt/DevKit/workspace/user_name/).
- Set BC File Path using either of the following methods:
- If you want to use an uploaded BC file, click the text box and select a BC path from the drop-down list or manually enter a BC path.
- Click Upload on the right to upload the package or folder. (The package is automatically decompressed during the upload.)
- For details about the BC file and how to obtain it, see Generating a BC File.
- Only TAR, TAR.BZ, TAR.BZ2, TAR.GZ, TAR.XZ, TBZ, TBZ2, TGZ, TXZ and ZIP packages can be uploaded. Only one package can be uploaded at a time. The source package cannot exceed 1 GB, and the extracted files must be less than or equal to half of the remaining drive space.
- Only one folder can be uploaded at a time. The size of the folder must be less than or equal to half of the remaining drive space.
- Set SVE. It is Disabled by default.
SVE is an instruction set that is used as an extension to the Armv8-A architecture. It allows for flexible vector length implementations for better binary code portability so that the binary code can run on wider SIMD units.
- Set Compiler. The options are GCC and Clang.
If SVE is not enabled, the supported compiler versions are Clang12, Clang 15, Clang 16, GCC 7, GCC 8, GCC 9, and GCC10. If SVE is enabled, the supported compiler versions are Clang 15, Clang 16, GCC 9, and GCC 10.
Click Check. After the check is complete, the check report page is displayed. See Figure 2.
- You can click
to sort the source files to be modified by path or number of recommended items. - In the upper right corner of the page, you can click Download Report. Then click Download Report (.csv) or Download Report (.html) to download the analysis report. Alternatively, you can click
next to the task name and click Download Report (.csv) or Download Report (.html) to download the analysis report.
Table 1 Parameters in the report Parameter
Description
Source File Statistics
Files to Modify
Total number of files to be modified in the source file path.
Code Lines to Modify
Number of code lines to be modified.
Total Number of Suggestions
Total number of items recommended for modification. Modify these items to enhance application performance on the Kunpeng platform.
Source Files to Modify
Source files to be modified and suggestions for each file. You can click View Suggested Source Code in the Operation column to quickly go to the source file suggestion page.
- You can click
- If the check result suggests that there are source files need to be modified, click View Suggested Source Code in the Operation column. See Figure 3. For details about the modification suggestion for vectorizing source code, see Suggestions for Vectorizing Source Code.
- The tool supports concurrent running of multiple vectorization check tasks.
- To cancel a task, click Close during the task running process.
- To modify the configuration of a successful or failed task, click
on the right of the task name to restart the task. - You can click the arrow keys in the upper right corner of Original Source Code to view the code.
- If the check fails or the check result indicates that no modification is required, an empty report is generated.


