Rate This Document
Findability
Accuracy
Completeness
Readability

Installing the KAE by Compiling Source Code

  • For details, see KAE Installation Methods in the Kunpeng Accelerator Engine User Guide.
  • The installation method varies with the KAE version and release mode. For details about the installation method, see README.md in KAE.
  1. Install KAE drivers.
    1. Obtain the KAE driver source package (version 1.3.11 is used as an example).
      1. Download the KAE driver source package using a local browser.
      2. Upload the source package to the /home/ directory on the server.

        If the server is connected to the Internet, you can run the following commands to download the source package:

        1
        2
        3
        cd /home/
        wget https://gitee.com/kunpengcompute/KAEdriver/repository/archive/v1.3.11.zip  --no-check-certificate
        mv v1.3.11.zip KAEdriver-v1.3.11.zip
        
    2. Decompress the source package.
      1
      unzip KAEdriver-v1.3.11.zip
      
    3. Install the kernel-mode driver.
      1
      2
      3
      cd /home/KAEdriver-1.3.11/kae_driver
      make
      make install
      
    4. Install the user-mode driver.
      1
      2
      3
      4
      5
      cd /home/KAEdriver-1.3.11/warpdrive
      sh autogen.sh
      ./configure
      make
      make install
      
  2. Install KAE.
    1. Obtain the KAE source package (version 1.3.11 is used as an example).
      1. Download the KAE source package using a local browser.
      2. Upload the source package to the /root directory on the server.
        If the server is connected to the Internet, you can run the following commands to download the source package:
        1
        2
        3
        cd /home/
        wget https://gitee.com/kunpengcompute/KAE/archive/refs/tags/v1.3.11.tar.gz --no-check-certificate
        mv v1.3.11.tar.gz KAE-v1.3.11.tar.gz
        
    2. Decompress the source package.
      1
      tar -zxvf KAE-v1.3.11.tar.gz
      
    3. Install the kernel-mode driver.
      1
      2
      3
      4
      5
      cd /home/KAE-1.3.11
      chmod 777 configure
      ./configure
      make
      make install
      
  3. View library files.
    1. View the user-mode library file.
      1
      ll /usr/local/lib/ | grep libwd
      

    2. View the kernel-mode library file.
      1
      ll /usr/local/lib/engines-1.1/
      

  4. Configure the environment variables.
    1. Open profile.
      1
      vi /etc/profile
      
    2. Add the following content to the file:
      1
      2
      export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
      export OPENSSL_ENGINES=/usr/local/lib/engines-1.1
      
    3. Make the environment variables take effect.
      1
      source /etc/profile
      
    4. View the environment variables.
      1
      2
      env | grep OPENSSL_ENGINES
      env | grep LD_LIBRARY_PATH
      

      To restore the environment variables, perform the following steps:

      1. Open profile.
        1
        vi /etc/profile
        
      2. Delete the following content:
        1
        2
        export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
        export OPENSSL_ENGINES="/usr/local/lib/engines-1.1"
        
      3. Make the environment variables take effect.
        1
        source /etc/profile
        
      4. Run the unset commands.
        1
        2
        unset OPENSSL_ENGINES
        unset LD_LIBRARY_PATH
        
      5. View the environment variables.
        1
        2
        env | grep OPENSSL_ENGINES
        env | grep LD_LIBRARY_PATH
        
  5. Load the drivers.
    1
    modprobe uacce
    
    1
    modprobe hisi_hpre
    
  6. Check the drivers.
    1
    2
    lsmod | grep uacce
    lsmod | grep hisi_hpre
    

  7. Check KAE devices (virtual devices).
    1
    ls /sys/class/uacce/