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
- Obtain the KAIL software package based on Obtaining the Software Package and decompress it to obtain the binary RPM package.
- Install KAIL.
1rpm -ivh boostkit-kail-xxxx.aarch64.rpm
After the installation is complete, the environment variable LD_LIBRARY_PATH is automatically added to /etc/profile, that is, the /usr/local/kail/lib directory where the KAIL dynamic library file is located.
In the preceding command, xxxx indicates the version number.
Verifying the Installation
Verifying KAIL_DNN
- Run the source command or log in to the terminal again for the environment variables to take effect.
1source /etc/profile
- Check whether the environment variable LD_LIBRARY_PATH contains the KAIL installation path /usr/local/kail/lib.
1env | 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/kail). The include folder contains the header file of the sub-library, and the lib folder contains the dynamic library file of the AI library.
Verifying KAIL_DNN_EXT
- Set the PYTHONPATH environment variable.
- To use the single-threaded version:
1export PYTHONPATH=/usr/local/kail/lib/extension/python39/single/:$PYTHONPATH
- To use the multithread version:
1export PYTHONPATH=/usr/local/kail/lib/extension/python39/omp/:$PYTHONPATH
- To use the single-threaded version:
- 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, KAIL_DNN_EXT has been installed successfully.