Installing the BiSheng Compiler

The BiSheng compiler must be installed in advance for Python, torch, and torch_npu compilation optimization.

  1. Obtain the compiler installation package from the official website of the Kunpeng community. This section uses version 4.1.0 as an example. Click here to download the package.
  2. After the download, run the following installation and configuration commands:
    # Decompress the BiSheng compiler installation package.
    tar -xvf BiShengCompiler-4.1.0-aarch64-linux.tar.gz
    
    # Configure environment variables.
    export PATH=$(pwd)/BiShengCompiler-4.1.0-aarch64-linux/bin:$PATH
    export LD_LIBRARY_PATH=$(pwd)/BiShengCompiler-4.1.0-aarch64-linux/lib:$LD_LIBRARY_PATH
  3. After the configuration is complete, run the following command to verify the installation.
    clang -v
  4. If the following version information is displayed, the configuration is successful:
    Figure 1 Information indicating that the BiSheng compiler is successfully configured