Rate This Document
Findability
Accuracy
Completeness
Readability

Installing KAIL

This section describes how to install KAIL using an RPM package and verify the installation. If you use parameters that are supported by the RPM package management tool but not described in this document, undefined behaviors may be introduced. Exercise caution when performing this operation.

Procedure

  1. Obtain the KAIL software package based on Obtaining the Software Package and decompress it to obtain the binary RPM package.
  2. Install KAIL.
    1
    rpm -ivh boostcore-kdnn-xxxx.aarch64.rpm
    

    After the installation is complete, the directories of the header file, static library, and dynamic library of the KAIL are /usr/local/kdnn/include, /usr/local/kdnn/lib/threadpool, and /usr/local/kdnn/lib/omp, respectively.

    In the preceding command, xxxx indicates the version number.

Verifying the Installation

Verifying KDNN

  1. Run the source command or log in to the terminal again for the environment variables to take effect.
    1
    source /etc/profile
    
  2. Check whether the environment variable LD_LIBRARY_PATH contains the installation path /usr/local/kdnn/lib/omp of the KDNN dynamic library.
    1
    env | grep LD_LIBRARY_PATH
    

    If the variable contains the installation path, the installation is successful.

    After the installation, the corresponding files are generated in the installation path (the default path is /usr/local/kdnn). The include folder contains the header file of the sublibrary, and the lib folder contains the static and dynamic library files of KDNN.

Verifying KDNN_EXT

  1. Set the PYTHONPATH environment variable.
    • To use the single-threaded version:
      1
      export PYTHONPATH=/usr/local/kdnn/lib/extension/python39/single/:$PYTHONPATH
      
    • To use the multi-threaded version:
      1
      export PYTHONPATH=/usr/local/kdnn/lib/extension/python39/omp/:$PYTHONPATH
      
  2. Go to the Python interactive CLI and import the libkdnn_ext operator package.
    1
    2
    python
    >>> import libkdnn_ext
    

    Or

    1
    >>> from libkdnn_ext import random_choice, softmax, get_version
    

    If no error information is displayed in the command output, KDNN_EXT has been installed successfully.