Rate This Document
Findability
Accuracy
Completeness
Readability

Vectorization Check

The tool checks vectorizable code fragments and provides modification suggestions.

Prerequisites

You have logged in to the Kunpeng DevKit.
  • /opt/DevKit is the default installation directory of the tool. The following uses this directory as an example. Replace it with the actual directory.
  • To perform a 64-bit running mode check on the WebUI, you need to manually upload files or compressed packages. In the IDE, you can simply scan local projects to run the check.

Procedure

  1. On the left pane of the page, choose Affinity Analyzer > Vectorization Check and click to create a task. See Figure 1.
    Figure 1 Vectorization check
  2. 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.
  3. 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/).
  4. 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.)
    • 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.
  5. 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.

  6. Set Compiler. The options are GCC and Clang.

    If SVE is not enabled, the supported compiler versions are Clang12, Clang 15, GCC 7, GCC 8, GCC 9, and GCC10. If SVE is enabled, the supported compiler versions are Clang 15, GCC 9, and GCC 10.

    Click Check. After the check is complete, the check report page is displayed. See Figure 2.

    Figure 2 Vectorization check report
    • You can click to sort the source files to be modified by path or number of recommended modifications.
    • You can click Download Report (.csv) or Download Report (.html) to download the report to your local PC.
  7. 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.
    Figure 3 Source code modification suggestion
    • The tool supports concurrent running of multiple vectorization check tasks.
    • To cancel a task, click Close during the task running process.
    • 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.